- This default route should be withdrawn if R2's link to BB2 goes down.
You may inject a default route into BGP by 2 ways:
1. using the network 0.0.0.0 mask 0.0.0.0 command, provided that there is a default route in the RIB. However, this will advertise the default route to all BGP neighbors.
2. To selectively generate a default route, use the command
neighbor <IP> default-originate [route-map <CONDITION>].
Without the route-map parameter, this command will generate a default route and send it to the configured peer. It is not required to have a matching default route in the BGP table or the RIB.
Note: You can match ip addresses with the routemap using either standard, extended access-list or prefix-lists. When using extended ACLs, you can match both the prefix and the subnet mask range in the same way you specify that for BGP filtering.
configuration:
R2:
ip prefix-list LINK_TO_BB2 permit 192.10.1.0/24
!
route-map DEFAULT permit 10
match ip address prefix-list LINK_TO_BB2
!
router bgp 200
neighbor 155.1.23.3 default-originate route-map DEFAULT
neighbor 155.1.0.5 default-originate route-map DEFAULT
note: when using extended access-list
ip access-list extended R2_BB2_LINK
permit ip 192.168.1.0 0.0.0.0 255.255.255.0 0.0.0.0.0
verification:
normal condition:
Rack1R3# show ip bgp 0.0.0.0
BGP routing table entry for 0.0.0.0/0, version 41
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1 2 3 4
Local
155.1.0.2 from 155.1.0.5 (150.1.5.5)
Origin IGP, metric 0, localpref 100, valid, internal
Originator: 222.22.1.1, Cluster list: 150.1.5.5
Local, (Received from a RR-client)
155.1.23.2 from 155.1.23.2 (222.22.1.1)
Origin IGP, metric 0, localpref 100, valid, internal, best
BGP routing table entry for 0.0.0.0/0, version 41
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1 2 3 4
Local
155.1.0.2 from 155.1.0.5 (150.1.5.5)
Origin IGP, metric 0, localpref 100, valid, internal
Originator: 222.22.1.1, Cluster list: 150.1.5.5
Local, (Received from a RR-client)
155.1.23.2 from 155.1.23.2 (222.22.1.1)
Origin IGP, metric 0, localpref 100, valid, internal, best
Rack1R5# show ip bgp 0.0.0.0
BGP routing table entry for 0.0.0.0/0, version 47
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Flag: 0x960
Advertised to update-groups:
1 2 3
Local, (Received from a RR-client)
155.1.0.2 from 155.1.0.2 (222.22.1.1)
Origin IGP, metric 0, localpref 100, valid, internal, best
Local
155.1.23.2 (metric 2681856) from 155.1.23.3 (150.1.3.3)
Origin IGP, metric 0, localpref 100, valid, internal
Originator: 222.22.1.1, Cluster list: 150.1.3.3
BGP routing table entry for 0.0.0.0/0, version 47
Paths: (2 available, best #1, table Default-IP-Routing-Table)
Flag: 0x960
Advertised to update-groups:
1 2 3
Local, (Received from a RR-client)
155.1.0.2 from 155.1.0.2 (222.22.1.1)
Origin IGP, metric 0, localpref 100, valid, internal, best
Local
155.1.23.2 (metric 2681856) from 155.1.23.3 (150.1.3.3)
Origin IGP, metric 0, localpref 100, valid, internal
Originator: 222.22.1.1, Cluster list: 150.1.3.3
when the link is down between R2 and BB2.
Rack1R2# show ip bgp 0.0.0.0
% Network not in table
% Network not in table
Rack1R5# show ip bgp 0.0.0.0
% Network not in table
% Network not in table
No comments:
Post a Comment