Re[2]: Problem with redistribute static routes from venet (openvz pseudointerface)
Hello,
On 20.3.2011 22:33, Łukasz Chrustek wrote:
Hello,
I would like to import routes (ips exactly, with netmask /32) added by openvz virtualization to main ruting kernel table, when the virtualization system starts. I don't want to be misunderstand, but in quagga it works :), and I would like to test (and switch to) bird. Unfortunetly in bird I can't see the routes(ips) from venet0, see below. My configuration (most important parts, if You think You will need more, please let me now):
Hi!
Can you send us:
show interfaces show protocols all direct1 show route protocol direct1 ?
Ofcourse, here it is: bird> show interfaces lo up (index=1) MultiAccess AdminUp LinkUp Loopback Ignored MTU=16436 127.0.0.1/8 (Primary, broadcast 127.255.255.255, scope host) eth0 up (index=2) MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500 91.207.11.3/29 (Primary, broadcast 91.207.11.7, scope univ) eth1 up (index=3) MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500 10.1.1.0/24 (Primary, broadcast 10.1.1.255, scope site) venet0 DOWN (index=5) PtP Multicast AdminUp LinkUp MTU=1500 bird> show protocols all direct1 name proto table state since info direct1 Direct master up 22:10 Preference: 240 Input filter: ACCEPT Output filter: REJECT Routes: 0 imported, 0 exported, 0 preferred Route change stats: received rejected filtered ignored accepted Import updates: 0 0 0 0 0 Import withdraws: 0 0 --- 0 0 Export updates: 0 0 0 --- 0 Export withdraws: 0 --- --- --- 0 bird> show route protocol direct1 bird> -- Best regards, Łukasz Chrustek
On Mon, Mar 21, 2011 at 09:57:56AM +0100, Łukasz Chrustek wrote:
Ofcourse, here it is:
bird> show interfaces lo up (index=1) MultiAccess AdminUp LinkUp Loopback Ignored MTU=16436 127.0.0.1/8 (Primary, broadcast 127.255.255.255, scope host) eth0 up (index=2) MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500 91.207.11.3/29 (Primary, broadcast 91.207.11.7, scope univ) eth1 up (index=3) MultiAccess Broadcast Multicast AdminUp LinkUp MTU=1500 10.1.1.0/24 (Primary, broadcast 10.1.1.255, scope site) venet0 DOWN (index=5) PtP Multicast AdminUp LinkUp MTU=1500
This is probably the reason why static protocol did not add the routes. I think BIRD ignore ifaces that do not have any IP address. Could you try to add some IP address to venet0? Then it should turn UP here and the static protocol should work. -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Hello,
venet0 DOWN (index=5) PtP Multicast AdminUp LinkUp MTU=1500
This is probably the reason why static protocol did not add the routes. I think BIRD ignore ifaces that do not have any IP address. Could you try to add some IP address to venet0? Then it should turn UP here and the static protocol should work.
I added ip to the venet0 and route from venet0 (static) showed up in ruting tables, but none of the others routes via venet0. I tried to add static routes (comented out earlier) and they also showed up in bird's routing table: bird> show interfaces [....] venet0 up (index=5) PtP Multicast AdminUp LinkUp MTU=1500 10.2.1.1/32 (Primary, broadcast 10.2.1.1, scope site) bird> show route 0.0.0.0/0 via 91.207.11.1 on eth0 [kernel1 22:45] * (10) 10.2.1.1/32 dev venet0 [direct1 22:45] * (240) dev venet0 [MyOSPF 22:45] I (150/10) [91.207.11.3] 10.1.1.0/24 dev eth1 [MyOSPF 22:45] * I (150/10) [91.207.11.3] 91.207.11.0/29 dev eth0 [MyOSPF 22:45] * I (150/10) [91.207.11.3] 91.207.10.61/32 dev venet0 [static1 22:45] * (200) 91.207.10.60/32 dev venet0 [static1 22:45] * (200) 192.168.1.51/32 dev venet0 [static1 22:45] * (200) but I can't see them in ospf on other routers (It looks like they are not imported to ospf - it may be my wrong configuration, see bellow) and still all other routes 'via venet0' (these not added explicitly by route command in protocol static) didn't showed up. They disappeared :), when I added ip to the venet iface (I don't see them even in ip r l), so configuration with ip on venet0 breaks the ruting to the virtual container's ips. I can add static routes (by bird or by hand) but it is very bad solution. ospf configuration: protocol ospf MyOSPF { import all; export all; area 0.0.0.0 { interface "eth*" { }; }; -- Regards, Łukasz Chrustek
Witam,
Hello,
venet0 DOWN (index=5) PtP Multicast AdminUp LinkUp MTU=1500
This is probably the reason why static protocol did not add the routes. I think BIRD ignore ifaces that do not have any IP address. Could you try to add some IP address to venet0? Then it should turn UP here and the static protocol should work.
I added ip to the venet0 and route from venet0 (static) showed up in ruting tables, but none of the others routes via venet0. I tried to add static routes (comented out earlier) and they also showed up in bird's routing table:
bird>> show interfaces
[....] venet0 up (index=5) PtP Multicast AdminUp LinkUp MTU=1500 10.2.1.1/32 (Primary, broadcast 10.2.1.1, scope site)
bird>> show route
0.0.0.0/0 via 91.207.11.1 on eth0 [kernel1 22:45] * (10) 10.2.1.1/32 dev venet0 [direct1 22:45] * (240) dev venet0 [MyOSPF 22:45] I (150/10) [91.207.11.3] 10.1.1.0/24 dev eth1 [MyOSPF 22:45] * I (150/10) [91.207.11.3] 91.207.11.0/29 dev eth0 [MyOSPF 22:45] * I (150/10) [91.207.11.3] 91.207.10.61/32 dev venet0 [static1 22:45] * (200) 91.207.10.60/32 dev venet0 [static1 22:45] * (200) 192.168.1.51/32 dev venet0 [static1 22:45] * (200)
but I can't see them in ospf on other routers (It looks like they are not imported to ospf - it may be my wrong configuration, see bellow)
I'm sorry, my mistake. Redistribution static routes into ospf works, I can see them on other routers. Still is problem with vanished routes 'via venet0' after ip add. I can see routes via venet0 in /proc/net/route: # cat /proc/net/route Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT eth0 140BCF5B 010BCF5B 0007 0 0 0 FFFFFFFF 0 0 0 venet0 3D0ACF5B 00000000 0005 0 0 0 FFFFFFFF 0 0 0 venet0 3C0ACF5B 00000000 0005 0 0 0 FFFFFFFF 0 0 0 eth0 3201A8C0 010BCF5B 0007 0 0 0 FFFFFFFF 0 0 0 but there is no routes, which are deleted after adding ip to venet0. -- Pozdrawiam, Łukasz Chrustek
On Tue, Mar 22, 2011 at 12:31:18AM +0100, Łukasz Chrustek wrote:
but I can't see them in ospf on other routers (It looks like they are not imported to ospf - it may be my wrong configuration, see bellow)
I'm sorry, my mistake. Redistribution static routes into ospf works, I can see them on other routers. Still is problem with vanished routes 'via venet0' after ip add. I can see routes via venet0 in
I am not sure what routes do you mean, the same routes that you add to the static protocol (they should be exported to the kernel table)? Or some other, not yet mentioned ones? BTW, it seems to me that openvz is doing some crazy network setup on host system, perhaps the best way to handle that is to fix openvz to have proper network config on its venet iface (like one ptp address per one host). -- Elen sila lumenn' omentielvo Ondrej 'SanTiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
Hello,
I'm sorry, my mistake. Redistribution static routes into ospf works, I can see them on other routers. Still is problem with vanished routes 'via venet0' after ip add. I can see routes via venet0 in
I am not sure what routes do you mean, the same routes that you add to the static protocol (they should be exported to the kernel table)? Or some other, not yet mentioned ones?
Routes which I have added to protocol static are redistributed and works fine, but all other routes (I added 3 ips to static from all 8 ips configured by host system) dissapered. Now I need to check if it is openvz issue or bird issue.
BTW, it seems to me that openvz is doing some crazy network setup on host system, perhaps the best way to handle that is to fix openvz to have proper network config on its venet iface (like one ptp address per one host).
Yes... It is more adequate solution, but... in quagga it works without need to change anything in openvz or quagga code. I will try to patch sysdep/linux/netlink/netlink.c, as You wrote earlier. I write about the result. -- Regards, Łukasz Chrustek
Hello,
Yes... It is more adequate solution, but... in quagga it works without need to change anything in openvz or quagga code. I will try to patch sysdep/linux/netlink/netlink.c, as You wrote earlier. I write about the result.
And it works ! :), after rebuild the bird with commented out lines from file above (more info: [1]) I can see the openvz routes in bird's routing table and on others ospf routers: 0.0.0.0/0 via X.Y.11.1 on eth0 [kernel1 12:32] * (10) 10.1.1.0/24 dev eth1 [MyOSPF 12:32] * I (150/10) [X.Y.11.3] 192.168.1.140/32 dev venet0 [kernel1 12:32] * (10) X.Y.10.65/32 dev venet0 [kernel1 12:32] * (10) X.Y.11.0/29 dev eth0 [MyOSPF 12:32] * I (150/10) [X.Y.11.3] X.Y.10.64/32 dev venet0 [kernel1 12:32] * (10) X.Y.10.61/32 dev venet0 [kernel1 12:32] * (10) X.Y.10.60/32 dev venet0 [kernel1 12:32] * (10) 192.168.1.51/32 dev venet0 [kernel1 12:32] * (10) Is there any other solution to this, rather then patching source ? [1] http://www.mail-archive.com/bird-users@atrey.karlin.mff.cuni.cz/msg01039.htm... -- Pozdrawiam, Łukasz Chrustek
participants (2)
-
Ondrej Zajicek -
Łukasz Chrustek