0% found this document useful (0 votes)
8 views

Lab 3-1 Ibgp and Ebgp

Chapter 3 of HCIP-IERS focuses on BGP features and configurations, specifically detailing the setup of IBGP and EBGP in a network with multiple autonomous systems. The lab objectives include configuring BGP, checking neighbor tables, and observing routing information transmission. It provides step-by-step instructions for configuring IP addresses, establishing OSPF as an IGP, and verifying connectivity and routing tables across routers.

Uploaded by

Yuri Henry
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Lab 3-1 Ibgp and Ebgp

Chapter 3 of HCIP-IERS focuses on BGP features and configurations, specifically detailing the setup of IBGP and EBGP in a network with multiple autonomous systems. The lab objectives include configuring BGP, checking neighbor tables, and observing routing information transmission. It provides step-by-step instructions for configuring IP addresses, establishing OSPF as an IGP, and verifying connectivity and routing tables across routers.

Uploaded by

Yuri Henry
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

HCIP-IERS Chapter 3 BGP Features and Configurations

Chapter 3 BGP Features and Configurations

Lab 3-1 IBGP and EBGP

Learning Objectives

The objectives of this lab are to learn and understand:

 How to configure IBGP


 How to configure BGP in multiple areas
 How to check the BGP neighbor table and database
 How to configure a BGP source address for initiating a connection
 How to configure EBGP multihop
 How to observe next-hop changes in IBGP and EBGP routes
 How to configure a next hop in IBGP
 How to configure the network command in BGP

Topology

Figure 3-1 IBGP and EBGP

HUAWEI TECHNOLOGIES 268


HCIP-IERS Chapter 3 BGP Features and Configurations

Scenario

You are a network administrator of a company. The company’s network uses BGP as
the routing protocol. This network consists of multiple autonomous systems (ASs).
Different branches use different AS numbers. You need to build this network. OSPF is
used in the headquarters as an IGP. Different branches in the company use private
BGP AS numbers. After building the network, you still need to observe BGP routing
information transmission.

Tasks

Step 1 Set basic parameters and configure IP addresses.

Configure IP addresses and masks for all the routers. The mask of IP addresses for
Loopback1 of R4 and R5 is 24 bits, which is used to simulate a user network.

<R1>system-view

Enter system view, return user view with Ctrl+Z.

[R1]interface Serial 1/0/0

[R1-Serial1/0/0]ip address 10.0.12.1 24

[R1-Serial1/0/0]quit

[R1]interface Serial 3/0/0

[R1-Serial3/0/0]ip address 10.0.14.1 24

[R1-Serial3/0/0]quit

[R1]interface LoopBack 0

[R1-LoopBack0]ip address 10.0.1.1 32

[R1-LoopBack0]quit

<R2>system-view

Enter system view, return user view with Ctrl+Z.

[R2]interface Serial 1/0/0

[R2-Serial1/0/0]ip address 10.0.12.2 24

[R2-Serial1/0/0]quit

HUAWEI TECHNOLOGIES 269


HCIP-IERS Chapter 3 BGP Features and Configurations

[R2]interface Serial 2/0/0

[R2-Serial2/0/0]ip address 10.0.23.2 24

[R2-Serial2/0/0]quit

[R2]interface LoopBack 0

[R2-LoopBack0]ip address 10.0.2.2 32

<R3>system-view

Enter system view, return user view with Ctrl+Z.

[R3]interface Serial 2/0/0

[R3-Serial2/0/0]ip address 10.0.23.3 24

[R3-Serial2/0/0]quit

[R3]interface Serial 3/0/0

[R3-Serial3/0/0]ip address 10.0.35.3 24

[R3-Serial3/0/0]quit

[R3]interface LoopBack 0

[R3-LoopBack0]ip address 10.0.3.3 32

<R4>system-view

Enter system view, return user view with Ctrl+Z.

[R4]interface Serial 1/0/0

[R4-Serial1/0/0]ip address 10.0.14.4 24

[R4-Serial1/0/0]quit

[R3]interface LoopBack 0

[R4-LoopBack0]ip address 10.0.4.4 32

<R5>system-view

Enter system view, return user view with Ctrl+Z.

[R5]interface Serial 1/0/0

[R5-Serial1/0/0]ip address 10.0.35.5 24

HUAWEI TECHNOLOGIES 270


HCIP-IERS Chapter 3 BGP Features and Configurations

[R5-Serial1/0/0]quit

[R3]interface LoopBack 0

[R5-LoopBack0]ip address 10.0.5.5 32

Test direct link connectivity.

<R1>ping -c 1 10.0.12.2

PING 10.0.12.2: 56 data bytes, press CTRL_C to break

Reply from 10.0.12.2: bytes=56 Sequence=1 ttl=255 time=34 ms

--- 10.0.12.2 ping statistics ---

1 packet(s) transmitted

1 packet(s) received

0.00% packet loss

round-trip min/avg/max = 34/34/34 ms

<R1>ping -c 1 10.0.14.4

PING 10.0.14.4: 56 data bytes, press CTRL_C to break

Reply from 10.0.14.4: bytes=56 Sequence=1 ttl=255 time=40 ms

