拓扑说明:CE1上配置VS,虚拟出两个vs,分别为vsA、vsB,其中vsB作为2层接入、vsA作为三层接入,可以看做vsA为核心层、vsB为汇聚层
目的:PC1访问AR1
LSW2模拟线缆,因为ENSP没办法使用线缆直接互联两个VS,只能通过第三台设备实现。
CE使用的ENSP中的CE12800
切换vs使用的命令如:switch virtual-system vsA
CE1的配置:
#
sysname CE1
#
admin
virtual-system vsA
port-mode group
resource u4route upper-limit 10000
resource m4route upper-limit 1000
resource u6route upper-limit 1000
resource m6route upper-limit 1000
resource vlan upper-limit 4090
resource mpls enable
resource trill enable
resource mcast enable
resource vpn-instance upper-limit 4096
resource cpu weight 5
resource memory ratio-threshold 100
resource disk ratio-threshold 100
assign interface GE1/0/0
assign interface GE1/0/1
assign interface GE1/0/2
assign interface GE1/0/3
assign interface GE1/0/4
assign interface GE1/0/5
virtual-system vsB
port-mode group
resource u4route upper-limit 10000
resource m4route upper-limit 1000
resource u6route upper-limit 1000
resource m6route upper-limit 1000
resource vlan upper-limit 4090
resource mpls enable
resource trill enable
resource mcast enable
resource vpn-instance upper-limit 4096
resource cpu weight 5
resource memory ratio-threshold 100
resource disk ratio-threshold 100
assign interface GE1/0/6
assign interface GE1/0/7
assign interface GE1/0/8
assign interface GE1/0/9
#
return
vsA的配置:
sysname vsA
#
vlan batch 10
#
interface Vlanif10
ip address 192.168.10.254 255.255.255.0
#
interface MEth0/0/0
undo shutdown
#
interface GE1/0/0
undo portswitch
undo shutdown
ip address 10.0.12.1 255.255.255.252
#
interface GE1/0/1
undo shutdown
port link-type trunk
port trunk allow-pass vlan 10
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
#
interface NULL0
#
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.0.12.0 0.0.0.3
network 192.168.10.0 0.0.0.255
#
return
vsB的配置:
#
sysname vsB
#
vlan batch 10
#
interface GE1/0/8
undo shutdown
port link-type trunk
port trunk allow-pass vlan 10
#
interface GE1/0/9
undo shutdown
port link-type trunk
port trunk allow-pass vlan 10
#
return
结果验证:在AR1上可以访问PC1。
ENSP的display virtual-system命令可能有BUG,看不到配置的vs,只能看到admin-vs。
另外就是vs后带外接口也是会虚拟化的