0% found this document useful (0 votes)
11 views25 pages

Lab 3-4 BGP Attributes and Route Selection 2

This document outlines a lab exercise focused on BGP attributes and route selection, specifically modifying the Community attribute and using route policies to filter BGP routes. It includes step-by-step instructions for configuring IP addresses, establishing BGP peer relationships, and verifying connectivity and routing information. The lab aims to enhance understanding of BGP configurations in a network environment while ensuring inter-departmental communication restrictions.

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)
11 views25 pages

Lab 3-4 BGP Attributes and Route Selection 2

This document outlines a lab exercise focused on BGP attributes and route selection, specifically modifying the Community attribute and using route policies to filter BGP routes. It includes step-by-step instructions for configuring IP addresses, establishing BGP peer relationships, and verifying connectivity and routing information. The lab aims to enhance understanding of BGP configurations in a network environment while ensuring inter-departmental communication restrictions.

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

HCIP-IERS Chapter 3 BGP Features and Configurations

Lab 3-4 BGP Attributes and Route Selection 2 (Optional)

Learning Objectives

The objectives of this lab are to learn and understand:

 How to modify the Community attribute to affect route selection


 How to use a route-policy to filter BGP routes

Topology

Figure 3-4 BGP attributes and route selection 2

Scenario

You are a network administrator of a company. The company's network uses BGP for
interconnection. Design AS numbers according to the topology. To ensure network
security, some departments of branches cannot communicate with each other. To
control routing information transmission, you need to use the Community attribute
to filter BGP routes.

Tasks

Step 1 Set basic parameters and configure IP addresses.

HUAWEI TECHNOLOGIES 354


HCIP-IERS Chapter 3 BGP Features and Configurations

Configure IP addresses and masks for physical interfaces and Loopback0 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 255.255.255.0

[R1-Serial1/0/0]quit

[R1]interface Serial 3/0/0

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

[R1-Serial3/0/0]quit

[R1]interface loopback 0

[R1-LoopBack0]ip address 10.0.1.1 255.255.255.255

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

[R2-Serial1/0/0]quit

[R2]interface Serial 2/0/0

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

[R2-Serial2/0/0]quit

[R2]interface GigabitEthernet 0/0/0

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

[R2-GigabitEthernet0/0/0]quit

[R2]interface loopback 0

[R2-LoopBack0]ip address 10.0.2.2 255.255.255.255

[R2-LoopBack0]quit

HUAWEI TECHNOLOGIES 355


HCIP-IERS Chapter 3 BGP Features and Configurations

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

[R3-Serial2/0/0]

[R3]interface loopback 0

[R3-LoopBack0]ip address 10.0.3.3 255.255.255.255

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

[R4-Serial1/0/0]quit

[R4]interface loopback 0

[R4-LoopBack0]ip address 10.0.4.4 255.255.255.255

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

[R5-GigabitEthernet0/0/0]quit

[R5]interface loopback 0

[R5-LoopBack0]ip address 10.0.5.5 255.255.255.255

[R5-LoopBack0]quit

After the configurations are complete, test direct link connectivity.

HUAWEI TECHNOLOGIES 356


HCIP-IERS Chapter 3 BGP Features and Configurations

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

--- 10.0.12.2 ping statistics ---

1 packet(s) transmitted

1 packet(s) received

0.00% packet loss

round-trip min/avg/max = 40/40/40 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=61 ms

--- 10.0.14.4 ping statistics ---

1 packet(s) transmitted

1 packet(s) received

0.00% packet loss

round-trip min/avg/max = 61/61/61 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=14 ms

--- 10.0.25.5 ping statistics ---

1 packet(s) transmitted

1 packet(s) received

0.00% packet loss

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

HUAWEI TECHNOLOGIES 357


HCIP-IERS Chapter 3 BGP Features and Configurations

<R2>ping -c 1 10.0.23.3

PING 10.0.23.2: 56 data bytes, press CTRL_C to break

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

--- 10.0.23.3 ping statistics ---

1 packet(s) transmitted

1 packet(s) received

0.00% packet loss

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

Step 2 Configure BGP.

Establish an IBGP peer relationship between R1 and R2 and establish EBGP peer
relationships between other routers.

[R1]router id 10.0.1.1

[R1]bgp 64513

[R1-bgp]peer 10.0.12.2 as-number 64513

[R1-bgp]peer 10.0.14.4 as-number 64512

[R1-bgp]quit