--- 10.0.14.4 ping statistics ---

1 packet(s) transmitted

1 packet(s) received

0.00% packet loss

round-trip min/avg/max = 40/40/40 ms

<R3>ping -c 1 10.0.23.2

PING 10.0.23.2: 56 data bytes, press CTRL_C to break

Reply from 10.0.23.2: bytes=56 Sequence=1 ttl=255 time=33 ms

HUAWEI TECHNOLOGIES 271


HCIP-IERS Chapter 3 BGP Features and Configurations

--- 10.0.23.2 ping statistics ---

1 packet(s) transmitted

1 packet(s) received

0.00% packet loss

round-trip min/avg/max = 33/33/33 ms

<R3>ping -c 1 10.0.35.5

PING 10.0.35.5: 56 data bytes, press CTRL_C to break

Reply from 10.0.35.5: bytes=56 Sequence=1 ttl=255 time=35 ms

--- 10.0.35.5 ping statistics ---

1 packet(s) transmitted

1 packet(s) received

0.00% packet loss

round-trip min/avg/max = 35/35/35 ms

The preceding command output shows that direct link connectivity is normal.

Step 2 Configure an IGP in an AS.

Use OSPF as an IGP in AS 64512 and advertise the network segment connected to
Loopback0 into OSPF. Run OSPF on the network segment connected to S1/0/0 of R1.

[R1]router id 10.0.1.1

[R1]ospf 1

[R1-ospf-1]area 0

[R1-ospf-1-area-0.0.0.0]network 10.0.12.1 0.0.0.0

[R1-ospf-1-area-0.0.0.0]network 10.0.1.1 0.0.0.0

[R1-ospf-1-area-0.0.0.0]quit

[R1-ospf-1]quit

HUAWEI TECHNOLOGIES 272


HCIP-IERS Chapter 3 BGP Features and Configurations

Run OSPF on the network segments connected to S1/0/0 and S2/0/0 of R2.

[R2]router id 10.0.2.2

[R2]ospf 1

[R2-ospf-1]area 0

[R2-ospf-1-area-0.0.0.0]network 10.0.12.2 0.0.0.0

[R2-ospf-1-area-0.0.0.0]network 10.0.23.2 0.0.0.0

[R2-ospf-1-area-0.0.0.0]network 10.0.2.2 0.0.0.0

[R2-ospf-1-area-0.0.0.0]quit

[R2-ospf-1]quit

Run OSPF on the network segment connected to S2/0/0 of R3.

[R3]router id 10.0.3.3

[R3]ospf 1

[R3-ospf-1]area 0

[R3-ospf-1-area-0.0.0.0]network 10.0.23.3 0.0.0.0

[R3-ospf-1-area-0.0.0.0]network 10.0.3.3 0.0.0.0

[R3-ospf-1-area-0.0.0.0]quit

[R3-ospf-1]quit

When configuring the network command, use the wildcard mask 0.0.0.0.

After the configurations are complete, check whether OSPF neighbor relationships
are established.

[R2]display ospf peer

OSPF Process 1 with Router ID 10.0.2.2

Neighbors

HUAWEI TECHNOLOGIES 273


HCIP-IERS Chapter 3 BGP Features and Configurations

Area 0.0.0.0 interface 10.0.12.2(Serial1/0/0)'s neighbors

Router ID: 10.0.1.1 Address: 10.0.12.1

State: Full Mode:Nbr is Slave Priority: 1

DR: None BDR: None MTU: 0

Dead timer due in 37 sec

Retrans timer interval: 5

Neighbor is up for 00:01:05

Authentication Sequence: [ 0 ]

Neighbors

Area 0.0.0.0 interface 10.0.23.2(Serial2/0/0)'s neighbors

Router ID: 10.0.3.3 Address: 10.0.23.3

State: Full Mode:Nbr is Master Priority: 1

DR: None BDR: None MTU: 0

Dead timer due in 33 sec

Retrans timer interval: 5

Neighbor is up for 00:00:19

Authentication Sequence: [ 0 ]

Check the IP routing table of each router. Check whether these routers can learn
routes to the network segments connected to loopback interfaces of the peer device.

[R1]display ip routing-table

Route Flags: R - relay, D - download to fib

----------------------------------------------------------------------------

Routing Tables: Public

Destinations : 15 Routes : 15

HUAWEI TECHNOLOGIES 274


HCIP-IERS Chapter 3 BGP Features and Configurations

Destination/Mask Proto Pre Cost Flags NextHop Interface

10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0

10.0.2.2/32 OSPF 10 1562 D 10.0.12.2 Serial1/0/0

10.0.3.3/32 OSPF 10 3124 D 10.0.12.2 Serial1/0/0

10.0.12.0/24 Direct 0 0 D 10.0.12.1 Serial1/0/0

10.0.12.1/32 Direct 0 0 D 127.0.0.1 Serial1/0/0

10.0.12.2/32 Direct 0 0 D 10.0.12.2 Serial1/0/0

10.0.12.255/32 Direct 0 0 D 127.0.0.1 Serial1/0/0

10.0.14.0/24 Direct 0 0 D 10.0.14.1 Serial3/0/0

