SOURCECODEBD.NET

Live Experience

12. AS-PATH ATTRIBUTE

HOW TO AS-PATH ATTRIBUTE CONFIGURATION
 
Interface IP Address Configuration 
 
R1 
 
Interface  IP Address   Subnet Mask 
S 0     1.1.1.1   255.0.0.0 
S 1     3.3.3.1   255.0.0.0 
E 0     10.1.1.1   255.0.0.0 
 
R2 
 
Interface  IP Address   Subnet Mask 
S 0     1.1.1.2   255.0.0.0 
S 1     2.2.2.1   255.0.0.0 
E 0     20.1.1.1   255.0.0.0 
  
R3 
 
Interface  IP Address   Subnet Mask 
S 0     2.2.2.2   255.0.0.0 
S 1     4.4.4.2   255.0.0.0 
E 0     30.1.1.1   255.0.0.0 
 
R4 
 
Interface  IP Address   Subnet Mask 
S 1     3.3.3.2   255.0.0.0 
S 0     4.4.4.1   255.0.0.0 
E 0     40.1.1.1   255.0.0.0 
 
Task 1: 
 
Configure BGP on all the routers.  
 
 
R1 
 
Router bgp 100 
Neighbor 1.1.1.2 remote-as 200 
Neighbor 3.3.3.2 remote-as 400
Network 1.0.0.0 
Network 3.0.0.0 
Network 10.0.0.0 
No synchronization
 
 
R2 
 
Router bgp 200 
Neighbor 2.2.2.2 remote-as 300 
Neighbor 1.1.1.1 remote-as 100 
Network 1.0.0.0 
Network 2.0.0.0 
Network 20.0.0.0 
No synchronization 
 
 
R3 
 
Router bgp 300 
Neighbor 2.2.2.1 remote-as 200 
Neighbor 4.4.4.1 remote-as 400 
Network 2.0.0.0 
Network 4.0.0.0 
Network 30.0.0.0 
No synchronization
 
R4 
 
Router bgp 400 
Neighbor 4.4.4.2 remote-as 300 
Neighbor 3.3.3.1 remote-as 100 
Network 3.0.0.0 
Network 4.0.0.0 
Network 40.0.0.0 
No synchronization
 
 
Verification: 
 
R4#show ip route 
 
R4#show ip bgp 30.0.0.0
 
The output displays that network 30.0.0.0 is reached via 4.4.4.2 from R4 as it is the 
shortest path when compared to the other path via 3.3.3.1. 
 
 
Task 2: 
 
Manipulate the path to reach network 30.0.0.0 on R4. You can use as-path prepend 
command using route-map to accomplish this task. 
 
R4 
 
Access-list 1 permit 30.0.0.0 
0.255.255.255 
 
Route-map map 1 permit 10 
Match ip add 1 
Set as-path prepend 400 400 400 400 
 
Route-map map1 permit 20 
 
Router bgp 400 
Neighbor 4.4.4.2 route-map map 1 in 
 
 
Verification: 
 
R4#show ip route 
 
R4#show ip bgp 30.0.0.0
 
The output displays that network 30.0.0.0 is reached via 3.3.3.1 from R4 as it is the 
shortest path when compared to the other path via 4.4.4.2. 
You are here: Home / BGP / HOW TO AS-PATH ATTRIBUTE CONFIGURATION