[R2]router id 10.0.2.2

[R2]bgp 64513

[R2-bgp]peer 10.0.12.1 as-number 64513

[R2-bgp]peer 10.0.23.3 as-number 64514

[R2-bgp]peer 10.0.25.5 as-number 64515

[R2-bgp]quit

[R3]router id 10.0.3.3

[R3]bgp 64514

HUAWEI TECHNOLOGIES 358


HCIP-IERS Chapter 3 BGP Features and Configurations

[R3-bgp]peer 10.0.23.2 as-number 64513

[R3-bgp]quit

[R4]router id 10.0.4.4

[R4]bgp 64512

[R4-bgp]peer 10.0.14.1 as-number 64513

[R4-bgp]quit

[R5]router id 10.0.5.5

[R5]bgp 64515

[R5-bgp]peer 10.0.25.2 as-number 64513

[R5-bgp]quit

After the configurations are complete, check whether BGP peer relationships are
established between routers.

[R1]display bgp peer

BGP local router ID : 10.0.1.1

Local AS number : 64513

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

Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv

10.0.12.2 4 64513 5 6 0 00:03:28 Established 0

10.0.14.4 4 64512 2 3 0 00:00:39 Established 0

[R2]display bgp peer

HUAWEI TECHNOLOGIES 359


HCIP-IERS Chapter 3 BGP Features and Configurations

BGP local router ID : 10.0.2.2

Local AS number : 64513

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

Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv

10.0.12.1 4 64513 6 5 0 00:04:00 Established 0

10.0.23.3 4 64514 4 6 0 00:02:44 Established 0

10.0.25.5 4 64515 2 3 0 00:00:41 Established 0

[R3]display bgp peer

BGP local router ID : 10.0.3.3

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.23.2 4 64513 4 4 0 00:02:59 Established 0

[R4]display bgp peer

BGP local router ID : 10.0.4.4

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.14.1 4 64513 3 3 0 00:01:40 Established 0

HUAWEI TECHNOLOGIES 360


HCIP-IERS Chapter 3 BGP Features and Configurations

[R5]display bgp peer

BGP local router ID : 10.0.5.5

Local AS number : 64515

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 64513 3 3 0 00:01:23 Established 0

The preceding command output shows that all BGP peer relationships are in
Established state.

Step 3 Configure a common Community attribute.

Create Loopback1, Loopack2, and Loopback3 on R5, assign addresses 10.1.5.5/24,


10.2.5.5/24, and 10.3.5.5/24 to the three loopback interfaces respectively, and run
the network command to advertise these addresses into BGP.

[R5]interface loopback 1

[R5-LoopBack1]ip address 10.1.5.5 255.255.255.0

[R5-LoopBack1]quit

[R5]interface loopback 2

[R5-LoopBack2]ip address 10.2.5.5 255.255.255.0

[R5-LoopBack2]quit

[R5]interface loopback 3

[R5-LoopBack3]ip address 10.3.5.5 255.255.255.0

[R5-LoopBack3]quit

[R5]bgp 64515

[R5-bgp]network 10.1.5.5 255.255.255.0

HUAWEI TECHNOLOGIES 361


HCIP-IERS Chapter 3 BGP Features and Configurations

[R5-bgp]network 10.2.5.5 255.255.255.0

[R5-bgp]network 10.3.5.5 255.255.255.0

[R5-bgp]quit

[R2]bgp 64513

[R2-bgp]peer 10.0.12.1 next-hop-local

[R2-bgp]quit

Check whether the routing information is correctly transmitted on R2 and R4.

[R2]display bgp routing-table

BGP Local router ID is 10.0.2.2

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

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

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

Total Number of Routes: 3

Network NextHop MED LocPrf PrefVal Path/Ogn

*> 10.1.5.0/24 10.0.25.5 0 0 64515i

*> 10.2.5.0/24 10.0.25.5 0 0 64515i

*> 10.3.5.0/24 10.0.25.5 0 0 64515i