10.0.14.1/32 Direct 0 0 D 127.0.0.1 Serial3/0/0

10.0.14.4/32 Direct 0 0 D 10.0.14.4 Serial3/0/0

10.0.14.255/32 Direct 0 0 D 127.0.0.1 Serial3/0/0

10.0.23.0/24 OSPF 10 3124 D 10.0.12.2 Serial1/0/0

127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0

127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

127.255.255.255/32Direct 0 0 D 127.0.0.1 InLoopBack0

255.255.255.255/32Direct 0 0 D 127.0.0.1 InLoopBack0

[R2]display ip routing-table

Route Flags: R - relay, D - download to fib

----------------------------------------------------------------------------

Routing Tables: Public

Destinations : 15 Routes : 15

Destination/Mask Proto Pre Cost Flags NextHop Interface

10.0.1.1/32 OSPF 10 1562 D 10.0.12.1 Serial1/0/0

HUAWEI TECHNOLOGIES 275


HCIP-IERS Chapter 3 BGP Features and Configurations

10.0.2.2/32 Direct 0 0 D 127.0.0.1 LoopBack0

10.0.3.3/32 OSPF 10 1562 D 10.0.23.3 Serial2/0/0

10.0.12.0/24 Direct 0 0 D 10.0.12.2 Serial1/0/0

10.0.12.1/32 Direct 0 0 D 10.0.12.1 Serial1/0/0

10.0.12.2/32 Direct 0 0 D 127.0.0.1 Serial1/0/0

10.0.12.255/32Direct 0 0 D 127.0.0.1 Serial1/0/0

10.0.23.0/24 Direct 0 0 D 10.0.23.2 Serial2/0/0

10.0.23.2/32 Direct 0 0 D 127.0.0.1 Serial2/0/0

10.0.23.3/32 Direct 0 0 D 10.0.23.3 Serial2/0/0

10.0.23.255/32Direct 0 0 D 127.0.0.1 Serial2/0/0

127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0

127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0

[R3]display ip routing-table

Route Flags: R - relay, D - download to fib

----------------------------------------------------------------------------

Routing Tables: Public

Destinations : 16 Routes : 16

Destination/Mask Proto Pre Cost Flags NextHop Interface

10.0.1.1/32 OSPF 10 3124 D 10.0.23.2 Serial2/0/0

10.0.2.2/32 OSPF 10 1562 D 10.0.23.2 Serial2/0/0

10.0.3.3/32 Direct 0 0 D 127.0.0.1 LoopBack0

10.0.12.0/24 OSPF 10 3124 D 10.0.23.2 Serial2/0/0

10.0.23.0/24 Direct 0 0 D 10.0.23.3 Serial2/0/0

10.0.23.2/32 Direct 0 0 D 10.0.23.2 Serial2/0/0

HUAWEI TECHNOLOGIES 276


HCIP-IERS Chapter 3 BGP Features and Configurations

10.0.23.3/32 Direct 0 0 D 127.0.0.1 Serial2/0/0

10.0.23.255/32 Direct 0 0 D 127.0.0.1 Serial2/0/0

10.0.35.0/24 Direct 0 0 D 10.0.35.3 Serial3/0/0

10.0.35.3/32 Direct 0 0 D 127.0.0.1 Serial3/0/0

10.0.35.5/32 Direct 0 0 D 10.0.35.5 Serial3/0/0

10.0.35.255/32 Direct 0 0 D 127.0.0.1 Serial3/0/0

127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0

127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

127.255.255.255/32Direct 0 0 D 127.0.0.1 InLoopBack0

255.255.255.255/32Direct 0 0 D 127.0.0.1 InLoopBack0

The IP routing tables of R1, R2, and R3 show that each router can learn routes to the
network segment connected to Loopback0 of the other two routers.

Step 3 Configure IBGP peers.

Configure IBGP full mesh on R1, R2, and R3. Use Loopback0 address as a source
address.

[R1]bgp 64512

[R1-bgp]peer 10.0.2.2 as-number 64512

[R1-bgp]peer 10.0.2.2 connect-interface LoopBack 0

[R1-bgp]peer 10.0.3.3 as-number 64512

[R1-bgp]peer 10.0.3.3 connect-interface LoopBack 0

[R1-bgp]quit

[R2]bgp 64512

[R2-bgp]peer 10.0.1.1 as-number 64512

[R2-bgp]peer 10.0.1.1 connect-interface loopback 0

[R2-bgp]peer 10.0.3.3 as-number 64512

HUAWEI TECHNOLOGIES 277


HCIP-IERS Chapter 3 BGP Features and Configurations

[R2-bgp]peer 10.0.3.3 connect-interface LoopBack 0

[R2-bgp]quit

[R3]bgp 64512

[R3-bgp]peer 10.0.1.1 as-number 64512

[R3-bgp]peer 10.0.1.1 connect-interface loopback 0

[R3-bgp]peer 10.0.2.2 as-number 64512

[R3-bgp]peer 10.0.2.2 connect-interface LoopBack 0

[R3-bgp]quit

Run the display tcp status command to check the TCP port connection status.

[R2]display tcp status

TCPCB Tid/Soid Local Add:port Foreign Add:port VPNID State

