首页 > 技术文章 > vlan间路由

bilibili517153 2019-05-21 13:40 原文

先是在主机1配置ip地址192.168.30.1 主机2的ip地址192.168.40.1。之后再交换机上创建vlan30和40,让主机1在vlan 30,主机2在vlan40。之后进入接口30和40,配置ip地址和掩码,之后在主机上配置网关

交换机代码:

sys
vlan 30
vlan 40
interface gi 1/0/1
port link-type access 
port access vlan 30
interface gi 1/0/1
port link-type access 
port access vlan 40
interface vlan-interface 30
ip address 192.168.30.254 24
interface vlan-interface 40
ip address 192.1

 

68.40.254 24

推荐阅读