0% found this document useful (0 votes)
12 views40 pages

Lab 3-5 BGP Multi-Homing

This document outlines a lab focused on BGP multi-homing, detailing the configuration steps for setting up BGP with two ISPs using default routes and filtering. It includes specific tasks for configuring IP addresses, OSPF, and VLANs across multiple routers and switches. The lab aims to provide practical experience in managing BGP multi-homing scenarios in a network environment.

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)
12 views40 pages

Lab 3-5 BGP Multi-Homing

This document outlines a lab focused on BGP multi-homing, detailing the configuration steps for setting up BGP with two ISPs using default routes and filtering. It includes specific tasks for configuring IP addresses, OSPF, and VLANs across multiple routers and switches. The lab aims to provide practical experience in managing BGP multi-homing scenarios in a network environment.

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/ 40

HCIP-IERS Chapter 3 BGP Features and Configurations

Lab 3-5 BGP Multi-homing

Learning Objectives

The objectives of this lab are to learn and understand:

 How to use only default routes in BGP multi-homing scenario


 How to use default routes to filter some routes in BGP multi-homing
scenario
 How to use only BGP routes in BGP multi-homing scenario

Topology

Figure 3-5 BGP multi-homing

Scenario

You are a network administrator of a company. The company's network uses BGP to
connect to ISP1. The company uses a private AS number 64512 and connects to ISP1
through two routers, and ISP1 uses the AS number 100. The company initially used

HUAWEI TECHNOLOGIES 379


HCIP-IERS Chapter 3 BGP Features and Configurations

default routes to connect to the Internet through ISP1. With the development of the
company, this Internet access mode cannot meet requirements. You need to import
some Internet routes into the AS of the company. After a certain period, the
company leases a line to connect to ISP2, whose AS number is 200. Finally, the
company builds a BGP multi-homing network.

Tasks

Step 1 Set basic parameters and configure IP addresses.

Configure IP addresses and masks for physical interfaces and loopback interfaces of
all the routers. Each Loopback0 uses the 32-bit mask.

<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

[R2]interface Serial 2/0/0

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

HUAWEI TECHNOLOGIES 380


HCIP-IERS Chapter 3 BGP Features and Configurations

[R2-Serial2/0/0]quit

[R2]interface GigabitEthernet 0/0/0

[R2-GigabitEthernet0/0/0]ip address 10.0.25.2 24

[R2-GigabitEthernet0/0/0]quit

[R2]interface loopback 0

[R2-LoopBack0]ip address 10.0.2.2 32

[R2-LoopBack0]quit

<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 GigabitEthernet 0/0/1

[R3-GigabitEthernet0/0/1]ip address 10.0.113.3 24

[R3-GigabitEthernet0/0/1]quit

[R3]interface loopback 0

[R3-LoopBack0]ip address 10.0.3.3 32

[R3-LoopBack0]quit

<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

[R4]interface GigabitEthernet 0/0/1

[R4-GigabitEthernet0/0/1]ip address 10.0.114.4 24

[R4-GigabitEthernet0/0/1]quit

[R4]interface LoopBack 0

HUAWEI TECHNOLOGIES 381


HCIP-IERS Chapter 3 BGP Features and Configurations

[R4-LoopBack0]ip address 10.0.4.4 32

[R4-LoopBack0]quit

<R5>system-view

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

[R5]interface GigabitEthernet 0/0/0

[R5-GigabitEthernet0/0/0]ip address 10.0.25.5 24

[R5-GigabitEthernet0/0/0]quit

[R5]interface GigabitEthernet 0/0/1

[R5-GigabitEthernet0/0/1]ip address 10.0.115.5 24

[R5-GigabitEthernet0/0/1]quit

[R5]interface loopback 0

[R5-LoopBack0]ip address 10.0.5.5 32

[R5-LoopBack0]quit

After the configurations are complete, test direct link connectivity.

<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=33 ms

--- 10.0.14.4 ping statistics ---

1 packet(s) transmitted

1 packet(s) received

0.00% packet loss

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

<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

HUAWEI TECHNOLOGIES 382


HCIP-IERS Chapter 3 BGP Features and Configurations

--- 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

<R2>ping -c 1 10.0.25.5

PING 10.0.25.5: 56 data bytes, press CTRL_C to break

Reply from 10.0.25.5: bytes=56 Sequence=1 ttl=255 time=13 ms

--- 10.0.25.5 ping statistics ---

1 packet(s) transmitted

1 packet(s) received

0.00% packet loss

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

<R2>ping -c 1 10.0.23.3

PING 10.0.23.3: 56 data bytes, press CTRL_C to break

Reply from 10.0.23.3: bytes=56 Sequence=1 ttl=255 time=39 ms

--- 10.0.23.3 ping statistics ---

1 packet(s) transmitted

1 packet(s) received

0.00% packet loss

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

Step 2 Configure IGP and BGP.

HUAWEI TECHNOLOGIES 383


HCIP-IERS Chapter 3 BGP Features and Configurations

Configure OSPF in AS 64512 and configure all devices to belong to Area 0.

Run OSPF on the network segments connected to G0/0/1 and Loopback0 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.113.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

Run OSPF on the network segments connected to G0/0/1 and Loopback0 of R4.

[R4]router id 10.0.4.4

[R4]ospf 1

[R4-ospf-1]area 0

[R4-ospf-1-area-0.0.0.0]network 10.0.114.4 0.0.0.0

[R4-ospf-1-area-0.0.0.0]network 10.0.4.4 0.0.0.0

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

[R4-ospf-1]quit

Run OSPF on the network segments connected to G0/0/1 and Loopback0 of R5.

[R5]router id 10.0.5.5

[R5]ospf 1

[R5-ospf-1]area 0

[R5-ospf-1-area-0.0.0.0]network 10.0.115.5 0.0.0.0

[R5-ospf-1-area-0.0.0.0]network 10.0.5.5 0.0.0.0

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

[R5-ospf-1]quit

HUAWEI TECHNOLOGIES 384


HCIP-IERS Chapter 3 BGP Features and Configurations

Create VLAN 13 on S1 and configure a VLANIF address for interconnection with R3.

Create VLAN 14 on S1 and configure a VLANIF address for interconnection with R4.

Create VLAN 15 on S1 and configure a VLANIF address for interconnection with R5.

Set the link type of interconnected interfaces to access, and run OSPF on the network
segments connected to S1's VLANIF 13, VLANIF 14, VLANIF 15, and Loopback0.

[S1]vlan batch 13 to 15

[S1]interface vlan 13

[S1-Vlanif13]ip address 10.0.113.1 255.255.255.0

[S1-Vlanif13]quit

[S1]interface vlan 14

[S1-Vlanif14]ip address 10.0.114.1 255.255.255.0

[S1-Vlanif14]quit

[S1]interface vlan 15

[S1-Vlanif15]ip address 10.0.115.1 255.255.255.0

[S1-Vlanif15]quit

[S1]interface GigabitEthernet 0/0/3

[S1-GigabitEthernet0/0/3]port link-type access

[S1-GigabitEthernet0/0/3]port default vlan 13

[S1-GigabitEthernet0/0/3]quit

[S1]interface GigabitEthernet 0/0/4

[S1-GigabitEthernet0/0/4]port link-type access

[S1-GigabitEthernet0/0/4]port default vlan 14

[S1-GigabitEthernet0/0/4]quit

[S1]interface GigabitEthernet 0/0/5

[S1-GigabitEthernet0/0/5]port link-type access

[S1-GigabitEthernet0/0/5]port default vlan 15

[S1-GigabitEthernet0/0/5]quit

HUAWEI TECHNOLOGIES 385


HCIP-IERS Chapter 3 BGP Features and Configurations

[S1]interface loopback 0

[S1-LoopBack0]ip address 10.0.1.11 32

[S1-LoopBack0]quit

[S1]router id 10.0.1.11

[S1]ospf 1

[S1-ospf-1]area 0

[S1-ospf-1-area-0.0.0.0]network 10.0.113.1 0.0.0.0

[S1-ospf-1-area-0.0.0.0]network 10.0.114.1 0.0.0.0

[S1-ospf-1-area-0.0.0.0]network 10.0.115.1 0.0.0.0

[S1-ospf-1-area-0.0.0.0]network 10.0.1.11 0.0.0.0

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

[S1-ospf-1]quit

Check whether the devices learn the network segment connected to Loopback0 of
other devices.

<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

10.0.1.11/32 OSPF 10 1 D 10.0.113.1 GigabitEthernet0/0/1

10.0.3.3/32 Direct 0 0 D 127.0.0.1 LoopBack0

10.0.4.4/32 OSPF 10 2 D 10.0.113.1 GigabitEthernet0/0/1

10.0.5.5/32 OSPF 10 2 D 10.0.113.1 GigabitEthernet0/0/1

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

HUAWEI TECHNOLOGIES 386


HCIP-IERS Chapter 3 BGP Features and Configurations

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.113.0/24 Direct 0 0 D 10.0.113.3 GigabitEthernet0/0/1

10.0.113.3/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1

10.0.113.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1

10.0.114.0/24 OSPF 10 2 D 10.0.113.1 GigabitEthernet0/0/1

10.0.115.0/24 OSPF 10 2 D 10.0.113.1 GigabitEthernet0/0/1

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

<R4>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

10.0.1.11/32 OSPF 10 1 D 10.0.114.1 GigabitEthernet0/0/1

10.0.3.3/32 OSPF 10 2 D 10.0.114.1 GigabitEthernet0/0/1

10.0.4.4/32 Direct 0 0 D 127.0.0.1 LoopBack0

10.0.5.5/32 OSPF 10 2 D 10.0.114.1 GigabitEthernet0/0/1

10.0.14.0/24 Direct 0 0 D 10.0.14.4 Serial1/0/0

10.0.14.1/32 Direct 0 0 D 10.0.14.1 Serial1/0/0

10.0.14.4/32 Direct 0 0 D 127.0.0.1 Serial1/0/0

10.0.14.255/32 Direct 0 0 D 127.0.0.1 Serial1/0/0

HUAWEI TECHNOLOGIES 387


HCIP-IERS Chapter 3 BGP Features and Configurations

10.0.113.0/24 OSPF 10 2 D 10.0.114.1 GigabitEthernet0/0/1

10.0.114.0/24 Direct 0 0 D 10.0.114.4 GigabitEthernet0/0/1

10.0.114.4/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1

10.0.114.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1

10.0.115.0/24 OSPF 10 2 D 10.0.114.1 GigabitEthernet0/0/1

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

