Install Config Wiki

All about installing, configuring and troubleshooting

User Tools

Site Tools


configure_static_ip_address_ubuntu_server_22_04

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
configure_static_ip_address_ubuntu_server_22_04 [2023/06/20 12:23] wikiadminconfigure_static_ip_address_ubuntu_server_22_04 [2023/06/20 14:42] (current) wikiadmin
Line 4: Line 4:
 user@svr1:~$ ifconfig user@svr1:~$ ifconfig
 eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500 eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
-        inet 192.168.2.106  netmask 255.255.255.0  broadcast 192.168.2.255+        inet 192.168.1.95  netmask 255.255.255.0  broadcast 192.168.1.255
         inet6 fe80::d6ae:52ff:fecd:3bf8  prefixlen 64  scopeid 0x20<link>         inet6 fe80::d6ae:52ff:fecd:3bf8  prefixlen 64  scopeid 0x20<link>
         ether d4:ae:52:cd:3b:f8  txqueuelen 1000  (Ethernet)         ether d4:ae:52:cd:3b:f8  txqueuelen 1000  (Ethernet)
Line 29: Line 29:
 user@svr1:/etc/netplan$ ifconfig -a user@svr1:/etc/netplan$ ifconfig -a
 eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500 eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
-        inet 192.168.2.106  netmask 255.255.255.0  broadcast 192.168.2.255+        inet 192.168.1.95  netmask 255.255.255.0  broadcast 192.168.1.255
         inet6 fe80::d6ae:52ff:fecd:3bf8  prefixlen 64  scopeid 0x20<link>         inet6 fe80::d6ae:52ff:fecd:3bf8  prefixlen 64  scopeid 0x20<link>
         ether d4:ae:52:cd:3b:f8  txqueuelen 1000  (Ethernet)         ether d4:ae:52:cd:3b:f8  txqueuelen 1000  (Ethernet)
Line 46: Line 46:
         TX packets 288  bytes 29450 (29.4 KB)         TX packets 288  bytes 29450 (29.4 KB)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 +</code>
  
 +Let's switch to /etc/netplan subdirectory path and perform a list command to see what is stored in the subdirectory.
 +
 +<code>
 +user@svr1:$ cd /etc/netplan/
 +user@svr1:/etc/netplan$ ls
 +user@svr1:/etc/netplan$ 00-installer-config.yaml
 +</code>
 +
 +Then, before we edit the network configuration file, let's make a backup of the '00-installer-config.yaml' file and call it '00-installer-config.yaml-bak' just in case we need to restore it in the future to obtain a dynamic IP lease.
 +
 +<code>
 user@svr1:/etc/netplan$ cp -v 00-installer-config.yaml 00-installer-config.bak user@svr1:/etc/netplan$ cp -v 00-installer-config.yaml 00-installer-config.bak
 '00-installer-config.yaml' -> '00-installer-config.bak' '00-installer-config.yaml' -> '00-installer-config.bak'
Line 128: Line 140:
 </code> </code>
  
-Notice that there was an error (failed to load, then it auto performed a hard restart of systemd-neworkd.service). This may be the result of using the first example above rather than the second (containing the line renderer: networkd).  A re-run of 'sudo netplan apply' like above, there is silent application.  Maybe insert the renderer line and re-apply to netplan.  See if that is silently applied as well.+Notice that there was an error (failed to load, then the system auto-performed a hard restart of systemd-neworkd.service). This may be the result of using the first example above rather than the second (containing the line 'renderer: networkd').  A re-run of 'sudo netplan apply' like above, there is silent application.  Maybe insert the renderer line and re-apply to netplan.  See if that is silently applied as well.
  
  
Line 146: Line 158:
 rtt min/avg/max/mdev = 11.387/12.302/13.216/0.674 ms rtt min/avg/max/mdev = 11.387/12.302/13.216/0.674 ms
 user@svr1:/etc/netplan$ user@svr1:/etc/netplan$
 +</code>
 +
 +Run ifconfig:
 +
 +<code>
 +$ ifconfig
 +eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
 +        inet 192.168.1.95  netmask 255.255.255.0  broadcast 192.168.1.255
 +        inet6 fe80::d6ae:52ff:fecd:3bf8  prefixlen 64  scopeid 0x20<link>
 +        ether d4:ae:52:cd:3b:f8  txqueuelen 1000  (Ethernet)
 +        RX packets 183111  bytes 149312474 (149.3 MB)
 +        RX errors 0  dropped 88  overruns 0  frame 0
 +        TX packets 47132  bytes 8346015 (8.3 MB)
 +        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 +        device interrupt 16
 +
 +lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
 +        inet 127.0.0.1  netmask 255.0.0.0
 +        inet6 ::1  prefixlen 128  scopeid 0x10<host>
 +        loop  txqueuelen 1000  (Local Loopback)
 +        RX packets 374  bytes 38261 (38.2 KB)
 +        RX errors 0  dropped 0  overruns 0  frame 0
 +        TX packets 374  bytes 38261 (38.2 KB)
 +        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
 </code> </code>
configure_static_ip_address_ubuntu_server_22_04.1687263820.txt.gz · Last modified: 2023/06/20 12:23 by wikiadmin