SOURCECODEBD.NET

Live Experience

7.  WEIGHT ATTRIBUTE

HOW TO WEIGHT 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            3.3.3.2           255.0.0.0 
E 0           30.1.1.1         255.0.0.0 
 
Task 1: 
 
Configure AS 200 such that all traffic destined for network 3.0.0.0 should go through R3. 
Use the Weight attribute to accomplish this task. 
 
R1 
 
Router bgp 100 
Neighbor 1.1.1.2 remote-as 200 
Neighbor 3.3.3.2 remote-as 300 
Network 1.0.0.0 
Network 3.0.0.0 
Network 10.0.0.0 
No synchronization 
 
R2 
 
Router bgp 200 
Neighbor 1.1.1.1 remote-as 100 
Neighbor 1.1.1.1 weight 500 
Neighbor 2.2.2.2 remote-as 300 
Neighbor 2.2.2.2 weight 1000 
Network 1.0.0.0 
Network 2.0.0.0 
Network 20.0.0.0 
Redistribute static
No synchronization
 
R3 
 
Router bgp 300 
Neighbor 2.2.2.1 remote-as 200 
Neighbor 3.3.3.1 remote-as 100 
Network 2.0.0.0 
Network 3.0.0.0 
Network 30.0.0.0 
No synchronization 
 
Verification: 
 
R2#show ip route 
 
The output displays that R2 has been forced to use R3 as the next-hop to reach network 
3.0.0.0 
 
R2#show ip bgp 3.0.0.0 
 
The output displays two paths and shows the path via 2.2.2.2 as the best path choosen 
because of the highest weight set to that path. 
 
R2#show ip bgp 10.0.0.0 
 
The output displays two paths and shows the path via 2.2.2.2 as the best path choosen 
because of the highest weight set to that path. 
 
 
Task 2: 
 
Configure route-map using weight attribute to manipulate the routing information on R2. 
 
R2 
 
Access-list 1 permit 30.0.0.0 0.255.255.255 
Access-list 2 permit 10.0.0.0 0.255.255.255 
 
Route-map list 1 permit 10 
Match ip address 1 
Set weight 1000 
 
Route-map list 1 permit 20 
 
Route-map list 2 permit 10 
Match ip add 2 
Set weight 1000 
 
Route-map list 2 permit 20 
 
Router bgp 200 
Neighbor 1.1.1.1 route-map list 1 in 
Neighbor 2.2.2.2 route-map list 2 in 
 
 
Verification: 
 
R2#sh ip route
 
The routing table displays that R2 is learning network 10.0.0.0 via 2.2.2.2 and network 
30.0.0.0 via 1.1.1.1
 
R2#show ip bgp 30.0.0.0 
 
R2#show ip bgp 10.0.0.0 
 
The output displays the best path to reach network 10.0.0.0 from R2 is via 2.2.2.2, 
because of the highest weight attribute set to that path.
You are here: Home / BGP / HOW TO WEIGHT ATTRIBUTE CONFIGURATION