|
|
一、ensp中路由器若何设置vlan建立vlan:
[sw1]vlan 10 //建立VLAN10
[sw1-vlan10]vlan 20 //建立VLAN20
设置access:
[sw1]interface Ethernet 0/0/1 //进入以太网接口0/0/1
[sw1-Ethernet0/0/1]port link-type access //设置接口范例为Access
[sw1-Ethernet0/0/1]port default vlan 10 //分派接口给VLAN10
设置trunk:
[sw1]interface Ethernet 0/0/4
[sw1-Ethernet0/0/4]port link-type trunk //设置接口范例为trunk
[sw1-Ethernet0/0/4]port trunk allow-pass vlan 10 20//trunk口答应经过的VLAN
二、关于cisco路由器vlan设置题目~需要经过单臂路由才能是分歧的vlan之间通讯,具体设置就是进入子接口中封装802.1Q协议设置vlan的IP地址而且no shutdown
Router(config)#interface f0/0.1
%link-5-CHANGED: Interface FastEthernet0/0.1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.1, changed state to upRouter(config-subif)#en
Router(config-subif)#encapsulation do
Router(config-subif)#encapsulation dot1Q ?
IEEE 802.1Q VLAN ID
Router(config-subif)#encapsulation dot1Q 1
Router(config-subif)#ip ad
Router(config-subif)#ip address 192.168.1.1 255.255.255.0
Router(config-subif)#no sh
Router(config-subif)#no shutdown
Router(config-subif)# |
|