a. Enter BGP configuration mode from global configuration mode, specifying AS 1000.
R1(config)# router bgp 1000 |
b. Configure the BGP router-id for R1.
R1(config-router)# bgp router-id 1.1.1.1 |
c. Based on the topology diagram, configure all the designated neighbors for R1.
R1(config-router)# neighbor 10.1.2.2 remote-as 500 R1(config-router)# neighbor 10.1.3.3 remote-as 300 R1(config-router)# neighbor 10.1.3.130 remote-as 300 |
d. Configure R1 to advertise the IPv4 prefixes of local ASN 1000.
R1(config-router)# network 192.168.1.0 mask 255.255.255.224 R1(config-router)# network 192.168.1.64 mask 255.255.255.192 |
a. Enter BGP configuration mode from global configuration mode, specifying AS 500.
R2(config)# router bgp 500 |
b. Configure the BGP router-id for R2.
R2(config-router)# bgp router-id 2.2.2.2 |
c. Based on the topology diagram, configure all the designated neighbors for R2.
R2(config-router)# neighbor 10.1.2.1 remote-as 1000 R2(config-router)# neighbor 10.2.3.3 remote-as 300 |
d. Configure R2 to advertise the IPv4 prefixes local to ASN 500.
R2(config-router)# network 192.168.2.0 mask 255.255.255.224 R2(config-router)# network 192.168.2.64 mask 255.255.255.192 |
a. Enter BGP configuration mode from global configuration mode, specifying AS 300.
R3(config)# router bgp 300 |
b. Configure the BGP router-id for R3.
R3(config-router)# bgp router-id 3.3.3.3 |
c. Unlike the configuration on R1 and R2, disable the default IPv4 unicast behavior.
R3(config-router)# no bgp default ipv4-unicast |
The default behavior in IOS is bgp default ipv4-unicast. Routers R1 and R2 were configured using this default behavior. The bgp default ipv4-unicast command enables the automatic exchange of IPv4 address family prefixes. When this command is disabled using no bgp default ipv4-unicast, bgp neighbors must be activated within IPv4 address family (AF) configuration mode. BGP network commands must also be configured within IPv4 AF mode.
d. Based on the topology diagram, configure all the designated neighbors for R3.
R3(config-router)# neighbor 10.2.3.2 remote-as 500 R3(config-router)# neighbor 10.1.3.1 remote-as 1000 R3(config-router)# neighbor 10.1.3.129 remote-as 1000 |
a. Examine the routing tables on each router. Notice that R1 and R2 are receiving BGP prefixes from each other but not receiving BGP prefixes from R3. And R3 is not receiving any prefixes from R1 or R2. This is because R3 was configured using no bgp default ipv4-unicast and the interfaces must be activated within IPv4 address configuration mode.
R1# show ip route bgp | begin Gateway Gateway of last resort is not set
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks B 192.168.2.0/27 [20/0] via 10.1.2.2, 00:28:40 B 192.168.2.64/26 [20/0] via 10.1.2.2, 00:28:40 |
R2# show ip route bgp | begin Gateway Gateway of last resort is not set
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks B 192.168.1.0/27 [20/0] via 10.1.2.1, 00:29:41 B 192.168.1.64/26 [20/0] via 10.1.2.1, 00:29:41 |
R3# show ip route bgp | begin Gateway Gateway of last resort is not set |
b. This can be further verified by examining the BGP neighbor adjacencies on R2. Notice the BGP state between R2 and R1 is established, while the BGP state between R2 and R3 is idle.
R2# show ip bgp neighbors BGP neighbor is 10.1.2.1, remote AS 1000, external link BGP version 4, remote router ID 1.1.1.1 BGP state = Established, up for 00:35:34 Last read 00:00:28, last write 00:00:35, hold time is 180, keepalive interval is 60 seconds Neighbor sessions: 1 active, is not multisession capable (disabled) <output omitted>
BGP neighbor is 10.2.3.3, remote AS 300, external link BGP version 4, remote router ID 0.0.0.0 BGP state = Idle, down for never Neighbor sessions: 0 active, is not multisession capable (disabled) <output omitted> |
c. The interfaces on R3 need to be activated in IPv4 AF configuration mode. The neighbor activate command in IPv4 AF configuration mode is required to enable the exchange of BGP information between neighbors. This will enable R3 to form an established neighbor adjacency with both R1 and R2. Additionally, because bgp default ipv4-unicast is disabled, network commands must be configured in IPv4 AF configuration mode.
R3(config-router)# address-family ipv4 R3(config-router-af)# neighbor 10.1.3.1 activate R3(config-router-af)# neighbor 10.1.3.129 activate R3(config-router-af)# neighbor 10.2.3.2 activate R3(config-router-af)# network 192.168.3.0 mask 255.255.255.224 R3(config-router-af)# network 192.168.3.64 mask 255.255.255.192 |
d. Verify that all BGP speakers are receiving prefixes from their neighbors. The prefixes from R3 are highlighted in the routing tables of R1 and R2.
Note: The prefixes in the lab are for example purposes only. Most service providers do not accept prefixes larger than /24 for IPv4 (/25 through /32).
R1# show ip route bgp | begin Gateway Gateway of last resort is not set
192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks B 192.168.2.0/27 [20/0] via 10.1.2.2, 00:51:09 B 192.168.2.64/26 [20/0] via 10.1.2.2, 00:51:09 192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks B 192.168.3.0/27 [20/0] via 10.1.3.3, 00:01:43 B 192.168.3.64/26 [20/0] via 10.1.3.3, 00:01:43 |
R2# show ip route bgp | begin Gateway Gateway of last resort is not set
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks B 192.168.1.0/27 [20/0] via 10.1.2.1, 00:51:17 B 192.168.1.64/26 [20/0] via 10.1.2.1, 00:51:17 192.168.3.0/24 is variably subnetted, 2 subnets, 2 masks B 192.168.3.0/27 [20/0] via 10.2.3.3, 00:01:51 B 192.168.3.64/26 [20/0] via 10.2.3.3, 00:01:51 |
R3# show ip route bgp | begin Gateway Gateway of last resort is not set
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks B 192.168.1.0/27 [20/0] via 10.1.3.1, 00:02:11 B 192.168.1.64/26 [20/0] via 10.1.3.1, 00:02:11 192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks B 192.168.2.0/27 [20/0] via 10.2.3.2, 00:02:11 B 192.168.2.64/26 [20/0] via 10.2.3.2, 00:02:11 |
e. Verify that the BGP state between R2 and R3 has now been established.
R2# show ip bgp neighbors | begin BGP neighbor is 10.2.3.3 BGP neighbor is 10.2.3.3, remote AS 300, external link BGP version 4, remote router ID 3.3.3.3 BGP state = Established, up for 00:12:16 Last read 00:00:37, last write 00:00:52, hold time is 180, keepalive interval is 60 seconds Neighbor sessions: 1 active, is not multisession capable (disabled) <output omitted> |
Examine the running-configs on all three routers. Because router R3 was configured using no bgp default ipv4-unicast command, notice that the network commands were automatically entered under the IPv4 AF. This is the same configuration mode where the neighbors were activated to exchange BGP information.
R1# show running-config | section bgp router bgp 1000 bgp router-id 1.1.1.1 bgp log-neighbor-changes network 192.168.1.0 mask 255.255.255.224 network 192.168.1.64 mask 255.255.255.192 neighbor 10.1.2.2 remote-as 500 neighbor 10.1.3.3 remote-as 300 neighbor 10.1.3.130 remote-as 300 |
R2# show running-config | section bgp router bgp 500 bgp router-id 2.2.2.2 bgp log-neighbor-changes network 192.168.2.0 mask 255.255.255.224 network 192.168.2.64 mask 255.255.255.192 neighbor 10.1.2.1 remote-as 1000 neighbor 10.2.3.3 remote-as 300 |
R3# show running-config | section bgp router bgp 300 bgp log-neighbor-changes no bgp default ipv4-unicast neighbor 10.1.3.1 remote-as 1000 neighbor 10.1.3.129 remote-as 1000 neighbor 10.2.3.2 remote-as 500 ! address-family ipv4 network 192.168.3.0 mask 255.255.255.224 network 192.168.3.64 mask 255.255.255.192 neighbor 10.1.3.1 activate neighbor 10.1.3.129 activate neighbor 10.2.3.2 activate exit-address-family |
a. To verify the BGP operation on R2, issue the show ip bgp command.
R2# show ip bgp BGP table version is 11, local router ID is 2.2.2.2 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, t secondary path, L long-lived-stale, Origin codes: i – IGP, e – EGP, ? – incomplete RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path * 192.168.1.0/27 10.2.3.3 0 300 1000 i *> 10.1.2.1 0 0 1000 i * 192.168.1.64/26 10.2.3.3 0 300 1000 i *> 10.1.2.1 0 0 1000 i *> 192.168.2.0/27 0.0.0.0 0 32768 i *> 192.168.2.64/26 0.0.0.0 0 32768 i *> 192.168.3.0/27 10.2.3.3 0 0 300 i * 10.1.2.1 0 1000 300 i *> 192.168.3.64/26 10.2.3.3 0 0 300 i * 10.1.2.1 0 1000 300 i |
What does the * at the beginning of an entry indicate?
The entry is valid, reachable.
What does the angle bracket (>) in an entry indicate?
An angle bracket (>) indicates that the route has been selected as the best route.
What is the address of the preferred next hop router to reach the 192.168.1.0/27 network? Explain.
10.1.2.1. It is preferred because it has shorter AS path.
How can you verify that 10.1.2.1 is the next hop router used to reach 192.168.1.0/27?
Display the routing table on R2.
B 192.168.1.0/27 [20/0] via 10.1.2.1, 17:31:46
What does a next hop of 0.0.0.0 indicate?
This advertised prefix is a directly connected network.
b. Use the show ip bgp ip-prefix command to display all the paths for a specific route and the BGP path attributes for that route.
R2# show ip bgp 192.168.1.0 BGP routing table entry for 192.168.1.0/27, version 14 Paths: (2 available, best #2, table default) Advertised to update-groups: 1 Refresh Epoch 1 300 1000 10.2.3.3 from 10.2.3.3 (3.3.3.3) Origin IGP, localpref 100, valid, external rx pathid: 0, tx pathid: 0 Refresh Epoch 2 1000 10.1.2.1 from 10.1.2.1 (1.1.1.1) Origin IGP, metric 0, localpref 100, valid, external, best rx pathid: 0, tx pathid: 0x0 |
What is the IPv4 address of the next hop router with the best path?
10.1.2.1
c. Examine the BGP neighbor relationships on R2 using the show ip bgp neighbors command.
R2# show ip bgp neighbors BGP neighbor is 10.1.2.1, remote AS 1000, external link BGP version 4, remote router ID 1.1.1.1 BGP state = Established, up for 00:00:51 Last read 00:00:00, last write 00:00:51, hold time is 180, keepalive interval is 60 seconds Neighbor sessions: 1 active, is not multisession capable (disabled) Neighbor capabilities: Route refresh: advertised and received(new) Four-octets ASN Capability: advertised and received Address family IPv4 Unicast: advertised and received Enhanced Refresh Capability: advertised and received Multisession Capability: Stateful switchover support enabled: NO for session 1 Message statistics: InQ depth is 0 OutQ depth is 0
Sent Rcvd Opens: 1 1 Notifications: 0 0 Updates: 5 5 Keepalives: 2 3 Route Refresh: 0 0 Total: 10 11 <output omitted>
BGP neighbor is 10.2.3.3, remote AS 300, external link BGP version 4, remote router ID 3.3.3.3 BGP state = Established, up for 16:23:45 Last read 00:00:29, last write 00:00:51, hold time is 180, keepalive interval is 60 seconds Neighbor sessions: 1 active, is not multisession capable (disabled) Neighbor capabilities: Route refresh: advertised and received(new) Four-octets ASN Capability: advertised and received Address family IPv4 Unicast: advertised and received Enhanced Refresh Capability: advertised and received Multisession Capability: Stateful switchover support enabled: NO for session 1 Message statistics: InQ depth is 0 OutQ depth is 0
Sent Rcvd Opens: 1 1 Notifications: 0 0 Updates: 9 5 Keepalives: 1082 1088 Route Refresh: 0 0 Total: 1096 1096 Do log neighbor state changes (via global configuration) Default minimum time between advertisement runs is 30 seconds <output omitted> |
How many neighbors does R2 have and what are their router IDs?
Two neighbors: 1.1.1.1 and 3.3.3.3
What is the BGP state of both neighbors?
established
What are the keepalive and hold time value for both neighbors?
Keepalive is 60 seconds, hold time is180 seconds