<R5>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.11/32 OSPF 10 1 D 10.0.115.1 GigabitEthernet0/0/1

10.0.3.3/32 OSPF 10 2 D 10.0.115.1 GigabitEthernet0/0/1

10.0.4.4/32 OSPF 10 2 D 10.0.115.1 GigabitEthernet0/0/1

10.0.5.5/32 Direct 0 0 D 127.0.0.1 LoopBack0

10.0.25.0/24 Direct 0 0 D 10.0.25.5 GigabitEthernet0/0/0

10.0.25.5/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0

10.0.25.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/0

10.0.113.0/24 OSPF 10 2 D 10.0.115.1 GigabitEthernet0/0/1

10.0.114.0/24 OSPF 10 2 D 10.0.115.1 GigabitEthernet0/0/1

10.0.115.0/24 Direct 0 0 D 10.0.115.5 GigabitEthernet0/0/1

10.0.115.5/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1

HUAWEI TECHNOLOGIES 388


HCIP-IERS Chapter 3 BGP Features and Configurations

10.0.115.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0/0/1

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

[S1]display ip routing-table

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

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

Routing Tables: Public

Destinations : 12 Routes : 12

Destination/Mask Proto Pre Cost Flags NextHop Interface

10.0.1.11/32 Direct 0 0 D 127.0.0.1 LoopBack0

10.0.3.3/32 OSPF 10 1 D 10.0.113.3 Vlanif13

10.0.4.4/32 OSPF 10 1 D 10.0.114.4 Vlanif14

10.0.5.5/32 OSPF 10 1 D 10.0.115.5 Vlanif15

10.0.113.0/24 Direct 0 0 D 10.0.113.1 Vlanif13

10.0.113.1/32 Direct 0 0 D 127.0.0.1 Vlanif13

10.0.114.0/24 Direct 0 0 D 10.0.114.1 Vlanif14

10.0.114.1/32 Direct 0 0 D 127.0.0.1 Vlanif14

10.0.115.0/24 Direct 0 0 D 10.0.115.1 Vlanif15

10.0.115.1/32 Direct 0 0 D 127.0.0.1 Vlanif15

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

Configure EBGP on R2, R3, and R5.

HUAWEI TECHNOLOGIES 389


HCIP-IERS Chapter 3 BGP Features and Configurations

Enable R2, R3, and R5 to establish EBGP peer relationships using physical interfaces
according to the topology. Do not run BGP on SI.

[R2]router id 10.0.2.2

[R2]bgp 100

[R2-bgp]peer 10.0.25.5 as-number 64512

[R2-bgp]peer 10.0.23.3 as-number 64512

[R2-bgp]quit

[R3]bgp 64512

[R3-bgp]peer 10.0.23.2 as-number 100

[R3-bgp]quit

[R5]bgp 64512

[R5-bgp]peer 10.0.25.2 as-number 100

[R5-bgp]quit

After the configurations are complete, check whether EBGP peer relationships are
established.

[R2]display bgp peer

BGP local router ID : 10.0.2.2

Local AS number : 100

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

Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv

10.0.23.3 4 64512 7 9 0 00:05:55 Established 0

10.0.25.5 4 64512 6 7 0 00:04:17 Established 0

HUAWEI TECHNOLOGIES 390


HCIP-IERS Chapter 3 BGP Features and Configurations

[R3]display bgp peer

BGP local router ID : 10.0.3.3

Local AS number : 64512

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

Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv

10.0.23.2 4 100 8 8 0 00:06:09 Established 0

<R5>display bgp peer

BGP local router ID : 10.0.5.5

Local AS number : 64512

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

Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv

10.0.25.2 4 100 7 7 0 00:05:31 Established 0

Step 3 Use only default routes to connect to a single ISP.

By default, BGP load balancing is disabled. Enable BGP load balancing on all the
routers and set the maximum number of equal-cost routes to 4 for load balancing.

[R1]router id 10.0.1.1

[R1]bgp 200

[R1-bgp]maximum load-balancing 4

[R1-bgp]quit

HUAWEI TECHNOLOGIES 391


HCIP-IERS Chapter 3 BGP Features and Configurations

[R2]bgp 100

[R2-bgp]maximum load-balancing 4

[R2-bgp]quit

[R3]bgp 64512

[R3-bgp]maximum load-balancing 4

[R3-bgp]quit

[R4]bgp 64512

[R4-bgp]maximum load-balancing 4

[R4-bgp]quit

[R5]bgp 64512

[R5-bgp]maximum load-balancing 4

[R5-bgp]quit

Create Loopback1 and Loopback2 on R2 and assign addresses 10.1.2.2/24 and


10.2.2.2/24 to them. Run the network command to advertise the two addresses into
BGP.

[R2]interface LoopBack 1

[R2-LoopBack1]ip address 10.1.2.2 24

[R2-LoopBack1]quit

[R2]interface LoopBack 2

[R2-LoopBack2]ip address 10.2.2.2 24

[R2-LoopBack2]quit

[R2]bgp 100

HUAWEI TECHNOLOGIES 392


HCIP-IERS Chapter 3 BGP Features and Configurations

[R2-bgp]network 10.1.2.0 255.255.255.0

[R2-bgp]network 10.2.2.0 255.255.255.0

[R2-bgp]quit

Check whether R3 and R5 learn the two routes to 10.1.2.2/24 and 10.2.2.2/24.

