一、实验的目的及要求:
1.掌握网络拓扑规划
2.掌握交换机的配置与管理
3.掌握VLAN的配置方法
4.掌握路由协议的使用方法
二、实验环境:
计算机、4块交换机、2块路由器
三、实验内容:
3.1、项目背景:
某中学有两个校区,其中北校区有行政楼和理科楼,南校区有文科楼和活动中心。每个楼里有教师和学生两种类型的用户。学校现有4块二层交换机(cisco2960),两块路由器,现在学校要求,南北校区的两种类型的用户既能隔离一定的广播信息,又能实现互通。假如你是该校的网络管理员,请你给出拓扑规划、完成学校任务。
由项目背景可知,为了隔离一定的广播信息,需要使用vlan ,并且用的不同vlan 间的通信,由此单臂路由最适合。
3.2、根据实验目的规划拓扑图
拓扑图
整体思路:利用交换机划分不同vlan模拟楼里的两种用户,使用单臂路由使楼里的两种用户能够相互通信。
North(路由器)
north>enable north#configure terminal north(config)#interface FastEthernet0/0 north(config-if)#no shutdown north(config-if)#exit north(config)#int f0/0.10 north(config-subif)# %LINK-5-CHANGED: Interface FastEthernet0/0.10, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.10, changed state to up north(config-subif)#encapsulation dot1Q 10 north(config-subif)#ip add 192.168.10.1 255.255.255.0 north(config-subif)#exit north(config)#int f0/0.2 north(config-subif)# %LINK-5-CHANGED: Interface FastEthernet0/0.2, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.2, changed state to up north(config-subif)#encapsulation dot1Q 20 north(config-subif)#ip add 192.168.20.1 255.255.255.0 north(config-subif)#end %SYS-5-CONFIG_I: Configured from console by console north# north#configure terminal north(config)#interface FastEthernet0/1 north(config-if)#no shutdown %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up north(config-if)#exit north(config)#interface FastEthernet0/1 north(config-if)#no ip add north(config-if)#int f0/1.30 north(config-subif)# %LINK-5-CHANGED: Interface FastEthernet0/1.30, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1.30, changed state to up north(config-subif)#encapsulation dot1Q 30 north(config-subif)#ip add 192.168.30.1 255.255.255.0 north(config-subif)#no shut north(config-subif)#int f0/1.40 %LINK-5-CHANGED: Interface FastEthernet0/1.40, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1.40, changed state to up north(config-subif)#encapsulation dot1Q 40 north(config-subif)#ip add 192.168.40.1 255.255.255.0 north(config-subif)#no shutdown north(config-subif)#exit north(config)#end north# north#configure terminal Enter configuration commands, one per line. End with CNTL/Z. north(config)#route rip north(config-route)#network 192.168.10.0 north(config-route)#network 192.168.20.0 north(config-route)#network 192.168.30.0 north(config-route)#network 192.168.40.0 north(config-route)#network 10.10.10.0 north(config-route)#exit north#configure terminal north(config)#interface Serial1/0 north(config-if)#no shutdown north(config-if)#ip address 10.10.10.1 255.255.255.0 north(config-if)#clock rate 9600 north(config-if)# %LINK-5-CHANGED: Interface Serial1/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up north(config-if)#exit
行政楼(交换机)
xingzhenglou>enable xingzhenglou#configure terminal xingzhenglou(config)#vlan 10 xingzhenglou(config-vlan)#name VLAN10 xingzhenglou(config-vlan)#exit xingzhenglou(config)#vlan 20 xingzhenglou(config-vlan)#name VLAN20 xingzhenglou(config-vlan)#exit xingzhenglou(config)# xingzhenglou(config)#interface FastEthernet0/1 xingzhenglou(config-if)#xingzhenglouport mode trunk xingzhenglou(config-if)#exit xingzhenglou(config)#interface FastEthernet0/2 xingzhenglou(config-if)#xingzhenglouport access vlan 10 xingzhenglou(config)#interface FastEthernet0/11 xingzhenglou(config-if)#xingzhenglouport access vlan 20 xingzhenglou(config-if)#exit
理科楼(交换机)
likelou>enable likelou#configure terminal likelou(config)#vlan 30 likelou(config-vlan)#name VLAN30 likelou(config-vlan)#exit likelou(config)#vlan 40 likelou(config-vlan)#name VLAN40 likelou(config-vlan)#exit likelou(config)#interface FastEthernet0/2 likelou(config-if)#likelouport access vlan 30 likelou(config-if)#exit likelou(config)#interface FastEthernet0/11 likelou(config-if)#likelouport access vlan 40 likelou(config-if)#end
南区(South)
Router>enable Router#configure terminal Router(config)#interface FastEthernet0/0 Router(config-if)#no shutdown Router(config-if)#int f0/0.50 Router(config-subif)# %LINK-5-CHANGED: Interface FastEthernet0/0.50, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.50, changed state to up Router(config-subif)#encapsulation dot1Q 50 Router(config-subif)#ip add 192.168.50.1 255.255.255.0 Router(config-subif)#exit Router(config)#int f0/0.60 Router(config-subif)# %LINK-5-CHANGED: Interface FastEthernet0/0.60, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0.60, changed state to up Router(config-subif)#en Router(config-subif)#encapsulation dot1Q 60 Router(config-subif)#ip add 192.168.60.1 255.255.255.0 Router(config-subif)#end Router(config-if)# Router(config-if)#no ip add Router(config-if)#int f0/1.70 Router(config-subif)#encapsulation dot1Q 70 Router(config-subif)#ip add 192.168.70.1 255.255.255.0 Router(config-subif)#no shutdown Router(config-subif)#int f0/1.80 Router(config-subif)#encapsulation dot1Q 80 Router(config-subif)#ip add 192.168.80.1 255.255.255.0 Router(config-subif)#no shutdo Router(config-subif)#exit South(config)#router rip Router(config-router)#network 192.168.60.0 Router(config-router)#network 192.168.50.0 South(config-router)#network 192.168.70.0 South(config-router)#network 192.168.80.0 South(config-router)#network 10.10.10.0 South(config)#interface Serial1/0 South(config-if)#no shutdown South(config-if)# %LINK-5-CHANGED: Interface Serial1/0, changed state to up clock rate 9600 South(config-if)# South(config-if)#ip address 10.10.10.2 255.255.255.0 South(config-if)#exit
文科楼(wenkelou)
wenkelou>enable wenkelou#configure terminal wenkelou(config)#vlan 50 wenkelou(config-vlan)#name VLAN50 wenkelou(config)#vlan 60 wenkelou(config-vlan)#name VLAN60 wenkelou(config)# wenkelou(config)#interface FastEthernet0/1 wenkelou(config-if)#wenkelouport mode trunk wenkelou(config-if)#exit wenkelou(config)#interface FastEthernet0/2 wenkelou(config-if)#wenkelouport access vlan 50 wenkelou(config-if)#exit wenkelou(config)#interface FastEthernet0/11 wenkelou(config-if)#wenkelouport access vlan 60 wenkelou(config-if)# %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up wenkelou(config-if)#end wenkelou#configure terminal
活动中心(huodongzhongxin)
huodongzhongxin>enable huodongzhongxin#configure terminal huodongzhongxin(config)#vlan 70 huodongzhongxin(config-vlan)#name VLAN70 huodongzhongxin(config)#vlan 80 huodongzhongxin(config-vlan)#name VLAN80 huodongzhongxin(config)# huodongzhongxin(config)#interface FastEthernet0/1 huodongzhongxin(config-if)#huodongzhongxinport mode trunk huodongzhongxin(config-if)#exit huodongzhongxin(config)#interface FastEthernet0/2 huodongzhongxin(config-if)#huodongzhongxinport access vlan 70 huodongzhongxin(config-if)#exit huodongzhongxin(config)#interface FastEthernet0/11 huodongzhongxin(config-if)#huodongzhongxinport access vlan 80 huodongzhongxin(config-if)#end
测试用Te1ping Te3,Te4,St3,St4
总结:单臂路由时router rip然后Router(config-router)#network 192.168.60.0告知自己能到达的网络