cisco三层交换机怎么设置实现vlan间的通讯
发布网友
发布时间:2022-04-30 02:51
我来回答
共5个回答
懂视网
时间:2022-04-13 00:06
创建VLAN的步骤 1.定义VTP COS set vtp domain domain-name IOS (vlan) vtp domain domain-name 或者 (global) vtp domain domain-name 2.创建VLAN COS set vlan vlan-id [name name] [state state] [mtu mtu] IOS (vlan) vlan vlan-id [name vlan-name] [sta
创建VLAN的步骤
1.定义VTP
COS
set vtp domain domain-name
IOS
(vlan) vtp domain domain-name
或者
(global) vtp domain domain-name
2.创建VLAN
COS
set vlan vlan-id [name name] [state state] [mtu mtu]
IOS
(vlan) vlan vlan-id [name vlan-name] [state {suspend | active}] [mtu mtu-size]
(global) vlan vlan-id
(vlan-config) vlan vlan-id [mtu mtu-size] [name vlan-name] [state {suspend | active}]
举例
CatOS
(enable)>set vtp mode transparent
(enable)>set vlan 5 name Cameron
(enable)>set vlan 8 name Logan
(enable)>set vlan 10 name Katie
(enable)>set spantree macreduction enable
(enable)>set vlan 2112 name Rush
(enable)>
IOS
#vlan database
(vlan)#vtp transparent
(vlan)#vlan 5 name Cameron
(vlan)#vlan 8 name Logan
(vlan)#vlan 10 name Katie
(vlan)#exit
#copy running-config startup-config
TRUNK
An example of the Catalyst OS configuration for Distribution_1 follows:
Distribution_1 (enable)>clear trunk 1/1 2-1001
Distribution_1 (enable)>set trunk 1/1 desirable isl 10
Distribution_1 (enable)>clear trunk 2/1 2-1001
Distribution_1 (enable)>set trunk 2/1 on dot1q 5,8,10
An example of the Catalyst OS configuration for Core_1 follows:
Core_1 (enable)>clear trunk 1/1 2-1001
Core_1 (enable)>set trunk 1/1 10
An example of the Supervisor IOS configuration for Core_1 follows:
Core_1(config)#interface gigabitethernet 1/1
Core_1(config-if)#switchport encapsulation negotiate
Core_1(config-if)#switchport mode dynamic auto
Core_1(config-if)#switchport trunk allowed vlan remove 2-1001
Core_1(config-if)#switchport trunk allowed vlan add 10
Core_1 (config-if)#end
Core_1#copy running-config startup-config
An example of the Layer 2 IOS configuration for Access_1 follows:
Access_1 (config)#interface gigabitethernet 0/1
Access_1 (config-if)#switchport mode trunk
Access_1 (config-if)#switchport trunk encapsulation dot1q
Access_1 (config-if)#switchport trunk allowed vlan remove 2-1001
Access_1 (config-if)#switchport trunk allowed vlan add 5,8,10
Access_1 (config-if)#end
Access_1#copy running-config startup-config
An example of the Catalyst OS configuration for Core_1 follows:
Core_1 (enable)>set vtp mode transparent
Core_1 (enable)>set trunk 1/1 on isl
Core_1 (enable)>set trunk 1/2 on isl
Core_1 (enable)>
An example of the Catalyst OS configuration for Distribution_1 follows:
Distribution_1 (enable)>set vtp domain GO-CATS
Distribution_1 (enable)>set trunk 1/1 on isl
Distribution_1 (enable)>set trunk 2/1 on dot1Q
Distribution_1 (enable)>set vtp pruning enable
Distribution_1 (enable)>clear vtp pruneeligible 10
An example of the Catalyst OS configuration for Distribution_2 follows:
Distribution_2 (enable)>set trunk 1/1 on isl
Distribution_2 (enable)>clear vtp pruneeligible 10
An example of the Layer 2 IOS configuration for Access_1 follows:
Access_1#vlan database
Access_1 (vlan)#vtp client
Access_1 (vlan)#exit
Access_1 #config t
Access_1 (config)#interface gigabitethernet 0/1
Access_1 (config-if)#switchport mode trunk
Access_1 (config-if)#switchport trunk encapsulation dot1Q
Access_1 (config-if)#switchport trunk pruning vlan remove 10
Access_1 (config-if)#end
Access_1#copy running-config startup-config
热心网友
时间:2022-04-12 21:14
1、不同VLAN通信必须要借助三层或以三层以上设备
2、一般学习都会用路由器做子接口
3、用三层交换机就是你这种方法:
1、你把接口配置在二层就划分到你指定的vlan,比如你下面有VLAN10
2、在全局输入int vlan 10 在这个接口下配置VLAN10的网关
总结一下:就是接口工作在二层,然后在VLAN接口配置IP达到不同VLAN可以通信
具体配置如下:
三层交换机不同VLAN通信
第一步:把交换机启用三层功能
Switch(config)#ip routing
第二步:将接口划分到指定VLAN
Switch(config)#int f0/1
Switch(config-if)#switchport access vlan 20
第三步:在vlan接口上配置IP
Switch(config)#int vlan 10
Switch(config-if)#ip add 192.168.1.254 255.255.255.0
纯手工输入,希望采纳
热心网友
时间:2022-04-12 22:32
在三层交换机上配置各个VLAN的IP地址即可。
热心网友
时间:2022-04-13 00:07
起svi虚接口,通过路由通信。
热心网友
时间:2022-04-13 01:58
需要路由器或配置单臂路由