[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

HUAWEI TECHNOLOGIES 362


HCIP-IERS Chapter 3 BGP Features and Configurations

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

Total Number of Routes: 3

Network NextHop MED LocPrf PrefVal Path/Ogn

*> 10.1.5.0/24 10.0.14.1 0 64513 64515i

*> 10.2.5.0/24 10.0.14.1 0 64513 64515i

*> 10.3.5.0/24 10.0.14.1 0 64513 64515i

On R5, create a route-policy comm_r5 to add the Community attribute 100 to the
route 10.1.5.0/24.

[R5]acl number 2000

[R5-acl-basic-2000]rule 0 permit source 10.1.5.0 0.0.0.255

[R5-acl-basic-2000]quit

[R5]route-policy comm_r5 permit node 10

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

[R5-route-policy]apply community 100

[R5-route-policy]quit

[R5]bgp 64515

[R5-bgp]peer 10.0.25.2 route-policy comm_r5 export

[R5-bgp]quit

Configure all BGP peers to advertise the Community attribute between each other.

[R1]bgp 64513

[R1-bgp]peer 10.0.14.4 advertise-community

[R1-bgp]peer 10.0.12.2 advertise-community

[R1-bgp]quit

HUAWEI TECHNOLOGIES 363


HCIP-IERS Chapter 3 BGP Features and Configurations

[R2]bgp 64513

[R2-bgp]peer 10.0.12.1 advertise-community

[R2-bgp]peer 10.0.23.3 advertise-community

[R2-bgp]peer 10.0.25.5 advertise-community

[R2-bgp]quit

[R3]bgp 64514

[R3-bgp]peer 10.0.23.2 advertise-community

[R3-bgp]quit

[R4]bgp 64512

[R4-bgp]peer 10.0.14.1 advertise-community

[R4-bgp]quit

[R5]bgp 64515

[R5-bgp]peer 10.0.25.2 advertise-community

[R5-bgp]quit

On R2 and R4, check whether the Community attribute is transmitted normally.

<R2>display bgp routing-table community

BGP Local router ID is 10.0.2.2

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

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

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

Total Number of Routes: 5

HUAWEI TECHNOLOGIES 364


HCIP-IERS Chapter 3 BGP Features and Configurations

Network NextHop MED LocPrf PrefVal Community

*> 10.1.5.0/24 10.0.25.5 0 0 <0:100>

<R4>display bgp routing-table community

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

Network NextHop MED LocPrf PrefVal Community

*> 10.1.5.0/24 10.0.25.5 0 0 <0:100>

Step 4 Configure a special Community attribute.

Use a route-policy on R5 to add a special Community attribute no-export for the


route 10.2.5.0/24 and add a special Community attribute no-advertise for the route
10.3.5.0/24.

You only need to add two new nodes and if-match clauses to the route-policy
comm_r5 created on R5.

[R5]acl 2001

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

[R5-acl-basic-2001]quit

[R5]route-policy comm_r5 permit node 20

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

[R5-route-policy]apply community no-export

HUAWEI TECHNOLOGIES 365


HCIP-IERS Chapter 3 BGP Features and Configurations

[R5-route-policy]quit

[R5]acl number 2002

[R5-acl-basic-2002]rule 0 permit source 10.3.5.0 0.0.0.255

[R5-acl-basic-2002]quit

[R5]route-policy comm_r5 permit node 30

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

[R5-route-policy]apply community no-advertise

[R5-route-policy]quit

Check the Community attribute of the routes learned by R2.

<R2>dis bgp routing-table community

BGP Local router ID is 10.0.2.2

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

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

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

Total Number of Routes: 4

Network NextHop MED LocPrf PrefVal Community

*> 10.1.5.0/24 10.0.25.5 0 0 <0:100>

*> 10.2.5.0/24 10.0.25.5 0 0 no-export

*> 10.3.5.0/24 10.0.25.5 0 0 no-advertise

Check the BGP routing tables of R2, R1, and R4 to observe transmission of the routes
10.1.5.0/24, 10.2.5.0/24, and 10.3.5.0/24.

<R2>display bgp routing-table

HUAWEI TECHNOLOGIES 366


HCIP-IERS Chapter 3 BGP Features and Configurations

BGP Local router ID is 10.0.2.2

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

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

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

Total Number of Routes: 3

Network NextHop MED LocPrf PrefVal Path/Ogn

*> 10.1.5.0/24 10.0.25.5 0 0 64515i

*> 10.2.5.0/24 10.0.25.5 0 0 64515i

*> 10.3.5.0/24 10.0.25.5 0 0 64515i

<R1>display bgp routing-table

BGP Local router ID is 10.0.1.1

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

*>i 10.1.5.0/24 10.0.12.2 0 100 0 64515i

*>i 10.2.5.0/24 10.0.12.2 0 100 0 64515i

[R4]display bgp routing-table

BGP Local router ID is 10.0.4.4

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

HUAWEI TECHNOLOGIES 367


HCIP-IERS Chapter 3 BGP Features and Configurations

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

*> 10.1.5.0/24 10.0.14.1 0 64513 64515i

The preceding command output shows that R2 does not advertise the route
10.2.5.0/24 carrying the special Community attribute no-export outside its AS but
advertises it to R1 in the same AS. R2 does not advertise the route 10.3.5.0/24
carrying the special Community attribute no-advertise to any BGP peer.

Step 5 Configure the Community attribute for route summarization.

Create Loopback1 and Loopack2 on R3, assign addresses 10.1.3.3/24 and 10.2.3.3/24
to the two loopback interfaces respectively, and run the network command to
advertise these addresses into BGP.

[R3]interface LoopBack 1

[R3-LoopBack1]ip address 10.1.3.3 255.255.255.0

[R3-LoopBack1]quit

[R3]interface loopback 2

[R3-LoopBack2]ip address 10.2.3.3 255.255.255.0

[R3-LoopBack2]quit

[R3]bgp 64514

[R3-bgp]network 10.1.3.3 255.255.255.0

[R3-bgp]network 10.2.3.3 255.255.255.0

[R3-bgp]quit

HUAWEI TECHNOLOGIES 368


HCIP-IERS Chapter 3 BGP Features and Configurations

Currently, the following requirements need to be met: The route 10.1.5.0/24


advertised by R5 and the route 10.2.3.0/24 advertised by R3 need to be summarized
into a Class A network segment 10.0.0.0/8. The specific routes need to be suppressed
when the summarized route is advertised, and the Community attribute of the
summarized route advertised to R4 must be 200. Specific routes 10.1.3.0/24 must be
advertised to R4.

To meet these requirements, create a route-policy comm_r3 on R3 to add the


Community attribute 100 to the route 10.2.3.0/24 advertised by R3.

[R3]acl number 2001

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

[R3-acl-basic-2001]quit

[R3]route-policy comm_r3 permit node 10

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

[R3-route-policy]apply community 100

[R3-route-policy]quit

[R3]route-policy comm_r3 permit node 20

[R3-route-policy]quit

[R3]bgp 64514

[R3-bgp]peer 10.0.23.2 route-policy comm_r3 export

[R3-bgp]quit

On R1, check whether the learned routes 10.1.5.0/24 and 10.2.3.0/24 carry the
Community attribute 100.

<R1>display bgp routing-table community

BGP Local router ID is 10.0.1.1

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

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

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

HUAWEI TECHNOLOGIES 369


HCIP-IERS Chapter 3 BGP Features and Configurations

Total Number of Routes: 3

Network NextHop MED LocPrf PrefVal Community

*>i 10.1.5.0/24 10.0.12.2 0 100 0 <0:100>

*>i 10.2.3.0/24 10.0.12.2 0 100 0 <0:100>

*>i 10.2.5.0/24 10.0.12.2 0 100 0 no-export

Create a community filter to filter the route with the Community attribute 100.

[R1]ip community-filter 1 permit 100

Create a route-policy match_comm to match the route with the Community


attribute 100.

[R1]route-policy match_comm permit node 10

[R1-route-policy]if-match community-filter 1

[R1-route-policy]quit

Create a route-policy add_comm to add the Community attribute 200:1 to the


summarized route.

[R1]route-policy add_comm permit node 10

[R1-route-policy]apply community 200:1 additive

[R1-route-policy]quit

On R1, summarize the route matching the route-policy match_comm and use the
route-policy add_comm to add the Community attribute.

[R1]bgp 64513

[R1-bgp]aggregate 10.0.0.0 255.0.0.0 detail-suppressed origin-policy match_comm attribute-policy add_comm

HUAWEI TECHNOLOGIES 370


HCIP-IERS Chapter 3 BGP Features and Configurations

[R1-bgp]quit

Check the BGP routing table of R4.

<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.0.0.0 10.0.14.1 0 64513i

*> 10.1.3.0/24 10.0.14.1 0 64513 64514i

On R4, check the Community attribute of the summarized route.

<R4>display bgp routing-table community

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

Network NextHop MED LocPrf PrefVal Community

*> 10.0.0.0 10.0.14.1 0 <200:1>

HUAWEI TECHNOLOGIES 371


HCIP-IERS Chapter 3 BGP Features and Configurations

----End

Additional Exercises: Analysis and Verification

If in step 4, the Community attribute of the route 10.2.5.0/24 is also changed to no


advertise, check the BGP routing tables of R2, R1, and R4 to analyze transmission of
the routes 10.1.5.0/24, 10.2.5.0/24, and 10.3.5.0/24.

Consider how to retain specific routes of the two routes 10.1.3.0/24 and 10.2.3.0/24
and suppress only specific routes of the route 10.1.5.0/24 on R4.

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

bgp 64513

HUAWEI TECHNOLOGIES 372


HCIP-IERS Chapter 3 BGP Features and Configurations

peer 10.0.12.2 as-number 64513

peer 10.0.14.4 as-number 64512

ipv4-family unicast

undo synchronization

aggregate 10.0.0.0 255.0.0.0 detail-suppressed origin-policy match_comm attribute-policy add_comm

peer 10.0.12.2 enable

peer 10.0.12.2 advertise-community

peer 10.0.14.4 enable

peer 10.0.14.4 advertise-community

route-policy match_comm permit node 10

if-match community-filter 1

route-policy add_comm permit node 10

apply community 200:1 additive

ip community-filter 1 permit 100

return

<R2>display current-configuration

[V200R007C00SPC600]

sysname R2

router id 10.0.2.2

interface Serial1/0/0

HUAWEI TECHNOLOGIES 373


HCIP-IERS Chapter 3 BGP Features and Configurations

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

bgp 64513

peer 10.0.12.1 as-number 64513

peer 10.0.23.3 as-number 64514

peer 10.0.25.5 as-number 64515

ipv4-family unicast

undo synchronization

peer 10.0.12.1 enable

peer 10.0.12.1 next-hop-local

peer 10.0.12.1 advertise-community

peer 10.0.23.3 enable

peer 10.0.23.3 advertise-community

peer 10.0.25.5 enable

peer 10.0.25.5 advertise-community

return

HUAWEI TECHNOLOGIES 374


HCIP-IERS Chapter 3 BGP Features and Configurations

<R3>display current-configuration

[V200R007C00SPC600]

sysname R3

router id 10.0.3.3

acl number 2001

rule 0 permit source 10.2.3.0 0.0.0.255

interface Serial2/0/0

link-protocol ppp

ip address 10.0.23.3 255.255.255.0

interface LoopBack0

ip address 10.0.3.3 255.255.255.255

interface LoopBack1

ip address 10.1.3.3 255.255.255.0

interface LoopBack2

ip address 10.2.3.3 255.255.255.0

bgp 64514

peer 10.0.23.2 as-number 64513

ipv4-family unicast

undo synchronization

HUAWEI TECHNOLOGIES 375


HCIP-IERS Chapter 3 BGP Features and Configurations

network 10.1.3.0 255.255.255.0

network 10.2.3.0 255.255.255.0

peer 10.0.23.2 enable

peer 10.0.23.2 route-policy comm_r3 export

peer 10.0.23.2 advertise-community

route-policy comm_r3 permit node 10

if-match acl 2001

apply community 100

route-policy comm_r3 permit node 20

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

bgp 64512

HUAWEI TECHNOLOGIES 376


HCIP-IERS Chapter 3 BGP Features and Configurations

peer 10.0.14.1 as-number 64513

ipv4-family unicast

undo synchronization

peer 10.0.14.1 enable

peer 10.0.14.1 advertise-community

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 LoopBack0

ip address 10.0.5.5 255.255.255.255

interface LoopBack1

ip address 10.1.5.5 255.255.255.0

interface LoopBack2

ip address 10.2.5.5 255.255.255.0

interface LoopBack3

HUAWEI TECHNOLOGIES 377


HCIP-IERS Chapter 3 BGP Features and Configurations

ip address 10.3.5.5 255.255.255.0

bgp 64515

peer 10.0.25.2 as-number 64513

ipv4-family unicast

undo synchronization

network 10.1.5.0 255.255.255.0

network 10.2.5.0 255.255.255.0

network 10.3.5.0 255.255.255.0

peer 10.0.25.2 enable

peer 10.0.25.2 route-policy comm_r5 export

peer 10.0.25.2 advertise-community

route-policy comm_r5 permit node 10

if-match acl 2000

apply community 100

route-policy comm_r5 permit node 20

if-match acl 2001

apply community no-export

route-policy comm_r5 permit node 30

if-match acl 2002

apply community no-advertise

return

HUAWEI TECHNOLOGIES 378

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy