;
This guide details how to configure a LANforge system’s management port with a static IP address.
By default, LANforge systems expect a DHCP-provided address, falling back to the 192.168.1.101/24 address when it doesn’t receive a DHCP-provided address within roughly a minute of booting.
Use this approach for the following system types:
# If logged in as 'lanforge' or using VNC, run the following to become root
sudo -i
mgt_dev. nmcli connection show | grep mgt_dev
192.168.1.101/24) # Shorthand is 'nmcli c m'
nmcli connection modify mgt_dev ipv4.method manual ipv4.addresses "10.0.0.10/24"
# Reset the interface
# Shorthand for this is 'nmcli c d mgt_dev'
nmcli connection down mgt_dev
nmcli connection up mgt_dev
# If logged in as 'lanforge' or using VNC, run the following to become root
sudo -i
mgt_dev. nmcli connection show | grep mgt_dev
# Shorthand is 'nmcli c m'
nmcli connection modify mgt_dev ipv4.method auto ipv4.addresses ""
# Reset the interface
# Shorthand for this is 'nmcli c d mgt_dev'
nmcli connection down mgt_dev
nmcli connection up mgt_dev
Use this approach for the following system types:
# If logged in as 'lanforge' or using VNC, run the following to become root
sudo -i
eth0 unless non-default configuration is used. If using a CT521-at7, please see the dedicated CT521-at7 section here. # This will output just the MAC address
ip -br link show dev eth0 | awk '{ print $3 }'
vim or nano)head -2 /etc/os-release command. vim /etc/sysconfig/network-scripts/ifcfg-eth0
HWADDR: Management port MAC addressIPADDR: Static IP addressNETMASK: Subnet mask for static IP networkGATEWAY: Gateway IP address for static IP networketh0), you’ll also need to modify NAME as well. More information on these options can be found here. # Modify as needed
NAME=eth0
HWADDR=00:CA:00:FE:00
IPADDR=172.16.0.101
NETMASK=255.255.255.0
GATEWAY=172.16.0.1
# This generally should not change
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
ONBOOT=yes
IPV4_FAILURE_FATAL=no
# Down the interface
ifdown eth0
# Up the interface
ifup eth0
The following only applies to systems like the CT523c or CT521b with the management port as eth0 (default management port).
# If logged in as 'lanforge' or using VNC, run the following to become root
sudo -i
# Assumes 'eth0' is management and associated udev rule properly configured
sudo ./lf_kinstall.pl --make_ifcfg_eth0
# Down the interface
ifdown eth0
# Up the interface
ifup eth0
/etc/network/interfaces SetupUse this approach for the following system types:
Much of this is taken from this forum post:
https://askubuntu.com/a/1228928
# If logged in as 'lanforge' or using VNC, run the following to become root
sudo -i
/etc/network/interfaces in desired text editor (e.g. vim or nano)address: Static IP addressnetmask: Subnet mask for static IP networkgateway: Gateway IP address for static IP network
If using non-default interface (i.e. not lan4), you’ll also need to modify the interface name as well. More information on these options can be found here. iface lan4 inet static
address 192.168.99.101
netmask 255.255.255.0
gateway 192.168.99.1
systemctl restart networking
systemctl status networking
# If logged in as 'lanforge' or using VNC, run the following to become root
sudo -i
/etc/network/interfaces in desired text editor (e.g. vim or nano)lan4), you’ll also need to modify the interface name as well. More information on these options can be found here. iface lan4 inet dhcp