11.1.2 Lab - Implement eBGP For IPv4
11.1.2 Lab - Implement eBGP For IPv4
Topology
Addressing Table
Device Interface IPv4 Address
R1 G0/0/0 10.1.2.1/24
R1
S0/1/0 10.1.3.1/25
R1
S0/1/1 10.1.3.129/25
R1
Loopback0 192.168.1.1/27
R1
Loopback1 192.168.1.65/26
R2 G0/0/0 10.1.2.2/24
R2
G0/0/1 10.2.3.2/24
R2
Loopback0 192.168.2.1/27
R2
Loopback1 192.168.2.65/26
R3 G0/0/0 10.2.3.3/24
R3
S0/1/0 10.1.3.3/25
R3
S0/1/1 10.1.3.130/25
R3
Loopback0 192.168.3.1/27
R3
Loopback1 192.168.3.65/26
2019 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 1 of 16 www.netacad.com
Lab - Implement eBGP for IPv4
Objectives
Part 1: Build the Network and Configure Basic Device Settings and Interface Addressing
Part 2: Configure and Verify eBGP for IPv4 on all Routers
Part 3: Configure and Verify Route Summarization and Atomic Aggregate
Part 4: Configure and Verify Route Summarization with Atomic Aggregate and AS-Set
Part 5: Configure and Verify the Advertising of a Default Route
Background / Scenario
In this lab you will configure eBGP for IPv4.
Note: This lab is an exercise in developing, deploying, and verifying various path manipulation tools for BGP,
and does not reflect networking best practices.
Note: The routers used with CCNP hands-on labs are Cisco 4221 with Cisco IOS XE Release 16.9.4
(universalk9 image). Other routers and Cisco IOS versions can be used. Depending on the model and Cisco
IOS version, the commands available and the output produced might vary from what is shown in the labs.
Note: Ensure that the routers and switches have been erased and have no startup configurations. If you are
unsure contact your instructor.
Required Resources
3 Routers (Cisco 4221 with Cisco IOS XE Release 16.9.4 universal image or comparable)
1 PC (Windows with a terminal emulation program, such as Tera Term)
Console cables to configure the Cisco IOS devices via the console ports
Ethernet and serial cables as shown in the topology
Instructions
Part 1: Build the Network and Configure Basic Device Settings and Interface
Addressing
In Part 1, you will set up the network topology and configure basic settings and interface addressing on
routers.
Router R1
hostname R1
no ip domain lookup
line con 0
logging sync
exec-time 0 0
exit
2019 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 2 of 16 www.netacad.com
Lab - Implement eBGP for IPv4
interface Loopback0
ip address 192.168.1.1 255.255.255.224
no shut
exit
interface Loopback1
ip address 192.168.1.65 255.255.255.192
no shut
exit
interface GigabitEthernet0/0/0
ip address 10.1.2.1 255.255.255.0
no shut
exit
interface Serial0/1/0
ip address 10.1.3.1 255.255.255.128
no shut
exit
interface Serial0/1/1
ip address 10.1.3.129 255.255.255.128
no shut
exit
Router R2
hostname R2
no ip domain lookup
line con 0
logging sync
exec-time 0 0
exit
interface Loopback0
ip address 192.168.2.1 255.255.255.224
no shut
exit
interface Loopback1
ip address 192.168.2.65 255.255.255.192
no shut
exit
interface GigabitEthernet0/0/0
ip address 10.1.2.2 255.255.255.0
no shut
exit
interface GigabitEthernet0/0/1
ip address 10.2.3.2 255.255.255.0
no shut
exit
Router R3
hostname R3
2019 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 3 of 16 www.netacad.com
Lab - Implement eBGP for IPv4
no ip domain lookup
line con 0
logging sync
exec-time 0 0
exit
interface Loopback0
ip address 192.168.3.1 255.255.255.224
no shut
exit
interface Loopback1
ip address 192.168.3.65 255.255.255.192
no shut
exit
interface GigabitEthernet0/0/0
ip address 10.2.3.3 255.255.255.0
negotiation auto
no shut
exit
interface Serial0/1/0
ip address 10.1.3.3 255.255.255.128
no shut
exit
interface Serial0/1/1
ip address 10.1.3.130 255.255.255.128
no shut
exit
b. Save the running configuration to startup-config.
Close configuration window
2019 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 4 of 16 www.netacad.com
Lab - Implement eBGP for IPv4
2019 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 5 of 16 www.netacad.com
Lab - Implement eBGP for IPv4
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>
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
2019 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 6 of 16 www.netacad.com
Lab - Implement eBGP for IPv4
2019 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 7 of 16 www.netacad.com
Lab - Implement eBGP for IPv4
2019 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 8 of 16 www.netacad.com
Lab - Implement eBGP for IPv4
What is the address of the preferred next hop router to reach the 192.168.1.0/27 network? Explain.
Type your answers here.
How can you verify that 10.1.2.1 is the next hop router used to reach 192.168.1.0/27?
Type your answers here.
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
Question:
What is the IPv4 address of the next hop router with the best path?
Type your answers here.
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:
2019 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 9 of 16 www.netacad.com
Lab - Implement eBGP for IPv4
Sent Rcvd
Opens: 1 1
Notifications: 0 0
Updates: 5 5
Keepalives: 2 3
Route Refresh: 0 0
Total: 10 11
<output omitted>
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>
2019 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 10 of 16 www.netacad.com
Lab - Implement eBGP for IPv4
Questions:
How many neighbors does R2 have and what are their router IDs?
Type your answers here.
What are the keepalive and hold time value for both neighbors?
Type your answers here.
2019 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 11 of 16 www.netacad.com
Lab - Implement eBGP for IPv4
Why do R1 and R3 contain an entry with a next hop address of Null0? What is the result of having this
Null0 route in the routing table?
Type your answers here.
b. Examine the BGP table on router R2 to verify the route summarization. When a prefix has the default
classful mask, the subnet mask is not displayed. Both 192.168.1.0 and 192.168.3.0 prefixes have a /24
prefix length which would be the default mask for a Class C address.
R2# show ip bgp
BGP table version is 69, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
<output omitted>
c. Examine the BGP table on routers R2 and R3 and verify that each router is receiving the summary route
from the other router.
R1# show ip bgp
BGP table version is 69, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
<output omitted>
2019 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 12 of 16 www.netacad.com
Lab - Implement eBGP for IPv4
Why do two of the entries have the status code of "s"? Specifically, this is the result of what command or
option that was configured on these two routers?
Type your answers here.
d. Examine the explicit 192.168.1.0 prefix entry in R2's BGP table. The route's NLRI information indicates
that the route was aggregated in AS 1000 by router with the RID 1.1.1.1.
R2# show ip bgp 192.168.1.0
BGP routing table entry for 192.168.1.0/24, version 45
Paths: (2 available, best #2, table default)
Advertised to update-groups:
1
Refresh Epoch 1
300 1000, (aggregated by 1000 1.1.1.1)
10.2.3.3 from 10.2.3.3 (3.3.3.3)
Origin IGP, localpref 100, valid, external, atomic-aggregate
rx pathid: 0, tx pathid: 0
Refresh Epoch 2
1000, (aggregated by 1000 1.1.1.1)
10.1.2.1 from 10.1.2.1 (1.1.1.1)
Origin IGP, metric 0, localpref 100, valid, external, atomic-aggregate, best
2019 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 13 of 16 www.netacad.com
Lab - Implement eBGP for IPv4
Part 4: Configure and Verify Route Summarization with Atomic Aggregate and
AS-Set
Step 1: Configure route summarization using atomic aggregate and AS-Set.
a. Shut down both serial interfaces on R1. This will create a single path from R1 (AS 1000) to R2 (AS 500)
to R3 (AS 300).
Open configuration window
c. Verify that R3 is now receiving the non-summarized prefixes 192.168.1.0/27 and 192.168.1.64/26.
R3# show ip route 192.168.1.0
Routing entry for 192.168.1.0/24, 2 known subnets
Variably subnetted with 2 masks
B 192.168.1.0/27 [20/0] via 10.2.3.2, 00:01:26
B 192.168.1.64/26 [20/0] via 10.2.3.2, 00:01:26
d. On R2, summarize the prefixes 192.168.1.0/27 and 192.168.1.64/26 received from R1 as 192.168.1.0/24.
R2(config)# router bgp 500
R2(config-router)# aggregate-address 192.168.1.0 255.255.255.0 summary-only
Close configuration window
b. Examine R3's BGP table. Notice that the AS path only includes the AS that summarized the route, AS
500, router R2.
R3# show ip bgp
<output omitted>
2019 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 14 of 16 www.netacad.com
Lab - Implement eBGP for IPv4
c. On R2, remove the current route aggregation for the 192.168.1.0/24 prefix and configure it again, this
time using the as-set option.
R2(config)# router bgp 500
R2(config-router)# no aggregate-address 192.168.1.0 255.255.255.0 summary-only
R2(config-router)# aggregate-address 192.168.1.0 255.255.255.0 as-set summary-only
e. Examine R3's BGP table again. Notice that the entry for 192.168.1.0 this time includes the entire AS path.
The output from the show ip bgp 192.168.1.0 command displays both AS numbers and identifies that R2
(2.2.2.2) aggregated the route.
R3# show ip bgp
<output omitted>
Network Next Hop Metric LocPrf Weight Path
*> 192.168.1.0 10.2.3.2 0 0 500 1000 i
*> 192.168.2.0/27 10.2.3.2 0 0 500 i
*> 192.168.2.64/26 10.2.3.2 0 0 500 i
s> 192.168.3.0/27 0.0.0.0 0 32768 i
*> 192.168.3.0 0.0.0.0 32768 i
s> 192.168.3.64/26 0.0.0.0 0 32768 i
2019 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 15 of 16 www.netacad.com
Lab - Implement eBGP for IPv4
Note: To find out how the router is configured, look at the interfaces to identify the type of router and how many
interfaces the router has. There is no way to effectively list all the combinations of configurations for each router
class. This table includes identifiers for the possible combinations of Ethernet and Serial interfaces in the device.
The table does not include any other type of interface, even though a specific router may contain one. An example
of this might be an ISDN BRI interface. The string in parenthesis is the legal abbreviation that can be used in
Cisco IOS commands to represent the interface. End of document
2019 - 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public Page 16 of 16 www.netacad.com