BGP Conditional default-route advertisement
Conditional
default-route advertisement is done by associating a route-map with the “neighbor
default-originate” statement. The default route is advertised if the route-map
matches the prefix which is in the routing table.If the route is not in the
routing table, the related prefix will not be advertised to the neighbor.
We can
match ip prefixes with the route-map using either access-lists or prefix-lists.
Here is
the example:
We will
send default-route when 10.1.10.0/24 network is in the routing table:
ip
prefix-list test seq 5 permit 10.1.10.0/24
route-map
test permit 10
match ip address prefix-list test
router bgp 1
no synchronization
bgp log-neighbor-changes
bgp redistribute-internal
timers bgp 10 30
neighbor 10.10.10.6 remote-as 1
neighbor 10.10.10.6 default-originate
route-map test
no auto-summary
R1#sh run int f0/0.10
Building configuration...
Current configuration : 112 bytes
!
interface FastEthernet0/0.10
encapsulation dot1Q 10
ip address 10.1.10.1 255.255.255.0
end
R1#debug ip bgp update (to see
updates)
BGP updates debugging is on for
address family: IPv4 Unicast
R1#conf t
Enter configuration commands, one per
line. End with CNTL/Z.
R1(config)#int f0/0.10
R1(config-subif)#shut
R1(config-subif)#
*Mar
1 00:28:52.063: BGP(0): 10.10.10.6 send unreachable 0.0.0.0/0
*Mar
1 00:28:52.063: BGP(0): 10.10.10.6 enqueued default-originate update
R1(config-subif)#no shut
R1(config-subif)#
*Mar
1 00:29:00.031: BGP(0): 10.10.10.6 enqueued default-originate update
No comments:
Post a Comment