[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: 2

Network NextHop MED LocPrf PrefVal Path/Ogn

*> 10.1.2.0/24 10.0.23.2 0 0 100i

*> 10.2.2.0/24 10.0.23.2 0 0 100i

<R5>display bgp routing-table

BGP Local router ID is 10.0.5.5

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

HUAWEI TECHNOLOGIES 393


HCIP-IERS Chapter 3 BGP Features and Configurations

*> 10.1.2.0/24 10.0.25.2 0 0 100i

*> 10.2.2.0/24 10.0.25.2 0 0 100i

The link from R1 to ISP1 is the primary link, and the link from R5 to ISP1 is the
backup link. On R3 and R5, run the import-route command to import OSPF routes
into BGP.

[R3]bgp 64512

[R3-bgp]import-route ospf 1

[R3-bgp]quit

[R5]bgp 64512

[R5-bgp]import-route ospf 1

[R5-bgp]quit

On R3 and R5, configure forcible advertisement of default routes into Area 0 and set
the route type as Type 1 external route. Set the costs of default routes advertised by
R3 and R5 to 20 and 40 respectively.

[R3]ospf 1

[R3-ospf-1]default-route-advertise always cost 20 type 1

[R3-ospf-1]quit

[R5]ospf 1

[R5-ospf-1]default-route-advertise always cost 40 type 1

[R5-ospf-1]quit

Check the IP routing table of S1.

[S1]display ip routing-table

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

HUAWEI TECHNOLOGIES 394


HCIP-IERS Chapter 3 BGP Features and Configurations

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

Routing Tables: Public

Destinations : 14 Routes : 14

Destination/Mask Proto Pre Cost Flags NextHop Interface

0.0.0.0/0 O_ASE 150 21 D 10.0.113.3 Vlanif13

10.0.1.0/24 Direct 0 0 D 10.0.1.11 LoopBack0

10.0.1.11/32 Direct 0 0 D 127.0.0.1 LoopBack0

10.0.3.3/32 OSPF 10 1 D 10.0.113.3 Vlanif13

10.0.4.4/32 OSPF 10 1 D 10.0.114.4 Vlanif14

10.0.5.5/32 OSPF 10 1 D 10.0.115.5 Vlanif15

10.0.113.0/24 Direct 0 0 D 10.0.113.1 Vlanif13

10.0.113.1/32 Direct 0 0 D 127.0.0.1 Vlanif13

10.0.114.0/24 Direct 0 0 D 10.0.114.1 Vlanif14

10.0.114.1/32 Direct 0 0 D 127.0.0.1 Vlanif14

10.0.115.0/24 Direct 0 0 D 10.0.115.1 Vlanif15

10.0.115.1/32 Direct 0 0 D 127.0.0.1 Vlanif15

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

On S1, check the route to 10.1.2.2.

[S1]tracert 10.1.2.2

traceroute to 10.1.2.2(10.1.2.2), max hops: 30 ,packet length: 40

1 10.0.113.3 10 ms 1 ms 1 ms

2 10.0.23.2 40 ms 20 ms 20 ms

HUAWEI TECHNOLOGIES 395


HCIP-IERS Chapter 3 BGP Features and Configurations

The preceding command output shows that S1 uses the default route learned from
R3. That is, S1 accesses 10.1.2.2 through the primary link.

Shut down S2/0/0 of R3 to simulate a failure of the link from the company to ISP1.

[R3]interface s2/0/0

[R3-Serial2/0/0]shutdown

[R3-Serial2/0/0]quit

After route convergence is complete, check the IP routing table of S1. Check
connectivity to 10.1.2.2.

[S1]display ip routing-table

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

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

Routing Tables: Public

Destinations : 13 Routes : 13

Destination/Mask Proto Pre Cost Flags NextHop Interface

0.0.0.0/0 O_ASE 150 21 D 10.0.113.3 Vlanif13

10.0.1.11/32 Direct 0 0 D 127.0.0.1 InLoopBack0

10.0.3.3/32 OSPF 10 1 D 10.0.113.3 Vlanif13

10.0.4.4/32 OSPF 10 1 D 10.0.114.4 Vlanif14

10.0.5.5/32 OSPF 10 1 D 10.0.115.5 Vlanif15

10.0.113.0/24 Direct 0 0 D 10.0.113.1 Vlanif13

10.0.113.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

10.0.114.0/24 Direct 0 0 D 10.0.114.1 Vlanif14

10.0.114.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

10.0.115.0/24 Direct 0 0 D 10.0.115.1 Vlanif15

10.0.115.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

HUAWEI TECHNOLOGIES 396


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

[S1]ping 10.1.2.2

PING 10.1.2.2: 56 data bytes, press CTRL_C to break

Request time out

Request time out

Request time out

Request time out

Request time out

--- 10.1.2.2 ping statistics ---

5 packet(s) transmitted

0 packet(s) received

100.00% packet loss

The preceding command output shows that the IP routing table of S1 does not
change and S1 still accesses the target network through R3.

When the uplink fails, S1 selects the default route advertised by R3 after comparing
the costs of the default routes advertised by R3 and R5. Therefore, the network
cannot operate normally.

Restore S2/0/0 of R3 and shut down G0/0/1 of R3 to simulate a downlink failure of


R3.

Check route convergence and connectivity.

[R3]interface s2/0/0

[R3-Serial2/0/0]undo shutdown

[R3-Serial2/0/0]quit

HUAWEI TECHNOLOGIES 397


HCIP-IERS Chapter 3 BGP Features and Configurations

[R3]interface g0/0/1

[R3-GigabitEthernet0/0/1]shutdown

[R3-GigabitEthernet0/0/1]quit

[S1]display ip routing-table

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

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

Routing Tables: Public

Destinations : 10 Routes : 10

Destination/Mask Proto Pre Cost Flags NextHop Interface

0.0.0.0/01 O_ASE 150 41 D 10.0.115.5 Vlanif15

10.0.1.11/32 Direct 0 0 D 127.0.0.1 InLoopBack0

10.0.4.4/32 OSPF 10 1 D 10.0.114.4 Vlanif14

10.0.5.5/32 OSPF 10 1 D 10.0.115.5 Vlanif15

10.0.114.0/24 Direct 0 0 D 10.0.114.1 Vlanif14

10.0.114.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

10.0.115.0/24 Direct 0 0 D 10.0.115.1 Vlanif15

10.0.115.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

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

[S1]ping 10.1.2.2

PING 10.1.2.2: 56 data bytes, press CTRL_C to break

Reply from 10.1.2.2: bytes=56 Sequence=1 ttl=254 time=1 ms

Reply from 10.1.2.2: bytes=56 Sequence=2 ttl=254 time=1 ms

Reply from 10.1.2.2: bytes=56 Sequence=3 ttl=254 time=1 ms

Reply from 10.1.2.2: bytes=56 Sequence=4 ttl=254 time=1 ms

HUAWEI TECHNOLOGIES 398


HCIP-IERS Chapter 3 BGP Features and Configurations

Reply from 10.1.2.2: bytes=56 Sequence=5 ttl=254 time=1 ms

--- 10.1.2.2 ping statistics ---

5 packet(s) transmitted

5 packet(s) received

0.00% packet loss

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

S1 selects the default route learned from R5. That is, S1 accesses the target network
through the backup link.

Restore G0/0/1 of R3.

[R3]interface g0/0/1

[R3-GigabitEthernet0/0/1]undo shutdown

[R3-GigabitEthernet0/0/1]quit

Step 4 Connect to a single ISP using default routes and some filtered
routes.

Establish IBGP peer relationships between R3 and S1, between R4 and S1, and
between R5 and S1, and specify the next-hop-local parameter to ensure that S1 can
learn the route Update message sent from the ISP.

[R3]bgp 64512

[R3-bgp]peer 10.0.113.1 as-number 64512

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

[R3-bgp]quit

[R4]bgp 64512

[R4-bgp]peer 10.0.114.1 as-number 64512

HUAWEI TECHNOLOGIES 399


HCIP-IERS Chapter 3 BGP Features and Configurations

[R4-bgp]peer 10.0.114.1 next-hop-local

[R4-bgp]quit

[R5]bgp 64512

[R5-bgp]peer 10.0.115.1 as-number 64512

[R5-bgp]peer 10.0.115.1 next-hop-local

[R5-bgp]quit

[S1]bgp 64512

[S1-bgp]peer 10.0.113.3 as-number 64512

[S1-bgp]peer 10.0.114.4 as-number 64512

[S1-bgp]peer 10.0.115.5 as-number 64512

[S1-bgp]quit

Check whether S1 learns the routes 10.1.2.0/24 and 10.2.2.0/24.

[S1]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

0.0.0.0/0 O_ASE 150 21 D 10.0.113.3 Vlanif13

10.0.1.11/32 Direct 0 0 D 127.0.0.1 InLoopBack0

10.0.3.3/32 OSPF 10 1 D 10.0.113.3 Vlanif13

10.0.4.4/32 OSPF 10 1 D 10.0.114.4 Vlanif14

10.0.5.5/32 OSPF 10 1 D 10.0.115.5 Vlanif15

HUAWEI TECHNOLOGIES 400


HCIP-IERS Chapter 3 BGP Features and Configurations

10.0.113.0/24 Direct 0 0 D 10.0.113.1 Vlanif13

10.0.113.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

10.0.114.0/24 Direct 0 0 D 10.0.114.1 Vlanif14

10.0.114.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

10.0.115.0/24 Direct 0 0 D 10.0.115.1 Vlanif15

10.0.115.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

10.1.2.0/24 BGP 255 0 RD 10.0.113.3 Vlanif13

10.2.2.0/24 BGP 255 0 RD 10.0.113.3 Vlanif13

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

To affect route selection through BGP, configure a route-policy policy_r3 on R3 to


filter the route 10.1.2.0/24.

[R3]acl number 2001

[R3-acl-basic-2001]rule 0 permit source 10.1.2.0 0.0.0.255

[R3-acl-basic-2001]quit

[R3]route-policy policy_r3 deny node 10

[R3-route-policy]if-match acl 2001

[R3-route-policy]quit

[R3]route-policy policy_r3 permit node 20

[R3-route-policy]bgp 64512

[R3-bgp]peer 10.0.113.1 route-policy policy_r3 export

[R3-bgp]quit

Configure a route-policy policy_r5 on R5 to filter the route 10.2.2.0/24.

[R5]acl number 2001

[R5-acl-basic-2001]rule 0 permit source 10.2.2.0 0.0.0.255

[R5-acl-basic-2001]quit

HUAWEI TECHNOLOGIES 401


HCIP-IERS Chapter 3 BGP Features and Configurations

[R5]route-policy policy_r5 deny node 10

[R5-route-policy]if-match acl 2001

[R5-route-policy]quit

[R5]route-policy policy_r5 permit node 20

[R5-route-policy]quit

[R5]bgp 64512

[R5-bgp]peer 10.0.115.1 route-policy policy_r5 export

[R5-bgp]quit

Check the IP routing table of S1.

[S1]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

0.0.0.0/0 O_ASE 150 21 D 10.0.113.3 Vlanif13

10.0.1.11/32 Direct 0 0 D 127.0.0.1 InLoopBack0

10.0.3.3/32 OSPF 10 1 D 10.0.113.3 Vlanif13

10.0.4.4/32 OSPF 10 1 D 10.0.114.4 Vlanif14

10.0.5.5/32 OSPF 10 1 D 10.0.115.5 Vlanif15

10.0.113.0/24 Direct 0 0 D 10.0.113.1 Vlanif13

10.0.113.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

10.0.114.0/24 Direct 0 0 D 10.0.114.1 Vlanif14

10.0.114.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

10.0.115.0/24 Direct 0 0 D 10.0.115.1 Vlanif15

HUAWEI TECHNOLOGIES 402


HCIP-IERS Chapter 3 BGP Features and Configurations

10.0.115.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

10.1.2.0/24 BGP 255 0 RD 10.0.115.5 Vlanif15

10.2.2.0/24 BGP 255 0 RD 10.0.113.3 Vlanif13

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

The preceding command output shows that the next hop for the route 10.1.2.0/24 is
R5 and the next hop for the route 10.2.2.0/24 is R3.

Shut down S2/0/0 of R3.

[R3]interface s2/0/0

[R3-Serial2/0/0]shutdown

[R3-Serial2/0/0]quit

Check the IP routing table of S1 and test connectivity to 10.1.2.2.

[S1]display ip routing-table

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

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

Routing Tables: Public

Destinations : 14 Routes : 14

Destination/Mask Proto Pre Cost Flags NextHop Interface

0.0.0.0/0 O_ASE 150 21 D 10.0.113.3 Vlanif13

10.0.1.11/32 Direct 0 0 D 127.0.0.1 InLoopBack0

10.0.3.3/32 OSPF 10 1 D 10.0.113.3 Vlanif13

10.0.4.4/32 OSPF 10 1 D 10.0.114.4 Vlanif14

10.0.5.5/32 OSPF 10 1 D 10.0.115.5 Vlanif15

10.0.113.0/24 Direct 0 0 D 10.0.113.1 Vlanif13

HUAWEI TECHNOLOGIES 403


HCIP-IERS Chapter 3 BGP Features and Configurations

10.0.113.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

10.0.114.0/24 Direct 0 0 D 10.0.114.1 Vlanif14

10.0.114.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

10.0.115.0/24 Direct 0 0 D 10.0.115.1 Vlanif15

10.0.115.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

10.1.2.0/24 BGP 255 0 RD 10.0.115.5 Vlanif15

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

The IP routing table of S1 has only one BGP route 10.1.2.0/24 because a route-policy
is configured on R5 to filter the BGP route 10.2.2.0/24.

[S1]ping 10.1.2.2

PING 10.1.2.2: 56 data bytes, press CTRL_C to break

Reply from 10.1.2.2: bytes=56 Sequence=1 ttl=254 time=1 ms

Reply from 10.1.2.2: bytes=56 Sequence=2 ttl=254 time=1 ms

Reply from 10.1.2.2: bytes=56 Sequence=3 ttl=254 time=1 ms

Reply from 10.1.2.2: bytes=56 Sequence=4 ttl=254 time=1 ms

Reply from 10.1.2.2: bytes=56 Sequence=5 ttl=254 time=1 ms

--- 10.1.2.2 ping statistics ---

5 packet(s) transmitted

5 packet(s) received

0.00% packet loss

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

Restore S2/0/0 of R3.

[R3]interface s2/0/0

[R3-Serial2/0/0]undo shutdown

HUAWEI TECHNOLOGIES 404


HCIP-IERS Chapter 3 BGP Features and Configurations

[R3-Serial2/0/0]quit

Step 5 Connect to multiple ISPs using BGP routes.

The company applies for an Internet line to connect to ISP2. To select routes among
BGP routes, delete the default routes advertised by OSPF.

[R3]ospf

[R3-ospf-1]undo default-route-advertise

[R3-ospf-1]quit

[R5]ospf

[R5-ospf-1]undo default-route-advertise

[R5-ospf-1]quit

Delete the route-policies configured on R3 and R5.

[R3]undo route-policy policy1

[R5]undo route-policy policy2

On R3 and R5, delete the command used to import OSPF routes into BGP.

[R3]bgp 64512

[R3-bgp]undo import-route ospf 1

[R3-bgp]quit

[R5]bgp 64512

[R5-bgp]undo import-route ospf 1

[R5-bgp]quit

HUAWEI TECHNOLOGIES 405


HCIP-IERS Chapter 3 BGP Features and Configurations

Establish EBGP peer relationships between R1 and R2 and between R1 and R4 so that
ISP2 can also transmit the routes 10.1.2.0/24 and 10.2.2.0/24.

[R1]bgp 200

[R1-bgp]peer 10.0.12.2 as-number 100

[R1-bgp]peer 10.0.14.4 as-number 64512

[R1-bgp]quit

[R2]bgp 100

[R2-bgp]peer 10.0.12.1 as-number 200

[R2-bgp]quit

[R4]bgp 64512

[R4-bgp]peer 10.0.14.1 as-number 200

[R4-bgp]quit

On S1, check the routes 10.1.2.0/24 and 10.2.2.0/24 and analyze current route
selection rules.

[S1]display bgp routing-table

Total Number of Routes: 6

BGP Local router ID is 10.0.1.11

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

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

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

Network NextHop MED LocPrf PrefVal Path/Ogn

HUAWEI TECHNOLOGIES 406


HCIP-IERS Chapter 3 BGP Features and Configurations

*>i 10.1.2.0/24 10.0.113.3 0 100 0 100i

*i 10.0.115.5 0 100 0 100i

*i 10.0.114.4 100 0 200 100i

*>i 10.2.2.0/24 10.0.113.3 0 100 0 100i

*i 10.0.115.5 0 100 0 100i

*i 10.0.114.4 100 0 200 100i

The company wants to access 10.2.2.0/24 through the new line connected to ISP2.
Configure a route-policy policy_r4 on R4 and change the Local_Pref attribute of the
route 10.2.2.0/24 to 150.

[R4]acl number 2001

[R4-acl-basic-2001]rule 0 permit source 10.2.2.0 0.0.0.255

[R4-acl-basic-2001]quit

[R4]route-policy policy_r4 permit node 10

[R4-route-policy]if-match acl 2001

[R4-route-policy]apply local-preference 150

[R4-route-policy]quit

[R4]route-policy policy_r4 permit node 20

[R4-route-policy]quit

Configure R4 to advertise this route-policy to S1.

[R4]bgp 64512

[R4-bgp]peer 10.0.114.1 route-policy policy_r4 export

[R4-bgp]quit

Check the BGP routing table of S1.

[S1]display bgp routing-table

HUAWEI TECHNOLOGIES 407


HCIP-IERS Chapter 3 BGP Features and Configurations

Total Number of Routes: 6

BGP Local router ID is 10.0.1.11

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

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

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

Network NextHop MED LocPrf PrefVal Path/Ogn

*>i 10.1.2.0/24 10.0.113.3 0 100 0 100i

*i 10.0.115.5 0 100 0 100i

*i 10.0.114.4 100 0 200 100i

*>i 10.2.2.0/24 10.0.114.4 150 0 200 100i

*i 10.0.113.3 0 100 0 100i

*i 10.0.115.5 0 100 0 100i

The preceding command output shows that S1 accesses 10.2.2.0/24 through the
route obtained from ISP2 connected to R4.

Shut down S1/0/0 of R4 to simulate a failure.

[R4]interface s1/0/0

[R4-Serial1/0/0]shutdown

[R4-Serial1/0/0]quit

Check the BGP routing table of S1.

[S1]display bgp routing-table

Total Number of Routes: 4

HUAWEI TECHNOLOGIES 408


HCIP-IERS Chapter 3 BGP Features and Configurations

BGP Local router ID is 10.0.1.11

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

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

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

Network NextHop MED LocPrf PrefVal Path/Ogn

*>i 10.1.2.0/24 10.0.113.3 0 100 0 100i

*i 10.0.115.5 0 100 0 100i

*>i 10.2.2.0/24 10.0.113.3 0 100 0 100i

*i 10.0.115.5 0 100 0 100i

The preceding command output shows that S1 obtains the routes 10.1.2.0/24 and
10.2.2.0/24 through ISP1 connected to R3.

Enable S1/0/0 of R4.

[R4]interface s1/0/0

[R4-Serial1/0/0]undo shutdown

[R4-Serial1/0/0]quit

Check the BGP routing table of S1 to determine whether the failure is rectified.

[S1]display bgp routing-table

Total Number of Routes: 6

BGP Local router ID is 10.0.1.11

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

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

HUAWEI TECHNOLOGIES 409


HCIP-IERS Chapter 3 BGP Features and Configurations

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

Network NextHop MED LocPrf PrefVal Path/Ogn

*>i 10.1.2.0/24 10.0.113.3 0 100 0 100i

*i 10.0.115.5 0 100 0 100i

*i 10.0.114.4 100 0 200 100i

*>i 10.2.2.0/24 10.0.114.4 150 0 200 100i

*i 10.0.113.3 0 100 0 100i

*i 10.0.115.5 0 100 0 100i

----End

Additional Exercises: Analysis and Verification

After S2/0/0 of R3 is shut down in step 3, and the primary link from the company to
ISP1 fails, the backup link between R5 and ISP1 still works normally. How to address
the connectivity problem?

This company is dual-homed to two ISPs. Analyze how to load balance incoming
traffic of the same network segment.

Device Configurations
<R1>display current-configuration

[V200R007C00SPC600]

sysname R1

router id 10.0.1.1

interface Serial1/0/0

HUAWEI TECHNOLOGIES 410


HCIP-IERS Chapter 3 BGP Features and Configurations

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

bgp 200

peer 10.0.12.2 as-number 100

peer 10.0.14.4 as-number 64512

ipv4-family unicast

undo synchronization

maximum load-balancing 4

peer 10.0.12.2 enable

peer 10.0.14.4 enable

return

<R2>display current-configuration

[V200R007C00SPC600]

sysname R2

router id 10.0.2.2

HUAWEI TECHNOLOGIES 411


HCIP-IERS Chapter 3 BGP Features and Configurations

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 GigabitEthernet0/0/0

ip address 10.0.25.2 255.255.255.0

interface LoopBack0

ip address 10.0.2.2 255.255.255.255

interface LoopBack1

ip address 10.1.2.2 255.255.255.0

interface LoopBack2

ip address 10.2.2.2 255.255.255.0

bgp 100

peer 10.0.12.1 as-number 200

peer 10.0.23.3 as-number 64512

peer 10.0.25.5 as-number 64512

ipv4-family unicast

undo synchronization

network 10.1.2.0 255.255.255.0

HUAWEI TECHNOLOGIES 412


HCIP-IERS Chapter 3 BGP Features and Configurations

network 10.2.2.0 255.255.255.0

maximum load-balancing 4

peer 10.0.12.1 enable

peer 10.0.23.3 enable

peer 10.0.25.5 enable

return

<R3>display current-configuration

[V200R007C00SPC600]

sysname R3

router id 10.0.3.3

acl number 2001

rule 0 permit source 10.1.2.0 0.0.0.255

interface Serial2/0/0

link-protocol ppp

ip address 10.0.23.3 255.255.255.0

interface GigabitEthernet0/0/1

ip address 10.0.113.3 255.255.255.0

interface LoopBack0

ip address 10.0.3.3 255.255.255.255

HUAWEI TECHNOLOGIES 413


HCIP-IERS Chapter 3 BGP Features and Configurations

bgp 64512

peer 10.0.23.2 as-number 100

peer 10.0.113.1 as-number 64512

ipv4-family unicast

undo synchronization

maximum load-balancing 4

peer 10.0.23.2 enable

peer 10.0.113.1 enable

peer 10.0.113.1 next-hop-local

ospf 1

area 0.0.0.0

network 10.0.113.3 0.0.0.0

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

HUAWEI TECHNOLOGIES 414


HCIP-IERS Chapter 3 BGP Features and Configurations

interface GigabitEthernet0/0/1

ip address 10.0.114.4 255.255.255.0

interface LoopBack0

ip address 10.0.4.4 255.255.255.255

bgp 64512

peer 10.0.14.1 as-number 200

peer 10.0.114.1 as-number 64512

ipv4-family unicast

undo synchronization

maximum load-balancing 4

peer 10.0.14.1 enable

peer 10.0.114.1 enable

peer 10.0.114.1 route-policy policy_r4 export

peer 10.0.114.1 next-hop-local

ospf 1

area 0.0.0.0

network 10.0.114.4 0.0.0.0

network 10.0.4.4 0.0.0.0

route-policy policy_r4 permit node 10

if-match acl 2001

apply local-preference 150

route-policy policy_r4 permit node 20

HUAWEI TECHNOLOGIES 415


HCIP-IERS Chapter 3 BGP Features and Configurations

Return

<R5>display current-configuration

[V200R007C00SPC600]

sysname R5

router id 10.0.5.5

interface GigabitEthernet0/0/0

ip address 10.0.25.5 255.255.255.0

interface GigabitEthernet0/0/1

ip address 10.0.115.5 255.255.255.0

interface LoopBack0

ip address 10.0.5.5 255.255.255.255

bgp 64512

peer 10.0.25.2 as-number 100

peer 10.0.115.1 as-number 64512

ipv4-family unicast

undo synchronization

maximum load-balancing 4

peer 10.0.25.2 enable

peer 10.0.115.1 enable

peer 10.0.115.1 next-hop-local

HUAWEI TECHNOLOGIES 416


HCIP-IERS Chapter 3 BGP Features and Configurations

ospf 1

area 0.0.0.0

network 10.0.115.5 0.0.0.0

network 10.0.5.5 0.0.0.0

return

<S1>display current-configuration

!Software Version V100R005C01SPC100

sysname S1

router id 10.0.1.11

interface Vlanif13

ip address 10.0.113.1 255.255.255.0

interface Vlanif14

ip address 10.0.114.1 255.255.255.0

interface Vlanif15

ip address 10.0.115.1 255.255.255.0

interface GigabitEthernet0/0/3

port link-type access

port default vlan 13

HUAWEI TECHNOLOGIES 417


HCIP-IERS Chapter 3 BGP Features and Configurations

interface GigabitEthernet0/0/4

port link-type access

port default vlan 14

interface GigabitEthernet0/0/5

port link-type access

port default vlan 15

interface LoopBack0

ip address 10.0.1.11 255.255.255.255

bgp 64512

peer 10.0.113.3 as-number 64512

peer 10.0.114.4 as-number 64512

peer 10.0.115.5 as-number 64512

ipv4-family unicast

undo synchronization

peer 10.0.113.3 enable

peer 10.0.114.4 enable

peer 10.0.115.5 enable

ospf 1

area 0.0.0.0

network 10.0.113.1 0.0.0.0

network 10.0.114.1 0.0.0.0

network 10.0.115.1 0.0.0.0

network 10.0.1.11 0.0.0.0

HUAWEI TECHNOLOGIES 418

You might also like