Configuring Routing Policies 131

[SwitchA] router id 1.1.1.1

[SwitchA] ospf [SwitchA-ospf-1] area 0

[SwitchA-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255

[SwitchA-ospf-1-area-0.0.0.0] quit [SwitchA-ospf-1] quit

# Configure an ACL.

[SwitchA] acl number 2000

[SwitchA-acl-basic-2000] rule deny source 30.0.0.0 0.255.255.255

[SwitchA-acl-basic-2000] rule permit source any

[SwitchA-acl-basic-2000] quit

# Apply ACL 2000 to filter the advertised routes.

[SwitchA] ospf

[SwitchA-ospf-1] filter-policy 2000 export

# Redistribute static routes.

[SwitchA-ospf-1] import-route static

Configure Switch B.

The configuration on Switch B is the same as that in method 1. Refer to “Configure Switch B.” on page 130.

Filter routing information with the import-route command and the asbr-summary not-advertise command (method 3)

Configure Switch A.

# Configure the IP addresses of the interfaces.

<SwitchA> system-view

[SwitchA] interface vlan-interface 100 [SwitchA-Vlan-interface100] ip address 10.0.0.1 255.0.0.0

[SwitchA-Vlan-interface100] quit [SwitchA] interface vlan-interface 200

[SwitchA-Vlan-interface200] ip address 12.0.0.1 255.0.0.0

[SwitchA-Vlan-interface200] quit

# Configure three static routes.

[SwitchA] ip route-static 20.0.0.0 255.0.0.0 12.0.0.2

[SwitchA] ip route-static 30.0.0.0 255.0.0.0 12.0.0.2

[SwitchA] ip route-static 40.0.0.0 255.0.0.0 12.0.0.2

# Enable OSPF and specify VLAN interface 100 to belong to area 0.

[SwitchA] router id 1.1.1.1

[SwitchA] ospf [SwitchA-ospf-1] area 0

[SwitchA-ospf-1-area-0.0.0.0] network 10.0.0.0 0.255.255.255

[SwitchA-ospf-1-area-0.0.0.0] quit

Page 131
Image 131
3Com 4200G, 5500G, 4210 manual # Apply ACL 2000 to filter the advertised routes, # Redistribute static routes