How to remove an IP address from a host node in order to use for containers Print

  • 0

After installing the SolusVM slave software on a host node, you will need to remove all IP addresses with the exception of the main IP.

Here is an example of IP addresses that are bound to the host node:

—-

#ifconfig
eth0 Link encap:Ethernet HWaddr 00:25:90:94:8D:9C
inet addr:67.205.96.178 Bcast:67.205.96.191 Mask:255.255.255.224
inet6 addr: fe80::225:90ff:fe94:8d9c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13359 errors:0 dropped:0 overruns:0 frame:0
TX packets:4902 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1722287 (1.6 MiB) TX bytes:1087180 (1.0 MiB)
eth0:0 Link encap:Ethernet HWaddr 00:25:90:94:8D:9C
inet addr:174.142.7.156 Bcast:174.142.7.156 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth0:1 Link encap:Ethernet HWaddr 00:25:90:94:8D:9C
inet addr:174.142.7.157 Bcast:174.142.7.156 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth0:2 Link encap:Ethernet HWaddr 00:25:90:94:8D:9C
inet addr:174.142.7.158 Bcast:174.142.7.156 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth0:3 Link encap:Ethernet HWaddr 00:25:90:94:8D:9C
inet addr:174.142.7.159 Bcast:174.142.7.156 Mask:255.255.255.255
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:36 errors:0 dropped:0 overruns:0 frame:0
TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:17928 (17.5 KiB) TX bytes:17928 (17.5 KiB)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet6 addr: fe80::1/128 Scope:Link
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:172 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:8944 (8.7 KiB) TX bytes:0 (0.0 b)

Based on the output, run the following command:

#ifconfig eth0:0 del 174.142.7.156
#ifconfig eth0:1 del 174.142.7.157
#ifconfig eth0:2 del 174.142.7.158
#ifconfig eth0:3 del 174.142.7.159

This will remove the IP addresses and free them up to be used properly with the virtual machine. They can now be added to the Host Node in SolusVM.

These interfaces will automatically reappear on reboot unless we get rid of the script responsible for adding them again. Go to/etc/sysconfig/network-scripts and remove the files with the names of the interfaces that we just deleted. The files will be named ifcfg-eth0:1, ifcfg-eth0:2, etc.

Be absolutely sure not to remove any ifcfg-eth file that does not have a colon in it.

This will prevent the IPs from being automatically added on boot of the node.


Was this answer helpful?

← Back