Learning points:
- The first BGP attributes
- Created by Cisco (Cisco proprietary)
- Weight is not exchanged between BGP routers.
- Weight is only local on the router.
- The path with the highest weight is preferred.
R1:
R1#sh run | sec bgp
ipv6 multicast rpf use-bgp
router bgp 1
bgp log-neighbor-changes
neighbor 192.168.12.2 remote-as 2
neighbor 192.168.13.3 remote-as 2
R2:
R2#sh run | sec bgp
ipv6 multicast rpf use-bgp
router bgp 2
bgp log-neighbor-changes
network 11.11.11.11 mask 255.255.255.255
network 22.22.22.22 mask 255.255.255.255
neighbor 192.168.12.1 remote-as 1
neighbor 192.168.23.3 remote-as 2
R3:
R3#sh run | sec bgp
ipv6 multicast rpf use-bgp
router bgp 2
bgp log-neighbor-changes
network 11.11.11.11 mask 255.255.255.255
network 22.22.22.22 mask 255.255.255.255
neighbor 192.168.13.1 remote-as 1
neighbor 192.168.23.2 remote-as 2
BGP neighbors:
R1#show ip bg summary
BGP router identifier 192.168.13.1, local AS number 1
BGP table version is 3, main routing table version 3
2 network entries using 288 bytes of memory
4 path entries using 320 bytes of memory
1/1 BGP path/bestpath attribute entries using 136 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 768 total bytes of memory
BGP activity 2/0 prefixes, 4/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
192.168.12.2 4 2 24 23 3 0 0 00:17:21 2
192.168.13.3 4 2 5 6 3 0 0 00:00:23 2
R1#
R2#show ip bgp summary
BGP router identifier 192.168.23.2, local AS number 2
BGP table version is 3, main routing table version 3
2 network entries using 288 bytes of memory
4 path entries using 320 bytes of memory
2/1 BGP path/bestpath attribute entries using 272 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 880 total bytes of memory
BGP activity 2/0 prefixes, 6/2 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
192.168.12.1 4 1 25 26 3 0 0 00:19:11 0
192.168.23.3 4 2 8 9 3 0 0 00:04:21 2
R2#
The BGP topology table is telling me that to reach 11.x.x.x & 22.x.x.x , the path is via R2
R1#show ip bgp
BGP table version is 3, local router ID is 192.168.13.1
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i – IGP, e – EGP, ? – incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
* 11.11.11.11/32 192.168.13.3 0 0 2 i
*> 192.168.12.2 0 0 2 i
* 22.22.22.22/32 192.168.13.3 0 0 2 i
*> 192.168.12.2 0 0 2 i
WEIGHT: The path with the highest weight is preferred.
R1(config)#router bgp 1
R1(config-router)#neighbor 192.168.13.3 weight 100
R1(config-router)#
Clear BGP..
R1#clear ip bgp *
The BGP topology table has the new candidate default and the new Weight.
R1#show ip bgp
BGP table version is 3, local router ID is 192.168.13.1
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i – IGP, e – EGP, ? – incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
* 11.11.11.11/32 192.168.12.2 0 0 2 i
*> 192.168.13.3 0 100 2 i
* 22.22.22.22/32 192.168.12.2 0 0 2 i
*> 192.168.13.3 0 100 2 i
The routing Table will show ONLY the best path,
R1#show ip route 11.11.11.11
Routing entry for 11.11.11.11/32
Known via “bgp 1”, distance 20, metric 0
Tag 2, type external
Last update from 192.168.13.3 00:01:04 ago
Routing Descriptor Blocks:
* 192.168.13.3, from 192.168.13.3, 00:01:04 ago
Route metric is 0, traffic share count is 1
AS Hops 1
Route tag 2
MPLS label: none
So what if I want to divide the incoming traffic…In this case 11.11.11.11 via R2 while 22.22.22.22 via R3.
R1(config)#route-map WEIGHT-R1 permit 10
R1(config-route-map)#set weight 500
R1(config-route-map)#match ip address 1
R1(config)#route-map WEIGHT-R3 permit 20
R1(config-route-map)#set weight 100
R1(config-route-map)#match ip address 2
R1#sh run | inc access-list
access-list 1 permit 22.22.22.22
access-list 2 permit 11.11.11.11
So here’s the new BGP topology table,
R1#show ip bgp
BGP table version is 3, local router ID is 192.168.13.1
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i – IGP, e – EGP, ? – incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 11.11.11.11/32 192.168.13.3 0 100 2 i
*> 22.22.22.22/32 192.168.12.2 0 500 2 i
Routing table:
R1#sho ip route bgp
!
Gateway of last resort is not set
11.0.0.0/32 is subnetted, 1 subnets
B 11.11.11.11 [20/0] via 192.168.13.3, 00:08:42
22.0.0.0/32 is subnetted, 1 subnets
B 22.22.22.22 [20/0] via 192.168.12.2, 00:08:42
R1#ping 11.11.11.11
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 11.11.11.11, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/54/60 ms
R1#ping 22.22.22.22
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 22.22.22.22, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/56/60 ms
***********************END OF LAB****************************************
Leave a comment