ensp搭建小型局域网综合实验(附详细步骤+命令)

时间:2025-03-08 14:31:36

SW1

三层vlan

interface Vlanif2

ip address 192.168.2.254 24

interface Vlanif3

ip address 192.168.3.254 24

配置DHCP

dhcp enable

ip pool vlan2

network 192.168.2.0 mask 24

gateway-list 192.168.2.254

dns-list 8.8.8.8

excluded-ip-address 192.168.2.200 192.168.2.253

quit

interface Vlanif 2

dhcp select global

ip pool vlan3

network 192.168.3.0 mask 24

gateway-list 192.168.3.254

dns-list 8.8.8.8

excluded-ip-address 192.168.3.200 192.168.3.253

quit

interface Vlanif 3

dhcp select global

 

三层交换机--路由器:配置ACCESS模式,要创建一个新的vlan

vlan 40

quit

interface g0/0/3

port link-type access

port default vlan 40

quit

interface Vlanif 40

ip address 192.168.40.254 24

 

三层交换机上网:默认路由

ip route-static 0.0.0.0 0.0.0.0 192.168.40.9