赞
踩
目录
- //配置三层接口之前,首先创建VLAN及端口分配
- S1(config)#VLAN 2 //创建vlan2
- S1(config-vlan)#exit
-
- S1(config)#interface fa0/1 //进入端口配置模式
- S1(config-if)#switchport trunk encapsulation dot1q //配置Trunk封装为802.1q协议
- S1(config-if)#switchport mode trunk //设置为主干道trunk模式
-
- S1(config)#interface fa0/2
- S1(config-if)#switchport trunk encapsulation dot1q //配置Trunk封装为802.1q协议
- S1(config-if)#switchport mode trunk //设置为主干道trunk模式
-
- S1(config)#interface vlan 1
- S1(config-if)#ip address 192.168.1.1 255.255.255.0 //在VLAN端口配置网关IP地址
- S1(config-if)#no shutdown //开启端口
-
- S1(config)#interface vlan 2
- S1(config-if)#ip address 192.168.2.1 255.255.255.0 //在VLAN端口配置网关IP地址
- S1(config-if)#no shutdown //开启端口
- S1(config-if)#exit
-
- S1(config)#ip routing //开启三层交换机的IP路由功能
- S2(config)#vlan 2 //在全局配置模式下创建VLAN
- S2(config-vlan)#exit
-
- S2(config)#interface fa0/1 //进入端口配置模式
- S2(config-if)#switchport mode trunk //端口配置为Trunk模式用来进行交换机互联,可允许多个VLAN通信
-
- S2(config-if)#interface fa0/2 //进入端口配置模式
- S2(config-if)#switchport access vlan 1 //将端口分配到vlan 1
-
- S2(config-if)#interface fa0/3
- S2(config-if)#switchport access vlan 2 //将交换机端口分配到vlan2
- S3(config)#vlan 2
- S3(config-vlan)#exit
-
- S3(config)#interface fa0/1
- S3(config-if)#switchport mode trunk
-
- S3(config-if)#interface fa0/2
- S3(config-if)#switchport access vlan 2
-
- S3(config-if)#interface fa0/3
- S3(config-if)#switchport access vlan 1
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。