COMPUTER TIPS
How to configure BGP with weight attribute?
BGP stands for Border Gateway Protocol is true built-in policy based routing protocols. BGP uses different attribute to implement these polices in route selection process between different autonomous systems. There are some main attributes that BGP uses in route selection process.
Weight
Local preference
Multi-exit Discriminator or MED
Origin
AS_Path
Next Hop
Community
We will configure here only weight attribute in detail and the remaining attributes will be discussed in the next tips.
The weight attribute basically a Cisco proprietary technology and considered as first attribute in BGP. The default value of weight is 0 and the range is from 0 to 65535. If we change the weight value of one router that change will not propagate to other router and the route with maximum weight value will be considered as the best route.
Today tip will help you configure BGP between two different autonomous systems. In this case, we will try to configure four different routers with routing protocols RIP and then complete the all routing tables using BGP. At the end, we will change the weight of one route in order to give it preference over a lower one
Follow the network topology of four different class networks in the given figure:
Configuration BGP on Router A
In global configuration Mode:
A(config)# router bgp 10
A (config-router) # neighbor 40.1.1.2 remote-as 20
A (config-router) # neighbor 70.1.1.1 remote-as 20
A (config-router) # network 210.100.30.0
A (config-router) #end
Configuration to Enable BGP & RIP on Router B
In global configuration Mode:
B(config)# router bgp 20
B (config-router) # neighbor 40.1.1.1 remote-as 10
B (config-router) # neighbor 50.1.1.2 remote-as 20
B (config-router) # neighbor 60.1.1.2 remote-as 20
B (config-router) #no synchronization
B (config-router) #end
B (config) #router rip
B (config-router) # network 40.0.0.0
B (config-router) # network 50.0.0.0
B (config-router) #end
Configuration to Enable BGP & RIP on Router C
In global configuration Mode:
C(config)# router bgp 20
C (config-router) # neighbor 50.1.1.1 remote-as 20
C (config-router) # neighbor 60.1.1.2 remote-as 20
C (config-router) #no synchronization
C (config-router) #end
C (config) #router rip
C (config-router) # network 50.0.0.0
C (config-router) # network 60.0.0.0
C (config-router) #end
Configuration to Enable BGP & RIP on Router D
In global configuration Mode:
D(config)# router bgp 20
D (config-router) # neighbor 70.1.1.2 remote-as 10
D (config-router) # neighbor 50.1.1.1 remote-as 20
D (config-router) # neighbor 60.1.1.1 remote-as 20
D (config-router) #no synchronization
D (config-router) #end
D (config) #router rip
D (config-router) # network 70.0.0.0
D (config-router) # network 60.0.0.0
D (config-router) #end
Now run show command to display the BGP updates on router C with default weight value.
C #show ip bgp
Then verify the routes in router C routing table, run the command
C #show ip route
Now change the weight value on router C in order to give it preference over a lower one.
In global configuration Mode:
C(config)# router bgp 20
C (config-router) # neighbor 50.1.1.1 weight 100
Now again run show command to display the BGP updates on router C with weight value 100.
C #show ip bgpBreak or recover the router passwordSuggested Reading
Routing Information Protocol (RIP) Configuration
How to configure Stub area in OSPF protocol?
How to protect EIGRP router from receiving unsigned routing updates?
How to configure BGP between two different autonomous systems? New
How to configure virtual link between different areas in OSPF?
How to perform unequal-cost load balancing using EIGRP? New
How to configure Site-to-Site IPsec VPN?
How configure EIGRP authentication to prevent unauthorized access?
How to configure BGP with weight attribute? New
How to perform configuration and convergence between RIP and IGRP protocols?
Interior Gateway Routing Protocol (IGRP) Configuration
Extended IP Access Control List
Enhanced Interior Gateway Routing Protocol (EIGRP) Configuration
Useful Router commands and configuration Common Frame Relay Configuration
Home | Previous Page | Site Map | About Us