5-3 distance bgp external internal local

 <  Free Open Study  >  

5-3 distance bgp external internal local

Syntax Description:

  • external ” Routes learned via EBGP.

  • internal ” Routes learned via IBGP

  • local ” Routes entered into the BGP table via the aggregate-address command.

Defaults: external 20, internal 200, local 200

Purpose: To modify the administrative distance of BGP routes. When a particular route is learned via multiple routing protocols, the administrative distance is used to select the best route. The lower administrative distance is preferred. The administrative distances used for the IP routing protocols are:

  • Connected ” 0

  • Static ” 1

  • EBGP ” 20

  • EIGRP ” 90

  • IGRP ” 100

  • OSPF ” 110

  • IS-IS ” 115

  • RIP ” 120

  • IBGP ” 200

Cisco IOS Software Release: 10.0

Configuration Example: Modifying the Distance for External, Internal, and Local BGP Routes

In Figure 5-2, Router A is advertising 144.223.1.0/24 via EBGP and Router C is advertising 205.40.30.0/24 via IBGP. From the perspective of Router B the EBGP route is external and the IBGP route is local. If we create an aggregate on Router B then a route to Null0 for the aggregate will be installed in the IP routing table. The Null0 route is considered a BGP local route.

Figure 5-2. External, Internal, and Local BGP Routes

graphics/05fig02.gif

 Router A  interface loopback 0   ip address 144.223.1.1 255.255.255.0   !   router bgp 1   network 144.223.1.0 mask 255.255.255.0   neighbor 172.17.1.1 remote-as 2   ___________________________________________________________________________  Router B  router bgp 2   no synchronization   aggregate-address 144.223.0.0 255.255.252.0 summary-only   neighbor 172.17.1.2 remote-as 1   neighbor 10.1.1.2 remote-as 2   ___________________________________________________________________________  Router C  interface loopback 0   ip address 205.40.30.1 255.255.255.0   !   router bgp 2   network 205.40.30.0   neighbor 10.1.1.1 remote-as 2  

The BGP table on Router B should contain 3 routes. The route from Router A is external, the route from Router C is internal and the route to Null0 for 144.223.0.0 is local.

 rtrB#  show ip bgp  BGP table version is 5, local router ID is 172.16.2.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete    Network          Next Hop            Metric LocPrf Weight Path *> 144.223.0.0/22   0.0.0.0                            32768 i s> 144.223.1.0/24   172.17.1.2               0             0 1 i *>i205.40.30.0      10.1.1.2                 0    100      0 I  ___________________________________________________________________________  rtrB#  show ip bgp 144.223.1.0  BGP routing table entry for 144.223.1.0/24, version 5 Paths: (1 available, best #1, table Default-IP-Routing-Table, Advertisements sup pressed by an aggregate.)   Not advertised to any peer   1     172.17.1.2 from 172.17.1.2 (144.223.1.1)  Origin IGP, metric 0, localpref 100, valid, external, best   ___________________________________________________________________________  rtrB#  show ip bgp 205.40.30.0  BGP routing table entry for 205.40.30.0/24, version 2 Paths: (1 available, best #1, table Default-IP-Routing-Table)   Advertised to non peer-group peers:   172.17.1.2   Local     10.1.1.2 from 10.1.1.2 (205.40.30.1)  Origin IGP, metric 0, localpref 100, valid, internal, best   ___________________________________________________________________________  p2#  show ip bgp 144.223.0.0  BGP routing table entry for 144.223.0.0/22, version 4 Paths: (1 available, best #1, table Default-IP-Routing-Table)   Advertised to non peer-group peers:   10.1.1.2 172.17.1.2   Local, (aggregated by 2 172.16.2.1)     0.0.0.0 from 0.0.0.0 (172.16.2.1)  Origin IGP, localpref 100, weight 32768, valid, aggregated, local, atomic- aggregate, best  

The administrative distance for these routes can be seen in the IP routing table entries for Router B:

 rtrB#  show ip route bgp  144.223.0.0/16 is variably subnetted, 2 subnets, 2 masks B       144.223.1.0/24 [20/0] via 172.17.1.2, 00:05:58 B       144.223.0.0/22 [200/0] via 0.0.0.0, 00:05:58, Null0 B    205.40.30.0/24 [200/0] via 10.1.1.2, 00:06:07 

Modify the BGP configuration on Router B to set the administrative distance of external routes to 15, internal routes to 25, and local routes to 35:

  router bgp 2   no synchronization   aggregate-address 144.223.0.0 255.255.252.0 summary-only   neighbor 172.17.1.2 remote-as 1   neighbor 10.1.1.2 remote-as 2    distance bgp 15 25 35   
Verification

Verify that the administrative distance for the external, internal, and local BGP routes has been modified:

 rtrB#  show ip route bgp  B       144.223.1.0/24 [15/0] via 172.17.1.2, 00:03:30 B       144.223.0.0/22 [35/0] via 0.0.0.0, 00:03:30, Null0 B    205.40.30.0/24 [25/0] via 10.1.1.2, 00:03:30 
Troubleshooting
Step 1. Verify that the BGP neighbors are in the Established state using the show ip bgp neighbors command.

If the neighbor relationship is not in the Established state then see section 8-23.

Step 2. If the neighbors are established then this command should work. Understand the difference between external, internal, and local BGP routes.

 <  Free Open Study  >  


Cisco[r] BGP-4 Command and Configuration Handbook
Cisco BGP-4 Command and Configuration Handbook
ISBN: 1587055732
EAN: 2147483647
Year: 2001
Pages: 300

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net