OpenVZ Forum - RDF feed
type: channel
items: [SOLVED] Routing problem in VE
items: Re: Routing problem in VE

[SOLVED] Routing problem in VE
type: item
description: Hello All, I have installed a machine at a client. I want access to the following ip's 10.11.15.101 10.1.4.191 10.1.4.192 10.1.1.191 10.1.1.192 10.200.6.1 with the gateway ip 10.0.254.2. This has been achieved in the base instance with the following net.eth0 config_eth0=( "10.0.253.72 netmask 255.255.0.0 broadcast 10.0.255.255" ) routes_eth0=( "10.0.253.0/24 via 10.0.254.2" "default via 10.0.254.2" ) However the VE (there is only one ATM) works perfectly except it cannot see either of the 10.1.4 addresses. I don't have a clue what is going on and I would be very grateful if you can point out the error of my ways Following is what is seen in the base instance and the VE. If you want any more information, please ask. BASE-INSTANCE conf.d # netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 10.0.253.0 10.0.254.2 255.255.255.0 UG 0 0 0 eth0 10.0.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 10.0.254.2 0.0.0.0 UG 0 0 0 eth0 BASE-INSTANCE conf.d # vzctl enter 201 entered into VE 201 VE-LIVE / # netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 192.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 venet0 127.0.0.0 127.0.0.1 255.0.0.0 UG 0 0 0 lo 0.0.0.0 192.0.2.1 0.0.0.0 UG 0 0 0 venet0 VE-LIVE / # cat /etc/conf.d/net config_venet0=( "10.0.253.133/32" ) routes_venet0=( "-net 192.0.2.0/24" "default via 192.0.2.1" ) Thanks in advance, Best Regards, Paul.
creator: wilf
date: 2007-05-16T23:39:32-00:00

Re: Routing problem in VE
type: item
description: Gday, please provide me output of: (execute on HW node) echo; \ echo "------- HW ------- {"; \ echo "-- ip a l --"; \ ip a l; \ echo "-- ip r l --"; \ ip r l; \ echo "------- HW ------- {"; \ echo; \ echo "------- VE 201 ------- {"; \ echo "-- ip a l --"; \ vzctl exec 222 "ip a l"; \ echo "-- ip r l --"; \ vzctl exec 222 "ip r l"; \ echo "------- VE 201 ------- }"; \ echo Regards, morik.
creator: morik
date: 2007-05-17T11:16:00-00:00

