Home » General » Support » [SOLVED] Routing problem in VE
[SOLVED] Routing problem in VE [message #12988] |
Wed, 16 May 2007 23:39 |
|
wilf
Messages: 30 Registered: January 2007 Location: UK
|
Member |
|
|
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.eth0config_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.
[Updated on: Mon, 21 May 2007 10:24] Report message to a moderator
|
|
|
|
Re: Routing problem in VE [message #13003 is a reply to message #12988] |
Thu, 17 May 2007 11:27 |
|
wilf
Messages: 30 Registered: January 2007 Location: UK
|
Member |
|
|
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 ------- }
|
|
|
|
Re: Routing problem in VE [message #13006 is a reply to message #12988] |
Thu, 17 May 2007 13:00 |
|
wilf
Messages: 30 Registered: January 2007 Location: UK
|
Member |
|
|
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 ------- }
|
|
|
|
Re: Routing problem in VE [message #13067 is a reply to message #13046] |
Fri, 18 May 2007 10:52 |
|
wilf
Messages: 30 Registered: January 2007 Location: UK
|
Member |
|
|
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 0.030 ms 0.012 ms
2 * * *
3 * *
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.037 ms 0.016 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.038 ms 0.023 ms 0.012 ms
2 10.0.254.3 (10.0.254.3) 0.391 ms 0.312 ms 0.327 ms
3 centralexchange (10.1.1.191) 0.816 ms 0.611 ms 0.647 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.026 ms 0.015 ms 0.011 ms
2 10.0.254.3 (10.0.254.3) 0.425 ms 0.285 ms 0.448 ms
3 10.1.1.192 (10.1.1.192) 0.651 ms 0.638 ms 0.647 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.021 ms 0.011 ms
2 10.0.254.3 (10.0.254.3) 0.456 ms 0.278 ms 0.327 ms
3 10.1.253.74 (10.1.253.74) 0.649 ms 0.485 ms 0.486 ms
4 * * *
5 * *
VE-LIVE / # 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=252 time=0.709 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=252 time=0.872 ms
--- 10.200.6.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.709/0.790/0.872/0.086 ms
10.1.4.191 just isn't visible at all. I find it strange that the instance get the location of the servers (central and east), but that info doesn't appear in teh base-instance. Am I confused? Yup.
Thanks again for you time,
Best Regards, Paul.
|
|
|
|
Re: Routing problem in VE [message #13077 is a reply to message #13068] |
Fri, 18 May 2007 14:37 |
|
wilf
Messages: 30 Registered: January 2007 Location: UK
|
Member |
|
|
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 bytes from 10.200.6.1: icmp_seq=2 ttl=252 time=0.787 ms
--- 10.200.6.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.787/0.827/0.868/0.049 ms
VE-LIVE / # exit
logout
exited from VE 201 Now, make changes to the base instance...BASE-INSTANCE ~ # iptables -t nat -A POSTROUTING -j SNAT -s 10.0.253.133/32 --to-source 10.0.253.72
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.237 ms 0.187 ms 0.186 ms
2 10.1.4.191 (10.1.4.191) 0.517 ms 0.455 ms 0.454 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.269 ms 0.189 ms 0.184 ms
2 10.1.4.192 (10.1.4.192) 0.564 ms 0.448 ms 0.445 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.311 ms 0.183 ms 0.172 ms
2 10.0.254.3 (10.0.254.3) 0.306 ms 0.275 ms 0.289 ms
3 10.1.1.191 (10.1.1.191) 0.721 ms 0.560 ms 0.502 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.365 ms 0.198 ms 0.195 ms
2 10.0.254.3 (10.0.254.3) 0.314 ms 0.294 ms 0.317 ms
3 10.1.1.192 (10.1.1.192) 0.644 ms 0.606 ms 0.517 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.390 ms 0.204 ms 0.183 ms
2 10.0.254.3 (10.0.254.3) 0.308 ms 0.291 ms 0.323 ms
3 10.1.253.74 (10.1.253.74) 0.651 ms 0.498 ms 0.480 ms
4 * * *
BASE-INSTANCE ~ # 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.877 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.794 ms
--- 10.200.6.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.794/0.835/0.877/0.050 ms Now nip back into VE-LIVE and see what difference if any has been made by the above changes...BASE-INSTANCE ~ # vzctl enter 201
entered into VE 201
VE-LIVE / #
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.032 ms 0.025 ms 0.011 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.020 ms 0.024 ms 0.012 ms
2 * * *
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.036 ms 0.028 ms 0.012 ms
2 10.0.254.3 (10.0.254.3) 0.403 ms 0.274 ms 0.284 ms
3 central (10.1.1.191) 0.632 ms 0.500 ms 0.607 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.018 ms 0.018 ms 0.011 ms
2 10.0.254.3 (10.0.254.3) 0.392 ms 0.355 ms 0.303 ms
3 10.1.1.192 (10.1.1.192) 0.652 ms 0.612 ms 0.529 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.021 ms 0.016 ms 0.011 ms
2 10.0.254.3 (10.0.254.3) 0.393 ms 0.351 ms 0.341 ms
3 10.1.253.74 (10.1.253.74) 0.668 ms 0.484 ms 0.484 ms
4 * * *
VE-LIVE / # 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=252 time=1.02 ms
64 bytes from 10.200.6.1: icmp_seq=2 ttl=252 time=0.750 ms
--- 10.200.6.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.750/0.887/1.025/0.140 ms
I hope that tells you something
Best Regards, Paul.
|
|
|
|
|
Goto Forum:
Current Time: Sat Nov 16 09:16:19 GMT 2024
Total time taken to generate the page: 0.03262 seconds
|