R3303-HP HSR6800 Routers Layer 3 - IP Routing Configuration Guide

259
# Configure a routing policy.
[RouterA] route-policy comm_policy permit node 0
[RouterA-route-policy] apply community no-export
[RouterA-route-policy] quit
# Apply the routing policy.
[RouterA] bgp 10
[RouterA-bgp] peer 200.1.2.2 route-policy comm_policy export
[RouterA-bgp] peer 200.1.2.2 advertise-community
# Display BGP routing table information on Router B.
[RouterB] display bgp routing-table 9.1.1.0
BGP local router ID : 2.2.2.2
Local AS number : 20
Paths: 1 available, 1 best
BGP routing table entry information of 9.1.1.0/24:
From : 200.1.2.1 (1.1.1.1)
Original nexthop: 200.1.2.1
Community : No-Export
AS-path : 10
Origin : igp
Attribute value : MED 0, pref-val 0, pre 255
State : valid, external, best,
Not advertised to any peers yet
You can find the No-export community attribute in the output. In this case, the route of 9.1.1.0/24
is not available in the routing table of Router C.
BGP route reflector configuration
Network requirements
As shown in Figure 78, all routers run BGP.
EBGP runs between Router A and Router B. IBGP runs between Router C and Router B, and between
Router C and Router D.
Router C is a route reflector with clients Router B and D.
Router D can learn route 1.0.0.0/8 from Router C.
Figure 78 Network diagram