3 pbr examples, 4 pbr troubleshooting help, Xamples – PLANET XGS3-24040 User Manual

Page 168: Roubleshooting

Advertising
background image

Chapter 20 Flow-based Redirection

19-3

19.3 PBR Examples

Example 1:

On port ethernet 1/1, set the messages whose source IP is within the segment 2000:: /64 to do policy routing,

the next hop is 3100::2.

The following is the configuration steps:

Switch#config

Switch(config)#interface vlan 1

Switch(Config-if-Vlan1)#ipv6 address 2000::1/64

Switch(Config-if-Vlan1)#ipv6 neighbor 2000::2 00-00-00-00-00-01 interface Ethernet 1/1

Switch(config)#interface vlan 2

Switch(Config-if-Vlan2)#ipv6 address 3000::1/64

Switch(Config-if-Vlan2)#ipv6 neighbor 3000::2 00-00-00-00-00-02 interface Ethernet 1/2

Switch(config)#interface vlan 3

Switch(Config-if-Vlan3)#ipv6 address 3100::1/64

Switch(Config-if-Vlan3)#ipv6 neighbor 3100::2 00-00-00-00-00-03 interface Ethernet 1/5

Switch(config)# ipv6 access-list extended b1

Switch(Config-IPv6-Ext-Nacl-b1)# permit tcp 2000:: /64 any-destination

Switch(Config-IPv6-Ext-Nacl-b1)#exit

Switch(config)#mls qos

Switch(config)#class-map c1

Switch(config-ClassMap)#match ipv6 access-group b1

Switch(config-ClassMap)# exit

Switch(config)#policy-map p1

Switch(config-PolicyMap)#class c1

Switch(config-Policy-Class)# set ipv6 nexthop 3100::2

Switch(config--Policy-Class)#exit

Switch(config-PolicyMap)#exit

Switch(config)#interface ethernet 1/1

Switch(Config-Ethernet1/1)#service-policy input p1

Configuration result:

First, set an ACL containing one entry, names it as b1, matching source IP segment 2000::/64(permit).

Globally enable QoS function, create a class-map:c1, and match ACL b1 in the class-map. Create a

policy-map:p1, quoting c1 in p1, and set the next hop as 3100::2. Apply this policy-map on port ethernet 1/1.

After that, the messages whose source IP are within the segment 2000::/64 received on port ethernet 1/1 will

be forwarded through 3100::2.

19.4 PBR Troubleshooting Help

 At present, policy-map can only be bound to input port but not output port.
 Since hardware resources are limited, if the policy is too complicated to configure, relative information

will be noticed to users.

Advertising