37a32f14 76 /1 0.0.0.0:80 0.0.0.0:0 23553 Listening

37a33b34 239/2 0.0.0.0:179 10.0.1.1:0 0 Listening

39052914 239/6 0.0.0.0:179 10.0.3.3:0 0 Listening

37a3321c 76 /3 0.0.0.0:443 0.0.0.0:0 23553 Listening

39052c1c 239/11 10.0.2.2:179 10.0.3.3:54086 0 Established

3905260c 239/5 10.0.2.2:61635 10.0.1.1:179 0 Established

The preceding command output shows that the Local Add field displays 10.0.2.2
(Loopback0 address of R2) and port number is 179 (TCP port number of BGP). The
neighbor state with 10.0.3.3 and 10.0.1.1 is Established, indicating that R2 has
established a TCP connection with R1 and R3.

Run the display bgp peer command to check BGP peer relationships of routers.

[R1]display bgp peer

BGP local router ID : 10.0.1.1

Local AS number : 64512

HUAWEI TECHNOLOGIES 278


HCIP-IERS Chapter 3 BGP Features and Configurations

Total number of peers : 2 Peers in established state : 2

Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv

10.0.2.2 4 64512 273 277 0 02:15:53 Established 0

10.0.3.3 4 64512 276 276 0 02:15:53 Established 0

[R2]display bgp peer

BGP local router ID : 10.0.2.2

Local AS number : 64512

Total number of peers : 2 Peers in established state : 2

Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv

10.0.1.1 4 64512 38 38 0 00:18:02 Established 0

10.0.3.3 4 64512 1000 1000 0 16:38:38 Established 0

[R3]display bgp peer

BGP local router ID : 10.0.3.3

Local AS number : 64512

Total number of peers : 2 Peers in established state : 2

Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv

10.0.1.1 4 64512 39 39 0 00:18:35 Established 0

10.0.2.2 4 64512 1001 1001 0 16:39:11 Established 0

HUAWEI TECHNOLOGIES 279


HCIP-IERS Chapter 3 BGP Features and Configurations

The preceding command output shows that BGP peer relationships between R1, R2,
and R3 are in Established state, indicating that BGP peer relationships have been
established.

On R1, run the timer command in the BGP process to change the Keepalive time to
30s and hold time to 90s. Check whether the BGP peer relationship between R1 and
R2 is established and run the display bgp peer verbose command to check the
negotiation interval after the BGP peer relationship is established.

[R1-bgp] bgp 64512

[R1-bgp] timer keepalive 30 hold 90

Warning: Changing the parameter in this command resets the peer session. Continue?[Y/N]:y

[R1-bgp]quit

Note that changing the Keepalive time and hold time will restart the BGP session.

[R2]display bgp peer verbose

BGP Peer is 10.0.1.1, remote AS 64512

Type: IBGP link

BGP version 4, Remote router ID 10.0.1.1

Update-group ID: 1

BGP current state: Established, Up for 00h07m19s

BGP current event: KATimerExpired

BGP last state: OpenConfirm

BGP Peer Up count: 2

Received total routes: 0

Received active routes total: 0

Advertised total routes: 0

Port: Local - 50117 Remote - 179

Configured: Connect-retry Time: 32 sec

HUAWEI TECHNOLOGIES 280


HCIP-IERS Chapter 3 BGP Features and Configurations

Configured: Active Hold Time: 180 sec Keepalive Time:60 sec

Received : Active Hold Time: 90 sec

Negotiated: Active Hold Time: 90 sec Keepalive Time:30 sec

Peer optional capabilities:

Peer supports bgp multi-protocol extension

Peer supports bgp route refresh capability

Peer supports bgp 4-byte-as capability

Address family IPv4 Unicast: advertised and received

Received: Total 16 messages

Update messages 0

Open messages 1

KeepAlive messages 15

Notification messages 0

Refresh messages 0

Sent: Total 16 messages

Update messages 0

Open messages 1

KeepAlive messages 15

Notification messages 0

Refresh messages 0

Authentication type configured: None

Last keepalive received: 2011/12/07 08:33:52

Minimum route advertisement interval is 15 seconds

Optional capabilities:

Route refresh capability has been enabled

4-byte-as capability has been enabled

Connect-interface has been configured

Peer Preferred Value: 0

Routing policy configured:

HUAWEI TECHNOLOGIES 281


HCIP-IERS Chapter 3 BGP Features and Configurations

No routing policy is configured

BGP Peer is 10.0.3.3, remote AS 64512

Type: IBGP link

BGP version 4, Remote router ID 10.0.3.3

Update-group ID: 1

BGP current state: Established, Up for 16h28m14s

BGP current event: RecvKeepalive

BGP last state: OpenConfirm

BGP Peer Up count: 1

Received total routes: 0

Received active routes total: 0

Advertised total routes: 0

Port: Local - 179 Remote - 49663

Configured: Connect-retry Time: 32 sec

Configured: Active Hold Time: 180 sec Keepalive Time:60 sec

Received : Active Hold Time: 180 sec

Negotiated: Active Hold Time: 180 sec Keepalive Time:60 sec

Peer optional capabilities:

