【Lab Objectives】
1. To understand how the BGP attributes to impact the data flow of other self-government system to flow into the local self-government system.
2. To master the MED configuration methods on base of route-map.
【Lab Topology】
【Lab Steps】
1. Configure the router’s IP address, and use the Ping command to confirm the connect’s interoperability of each router.
2. Configure the BGP protocols of each router.
3. In the lab of using Route Maps to Configuring BGP Local Preference, to introduce how to use the data flow of local priority configuration to flow out of local self-government system.
4. Check the routing table of R3 and R4, this lab is still concerned about the two loopback interface routes in the 64,512 self-government system:
R3#show ip route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets B 172.16.1.0 [20/0] via 192.168.1.1, 00:08:58 10.0.0.0/24 is subnetted, 1 subnets C 10.1.1.0 is directly connected, Serial1/1 130.130.0.0/24 is subnetted, 1 subnets B 130.130.1.0 [20/0] via 192.168.1.1, 00:08:58 C 192.168.1.0/24 is directly connected, Serial1/0 B 192.168.2.0/24 [200/0] via 10.1.1.2, 00:08:58 150.150.0.0/24 is subnetted, 1 subnets B 150.150.1.0 [20/0] via 192.168.1.1, 00:08:58 |
R4#show ip route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets B 172.16.1.0 [20/0] via 192.168.2.2, 00:20:47 10.0.0.0/24 is subnetted, 1 subnets C 10.1.1.0 is directly connected, Serial1/0 130.130.0.0/24 is subnetted, 1 subnets B 130.130.1.0 [20/0] via 192.168.2.2, 00:20:47 B 192.168.1.0/24 [200/0] via 10.1.1.1, 00:13:52 C 192.168.2.0/24 is directly connected, FastEthernet0/0 150.150.0.0/24 is subnetted, 1 subnets B 150.150.1.0 [20/0] via 192.168.2.2, 00:19:48 |
5. It can be seen from the routing table that the subnet 130.130.1.0/24 of R1 which router R3 reaches has chosen a second-best route. In practice of network applications, May due to the R3 will make the traffic which reaches the AS 64512 self-government to send to router R2 through its direct connections, while the link is a low-speed WAN link between R2 and R3, therefore, it will lead to congestion to its interface. As a result, 64512 self-government systems also hopes to make full use of Fast Ethernet links between R3 and R4 to carry out the data transmission. In order to achieve this goal, can configure the MED attributes on R1 and R2, because MED attributes can affect data flow of the self-government system for the other properties how to flow into the local self-government system.
6. According to MED feature that the route with lower value of the properties will be the preferred choice of properties, and the default value of MED is 0. As a result, it will be fine to configure the MED value of the route which the R2 notified to network to 130.130.1.0/24 be higher than the default values on R2, base on not to modify the default MED value of R1.
7. In order to be able to observe the changes of MED configuration on former and later route, it needs to check BGP database table of R3 and R4:
R3#show ip bgp
Network Next Hop Metric LocPrf Weight Path ……… *> 130.130.1.0/24 192.168.1.1 0 64512 i * i 192.168.2.2 0 100 0 64512 i *> 150.150.1.0/24 192.168.1.1 0 0 64512 i * i 192.168.2.2 0 100 0 64512 i ……… |
R4#show ip bgp
Network Next Hop Metric LocPrf Weight Path ……… * i130.130.1.0/24 192.168.1.1 0 100 0 64512 i *> 192.168.2.2 0 0 64512 i * i150.150.1.0/24 192.168.1.1 0 100 0 64512 i *> 192.168.2.2 0 64512 i ……… |
8. To implement MED strategy configuration on R2.
R2(config)#access-list 1 permit 130.130.1.0 0.0.0.255 R2(config)# R2(config)#route-map set_med permit 10 R2(config-route-map)#match ip address 1 R2(config-route-map)#set metric 100 R2(config-route-map)#exit R2(config)# R2(config)#route-map set_med permit 20 R2(config-route-map)#exit R2(config)# R2(config)#router bgp 64512 R2(config-router)#neighbor 192.168.1.2 route-map set_med out R2(config-router)#exit R2(config)# R2# R2#clear ip bgp * soft out |
9. Check database information of R3 and R4.
R3#show ip bgp
Network Next Hop Metric LocPrf Weight Path ……… * 130.130.1.0/24 192.168.1.1 100 0 64512 i *>i 192.168.2.2 0 100 0 64512 i *> 150.150.1.0/24 192.168.1.1 0 0 64512 i * i 192.168.2.2 0 100 0 64512 i ……… |
R4#show ip bgp
Network Next Hop Metric LocPrf Weight Path ……… *> 130.130.1.0/24 192.168.2.2 0 0 64512 i * i150.150.1.0/24 192.168.1.1 0 100 0 64512 i *> 192.168.2.2 0 64512 i ……… |
10. In order to determine the route that R3 reaches the network 130.130.1.0/24 is the exact best route, needs to configure the next hop attribute on R4. The configuration is shown as below:
R4(config)#router bgp 64513 R4(config-router)#neighbor 10.1.1.1 next-hop-self R4(config-router)#exit R4(config)#exit |
11. Check the BGP database and routing table on router R3.
R3#show ip bgp
Network Next Hop Metric LocPrf Weight Path ……… * 130.130.1.0/24 192.168.1.1 100 0 64512 i *>i 10.1.1.2 0 100 0 64512 i *> 150.150.1.0/24 192.168.1.1 0 0 64512 i * i 10.1.1.2 0 100 0 64512 i ……… |
R3#show ip route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets B 172.16.1.0 [20/0] via 192.168.1.1, 00:48:49 10.0.0.0/24 is subnetted, 1 subnets C 10.1.1.0 is directly connected, Serial1/1 130.130.0.0/24 is subnetted, 1 subnets B 130.130.1.0 [200/0] via 10.1.1.2, 00:03:50 C 192.168.1.0/24 is directly connected, Serial1/0 B 192.168.2.0/24 [200/0] via 10.1.1.2, 00:48:49 150.150.0.0/24 is subnetted, 1 subnets B 150.150.1.0 [20/0] via 192.168.1.1, 00:48:49 |
12. To confirm the route information by using traceroute command:
R3#traceroute 130.130.1.1
Type escape sequence to abort. Tracing the route to 130.130.1.1
1 10.1.1.2 32 msec 64 msec 80 msec 2 192.168.2.2 128 msec * 84 msec |
13. Lab completed.
Hope to helpful for you!