Article ID: 781, created on Oct 6, 2008, last review on Apr 11, 2016

  • Applies to:
  • Virtuozzo
  • Virtuozzo containers for Linux
  • Virtuozzo hypervisor

Question

How do I add or remove an IP address to/from a VE?

Answer

  • For Host-routed mode

To add the IP address 192.168.1.2 to VE 101, run the following command on the Hardware Node:

# vzctl set 101 --ipadd 192.168.1.2 --save

To release an IP address from a VE, use the same command with the --ipdel option.

  • For Bridged mode

First create a new veth virtual network adapter and assigns the name to the Ethernet interface inside the Container:

# vzctl set 101 --netif_add eth0 --save

After this, to add the IP address 192.168.1.2 to VE 101 in bridged mode, run the following command on the Hardware Node:

# vzctl set 101 --ifname eth0 --network Bridged --ipadd 192.168.1.2/24 --gw 192.168.1.1

To remove the bridged adapter from container, use --netif_del option.

Note

Valid network mask and gateway settings are required in case of Bridged mode.

Search Words

bridged mode add ip

Host-routed mode add ip

remove ip address from VE

how to remove ip address from VE

add ip address to VE

how to add ip address to VE

e8e50b42231236b82df27684e7ec0beb d02f9caf3e11b191a38179103495106f 2897d76d56d2010f4e3a28f864d69223 a26b38f94253cdfbf1028d72cf3a498b 0dd5b9380c7d4884d77587f3eb0fa8ef caea8340e2d186a540518d08602aa065 614fd0b754f34d5efe9627f2057b8642 5356b422f65bdad1c3e9edca5d74a1ae 2554725ed606193dd9bbce21365bed4e 6f1456866eed87488c0f02b298a741c0

Email subscription for changes to this article
Save as PDF