Peer supports bgp multi-protocol extension

Peer supports bgp route refresh capability

Peer supports bgp 4-byte-as capability

Address family IPv4 Unicast: advertised and received

Received: Total 990 messages

Update messages 0

Open messages 1

KeepAlive messages 989

Notification messages 0

Refresh messages 0

HUAWEI TECHNOLOGIES 282


HCIP-IERS Chapter 3 BGP Features and Configurations

Sent: Total 990 messages

Update messages 0

Open messages 1

KeepAlive messages 989

Notification messages 0

Refresh messages 0

Authentication type configured: None

Last keepalive received: 2011/12/07 08:34:17

Minimum route advertisement interval is 15 seconds

Optional capabilities:

Route refresh capability has been enabled

4-byte-as capability has been enabled

Connect-interface has been configured

Peer Preferred Value: 0

Routing policy configured:

No routing policy is configured

The preceding command output of R2 shows that the default parameter Active Hold
Time is 180s and Keepalive Time is 60s.

After parameters of R1 are changed, the Active Hold Time of packets received by R2
becomes 90s. The negotiated parameters use the smaller value. Therefore, the Active
Hold Time and Keepalive Timer that are negotiated between R2 and R1 are 90s and
30s respectively, but the parameters of R3 still use the default values.

Therefore, the negotiated parameters are the same as the configured parameters.
That is, the Active Hold Time and Keepalive Timer on R2 and R3 are 180s and 60s
respectively.

Step 4 Configure EBGP peers.

HUAWEI TECHNOLOGIES 283


HCIP-IERS Chapter 3 BGP Features and Configurations

Configure BGP on R4, set the local AS number to 64513, and establish an EBGP peer
relationship between R4 and R1. During EBGP peer relationship establishment,
specify the address of Loopback0 as the source address and set ebgp-max-hop to 2.
Add a 32-bit static route to the Loopback0 address of the peer device to ensure that
an EBGP peer relationship can be established normally.

[R1]ip route-static 10.0.4.4 32 10.0.14.4

[R4]ip route-static 10.0.1.1 32 10.0.14.1

[R1]bgp 64512

[R1-bgp]peer 10.0.4.4 as-number 64513

[R1-bgp]peer 10.0.4.4 ebgp-max-hop 2

[R1-bgp]peer 10.0.4.4 connect-interface LoopBack0

[R1-bgp]quit

[R4]router id 10.0.4.4

[R4]bgp 64513

[R4-bgp]peer 10.0.1.1 as-number 64512

[R4-bgp]peer 10.0.1.1 ebgp-max-hop 2

[R4-bgp]peer 10.0.1.1 connect-interface LoopBack0

[R4-bgp]quit

After an EBGP peer relationship is established, run the display bgp peer command
to check the peer relationship status.

[R4]display bgp peer

BGP local router ID : 10.0.4.4

Local AS number : 64513

Total number of peers : 1 Peers in established state : 1

HUAWEI TECHNOLOGIES 284


HCIP-IERS Chapter 3 BGP Features and Configurations

Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv

10.0.1.1 4 64512 4 5 0 00:01:18 Established 0

Run the debugging ip packet verbose command on R4 to check the TTL value of
Keepalive packets.

<R4>terminal monitor

<R4>terminal debugging

<R4>debugging ip packet

<R4>

Oct 31 2016 17:22:44.900.2+00:00 R4 IP/7/debug_case:

Receiving, interface = Serial1/0/0, version = 4, headlen = 20, tos = 192,

pktlen = 40, pktid = 429, offset = 0, ttl = 2, protocol = 6,

checksum = 40287, s = 10.0.1.1, d = 10.0.4.4

prompt: IP Process By Board Begin!

45 c0 00 28 01 ad 00 00 02 06 9d 5f 0a 00 01 01

0a 00 04 04

Oct 31 2016 17:22:44.900.3+00:00 R4 IP/7/debug_case:

Receiving, interface = Serial1/0/0, version = 4, headlen = 20, tos = 192,

pktlen = 40, pktid = 429, offset = 0, ttl = 2, protocol = 6,

checksum = 40287, s = 10.0.1.1, d = 10.0.4.4

prompt: Before search fib per flow in IP Forward.

The preceding command output shows that the TTL value of received packets is 2.

HUAWEI TECHNOLOGIES 285


HCIP-IERS Chapter 3 BGP Features and Configurations

Establish an EBGP peer relationship between R3 and R5. Use physical interface
addresses to establish a connection.

[R3]bgp 64512

[R3-bgp]peer 10.0.35.5 as-number 64514

[R3-bgp]quit

[R5]router id 10.0.5.5

[R5]bgp 64514

[R5-bgp]peer 10.0.35.3 as-number 64512

[R5-bgp]quit

[R5]display bgp peer

BGP local router ID : 10.0.5.5

Local AS number : 64514

Total number of peers : 1 Peers in established state : 1

Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv

10.0.35.3 4 64512 2 3 0 00:00:46 Established 0

Step 5 Run the network command to advertise routing information.

Configure Loopback1 on R4 and configure an IP address 10.1.4.4/24 for Loopback1.


Run the network command to advertise the network segment of Loopback1 into
BGP.

