cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5705
Views
0
Helpful
4
Replies

BGP - Conditional Default Origination

Joseph Nelson
Level 1
Level 1

Hi,

We have a setup like the following:

e1------e2

|    \     /  |

|      \  /   |

|      / \    |

|    /     \  |

|   /       \ |

c1        c2

The scenario has the following features:

  • iBGP full mesh between router loopbacks
  • Collapsed core/distribution design
  • Edge routers (e1, and e2) are dual multi-homed with 3 providers ( 2 providers are on e1 and another 1 provider is on e2). Both receive full+default announcements from the providers
  • Edge routers are advertising only a default route to the core routers (c1 and c2)

Goal:

  • Edge routers originate a default to core routers ( c1 and c2) if and only if they have a default route in their routing table

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

1 Accepted Solution

Accepted Solutions

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

View solution in original post

4 Replies 4

Lei Tian
Cisco Employee
Cisco Employee

Yes, that config looks right.

HTH,
Lei Tian

Sent from Cisco Technical Support iPhone App

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

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

Excelent Lei!


Thanks I had some doubts but you've solidified it for me. Thanks again.

Joe

Review Cisco Networking for a $25 gift card