ENSP Demo 005 L3 Switch - Router

可以将SW1的G0/0/1接口改为三层接口,也可以创建虚接口关联G0/0/1。

sys 
sysn sw1

vlan batch 30 40

int g0/0/2
port link-type access
port default vlan 30
int g0/0/1
port link-type access
port default vlan 40

interface vlanif 30
ip add 23.0.0.1 24
interface vlanif 40
ip add 13.0.0.1 24

ip route-static 192.168.10.0 24 23.0.0.2
ip route-static 192.168.20.0 24 23.0.0.2
ip route-static 1.1.1.1 32 13.0.0.2

sys
sysn sw2

vlan batch 10 20 30

int g0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20

int g0/0/1
port link-type access
port default vlan 30

interface vlanif 10
ip add 192.168.10.254 24
interface vlanif 20
ip add 192.168.20.254 24
interface vlanif 30
ip add 23.0.0.2 24

ip route-static 13.0.0.0 24 23.0.0.1
ip route-static 1.1.1.1 32 23.0.0.1

sys
sysn sw4

vlan batch 10 20

int e0/0/2
port link-type access
port default vlan 10
int e0/0/3
port link-type access
port default vlan 20
int e0/0/1
port link-type trunk
port trunk allow-pass vlan 10 20

sys
sysn R1

int g0/0/0
ip add 13.0.0.2 24
int loopback 0 
ip add 1.1.1.1 32

ip route-static 0.0.0.0 0 13.0.0.1

 

posted @ 2024-03-26 16:59  让我读个条  阅读(61)  评论(0)    收藏  举报