OpenVZ Forum


Home » General » Support » Network settings - differnet address range for containers
Network settings - differnet address range for containers [message #42161] Fri, 11 March 2011 19:17 Go to previous message
naro is currently offline  naro
Messages: 4
Registered: March 2011
Junior Member
Hello,

I'm trying to set up public IP for my container. HN has address XXX.71.138.11 (eth0). Container should get address from range:
YYY.132.159.194 - 222 (gateway is set up by ISP to YYY.132.159.193 and is sending packets to my HW node).

I tried to set YYY.132.159.200 to HN as eth0:0 and it works fine, it means, ISP routing is fine.

There are no iptables rules.

I've assigned YYY.132.159.194 to container and now I need to set up routing on hardware node. I checked Source based routing wiki, added the rule, but

/sbin/ip route add default dev eth0 via YYY.132.159.193 table 10
failed with RTNETLINK: No such file or directory. This is caused by missing YYY.132.159.193 route in the main table probably, but I don't know how to set it up.

HN# ip route list
YYY.132.159.194 dev venet0 scope link
XXX.71.138.0/27 dev eth0 proto kernel scope link src XXX.71.138.11
default via XXX.71.138.1 dev eth0

HN has assigned XXX.71.138.11 on eth0 only. No other public address.

How should I setup routing on HN to correctly pass packets from YYY.132.159.194-222 to YYY.132.159.193 via eth0 ?

Thanks

Edit:
forgot to mention sysctl settings:
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0

I have tried to assign 192.168.200.101 to container and configured iptables postrouting on HN and it works fine, but I'm still not able to get public address work.

[Updated on: Sat, 12 March 2011 17:27]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: are vzdump problems well known ?
Next Topic: Container ebtables LOG are going to Hardware Node CT0 syslog
Goto Forum:
  


Current Time: Thu Oct 17 20:34:02 GMT 2024

Total time taken to generate the page: 0.05566 seconds