08-07-2013 01:56 PM - edited 03-04-2019 08:42 PM
Hi,
We have a setup like the following:
e1------e2
| \ / |
| \ / |
| / \ |
| / \ |
| / \ |
c1 c2
The scenario has the following features:
Goal:
From the reading this "conditional announcement" can be achieved using the "neighbor x.x.x.x default-originate route-map rmap" command in router config mode. If at least one prefix in the route-map ( here: rmap) is matched in the local routing table, a default will be originated.
My question:
Can you specify the route-map to match on the default prefix as follows?:
config t
ip prefix-list IPV4-DEFAULT 10 permit 0.0.0.0/0
route-map IPV4-COND-DEFAULT seq 10 permit
match ip address IPV4-DEFAULT
end
config t
router bgp ASNX
neighbor x.x.x.x default-originate route-map IPV4-COND-DEFAULT
end
Reference:
http://www.cisco.com/en/US/docs/ios/iproute_bgp/command/reference/irg_bgp3.html#wp1105838
http://njetwork.wordpress.com/2013/01/28/bored-with-bgp-generating-a-default-route/
http://blog.ipspace.net/2011/09/responsible-generation-of-bgp-default.html
Solved! Go to Solution.
08-08-2013 02:41 PM
Hi Joe,
Don't recall if I have any customer is doing it; just tested it in lab
R1#sh run | sec router bgp
router bgp 100
bgp log-neighbor-changes
neighbor 10.10.10.2 remote-as 200
neighbor 10.10.10.2 default-originate route-map DEFAULT
R1#sh route-map
route-map DEFAULT, permit, sequence 10
Match clauses:
ip address prefix-lists: DEFAULT
Set clauses:
Policy routing matches: 0 packets, 0 bytes
R1#sh ip prefix-list
ip prefix-list DEFAULT: 1 entries
seq 5 permit 0.0.0.0/0
R1#sh ip route
S* 0.0.0.0/0 is directly connected, FastEthernet0/1
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.10.10.0/24 is directly connected, FastEthernet0/0
L 10.10.10.1/32 is directly connected, FastEthernet0/0
C 10.10.20.0/24 is directly connected, FastEthernet0/1
L 10.10.20.1/32 is directly connected, FastEthernet0/1
R2#sh ip route
B* 0.0.0.0/0 [20/0] via 10.10.10.1, 00:00:47
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.10.10.0/24 is directly connected, FastEthernet0/0
L 10.10.10.2/32 is directly connected, FastEthernet0/0
remove static default from R1
R1#sh ip route
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.10.10.0/24 is directly connected, FastEthernet0/0
L 10.10.10.1/32 is directly connected, FastEthernet0/0
R2#sh ip route
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.10.10.0/24 is directly connected, FastEthernet0/0
L 10.10.10.2/32 is directly connected, FastEthernet0/0
HTH,
Lei Tian
08-07-2013 05:20 PM
Yes, that config looks right.
HTH,
Lei Tian
Sent from Cisco Technical Support iPhone App
08-08-2013 06:41 AM
Lie,
Thanks for your reply. Have you every configured something like this? What was your experience configuration a conditional default in this way?
Other feedback welcomed.
Joe
08-08-2013 02:41 PM
Hi Joe,
Don't recall if I have any customer is doing it; just tested it in lab
R1#sh run | sec router bgp
router bgp 100
bgp log-neighbor-changes
neighbor 10.10.10.2 remote-as 200
neighbor 10.10.10.2 default-originate route-map DEFAULT
R1#sh route-map
route-map DEFAULT, permit, sequence 10
Match clauses:
ip address prefix-lists: DEFAULT
Set clauses:
Policy routing matches: 0 packets, 0 bytes
R1#sh ip prefix-list
ip prefix-list DEFAULT: 1 entries
seq 5 permit 0.0.0.0/0
R1#sh ip route
S* 0.0.0.0/0 is directly connected, FastEthernet0/1
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.10.10.0/24 is directly connected, FastEthernet0/0
L 10.10.10.1/32 is directly connected, FastEthernet0/0
C 10.10.20.0/24 is directly connected, FastEthernet0/1
L 10.10.20.1/32 is directly connected, FastEthernet0/1
R2#sh ip route
B* 0.0.0.0/0 [20/0] via 10.10.10.1, 00:00:47
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.10.10.0/24 is directly connected, FastEthernet0/0
L 10.10.10.2/32 is directly connected, FastEthernet0/0
remove static default from R1
R1#sh ip route
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.10.10.0/24 is directly connected, FastEthernet0/0
L 10.10.10.1/32 is directly connected, FastEthernet0/0
R2#sh ip route
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.10.10.0/24 is directly connected, FastEthernet0/0
L 10.10.10.2/32 is directly connected, FastEthernet0/0
HTH,
Lei Tian
08-08-2013 04:00 PM
Excelent Lei!
Thanks I had some doubts but you've solidified it for me. Thanks again.
Joe
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: