配置示例(Huawei)
在缺省情况下,华为数通产品上所有三层接口都属于根实例。在防火墙中,会看到明显的根实例;在路由器中,根示例的体现并不明显。
按照由下而上的配置顺序(报文沿途经过的设备):
// ------- PC ... // ------- SW1 interface GigabitEthernet0/0/1 port link-type access port default vlan 10 interface GigabitEthernet0/0/2 port link-type access port default vlan 20 interface GigabitEthernet0/0/3 port link-type trunk port trunk allow-pass vlan 10 20 // ------- AR6 ip vpn-instance VLAN10 ip vpn-instance VLAN20 interface GigabitEthernet0/0/0 ip binding vpn-instance VLAN10 ip address 10.0.0.1 255.255.255.0 interface GigabitEthernet0/0/1 ip binding vpn-instance VLAN20 ip address 10.0.0.1 255.255.255.0 interface GigabitEthernet0/0/2 interface GigabitEthernet0/0/2.10 dot1q termination vid 10 ip binding vpn-instance VLAN10 ip address 192.168.1.254 255.255.255.0 arp broadcast enable interface GigabitEthernet0/0/2.20 dot1q termination vid 20 ip binding vpn-instance VLAN20 ip address 192.168.1.254 255.255.255.0 arp broadcast enable ospf 1 router-id 1.1.1.1 vpn-instance VLAN10 area 0.0.0.0 network 10.0.0.0 0.0.0.255 network 192.168.1.0 0.0.0.255 ospf 2 router-id 1.1.1.1 vpn-instance VLAN20 area 0.0.0.0 network 10.0.0.0 0.0.0.255 network 192.168.1.0 0.0.0.255 // ------- AR5 ... // ------- AR4 ...