[R4]interface LoopBack 1

[R4-LoopBack1]ip address 10.1.4.4 24

[R4-LoopBack1]quit

HUAWEI TECHNOLOGIES 286


HCIP-IERS Chapter 3 BGP Features and Configurations

[R4]bgp 64513

[R4-bgp]network 10.1.4.4 24

[R4-bgp]quit

Check the IP routing tables of R1 and R3 to check whether the route to 10.1.4.4/24
exists.

Check the BGP routing table of R3 to analyze next-hop information of this route.

[R1]display ip routing-table

Route Flags: R - relay, D - download to fib

----------------------------------------------------------------------------

Routing Tables: Public

Destinations : 18 Routes : 18

Destination/Mask Proto Pre Cost Flags NextHop Interface

10.0.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0

10.0.2.2/32 OSPF 10 1562 D 10.0.12.2 Serial1/0/0

10.0.3.3/32 OSPF 10 3124 D 10.0.12.2 Serial1/0/0

10.0.4.4/32 Static 60 0 RD 10.0.14.4 Serial3/0/0

10.0.12.0/24 Direct 0 0 D 10.0.12.1 Serial1/0/0

10.0.12.1/32 Direct 0 0 D 127.0.0.1 Serial1/0/0

10.0.12.2/32 Direct 0 0 D 10.0.12.2 Serial1/0/0

10.0.12.255/32 Direct 0 0 D 127.0.0.1 Serial1/0/0

10.0.14.0/24 Direct 0 0 D 10.0.14.1 Serial3/0/0

10.0.14.1/32 Direct 0 0 D 127.0.0.1 Serial3/0/0

10.0.14.4/32 Direct 0 0 D 10.0.14.4 Serial3/0/0

10.0.14.255/32 Direct 0 0 D 127.0.0.1 Serial3/0/0

10.0.23.0/24 OSPF 10 3124 D 10.0.12.2 Serial1/0/0

HUAWEI TECHNOLOGIES 287


HCIP-IERS Chapter 3 BGP Features and Configurations

10.1.4.0/24 EBGP 255 0 RD 10.0.4.4 Serial3/0/0

127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0

127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

127.255.255.255/32Direct 0 0 D 127.0.0.1 InLoopBack0

255.255.255.255/3 Direct 0 0 D 127.0.0.1 InLoopBack0

The command output shows that R1 has learned the EBGP route to 10.1.4.0/24.

Check whether R3 has the route to 10.1.4.0/24.

[R3]display ip routing-table

Route Flags: R - relay, D - download to fib

----------------------------------------------------------------------------

Routing Tables: Public

Destinations : 16 Routes : 16

Destination/Mask Proto Pre Cost Flags NextHop Interface

10.0.1.1/32 OSPF 10 3124 D 10.0.23.2 Serial2/0/0

10.0.2.2/32 OSPF 10 1562 D 10.0.23.2 Serial2/0/0

10.0.3.3/32 Direct 0 0 D 127.0.0.1 LoopBack0

10.0.12.0/24 OSPF 10 3124 D 10.0.23.2 Serial2/0/0

10.0.23.0/24 Direct 0 0 D 10.0.23.3 Serial2/0/0

10.0.23.2/32 Direct 0 0 D 10.0.23.2 Serial2/0/0

10.0.23.3/32 Direct 0 0 D 127.0.0.1 Serial2/0/0

10.0.23.255/32 Direct 0 0 D 127.0.0.1 Serial2/0/0

10.0.35.0/24 Direct 0 0 D 10.0.35.3 Serial3/0/0

10.0.35.3/32 Direct 0 0 D 127.0.0.1 Serial3/0/0

10.0.35.5/32 Direct 0 0 D 10.0.35.5 Serial3/0/0

10.0.35.255/32 Direct 0 0 D 127.0.0.1 Serial3/0/0

HUAWEI TECHNOLOGIES 288


HCIP-IERS Chapter 3 BGP Features and Configurations

127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0

127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

127.255.255.255/32Direct 0 0 D 127.0.0.1 InLoopBack0

255.255.255.255/32Direct 0 0 D 127.0.0.1 InLoopBack0

The preceding command output shows that R3 does not have any BGP route to
10.1.4.4.

Check the BGP routing table of R3.

[R3]display bgp routing-table

BGP Local router ID is 10.0.3.3

Status codes: * - valid, > - best, d - damped,

h - history, i - internal, s - suppressed, S - Stale

Origin : i - IGP, e - EGP, ? - incomplete

Total Number of Routes: 1

Network NextHop MED LocPrf PrefVal Path/Ogn

i 10.1.4.0/24 10.0.4.4 0 100 0 64513i

The preceding command output shows that there is a BGP route to 10.1.4.0/24, but
this route is not marked with *, indicating that this route is not preferred. The
NextHop field of this route displays 10.0.4.4, but R3 does not have the route to
10.0.4.4. According to BGP route selection rules, when the next hop of a BGP route is
unreachable, this route is ignored.

Run the next-hop-local command on R1 and check the BGP routing table of R3
again.

[R1]bgp 64512

HUAWEI TECHNOLOGIES 289