Re: Routing problem in VE
type: item
description: Hi Morik, Thank you so much for taking a look at this - I am really grateful. Information as requested... Best Regards, Paul. echo; \ echo "------- HW ------- {"; \ echo "-- ip a l --"; \ ip a l; \ echo "-- ip r l --"; \ ip r l; \ echo "------- HW ------- {"; \ echo; \ echo "------- VE 201 ------- {"; \ echo "-- ip a l --"; \ vzctl exec 222 "ip a l"; \ echo "-- ip r l --"; \ vzctl exec 222 "ip r l"; \ echo "------- VE 201 ------- }"; \ echo ------- HW ------- { -- ip a l -- 2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:19:bb:39:2d:48 brd ff:ff:ff:ff:ff:ff inet 10.0.253.72/16 brd 10.0.255.255 scope global eth0 inet6 fe80::219:bbff:fe39:2d48/64 scope link valid_lft forever preferred_lft forever 4: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000 link/ether 00:19:bb:39:2d:3c brd ff:ff:ff:ff:ff:ff 6: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 brd 127.255.255.255 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 8: sit0: <NOARP> mtu 1480 qdisc noop link/sit 0.0.0.0 brd 0.0.0.0 1: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,10000> mtu 1500 qdisc noqueue link/void -- ip r l -- 10.0.253.133 dev venet0 scope link 10.0.253.0/24 via 10.0.254.2 dev eth0 10.0.0.0/16 dev eth0 proto kernel scope link src 10.0.253.72 127.0.0.0/8 dev lo scope link default via 10.0.254.2 dev eth0 ------- HW ------- { ------- VE 201 ------- { -- ip a l -- VE config file does not exist -- ip r l -- VE config file does not exist ------- VE 201 ------- }
creator: wilf
date: 2007-05-17T11:27:04-00:00

Re: Routing problem in VE
type: item
description: I am sorry but prev script was with error, (VE 222 instead of 201) could you please start it again on HW node sorry again. echo; \ echo "------- HW ------- {"; \ echo "-- ip a l --"; \ ip a l; \ echo "-- ip r l --"; \ ip r l; \ echo "------- HW ------- {"; \ echo; \ echo "------- VE 201 ------- {"; \ echo "-- ip a l --"; \ vzctl exec 201 "ip a l"; \ echo "-- ip r l --"; \ vzctl exec 201 "ip r l"; \ echo "------- VE 201 ------- }"; \ echo
creator: morik
date: 2007-05-17T12:10:01-00:00

Re: Routing problem in VE
type: item
description: Hi Morik, Here we are... I found the instance didn't have ip, that's way it took a while to get back to you. It's now emerged in echo; \ echo "------- HW ------- {"; \ echo "-- ip a l --"; \ ip a l; \ echo "-- ip r l --"; \ ip r l; \ echo "------- HW ------- {"; \ echo; \ echo "------- VE 201 ------- {"; \ echo "-- ip a l --"; \ vzctl exec 201 "ip a l"; \ echo "-- ip r l --"; \ vzctl exec 201 "ip r l"; \ echo "------- VE 201 ------- }"; \ echo ------- HW ------- { -- ip a l -- 2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000 link/ether 00:19:bb:39:2d:48 brd ff:ff:ff:ff:ff:ff inet 10.0.253.72/16 brd 10.0.255.255 scope global eth0 inet6 fe80::219:bbff:fe39:2d48/64 scope link valid_lft forever preferred_lft forever 4: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000 link/ether 00:19:bb:39:2d:3c brd ff:ff:ff:ff:ff:ff 6: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 brd 127.255.255.255 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 8: sit0: <NOARP> mtu 1480 qdisc noop link/sit 0.0.0.0 brd 0.0.0.0 1: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,10000> mtu 1500 qdisc noqueue link/void -- ip r l -- 10.0.253.133 dev venet0 scope link 10.0.253.0/24 via 10.0.254.2 dev eth0 10.0.0.0/16 dev eth0 proto kernel scope link src 10.0.253.72 127.0.0.0/8 dev lo scope link default via 10.0.254.2 dev eth0 ------- HW ------- { ------- VE 201 ------- { -- ip a l -- 1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 3: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,10000> mtu 1500 qdisc noqueue link/void inet 10.0.253.133/32 scope global venet0 -- ip r l -- 192.0.2.0/24 dev venet0 scope link 127.0.0.0/8 via 127.0.0.1 dev lo scope link default via 192.0.2.1 dev venet0 ------- VE 201 ------- }
creator: wilf
date: 2007-05-17T13:00:23-00:00

Re: Routing problem in VE
type: item
description: Gday, sorry for late answer, >I want access to the following ip's > > 10.11.15.101 > 10.1.4.191 > 10.1.4.192 > 10.1.1.191 > 10.1.1.192 > 10.200.6.1 > >with the gateway ip 10.0.254.2. This has been achieved in the >base >instance with the following net.eth0 as I see there are no networks 10.1.*.* and 10.11.*.* and 10.200.*.* in your HW routing table, so all packets for next hosts > 10.11.15.101 > 10.1.4.191 > 10.1.4.192 > 10.1.1.191 > 10.1.1.192 > 10.200.6.1 will be send on default gw 10.0.254.2 please check routing on 10.0.254.2 and/or provide me more routing information. Example: I have 10.1.0.0/16 network directly connected on eth0 device.. Regards, Roman.
creator: morik
date: 2007-05-18T08:19:43-00:00

Re: Routing problem in VE
type: item
description: Hi Morik, BASE-INSTANCE ~ # traceroute 10.1.4.191 traceroute to 10.1.4.191 (10.1.4.191), 30 hops max, 46 byte packets 1 10.0.254.2 (10.0.254.2) 0.204 ms 0.181 ms 0.182 ms 2 10.1.4.191 (10.1.4.191) 0.493 ms 0.453 ms 0.477 ms BASE-INSTANCE ~ # traceroute 10.1.4.192 traceroute to 10.1.4.192 (10.1.4.192), 30 hops max, 46 byte packets 1 10.0.254.2 (10.0.254.2) 0.267 ms 0.183 ms 0.186 ms 2 10.1.4.192 (10.1.4.192) 0.545 ms 0.444 ms 0.449 ms BASE-INSTANCE ~ # traceroute 10.1.1.191 traceroute to 10.1.1.191 (10.1.1.191), 30 hops max, 46 byte packets 1 10.0.254.2 (10.0.254.2) 0.249 ms 0.183 ms 0.181 ms 2 10.0.254.3 (10.0.254.3) 0.309 ms 0.326 ms 0.319 ms 3 10.1.1.191 (10.1.1.191) 0.820 ms 0.659 ms 0.525 ms BASE-INSTANCE ~ # traceroute 10.1.1.192 traceroute to 10.1.1.192 (10.1.1.192), 30 hops max, 46 byte packets 1 10.0.254.2 (10.0.254.2) 0.251 ms 0.183 ms 0.180 ms 2 10.0.254.3 (10.0.254.3) 0.394 ms 0.341 ms 0.316 ms 3 10.1.1.192 (10.1.1.192) 0.808 ms 0.538 ms 0.603 ms BASE-INSTANCE ~ # traceroute 10.200.6.1 traceroute to 10.200.6.1 (10.200.6.1), 30 hops max, 46 byte packets 1 10.0.254.2 (10.0.254.2) 0.216 ms 0.185 ms 0.177 ms 2 10.0.254.3 (10.0.254.3) 0.382 ms 0.316 ms 0.345 ms 3 10.1.253.74 (10.1.253.74) 0.501 ms 0.577 ms 0.485 ms 4 * * * BASE-INSTANCE ~ # ping !$ ping 10.200.6.1 PING 10.200.6.1 (10.200.6.1) 56(84) bytes of data. 64 bytes from 10.200.6.1: icmp_seq=1 ttl=253 time=0.735 ms From 10.0.254.2: icmp_seq=2 Redirect Network(New nexthop: 10.0.254.3) 64 bytes from 10.200.6.1: icmp_seq=2 ttl=253 time=0.792 ms --- 10.200.6.1 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 0.735/0.763/0.792/0.039 ms As you can see, it all works OK from the base instance. One oddity is that although it can ping 10.200.6.1, traceroute never completes. BASE-INSTANCE ~ # vzctl enter 201 entered into VE 201 VE-LIVE / # traceroute 10.1.4.191 traceroute to east (10.1.4.191), 30 hops max, 46 byte packets 1 10.0.253.72 (10.0.253.72) 0.048 ms…
creator: wilf
date: 2007-05-18T10:52:04-00:00

Re: Routing problem in VE
type: item
description: Hi Paul! Thank you for detailed answer! I have couple questions for you: Why you use default gw 192.0.2.1 at VE-LIVE? is it principled? Could you please test VE-LIVE with default gw 10.0.253.72 VE-LIVE # route del -net 0.0.0.0 VE-LIVE # route add 10.0.253.72/32 dev venet0 VE-LIVE # route add default gw 10.0.253.72 and if it won't works please add on BASE-INSTANCE BASE-INSTANCE # iptables -t nat -A POSTROUTING -j SNAT -s 10.0.253.133/32 --to-source 10.0.253.72 Please provide me traceroute's output. Regards, Roman.
creator: morik
date: 2007-05-18T12:04:04-00:00

Re: Routing problem in VE
type: item
description: Hi Roman, Quote: I have couple questions for you: Why you use default gw 192.0.2.1 at VE-LIVE? is it principled? it's nothing to do with me - VE-LIVE:/etc/conf.d/net is created during vzctl start 201 by the function setup_network() in /etc/vz/disfiles/scripts/gentoo-add_ip.sh, which picks up FAKEGATEWAY=192.0.2.1 and FAKEGATEWAYNET=192.0.2.0 from /etc/vz/disfiles/scripts/functions. Quote: Could you please test VE-LIVE with default gw 10.0.253.72 traceroute's output after change:- BASE-INSTANCE ~ # vzctl enter 201 entered into VE 201 VE-LIVE / # route del -net 0.0.0.0 VE-LIVE / # route add 10.0.253.72/32 dev venet0 VE-LIVE / # route add default gw 10.0.253.72 VE-LIVE / # traceroute 10.1.4.191 traceroute to east (10.1.4.191), 30 hops max, 46 byte packets 1 10.0.253.72 (10.0.253.72) 0.072 ms 0.017 ms 0.012 ms 2 * * * VE-LIVE / # traceroute 10.1.4.192 traceroute to 10.1.4.192 (10.1.4.192), 30 hops max, 46 byte packets 1 10.0.253.72 (10.0.253.72) 0.024 ms 0.014 ms 0.011 ms 2 * * * 3 * VE-LIVE / # traceroute 10.1.1.191 traceroute to central (10.1.1.191), 30 hops max, 46 byte packets 1 10.0.253.72 (10.0.253.72) 0.041 ms 0.025 ms 0.011 ms 2 10.0.254.3 (10.0.254.3) 0.328 ms 0.349 ms 0.323 ms 3 central (10.1.1.191) 0.795 ms 0.776 ms 0.599 ms VE-LIVE / # traceroute 10.1.1.192 traceroute to 10.1.1.192 (10.1.1.192), 30 hops max, 46 byte packets 1 10.0.253.72 (10.0.253.72) 0.028 ms 0.015 ms 0.012 ms 2 10.0.254.3 (10.0.254.3) 0.374 ms 0.340 ms 0.304 ms 3 10.1.1.192 (10.1.1.192) 0.681 ms 0.591 ms 0.629 ms VE-LIVE / # traceroute 10.200.6.1 traceroute to 10.200.6.1 (10.200.6.1), 30 hops max, 46 byte packets 1 10.0.253.72 (10.0.253.72) 0.028 ms 0.020 ms 0.012 ms 2 10.0.254.3 (10.0.254.3) 0.663 ms 0.370 ms 0.325 ms 3 10.1.253.74 (10.1.253.74) 0.650 ms 0.513 ms 0.437 ms 4 * * * VE-LIVE / # ping 10.200.6.1 PING 10.200.6.1 (10.200.6.1) 56(84) bytes of data. 64 bytes from 10.200.6.1: icmp_seq=1 ttl=252 time=0.868 ms From 10.0.254.2: icmp_seq=2 Redirect Network(New nexthop: 10.0.254.3) 64 b…
creator: wilf
date: 2007-05-18T14:37:35-00:00

Re: Routing problem in VE
type: item
description: Hi Paul, Thanks for answer, but it still not clear for me. Could you please provide me access to BASE-INSTANCE It will help to resolve problem faster. For private contacts: ICQ UID: 260260116 E-mail: openvz@chechnev.ru Regards, Roman.
creator: morik
date: 2007-05-19T07:11:52-00:00

Re: Routing problem in VE
type: item
description: Hello All, After all this work, my customer made a network change - apparently unrelated - which also fixed the problem. I do want to say just how much help Roman offered - I am very grateful, he couldn't have done more. Best Regards, Paul.
creator: wilf
date: 2007-05-21T10:23:58-00:00