# Network Managers

<span class="TextRun SCXO38321458 BCX0" data-contrast="none" lang="EN-GB" xml:lang="EN-GB"><span class="NormalTextRun SCXO38321458 BCX0">====================================================================================</span></span>

### Ubuntu - Netplan

Before making changes to the network configuration on an Ubuntu machine, ensure that Cloud-init isn't enabled. Cloud-init is essentially Canonicals attempt at having Ubuntu servers fully configure themselves, in terms of networking, Cloud-init will force an Ubuntu machine to attempt to automatically configure it's networking

Netplan uses .yaml files for network configuration, these are stored in /etc/netplan

Check DHCP IP leases info

```
netplan ip leases interfacename
```

Changes to interfaces are made in the .yaml files, once changes have been made they need to be applied.

To test changes, use the try command. This essentially implements the change for a set amount of time, after which the change is reverted.

```
netplan try
```

You can also set a custom timeout time using the below command:

```
netplan try --timeout=15
```

To permanently apply a change, use the below command:

```
netplan apply
```

<span class="TextRun SCXO38321458 BCX0" data-contrast="none" lang="EN-GB" xml:lang="EN-GB"><span class="NormalTextRun SCXO38321458 BCX0">====================================================================================</span></span>

### <span class="TextRun SCXO38321458 BCX0" data-contrast="none" lang="EN-GB" xml:lang="EN-GB"><span class="NormalTextRun SCXO38321458 BCX0">RHEL - nmcli</span></span>

<span class="TextRun SCXO38321458 BCX0" data-contrast="none" lang="EN-GB" xml:lang="EN-GB"><span class="NormalTextRun SCXO38321458 BCX0">Network configuration files are stored in /etc/syconfig/network-scripts. Files stored within this directory shouldn't really be edited - these are used for functionality of the ifconfig command, rather than being the interface configuration itself.</span></span>

#### <span class="TextRun SCXO38321458 BCX0" data-contrast="none" lang="EN-GB" xml:lang="EN-GB"><span class="NormalTextRun SCXO38321458 BCX0">Viewing network configuration</span></span>

<span class="TextRun SCXO38321458 BCX0" data-contrast="none" lang="EN-GB" xml:lang="EN-GB"><span class="NormalTextRun SCXO38321458 BCX0">View interface connections</span></span>

```
nmcli connection show
```

View interface device status

```
nmcli device status
```

View network device configuration

```
nmcli device show devicename
```

#### Editing network settings &amp; configuration

##### Edit connection settings

```
nmcli connection edit connectionname
```

From here, you can edit any of the settings shown in the 'nmcli device show devicename' command

As an example, the below could be used to change the default gateway IP

```
set ipv4.gateway 10.0.0.2
```

You would then want to save changes, you're given the option to trial the change or save it permanently

```
save persistent
```

or

```
save temporary
```

The above uses the nmcli cli to make changes, you can also format commands as below to make changes without entering the dedicated cli:

Add an additional IP to a connection

```
nmcli connection modify connectionname ipv4.addresses oldIP, newIP
```

##### <span class="TextRun SCXO38321458 BCX0" data-contrast="none" lang="EN-GB" xml:lang="EN-GB"><span class="NormalTextRun SCXO38321458 BCX0">Delete a connection</span></span>

```
nmcli connection delete connectionname
```

Once changes have been made via nmcli, the interface will need restarting

```
nmcli connection down

nmcli connection up
```

or

```
nmcli connection reload
```

<span class="TextRun SCXO38321458 BCX0" data-contrast="none" lang="EN-GB" xml:lang="EN-GB"><span class="NormalTextRun SCXO38321458 BCX0">====================================================================================</span></span>

### OpenSUSE - Wicked

Network configuration files are stored in /etc/sysconfig/networks

systemctl status network

Show all interfaces

```
wicked show all
```

Show info for specific interface

```
wicked show eth1
```

Take interface down or up

```
wicked ifdown eth1

wicked ifup eth1
```