Solved

How to change the Eth0 primary ip using NCLU

  • 14 January 2019
  • 2 replies
  • 150 views

Hi Team,
I am new to Cumulus, i have installed one VX instance. Initially i setup eth0 conf using "vi" method. Now while checking NCLU, if i need to change the primary IP of Eth0, it is not changing. It is adding the new IP as an additional IP

Initial "net show conf" output
-------------------------------------
interface eth0
address 10.10.10.100
gateway 10.10.10.99
netmask 255.255.255.0

Commited below command to change the eth0 IP
-------------------------------------------------------
net add interface eth0 ip address 10.10.10.101/24

Now my Output looks like this, and it shows both IPs
---------------------------------------------------------------
auto eth0
iface eth0 inet manual
address 10.10.10.100
+ address 10.10.10.101/24
gateway 10.10.10.99
netmask 255.255.255.0

What should i do to update my IP using NCLU ?
icon

Best answer by Nick Mitchell 14 January 2019, 14:53

Hi Dev,

The behavior you are seeing is correct. Using the 'net add' command will add a new IP address to the interface. If you would like to replace the IP address on the interface, you would execute a 'net del' to remove the existing IP address:
code:
net del interface eth0 ip address 10.10.10.100/24


Together in one commit, this would be done as follows:
code:
net del interface eth0 ip address 10.10.10.100/24
net add interface eth0 ip address 10.10.10.101/24
net pending
net commit
View original

2 replies

Userlevel 2
Hi Dev,

The behavior you are seeing is correct. Using the 'net add' command will add a new IP address to the interface. If you would like to replace the IP address on the interface, you would execute a 'net del' to remove the existing IP address:
code:
net del interface eth0 ip address 10.10.10.100/24


Together in one commit, this would be done as follows:
code:
net del interface eth0 ip address 10.10.10.100/24
net add interface eth0 ip address 10.10.10.101/24
net pending
net commit
Thanks a lot Nick.
Later i've see the limitation of net add interface eth0 ip address, command in the NCLU notification.

Reply