《思科Vlan配置实例》由会员分享,可在线阅读,更多相关《思科Vlan配置实例(3页珍藏版)》请在金锄头文库上搜索。
1、思科Vlan配置实例实验配置:SW-2L1、创建VLAN,并将相应端口加入VLANSW-2L#vlan databaseSW-2L(vlan)#vlan 10SW-2L(vlan)#vlan 20SW-2L(vlan)#vlan 30SW-2L(config)#interface f0/1SW-2L(config-if)#switch access vlan 10SW-2L(config)#interface f0/2SW-2L(config-if)#switch access vlan 20SW-2L(config)#interface f0/3SW-2L(config-if)#switch
2、 access vlan 302、创建TRUNKSW-2L(config)#interface f0/24SW-2L(config-if)switch mode trunkSW-3L1、创建VLANSW-3L#vlan databaseSW-3L(vlan)#vlan 10SW-3L(vlan)#vlan 20SW-3L(vlan)#vlan30用show vlan-switch查看2、创建TRUNKSW-3L(config)#interface f0/24SW-3L(config-if)#switch mode trunk3、开启三层交换路由功能SW-3L(conifg)#ip routin
3、g4、配置VLAN的IPSW-3L(config)#interface vlan 10SW-3L(config-if)#ip address 192.168.10.254 255.255.255.0SW-3L(config-if)#no shutdownSW-3L(config)#interface vlan 20SW-3L(config-if)#ip address 192.168.20.254 255.255.255.0SW-3L(config-if)#no shutdownSW-3L(conifg)#interface vlan30SW-3L(config-if)#ip address
4、192.168.30.254 255.255.255.0SW-3L(config-if)#no shutdown5、配置三层交换路由接口SW-3L(config)#interface f0/23SW-3L(config-if)#no switchportSW-3L(config-if)#ip address 10.1.1.1 255.255.255.0SW-3L(config-if)#no shutdown6、配置RIP路由SW-3L(config)#router ripSW-3L(config-router)#no auto-summarySW-3L(config-router)#netwo
5、rk 192.168.10.0 SW-3L(config-router)#network 192.168.20.0SW-3L(config-router)#network 192.168.30.0SW-3L(conifg-router)#network 10.1.1.0RA1、配置端口IPRA(config)#interface f0/0RA(config-if)#ip address 10.1.1.2 255.255.255.0RA(config-if)#no shutdownRA(config)#interface f0/1RA(config-if)#ip address 172.16.1
6、.1 255.255.255.0RA(config-if)#no shutdown用show run interfere vlan vlan-id查看,或者show interfere vlan vlan-id查看2、配置RIP路由RA(config)#router ripRA(config-router)#no auto-summaryRA(config-router)#network 10.1.1.0 RA(config-router)#network 172.16.1.0 RB1、配置端口IPRB(config)#interface f0/0RB(config-if)#ip address 172.16.1.2 255.255.255.0RB(config-if)#no shutdown2、配置RIP路由RB(config)#router ripRB(config-router)#no auto-summaryRB(config-router)#network 172.16.1.0 端口里面配VLAN,VLAN里面配IP