华为ENSP配置VLAN间路由
VLAN间路由:通过三层设备路由,使得不同VLAN间可以互相通信。但是仅仅允许单播通信。不同VLAN之间广播帧依然被隔离,没有失去VLAN原有的意义。
VLAN间路由两种方法:多层交换机的交换虚拟接口SVI(Switch Virtual Interface)和路由器的单臂路由。
将交换机的接口属性更改时,例如将access------>>trunk或者trunk------>>access,必须重置接口的默认配置。
[SW1]interface gi0/0/1
[SW1-GigabitEthernet0/0/1]undo port link-type access #取消accesss无效
Error:Too many parameters found at ‘^’ position.
[SW1]clear configuration interface gi0/0/1 #重置端口
[SW1]interface gi0/0/1
[SW1-GigabitEthernet0/0/1]dis this
interface GigabitEthernet0/0/1
shutdown
return
[SW1-GigabitEthernet0/0/1]undo shutdown #启用端口
一、多层交换机交换虚接口SVI配置
通过接入层交换机配置VLAN接口,核心层交换机配置Trunk链路,实现不同VLAN的互相通信或者向外网通信。
(一)将接口划入VLAN配置
1.创建配置SW1的VLAN 10和VLAN 20
system-view #进入系统视图
[Huawei]undo info-center enable #关闭消息中心
Info: Information center is disabled.
[Huawei]sysname SW1 #把交换机重命名为SW1
[SW1]vlan 10 #创建VLAN 10
[SW1-vlan10]quit
[SW1]vlan 20 #创建VLAN 20
[SW1-vlan20]quit
[SW1]vlan batch 10 20 #或者同时可以创建VLAN10和VLAN20
[SW1]vlan batch 30 to 40 #批量创建多个VLAN, VLAN30至VLAN 40,思科无此命令
[SW1]interface gi0/0/1
[SW1-GigabitEthernet0/0/1]port link-type access #接口的类型配置为access ,专门接PC主机
[SW1-GigabitEthernet0/0/1]port default vlan 10 #将接口g