Saturday, 1 February 2020

AS Path


I have removed the weight and local preference so that I show the AS path selection process.

R5#sh route-map
route-map AS_R4, permit, sequence 10
  Match clauses:
  Set clauses:
    as-path prepend 500 500 500 500
  Policy routing matches: 0 packets, 0 bytes

R5#sh run | s router bgp
router bgp 500
 no synchronization
 bgp log-neighbor-changes
 network 5.1.0.0 mask 255.255.255.0
 network 5.2.0.0 mask 255.255.255.0
 network 5.3.0.0 mask 255.255.255.0
 neighbor 150.4.4.4 remote-as 400
 neighbor 150.4.4.4 ebgp-multihop 2
 neighbor 150.4.4.4 update-source Loopback0
 neighbor 150.4.4.4 route-map AS_R4 in
 neighbor 155.1.35.3 remote-as 100
 no auto-summary

Now check the BGP routing table.
R5#sh ip bgp
BGP table version is 53, local router ID is 150.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 4.1.0.0/24       155.1.35.3                             0 100 400 i
*                             150.4.4.4                0             0 500 500 500 500 400 i
*> 4.2.0.0/24       155.1.35.3                             0 100 400 i
*                             150.4.4.4                0             0 500 500 500 500 400 i
*> 4.3.0.0/24       155.1.35.3                             0 100 400 i
*                             150.4.4.4                0             0 500 500 500

R5 prepending the its own AS path so that now the best route via R3 since it has the shortest route.

No comments:

Post a Comment