I have a brand new install of centos 6.3 and the openvz kernel. I followed the install guide properly and it is functioning and I can create VE's.
[root@Vanquish cache]# uname -a
Linux Vanquish 2.6.32-042stab057.1 #1 SMP Fri Jun 22 02:17:07 MSD 2012 x86_64 x86_64 x86_64 GNU/Linux
I am using a public IP address for the hardware node as well as public IP addresses for each VE all on the same subnet and example would be.
184.108.40.206 for my hardware node
220.127.116.11 for my gateway
255.255.255.128 for my subnetmask
I then create a centos 6 VE 32 bit and assign it the ip
I use the command vzctl set veid --ipadd 18.104.22.168 --save
I then start the container with
vzctl start veid
I enter the container with the vzctl enter command
I then try and ping the gateway however it can not ping the gateway. I can however ping other IPs in the subnet such as the hardware node and other servers not located on the same hardware node such as 22.214.171.124 that is on the same switch about 3u's down in the rack.
now heres the fun and weird part.
I tried for hours to figure this out then I went to bed. After I got up this morning magically it works and can ping out to the internet and I can ping it from the internet.
Please help me figure out the cause of this. I would be happy to provide any information needed if you just shoot me what commands you would like output from.
If you have try to access the Net with the same IP address (VE), for example when testing the availability of IP addresses, the gateway may have associate this IP address(VE) with another MAC address, the one you are using when doing testing. That way, the gateway may have learn this IP-to-MAC and cache it for a certain period.
On a Cisco router, the ARP cache, retains info during 4 hours.