;
Candela Technologies Logo
Network Testing and Emulation Solutions

Configure Static Management Address

Goal: Configure a Static Management Address

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.

NetworkManager-based Setup

Use this approach for the following system types:

Configure Static IP

  1. Open terminal and login as root
     # If logged in as 'lanforge' or using VNC, run the following to become root
     sudo -i
  2. Verify management connection is active
    kinstall by default creates the management port connection with the name mgt_dev.
     nmcli connection show | grep mgt_dev
  3. Modify management connection to use static IP configuration
    Substitute desired IP address and subnet mask prefix.
    Include the prefix in with the system’s new static IP (e.g. 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"
  4. Reset the interface or reboot
    If you’re SSH’ed or VNC’ed in, this will stop your connection
     # Reset the interface
     # Shorthand for this is 'nmcli c d mgt_dev'
     nmcli connection down mgt_dev
     nmcli connection up mgt_dev

Reset to DHCP Configuration

  1. Open terminal and login as root
     # If logged in as 'lanforge' or using VNC, run the following to become root
     sudo -i
  2. Verify management connection is active
    kinstall by default creates the management port connection with the name mgt_dev.
     nmcli connection show | grep mgt_dev
  3. Modify management connection to use static IP configuration
     # Shorthand is 'nmcli c m'
     nmcli connection modify mgt_dev ipv4.method auto ipv4.addresses ""
  4. Reset the interface or reboot
    If you’re SSH’ed or VNC’ed in, this will stop your connection
     # Reset the interface
     # Shorthand for this is 'nmcli c d mgt_dev'
     nmcli connection down mgt_dev
     nmcli connection up mgt_dev

Network Scripts-based Setup

Use this approach for the following system types:

Configure Static IP

  1. Open terminal and login as root
     # If logged in as 'lanforge' or using VNC, run the following to become root
     sudo -i
  2. Determine the management port MAC address
    This is generally 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 }'
  3. Open the interface configuration file in desired text editor (e.g. vim or nano)
    If the contents are empty or this creates a new file, please ensure the system operating system is not Fedora 41 or newer or Ubuntu with the head -2 /etc/os-release command.
     vim /etc/sysconfig/network-scripts/ifcfg-eth0
  4. Set the following in the configuration file, substituting in required fields
    Required fields include:
    HWADDR: Management port MAC address
    IPADDR: Static IP address
    NETMASK: Subnet mask for static IP network
    GATEWAY: Gateway IP address for static IP network
    If using non-default interface (i.e. not eth0), 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
  5. Reset interface or reboot
    If you’re SSH’ed or VNC’ed in, this will stop your connection
     # Down the interface
     ifdown eth0
     # Up the interface
     ifup eth0

Reset to DHCP Configuration

The following only applies to systems like the CT523c or CT521b with the management port as eth0 (default management port).

  1. Open terminal and login as root
     # If logged in as 'lanforge' or using VNC, run the following to become root
     sudo -i
  2. Run the following kinstall command
     # Assumes 'eth0' is management and associated udev rule properly configured
     sudo ./lf_kinstall.pl --make_ifcfg_eth0
  3. Reset interface or reboot
    If you’re SSH’ed or VNC’ed in, this will stop your connection
     # Down the interface
     ifdown eth0
     # Up the interface
     ifup eth0

/etc/network/interfaces Setup

Use this approach for the following system types:

Configure Static IP

Much of this is taken from this forum post:
https://askubuntu.com/a/1228928

  1. Open terminal and login as root
     # If logged in as 'lanforge' or using VNC, run the following to become root
     sudo -i
  2. Open /etc/network/interfaces in desired text editor (e.g. vim or nano)
    There should be configuration already present here, but we’ll overwrite this.
  3. Set the following in the configuration file, substituting in required fields
    Required fields include:
    address: Static IP address
    netmask: Subnet mask for static IP network
    gateway: 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
  4. Reset interface or reboot
    If you’re SSH’ed or VNC’ed in, this will stop your connection
     systemctl restart networking
  5. Verify configuration
     systemctl status networking

Reset to DHCP Configuration

  1. Open terminal and login as root
     # If logged in as 'lanforge' or using VNC, run the following to become root
     sudo -i
  2. Open /etc/network/interfaces in desired text editor (e.g. vim or nano)
  3. Set the following in the configuration file, substituting in required fields 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 dhcp

Candela  Technologies, 2417 Main Street, Suite 201, Ferndale, WA 98248, USA
www.candelatech.com | sales@candelatech.com | +1.360.380.1618
Facebook | LinkedIn | Blog