Initially as per our topology, we will add some static routes.
Router1(config)#ip route 2.2.2.2 255.255.255.255 192.167.23.2
Router1(config)#ip route 3.3.3.3 255.255.255.255 192.167.24.3
Router2(config)#ip route 3.3.3.3 255.255.255.255 192.167.23.1
Router2(config)#ip route 1.1.1.1 255.255.255.255 192.167.23.1
Router2(config)#ip route 192.167.24.0 255.255.255.0 192.167.23.1
Router3(config)#ip route 1.1.1.1 255.255.255.255 192.167.24.1
Router3(config)#ip route 2.2.2.2 255.255.255.255 192.167.24.1
Router3(config)#ip route 192.167.23.0 255.255.255.0 192.167.24.1
Now we will set the MED
Router1(config)#route-map MED permit 10
Router1(config-route-map)#set metric 2000
Configuration Without BGP Peer Group
Router1(config)#router bgp 10
Router1(config-router)#neighbor 2.2.2.2 remote-as 20
Router1(config-router)#neighbor 3.3.3.3 remote-as 30
Router1(config-router)#neighbor 2.2.2.2 update-source loopback 1
Router1(config-router)#neighbor 3.3.3.3 update-source loopback 1
Router1(config-router)#neighbor 2.2.2.2 ebgp-multihop 2
Router1(config-router)#neighbor 3.3.3.3 ebgp-multihop 2
Router1(config-router)#neighbor 2.2.2.2 route-map MED out
Router1(config-router)#neighbor 3.3.3.3 route-map MED out
Configuration With BGP Peer Group
Initially, again we will start BGP configuration from starting
Router1 Configuration -
Router1(config)#router bgp 10
Router1(config-router)#neighbor 2.2.2.2 remote-as 20
Router1(config-router)#neighbor 3.3.3.3 remote-as 30
Now we will create BGP Peer Group
Router1(config)#router bgp 10
Router1(config-router)#neighbor R2-R3 peer-group
Now we will add neighbor in this group
Router1(config-router)#neighbor 2.2.2.2 peer-group R2-R3
Router1(config-router)#neighbor 3.3.3.3 peer-group R2-R3
Now which you want to configure, you can be applied to the peer group instead of applying it to the neighbor directly -
Router1(config-router)#neighbor R2-R3 update-source loopback 1
Router1(config-router)#neighbor R2-R3 ebgp-multihop 2
Router1(config-router)#neighbor R2-R3 route-map MED out
Router2 Configuration -
Router2(config)#route-map MED permit 10
Router2(config-route-map)#set metric 2000
Router2(config-route-map)#exit
Router2(config)#router bgp 20
Router2(config-router)#neighbor 1.1.1.1 remote-as 10
Router2(config-router)#neighbor 3.3.3.3 remote-as 30
Router2(config-router)#neighbor R1-R3 peer-group
Router2(config-router)#neighbor 1.1.1.1 peer-group R1-R3
Router2(config-router)#neighbor 3.3.3.3 peer-group R1-R3
Router2(config-router)#neighbor R1-R3 update-source loopback 1
Router2(config-router)#neighbor R1-R3 ebgp-multihop 2
Router2(config-router)#neighbor R1-R3 route-map MED out
Router2(config-router)#exit
Router3 Configuration -
Router3(config)#route-map MED permit 10
Router3(config-route-map)#set metric 2000
Router3(config-route-map)#exit
Router3(config)#router bgp 30
Router3(config-router)#neighbor 1.1.1.1 remote-as 10
Router3(config-router)#neighbor 2.2.2.2 remote-as 20
Router3(config-router)#neighbor R1-R2 peer-group
Router3(config-router)#neighbor 1.1.1.1 peer-group R1-R2
Router3(config-router)#neighbor 2.2.2.2 peer-group R1-R2
Router3(config-router)#neighbor R1-R2 update-source loopback 1
Router3(config-router)#neighbor R1-R2 ebgp-multihop 2
Router3(config-router)#neighbor R1-R2 route-map MED out
Router3(config-router)#exit
0 comments:
Post a Comment
If you like my posts then please comment and if you don’t like then please suggest me to improve, and if you have any query related to post then please text me through the comment box or mail me on upadhyayambition@gmail.com , I will try my best to solve your queries as soon as possible.