R0106-HP MSR Router Series ACL and QoS Configuration Guide(V7)

76
[RouterA-bgp-ipv4] quit
[RouterA-bgp] quit
3. Configure Router B:
# Configure a BGP connection to Router A, apply the routing policy qppb to routes from the peer
168.1.1.1, and add the network 2.2.2.0/8 to the BGP routing table.
<RouterB> system-view
[RouterB] bgp 2000
[RouterB-bgp] peer 168.1.1.1 as-number 1000
[RouterB-bgp] peer 168.1.1.1 connect-interface GigabitEthernet 2/1/1
[RouterB-bgp] address-family ipv4
[RouterB-bgp-ipv4] peer 168.1.1.1 enable
[RouterB-bgp-ipv4] peer 168.1.1.1 route-policy qppb import
[RouterB-bgp-ipv4] quit
[RouterB-bgp] quit
# Configure the routing policy qppb.
[RouterB] route-policy qppb permit node 0
[RouterB-route-policy-qppb-0] apply ip-precedence 1
[RouterB-route-policy-qppb-0] apply qos-local-id 3
[RouterB-route-policy-qppb-0] quit
# Enable QPPB on interface GigabitEthernet 2/1/1.
[RouterB] interface gigabitethernet 2/1/1
[RouterB-GigabitEthernet2/1/1] bgp-policy source ip-prec-map ip-qos-map
[RouterB-GigabitEthernet2/1/1] quit
# Configure a QoS policy.
[RouterB] traffic classifier qppb
[RouterB-classifier-qppb] if-match ip-precedence 1
[RouterB-classifier-qppb] if-match qos-local-id 3
[RouterB-classifier-qppb] quit
[RouterB] traffic behavior qppb
[RouterB-behavior-qppb] car cir 512 green pass red discard
[RouterB-behavior-qppb] quit
[RouterB] qos policy qppb
[RouterB-qospolicy-qppb] classifier qppb behavior qppb
[RouterB-qospolicy-qppb] quit
# Apply the QoS policy qppb to incoming traffic on interface GigabitEthernet 2/1/1.
[RouterB] interface gigabitethernet 2/1/1
[RouterB-GigabitEthernet2/1/1] qos apply policy qppb inbound
[RouterB-GigabitEthernet2/1/1] quit
Verifying the configuration
# Verify that the related route on Router B takes effect.
[RouterB] display ip routing-table 1.1.1.0 24 verbose
Summary Count : 1
Destination: 1.1.1.0/24
Protocol: BGP Process ID: 0