HCIP-IERS Chapter 3 BGP Features and Configurations

[R1-bgp]peer 10.0.3.3 next-hop-local

[R1-bgp]peer 10.0.2.2 next-hop-local

[R1-bgp]quit

[R3]display bgp routing-table

BGP Local router ID is 10.0.3.3

Status codes: * - valid, > - best, d - damped,

h - history, i - internal, s - suppressed, S - Stale

Origin : i - IGP, e - EGP, ? - incomplete

Total Number of Routes: 1

Network NextHop MED LocPrf PrefVal Path/Ogn

*>i 10.1.4.0/24 10.0.1.1 0 100 0 64513i

The preceding command output shows that the next hop of the BGP route
10.1.4.0/24 is 10.0.1.1 and this route is marked with * and >, indicating that this route
is correct and the optimal route.

Check the IP routing table of R3.

[R3]display ip routing-table

Route Flags: R - relay, D - download to fib

----------------------------------------------------------------------------

Routing Tables: Public

Destinations : 17 Routes : 17

Destination/Mask Proto Pre Cost Flags NextHop Interface

HUAWEI TECHNOLOGIES 290


HCIP-IERS Chapter 3 BGP Features and Configurations

10.0.1.1/32 OSPF 10 3124 D 10.0.23.2 Serial2/0/0

10.0.2.2/32 OSPF 10 1562 D 10.0.23.2 Serial2/0/0

10.0.3.3/32 Direct 0 0 D 127.0.0.1 LoopBack0

10.0.12.0/24 OSPF 10 3124 D 10.0.23.2 Serial2/0/0

10.0.23.0/24 Direct 0 0 D 10.0.23.3 Serial2/0/0

10.0.23.2/32 Direct 0 0 D 10.0.23.2 Serial2/0/0

10.0.23.3/32 Direct 0 0 D 127.0.0.1 Serial2/0/0

10.0.23.255/32 Direct 0 0 D 127.0.0.1 Serial2/0/0

10.0.35.0/24 Direct 0 0 D 10.0.35.3 Serial3/0/0

10.0.35.3/32 Direct 0 0 D 127.0.0.1 Serial3/0/0

10.0.35.5/32 Direct 0 0 D 10.0.35.5 Serial3/0/0

10.0.35.255/32 Direct 0 0 D 127.0.0.1 Serial3/0/0

10.1.4.0/24 IBGP 255 0 RD 10.0.1.1 Serial2/0/0

127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0

127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

127.255.255.255/32Direct 0 0 D 127.0.0.1 InLoopBack0

255.255.255.255/32Direct 0 0 D 127.0.0.1 InLoopBack0

The IP routing table of R3 contains the route 10.1.4.0/24.

Create Loopback1 on R5, configure an IP address 10.1.5.5/24 for Loopback1,


advertise it into BGP, and configure next-hop-local.

[R5]interface LoopBack 1

[R5-LoopBack1]ip address 10.1.5.5 24

[R5-LoopBack1]quit

[R5]bgp 64514

[R5-bgp]network 10.1.5.0 24

HUAWEI TECHNOLOGIES 291


HCIP-IERS Chapter 3 BGP Features and Configurations

[R3]bgp 64512

[R3-bgp]peer 10.0.1.1 next-hop-local

[R3-bgp]peer 10.0.2.2 next-hop-local

Check the BGP routing table of R4 to determine whether R4 learns a route to the
network segment connected to Loopback1 of R5. Analyze the display bgp
routing-table command output.

[R4]display bgp routing-table

BGP Local router ID is 10.0.4.4

Status codes: * - valid, > - best, d - damped,

h - history, i - internal, s - suppressed, S - Stale

Origin : i - IGP, e - EGP, ? - incomplete

Total Number of Routes: 2

Network NextHop MED LocPrf PrefVal Path/Ogn

*> 10.1.4.0/24 0.0.0.0 0 0 i

*> 10.1.5.0/24 10.0.1.1 0 64512 64514i

Perform a ping with the source address on R5 to test connectivity to Loopback1


address of R4.

[R5]ping -c 1 -a 10.1.5.5 10.1.4.4

PING 10.1.4.4: 56 data bytes, press CTRL_C to break

Reply from 10.1.4.4: bytes=56 Sequence=1 ttl=252 time=125 ms

--- 10.1.4.4 ping statistics ---

1 packet(s) transmitted

HUAWEI TECHNOLOGIES 292


HCIP-IERS Chapter 3 BGP Features and Configurations

1 packet(s) received

0.00% packet loss

round-trip min/avg/max = 125/125/125 ms

Additional Exercises: Analysis and Verification

In which situation is it suitable to establish an EBGP peer relationship using physical


addresses?

Why does the TTL value of packets sent to EBGP peers default to 1? What is the
default configuration of the peer group_name ebgp-max-hop [ hop-count ]
command?

Device Configurations
[R1]display current-configuration

[V200R007C00SPC600]

sysname R1

router id 10.0.1.1

interface Serial1/0/0

link-protocol ppp

ip address 10.0.12.1 255.255.255.0

interface Serial3/0/0

link-protocol ppp

ip address 10.0.14.1 255.255.255.0

interface LoopBack0

ip address 10.0.1.1 255.255.255.255

HUAWEI TECHNOLOGIES 293


HCIP-IERS Chapter 3 BGP Features and Configurations

bgp 64512

timer keepalive 30 hold 90

peer 10.0.2.2 as-number 64512

peer 10.0.2.2 connect-interface LoopBack0

peer 10.0.3.3 as-number 64512

peer 10.0.3.3 connect-interface LoopBack0

peer 10.0.4.4 as-number 64513

peer 10.0.4.4 ebgp-max-hop 2

peer 10.0.4.4 connect-interface LoopBack0

ipv4-family unicast

undo synchronization

peer 10.0.2.2 enable

peer 10.0.2.2 next-hop-local

peer 10.0.3.3 enable

peer 10.0.3.3 next-hop-local

peer 10.0.4.4 enable

ospf 1

area 0.0.0.0

network 10.0.12.0 0.0.0.255

network 10.0.1.1 0.0.0.0

ip route-static 10.0.4.4 255.255.255.255 10.0.14.4

return

[R2]display current-configuration

[V200R007C00SPC600]

HUAWEI TECHNOLOGIES 294


HCIP-IERS Chapter 3 BGP Features and Configurations

sysname R2

router id 10.0.2.2

interface Serial1/0/0

link-protocol ppp

ip address 10.0.12.2 255.255.255.0

interface Serial2/0/0

link-protocol ppp

ip address 10.0.23.2 255.255.255.0

interface LoopBack0

ip address 10.0.2.2 255.255.255.255

bgp 64512

peer 10.0.1.1 as-number 64512

peer 10.0.1.1 connect-interface LoopBack0

peer 10.0.3.3 as-number 64512

peer 10.0.3.3 connect-interface LoopBack0

ipv4-family unicast

undo synchronization

peer 10.0.1.1 enable

peer 10.0.3.3 enable

ospf 1

area 0.0.0.0

HUAWEI TECHNOLOGIES 295


HCIP-IERS Chapter 3 BGP Features and Configurations

network 10.0.12.0 0.0.0.255

network 10.0.23.0 0.0.0.255

network 10.0.2.2 0.0.0.0

return

[R3]display current-configuration

[V200R007C00SPC600]

sysname R3

router id 10.0.3.3

interface Serial2/0/0

link-protocol ppp

ip address 10.0.23.3 255.255.255.0

interface Serial3/0/0

link-protocol ppp

ip address 10.0.35.3 255.255.255.0

interface LoopBack0

ip address 10.0.3.3 255.255.255.255

bgp 64512

peer 10.0.1.1 as-number 64512

peer 10.0.1.1 connect-interface LoopBack0

peer 10.0.2.2 as-number 64512

peer 10.0.2.2 connect-interface LoopBack0

peer 10.0.35.5 as-number 64514

HUAWEI TECHNOLOGIES 296


HCIP-IERS Chapter 3 BGP Features and Configurations

ipv4-family unicast

undo synchronization

peer 10.0.1.1 enable

peer 10.0.1.1 next-hop-local

peer 10.0.2.2 enable

peer 10.0.2.2 next-hop-local

peer 10.0.35.5 enable

ospf 1

area 0.0.0.0

network 10.0.23.0 0.0.0.255

network 10.0.3.3 0.0.0.0

return

[R4]display current-configuration

[V200R007C00SPC600]

sysname R4

router id 10.0.4.4

interface Serial1/0/0

link-protocol ppp

ip address 10.0.14.4 255.255.255.0

interface LoopBack0

ip address 10.0.4.4 255.255.255.255

HUAWEI TECHNOLOGIES 297


HCIP-IERS Chapter 3 BGP Features and Configurations

interface LoopBack1

ip address 10.1.4.4 255.255.255.0

bgp 64513

peer 10.0.1.1 as-number 64512

peer 10.0.1.1 ebgp-max-hop 2

peer 10.0.1.1 connect-interface LoopBack0

ipv4-family unicast

undo synchronization

network 10.0.4.0 255.255.255.0

network 10.1.4.0 255.255.255.0

peer 10.0.1.1 enable

ip route-static 10.0.1.1 255.255.255.255 10.0.14.1

return

[R5]display current-configuration

[V200R007C00SPC600]

sysname R5

router id 10.0.5.5

interface Serial1/0/0

link-protocol ppp

ip address 10.0.35.5 255.255.255.0

interface LoopBack0

HUAWEI TECHNOLOGIES 298


HCIP-IERS Chapter 3 BGP Features and Configurations

ip address 10.0.5.5 255.255.255.255

interface LoopBack1

ip address 10.1.5.5 255.255.255.0

bgp 64514

peer 10.0.35.3 as-number 64512

ipv4-family unicast

undo synchronization

network 10.1.5.0 255.255.255.0

peer 10.0.35.3 enable

return

Lab 3-2 BGP Route Summarization

Learning Objectives

The objectives of this lab are to learn and understand:

 How to run the network command to implement BGP route


summarization
 How to configure BGP route summarization to suppress specific routes
 How to change attributes of summarized routes
 How to use the AS_Set during route summarization

HUAWEI TECHNOLOGIES 299

You might also like