OpenVZ Forum


Home » General » Support » Multiple IPs from multiple Networks (It's driving me nuts! :))
Multiple IPs from multiple Networks [message #51893] Wed, 18 February 2015 12:41 Go to next message
creiss is currently offline  creiss
Messages: 4
Registered: February 2015
Location: Germany
Junior Member

From: *x-mailer.de
Hey folks,

[ The Issue ]

I am in a bit of a pickle here. So far I am successfully running OpenVZ in several instances, but this newest setting is driving me nuts. It's a network related issue.


[ The Setup ]

Here is my setup:

46.229.x.y is my public IP space,
10.1.0.x is my private space.

I have a private-only OpenVZ server running in the 10-space, the containers are also in the 10-space, all is good. The issue now arrives with the new server (CentOS 6.6, fully updated) using these vz packages:

vzkernel-2.6.32-042stab104.1.x86_64
vzctl-core-4.8-1.x86_64
vzquota-3.1-1.x86_64
vzstats-0.5.3-1.noarch
vzctl-4.8-1.x86_64

Kernel is 2.6.32-042stab104.1.

The HN has two network devices (eth0 => 46.x, eth1 => 10.x) and one venet0.
The containers all have one public and one private ip, where the public one is primary (venet0) and the other secondary (venet0:0).


[ The Situation ]

Container 1 can ping outside IP addresses, but can not ping any internal ip. But it can ping the internal IP of the HN. The Container is ping-able from all public servers (I didn't check *all*, tho Smile) and also it IS pingable from all internal servers. The only issue is the container not being able to contact any internal servers.


[ What I tried ]

- Switching IPs (private first, public second). Then I was able to ping all internal servers but public connections are no longer working
- Trying to understand source routing in the wiki. Uhh.
- Reading the forums Smile


[ Update ]

It seems that if I ping an internal IP from inside the container pings originate from 46.x not 10.x, as seen on this tcpdump done on the HN:
16:16:57.723679 IP 46.X > server3.public.com: ICMP echo request, id 8471, seq 5, length 64



I am sure it's easily solve-able with your help Smile
Thanks in advance!

[Updated on: Wed, 18 February 2015 15:18]

Report message to a moderator

Re: Multiple IPs from multiple Networks [message #51899 is a reply to message #51893] Mon, 23 February 2015 09:12 Go to previous message
creiss is currently offline  creiss
Messages: 4
Registered: February 2015
Location: Germany
Junior Member

From: *x-mailer.de
[ Solved ]

I had to put this in each /etc/rc.local for each openvz Container:

/sbin/ip address delete 10.1.0.89/32 dev venet0 label venet0:1
/sbin/ip address add    10.1.0.89/24 dev venet0 label venet0:1


This assigns a netmask for the secondary IP, making it correctly routed.
Previous Topic: OpenVZ Container doesn't start all processes.
Next Topic: Migrate from KVM to OpenVZ
Goto Forum:
  


Current Time: Fri Jul 19 10:10:06 GMT 2019