Network requirements, Configuration procedure – H3C Technologies H3C SecPath F1000-E User Manual

Page 865

Advertising
background image

840

Configuring IPv6 interface PBR based on packet length

Network requirements

As shown in

Figure 397

, PBR is configured to control packets arriving on GigabitEthernet 0/1 of SecPath

A. Configure 150::2/64 as the next hop for IPv6 packets with a length of 64 to 100 bytes, and configure

151::2/64 as the next hop for IPv6 packets with a length of 101 to 1000 bytes. All other IPv6 packets are
forwarded according to the routing table.

Figure 397 Network diagram

Configuration procedure

NOTE:

In this example, RIPng is configured to ensure the reachability among devices.

1.

Configure SecPath A:
# Configure RIPng.

<SecPathA> system-view

[SecPathA] ipv6

[SecPathA] ripng 1

[SecPathA-ripng-1] quit

[SecPathA] interface GigabitEthernet 0/2

[SecPathA-GigabitEthernet0/2] ipv6 address 150::1 64

[SecPathA-GigabitEthernet0/2] ripng 1 enable

[SecPathA-GigabitEthernet0/2] quit

[SecPathA] interface GigabitEthernet 0/3

[SecPathA-GigabitEthernet0/3] ipv6 address 151::1 64

[SecPathA-GigabitEthernet0/3] ripng 1 enable

[SecPathA-GigabitEthernet0/3] quit

# Define policy Node 10 of lab1, so that IPv6 packets with a length of 64 to 100 bytes are

forwarded to the next hop 150::2/64, and IPv6 packets with a length of 101 to 1000 bytes are
forwarded to the next hop 151::2/64.

[SecPathA] ipv6 policy-based-route lab1 permit node 10

[SecPathA-pbr6-lab1-10] if-match packet-length 64 100

[SecPathA-pbr6-lab1-10] apply ipv6-address next-hop 150::2

[SecPathA-pbr6-lab1-10] quit

[SecPathA] ipv6 policy-based-route lab1 permit node 20

[SecPathA-pbr6-lab1-20] if-match packet-length 101 1000

[SecPathA-pbr6-lab1-20] apply ipv6-address next-hop 151::2

Advertising