Operation Manual – Routing Protocol
Quidway S3900 Series Ethernet Switches-Release 1510 Chapter 5 IP Routing Policy Configuration
Huawei Technologies Proprietary
5-9
[Switch A-acl-basic-2000] rule permit source any
[Switch A-acl-basic-2000] quit
# Configure a route-policy.
[Switch A] route-policy ospf permit node 10
[Switch A -route-policy] if-match acl 2000
[Switch A -route-policy] quit
# Apply route policy when the static routes are imported.
[Switch A] ospf
[Switch A-ospf-1] import-route static route-policy ospf
z Configure Switch B:
# Configure the IP address of the interface.
<Switch B> system-view
[Switch B] interface vlan-interface 100
[Switch B-Vlan-interface100] ip address 10.0.0.2 255.0.0.0
[Switch B-Vlan-interface100] quit
# Enable the OSPF protocol and specify the ID of the area to which the interface
belongs.
[Switch B] router id 2.2.2.2
[Switch B] ospf
[Switch B-ospf-1] area 0
[Switch B-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255
[Switch B-ospf-1-area-0.0.0.0] quit
[Switch B-ospf-1] quit
# Display the OSPF routing table on Switch B and check if route policy takes effect.
[Switch B] display ospf routing
OSPF Process 1 with Router ID 2.2.2.2
Routing Tables
Routing for Network
Destination Cost Type NextHop AdvRouter Area
10.0.0.0/8 1 Transit 10.0.0.2 1.1.1.1 0.0.0.0
Routing for ASEs
Destination Cost Type Tag NextHop AdvRouter
20.0.0.0/8 1 Type2 1 10.0.0.1 1.1.1.1
40.0.0.0/8 1 Type2 1 10.0.0.1 1.1.1.1
Total Nets: 3