H3C Technologies H3C WX3000 Series Unified Switches User Manual
Page 668
67-7
[SwitchC-route-policy] apply cost 5
[SwitchC-route-policy] quit
# Create node 50 with the matching mode being permit, to allow all routing information to pass.
[SwitchC] route-policy in permit node 50
[SwitchC-route-policy] quit
# Configure RIP and apply the route policy in to the incoming routing information.
[SwitchC] rip
[SwitchC-rip] network 1.0.0.0
[SwitchC-rip] network 3.0.0.0
[SwitchC-rip] network 6.0.0.0
[SwitchC-rip] filter-policy route-policy in import
Configuration verification
1) Display data forwarding paths when the main link of the OA server between Switch A and Switch C
works normally.
Routing Table: public net
Destination/Mask Protocol Pre Cost Nexthop Interface
1.0.0.0/8 RIP 100 5 2.2.2.1 Vlan-interface2
2.0.0.0/8 DIRECT 0 0 2.2.2.2 Vlan-interface2
2.2.2.2/32 DIRECT 0 0 127.0.0.1 InLoopBack0
3.0.0.0/8 RIP 100 5 6.6.6.5 Vlan-interface6
6.0.0.0/8 DIRECT 0 0 6.6.6.6 Vlan-interface6
6.6.6.6/32 DIRECT 0 0 127.0.0.1 InLoopBack0
127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0
127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
192.168.0.0/24 DIRECT 0 0 192.168.0.39 Vlan-interface1
192.168.0.39/32 DIRECT 0 0 127.0.0.1 InLoopBack0
2) Display data forwarding paths when the main link of the OA server between Switch A and Switch C
is down.
Routing Table: public net
Destination/Mask Protocol Pre Cost Nexthop Interface
1.0.0.0/8 RIP 100 6 6.6.6.5 Vlan-interface2
3.0.0.0/8 RIP 100 5 6.6.6.5 Vlan-interface6
6.0.0.0/8 DIRECT 0 0 6.6.6.6 Vlan-interface6
6.6.6.6/32 DIRECT 0 0 127.0.0.1 InLoopBack0
127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0
127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
192.168.0.0/24 DIRECT 0 0 192.168.0.39 Vlan-interface1
192.168.0.39/32 DIRECT 0 0 127.0.0.1 InLoopBack0
Precautions
1) When you configure the apply cost command in a route policy:
z
The new cost should be greater than the original one to prevent RIP from generating routing loop in
the case that a loop exists in the topology.
z
The cost will become 16 if you try to set it to a value greater than 16.
z
The cost will become the original one if you try to set it to 0.
z
The cost will still be 16 if you try to set it to 16.