[RouterB-Vlanif10]
quit
[RouterB]
interface vlanif 30
[RouterB-Vlanif30]
ip address 30.30.30.2 24
[RouterB-Vlanif30]
quit
# Configure basic OSPF functions.
[RouterB]
router id 2.2.2.2
[RouterB]
ospf
[RouterB-ospf-1]
area 0
[RouterB-ospf-1-area-0.0.0.0]
network 20.20.20.0 0.0.0.255
[RouterB-ospf-1-area-0.0.0.0]
network 30.30.30.0 0.0.0.255
[RouterB-ospf-1-area-0.0.0.0]
quit
Step 3
Verify the configuration.
On the computer on the Layer 2 network connected to RouterA, set the default gateway address
to the IP address of VLANIF 10 (10.10.10.1/24 in this example).
On the computer on the Layer 2 network connected to RouterB, set the default gateway address
to the IP address of VLANIF 10 (20.20.20.1/24 in this example).
After the configurations are complete, computers on the two Layer 2 networks are isolated at
Layer 2 and can communicate at Layer 3.
----End
Configuration Files
Configuration file of RouterA
#
sysname RouterA
#
router id 1.1.1.1
#
vlan batch 10 30
#
interface Vlanif10
ip address 10.10.10.1 255.255.255.0
#
interface Vlanif30
ip address 30.30.30.1 255.255.255.0
#
interface Ethernet2/0/1
port link-type trunk
port trunk allow-pass vlan 10
#
interface Ethernet2/0/2
port link-type trunk
port trunk allow-pass vlan 30
#
ospf 1
area 0.0.0.0
network 10.10.10.0 0.0.0.255
network 30.30.30.0 0.0.0.255
#
return
Configuration file of RouterB
#
sysname RouterB
#
router id 2.2.2.2
#
vlan batch 10 30
Huawei AR3200 Series Enterprise Routers
Configuration Guide - LAN
3 VLAN Configuration
Issue 02 (2012-03-30)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
121