5-2 distance admin-distance ip-source-address ip-address-mask ip-access-list-number

 <  Free Open Study  >  

5-2 distance admin-distance ip-source-address ip-address-mask ip-access-list-number

Syntax Description:

  • admin-distance ” Administrative distance assigned to learned routes. The value range is 1 to 255.

  • ip-source-address ” IP address of the source of the routing update.

  • ip-address-maskl ” Address mask for the source of the routing update.

  • ip-access-list-number ” Optional standard IP access list used to apply the administrative distance to selected routes.

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 as follows :

  • 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 1: Modifying the Distance of All Routes Received from a Particular Neighbor

In Figure 5-1, Router A is advertising 144.223.1.0/24 and 144.223.2.0/24 via EBGP, and Router C is advertising 205.40.30.0/24 via IBGP.

Figure 5-1. Default Administrative Distance for EBGP and IBGP

graphics/05fig01.gif

 Router A  interface loopback 0   ip address 144.223.1.1 255.255.255.0   !   interface loopback 1   ip address 144.223.2.1 255.255.255.0   !   router bgp 1   network 144.223.1.0 mask 255.255.255.0   network 144.223.2.0 mask 255.255.255.0   neighbor 172.17.1.1 remote-as 2   ___________________________________________________________________________  Router B  router bgp 2   no synchronization   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 default administrative distance is 20 for EBGP and 200 for IBGP. This can be verified by inspecting the IP routing table on Router B:

 rtrB#  show ip route bgp  144.223.0.0/24 is subnetted, 2 subnets B       144.223.2.0 [20/0] via 172.17.1.2, 00:00:51 B       144.223.1.0 [20/0] via 172.17.1.2, 01:13:14 B    205.40.30.0/24 [200/0] via 10.1.1.2, 01:13:14 

For this example, we will set the administrative distance to 50 for all routes received by Router B from Router C. Using the first form of the command, all we need to do is use the IP address of Router C. Modify the BGP configuration on Router B as shown:

 Router B router bgp 2  no synchronization  neighbor 172.17.1.2 remote-as 1  neighbor 10.1.1.2 remote-as 2  distance 50 10.1.1.2 0.0.0.0  

Using a mask of 0.0.0.0 matches all 32 bits of the IP address. Multiple addresses can be matched using a different mask. For example, using 10.1.1.0 0.0.0.255 matches all neighbors on subnet 10.1.1.0/24. To match all neighbors, use the address/mask pair 0.0.0.0 255.255.255.255.

Verification

Verify that the administrative distance of the route learned from Router C has been set to 50:

 rtrB#  show ip route bgp  144.223.0.0/24 is subnetted, 2 subnets B       144.223.2.0 [20/0] via 172.17.1.2, 00:00:51 B       144.223.1.0 [20/0] via 172.17.1.2, 01:13:14  B    205.40.30.0/24 [50/0] via 10.1.1.2, 01:13:14  

Configuration Example 2: Modifying the Distance of a Specific Route Received from a Particular Neighbor

For the configuration in Figure 5-1, we will set the administrative distance to 80 for the 144.223.1.0/24 route being advertised by Router A. Modify the BGP configuration on Router B as shown:

  router bgp 2   no synchronization   neighbor 172.17.1.1 remote-as 1   neighbor 10.1.1.2 remote-as 2   distance 50 10.1.1.2 0.0.0.0   distance 80 172.17.1.0 0.0.0.255 1   !   access-list 1 permit 144.223.1.0 0.0.0.255  
Verification

Verify that the 144.223.1.0 route now has an administrative distance of 80 and that the administrative distance for the 144.223.2.0 route is unchanged:

 rtrB#  show ip route bgp  144.223.0.0/24 is subnetted, 2 subnets  B       144.223.2.0 [20/0] via 172.17.1.2, 00:02:22   B       144.223.1.0 [80/0] via 172.17.1.2, 00:02:22  B    205.40.30.0/24 [50/0] via 10.1.1.2, 00:02:22 
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, see section 8-23.

Step 2. Verify that the address/mask pair matches the proper neighbor

Step 3. If using an access list, verify the syntax of the list and that you are referencing the proper list.

 <  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