network 192.168.1.0 0.0.0.255
network 192.168.2.0 0.0.0.255
network 192.168.3.0 0.0.0.255
#
return
l Configuration file of Switch-C
#
sysname SwitchC
#
vlan batch 20
#
interface Vlanif20
ip address 192.168.2.2 255.255.255.0
#
interface XGigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 20
#
ospf 1
filter-policy ip-prefix in import
area 0.0.0.0
network 192.168.2.0 0.0.0.255
#
ip ip-prefix in index 10 permit 172.1.18.0 24
#
return
l Configuration file of Switch-D
#
sysname SwitchD
#
vlan batch 30
#
interface Vlanif30
ip address 192.168.3.2 255.255.255.0
#
interface XGigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 30
#
ospf 1
area 0.0.0.0
network 192.168.3.0 0.0.0.255
#
return
10.10.2 Example for Applying a Routing Policy to Imported Routes
Networking Requirements
As shown in Figure 10-2, Switch-B exchanges routing information with Switch-A through
OSPF and with Switch-C through IS-IS.
Switch-B is required to import IS-IS routes into OSPF and to use the routing policy to set the
route attributes. The cost value of the route 172.17.1.0/24 is set to 100, and the tag of the route
172.17.2.0/24 is set to 20.
S6700 Series Ethernet Switches
Configuration Guide - IP Routing 10 Routing Policy Configuration
Issue 01 (2012-03-15) Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
621