Why filter not work for two cases?
My network. Bird is used as border router on the standalone server. I have a two upstream ISPs from which I accept full view + default route over eBGP. I have a one downstream ISP to which I announce full view + default route. Into my AS a IGP protocol is OSPF. The L3 switch Cisco 3550 is used on a network. Bird IP is 10.10.1.2, Cisco 3550 IP is 10.10.1.3. To BGP downstream I plan to announce a default route which is exported from the bird static protocol, for stability. For OSPF neighbors I plan to announce a default route which is received from the upstream ISPs, since for each operator in the future there will be a server. Now the default route in routing table is imported only from upstreams, route to 0.0.0.0/0 network is not present in static protocol of bird. Оutput of birdc bird> show route where source=RTS_BGP && net = 0.0.0.0/0 0.0.0.0/0 via 93.191.9.205 on eth2.701 [bgpfiord 2010-05-09 19:37:35] * (100) [AS28917i] via 82.138.44.129 on eth2.51 [bgpcomcor 2010-05-09 19:37:31] (100) [AS8732i] bird> bird> show route where net = 0.0.0.0/0 0.0.0.0/0 via 93.191.9.205 on eth2.701 [bgpfiord 2010-05-09 19:37:35] * (100) [AS28917i] via 82.138.44.129 on eth2.51 [bgpcomcor 2010-05-09 19:37:31] (100) [AS8732i] bird> The filter which exports a default route from routing table to OSPF protocol looks as follows ... filter export_default_route_from_bgp_to_ospf { if ( source = RTS_BGP && net = 0.0.0.0/0 ) then { print "net accepted:", net; ospf_metric1 = 48; accept; } reject; } ... Default route is present в LSA_DB of OSPF bird. See output of birdc bird> show ospf lsadb Global Type LS ID Router Age Sequence Checksum 0005 0.0.0.0 10.10.1.2 41 80000001 a16c 0005 11.11.11.12 10.10.1.3 1880 80000037 9f88 0005 12.12.12.12 10.10.1.3 1880 80000037 7ba9 0005 13.13.13.12 10.10.1.3 1880 80000037 57ca Area 0.0.0.0 Type LS ID Router Age Sequence Checksum 0001 10.10.1.2 10.10.1.2 125 80000129 19a8 0001 10.10.1.3 10.10.1.3 93 8000018a cf76 0002 10.10.1.3 10.10.1.3 94 80000006 7ed6 bird> Console output of 3550 3550-L3-S1#show ip route 0.0.0.0 Routing entry for 0.0.0.0/0, supernet Known via "ospf 65500", distance 110, metric 49, candidate default path, type extern 1 Last update from 10.10.1.2 on Vlan550, 00:00:39 ago Routing Descriptor Blocks: * 10.10.1.2, from 10.10.1.2, 00:00:39 ago, via Vlan550 Route metric is 49, traffic share count is 1 3550-L3-S1# Default route is present в LSA_DB of OSPF Cisco 3550. Now I add a command in a configuration of the static protocol protocol static { ... route 0.0.0.0/0 via "lo"; ... } I softly restart bird and see the following bird> show route where source=RTS_BGP && net = 0.0.0.0/0 0.0.0.0/0 via 93.191.9.205 on eth2.701 [bgpfiord 2010-05-09 19:37:35] (100) [AS28917i] via 82.138.44.129 on eth2.51 [bgpcomcor 2010-05-09 19:37:31] (100) [AS8732i] bird> bird> show route where net = 0.0.0.0/0 0.0.0.0/0 dev lo [static1 2010-05-09 20:12:32] * (254) via 93.191.9.205 on eth2.701 [bgpfiord 2010-05-09 19:37:35] (100) [AS28917i] via 82.138.44.129 on eth2.51 [bgpcomcor 2010-05-09 19:37:31] (100) [AS8732i] bird> Default route is not present в LSA_DB of OSPF bird. Оutput of birdc bird> show ospf lsadb Global Type LS ID Router Age Sequence Checksum 0005 11.11.11.12 10.10.1.3 246 80000038 9d89 0005 12.12.12.12 10.10.1.3 246 80000038 79aa 0005 13.13.13.12 10.10.1.3 246 80000038 55cb Area 0.0.0.0 Type LS ID Router Age Sequence Checksum 0001 10.10.1.2 10.10.1.2 519 80000129 19a8 0001 10.10.1.3 10.10.1.3 487 8000018a cf76 0002 10.10.1.3 10.10.1.3 488 80000006 7ed6 bird> In result OSPF neighbor Cisco 3550 does not receive default route from bird. 3550-L3-S1#show ip route 0.0.0.0 % Network not in table 3550-L3-S1# Сlause "source = RTS_BGP && net = 0.0.0.0/0" in filter export_default_route_from_bgp_to_ospf and clause "source=RTS_BGP && net = 0.0.0.0/0" in the "show route" command is same. Why the default route is not exported to OSPF protocol from bird routing table after adding route 0.0.0.0/0 via "lo"; in bird.config of static protocol? Why filter export_default_route_from_bgp_to_ospf does not work for two cases? Vladislav Grishin
On Thu, Jul 08, 2010 at 01:17:45PM +0400, ????????? ?????? wrote:
My network.
Bird is used as border router on the standalone server.
I have a two upstream ISPs from which I accept full view + default route over eBGP. I have a one downstream ISP to which I announce full view + default route.
Into my AS a IGP protocol is OSPF. The L3 switch Cisco 3550 is used on a network. Bird IP is 10.10.1.2, Cisco 3550 IP is 10.10.1.3.
To BGP downstream I plan to announce a default route which is exported from the bird static protocol, for stability. For OSPF neighbors I plan to announce a default route which is received from the upstream ISPs, since for each operator in the future there will be a server.
...
Why the default route is not exported to OSPF protocol from bird routing table after adding
route 0.0.0.0/0 via "lo";
in bird.config of static protocol?
Why filter export_default_route_from_bgp_to_ospf does not work for two cases?
If there are more routes to the same destination, only the best route is considered for export. If the best route is filtered, then no route is exported. If you want to export one default route to the OSPF and a different one to the downstream BGP, you have to use two routing tables and a pipe, for example one (master) routing table for upstream BGP and OSPF and another table for downstream BGP and a static protocol with a default route. And a pipe that forwards routes from master to the secondary table, but does not forward default from secondary to the primary table. -- 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."
I thank you, it seems clearly. Vladislav Grishin. -----Original Message----- From: Ondrej Zajicek [mailto:santiago@crfreenet.org] Sent: Thursday, July 08, 2010 5:28 PM To: ????????? ?????? Cc: bird-users@trubka.network.cz Subject: Re: Why filter not work for two cases? On Thu, Jul 08, 2010 at 01:17:45PM +0400, ????????? ?????? wrote:
My network.
Bird is used as border router on the standalone server.
I have a two upstream ISPs from which I accept full view + default route over eBGP. I have a one downstream ISP to which I announce full view + default route.
Into my AS a IGP protocol is OSPF. The L3 switch Cisco 3550 is used on a network. Bird IP is 10.10.1.2, Cisco 3550 IP is 10.10.1.3.
To BGP downstream I plan to announce a default route which is exported from the bird static protocol, for stability. For OSPF neighbors I plan to announce a default route which is received from the upstream ISPs, since for each operator in the future there will be a server.
...
Why the default route is not exported to OSPF protocol from bird routing table after adding
route 0.0.0.0/0 via "lo";
in bird.config of static protocol?
Why filter export_default_route_from_bgp_to_ospf does not work for two cases?
If there are more routes to the same destination, only the best route is considered for export. If the best route is filtered, then no route is exported. If you want to export one default route to the OSPF and a different one to the downstream BGP, you have to use two routing tables and a pipe, for example one (master) routing table for upstream BGP and OSPF and another table for downstream BGP and a static protocol with a default route. And a pipe that forwards routes from master to the secondary table, but does not forward default from secondary to the primary table. -- 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."
participants (2)
-
Ondrej Zajicek -
Владислав Гришин