实验11 vlan间路由模拟器Word下载.docx
《实验11 vlan间路由模拟器Word下载.docx》由会员分享,可在线阅读,更多相关《实验11 vlan间路由模拟器Word下载.docx(17页珍藏版)》请在冰豆网上搜索。
ram=128
nvram=128#SizeofNVRAM
disk0=64#SetsizeofPCMCIAATAdisk0
disk1=64#SetsizeofPCMCIAATAdisk1
mmap=True
[[routerSW1]]
model=3640
console=3001
ram=100
confreg=0x2102
exec_area=32
mmap=True
slot0=NM-16ESW
F0/0=R1e0/0
F0/1=R2e0/0
F0/2=R3e0/0
idlepc=0x60638d00
[[ROUTERR1]]
console=3002
[[routerR2]]
console=3003
exec_area=32
idlepc=0x605119f0
[[routerR3]]
console=3004
confreg=0x2102
idlepc=0x605119f0
2配置交换机基本参数
Router>
en
Router#conft
Enterconfigurationcommands,oneperline.EndwithCNTL/Z.
Router(config)#hostsw1
sw1(config)#end
sw1#vlandata
sw1(vlan)#vlan10
VLAN10added:
Name:
VLAN0010
sw1(vlan)#vlan20
VLAN20added:
VLAN0020
sw1(vlan)#exit
APPLYcompleted.
Exiting....
sw1#conft
sw1(config)#intf0/1
sw1(config-if)#swmoacc
sw1(config-if)#swaccvlan10
sw1(config-if)#intf0/2
sw1(config-if)#swaccvlan20
sw1(config-if)#exit
sw1(config)#
sw1(config)#intf0/0
sw1(config-if)#swmotr
*Mar100:
12:
54.299:
%DTP-5-TRUNKPORTON:
PortFa0/0hasbecomedot1qtrunk
sw1(config-if)#swtrendot
3配置单臂路由R1
Router(config)#hostr1
r1(config)#inte0/0
r1(config-if)#nosh
r1(config)#inte0/0.10
r1(config-subif)#endot1Q10
r1(config-subif)#ipadd192.168.10.1255.255.255.0
r1(config-subif)#nosh
r1(config-subif)#exit
r1(config)#inte0/0.20
r1(config-subif)#endot1Q20
r1(config-subif)#ipadd192.168.20.1255.255.255.0
r1(config)#
4配置测试路由器R2R3
Router(config)#hostr3
r3(config)#noiprouting////把路由器关闭路由功能,也就是把路由器变成普通电脑
r3(config)#ipdefault-gateway192.168.10.1/////指定电脑的默认网关
r3(config)#inte0/0
r3(config-if)#ipadd192.168.10.2255.255.255.0
r3(config-if)#nosh
r3(config-if)#end
r3#
30:
38.227:
%SYS-5-CONFIG_I:
Configuredfromconsolebyconsole
39.483:
%LINK-3-UPDOWN:
InterfaceEthernet0/0,changedstatetoup
40.483:
%LINEPROTO-5-UPDOWN:
LineprotocolonInterfaceEthernet0/0,changedstatetoup
Router(config)#hostr4
r4(config)#noiprouting
r4(config)#ipdefault-gateway192.168.20.1
r4(config)#inte0/0
r4(config-if)#ipadd192.168.20.2255.255.255.0
r4(config-if)#nosh
r4(config-if)#
32:
36.439:
37.439:
r4(config-if)#end
r4#
4.测试
r4#p192.168.10.2
Typeescapesequencetoabort.
Sending5,100-byteICMPEchosto192.168.10.2,timeoutis2seconds:
..!
!
Successrateis60percent(3/5),round-tripmin/avg/max=144/176/192ms
第二部分三层交换
[[3640]]
F0/10=SW2f0/10
[[routerSW2]]
model=3640
ram=100
slot0=NM-16ESW
F0/11=R3e0/0
console=3005
1.配置2层交换机sw1
09:
20.039:
Configuredfromconsolebyconsolen
添加vlan10和vlan20
VLAN10modified:
VLAN20modified:
sw1#shvlan-s
VLANNameStatusPorts
----------------------------------------------------------------------------
1defaultactiveFa0/0,Fa0/1,Fa0/2,Fa0/3
Fa0/4,Fa0/5,Fa0/6,Fa0/7
Fa0/8,Fa0/9,Fa0/10,Fa0/11
Fa0/12,Fa0/13,Fa0/14,Fa0/15
10VLAN0010active
20VLAN0020active
1002fddi-defaultactive
1003token-ring-defaultactive
1004fddinet-defaultactive
1005trnet-defaultactive
VLANTypeSAIDMTUParentRingNoBridgeNoStpBrdgModeTrans1Trans2
--------------------------------------------------------------------
1enet1000011500-----10021003
10enet1000101500-----00
20enet1000201500-----00
1002fddi1010021500-----11003
1003tr101003150010050--srb11002
1004fdnet1010041500--1ibm-00
1005trnet1010051500--1ibm-00
sw1#
封装trunk链路
sw1(config)#intf0/10
51.467:
PortFa0/10hasbecomedot1qtrunk
把端口划分到相应的vlan中
sw1#conft
sw1(config-if)#intf0/1
2.配置三层交换机sw2
Router(config)#hostsw2
sw2(config)#end
添加vlan信息
sw2#vlandata
11:
06.311:
sw2(vlan)#vlan10
sw2(vlan)#vlan20
sw2(vlan)#exit
sw2#
sw2#conft
sw2(config)#intf0/10
sw2(config-if)#swmotr
sw2(config-if)#
52.671:
sw2(config-if)#swtrendot
sw2(config-if)#exit
开启路由功能,配置SVI端口,在vlan上部署ip地址
sw2(config)#iprouting
sw2(config)#intvlan10
06.319:
LineprotocolonInterfaceVlan10,changedstatetoup
sw2(config-if)#ipadd192.168.10.1255.255.255.0
sw2(config-if)#nosh
sw2(config)#intvlan20
15.907:
LineprotocolonInterfaceVlan20,changedstatetoup
sw2(config-if)#ipadd192.168.20.1255.255.255.0
给一个端口配置ip地址之前要把该端口的工作模式改为路由模式。
sw2(config)#intf0/11
sw2(config-if)#ipadd10.1.1.1255.255.255.0
%IPaddressesmaynotbeconfiguredonL2links.
注意考虑如何处理不允许在第二层配置ip地址的问题
sw2(config-if)#noswitchport
45.859:
LineprotocolonInterfaceFastEthernet0/11,changedstatetoup
sw2(config-if)#end
sw2#shiproute
Codes:
C-connected,S-static,R-RIP,M-mobile,B-BGP
D-EIGRP,EX-EIGRPexternal,O-OSPF,IA-OSPFinterarea
N1-OSPFNSSAexternaltype1,N2-OSPFNSSAexternaltype2
E1-OSPFexternaltype1,E2-OSPFexternaltype2
i-IS-IS,su-IS-ISsummary,L1-IS-ISlevel-1,L2-IS-ISlevel-2
ia-IS-ISinterarea,*-candidatedefault,U-per-userstaticroute
o-ODR,P-periodicdownloadedstaticroute
Gatewayoflastresortisnotset
C192.168.10.0/24isdirectlyconnected,Vlan10
C192.168.20.0/24isdirectlyconnected,Vlan20
10.0.0.0/24issubnetted,1subnets
C10.1.1.0isdirectlyconnected,FastEthernet0/11
3.配置R1R2测试路由器
r1(config)#iproute0.0.0.00.0.0.0e0/0//为了能ping通,要用默认路由补全路由表
r1(config-if)#ipadd192.168.10.2255.255.255.0
r1(config-if)#end
r1#
15:
55.551:
Configuredfromconsolebyconsoleping
56.711:
57.711:
r1#ping192.168.10.1
Sending5,100-byteICMPEchosto192.168.10.1,timeoutis2seconds:
.!
Successrateis80percent(4/5),round-tripmin/avg/max=72/95/116ms
router#conft
router(config)#hostr2
r2(config)#iproute0.0.0.00.0.0.0e0/0
r2(config)#inte0/0
r2(config-if)#ipadd192.168.20.2255.255.255.0
r2(config-if)#nosh
r2(config-if)#end
测试直连邻居
r2#ping192.168.20.1
Sending5,100-byteICMPEchosto192.168.20.1,timeoutis2seconds:
Successrateis80percent(4/5),round-tripmin/avg/max=72/84/96ms
r2#
测试其他相邻