1、精品文档C03欢迎下载、实验拓扑图:CLIENT1CLIENT?CLIENTS10;1*3.2/24网关门乱1.3 J/24 属于H13H210. 1.1.2/24网关:1* 属于HanN10. 1. 2.2/24胃关;10.1.2门 属于门司小二、配置:LSW1interface Vlanif2ip address 10.1.1.1 255.255.255.0#interface Vlanif3ip address 10.1.2.1 255.255.255.0#interface Vlanif4ip address 10.1.4.1 255.255.255.0 #interface MEth
2、0/0/1#interface Ethernet0/0/1port link-type trunkport trunk allow-pass vlan 2 to 4094 #interface Ethernet0/0/2 port link-type access port default vlan 2#interface Ethernet0/0/10 port link-type access port default vlan 3LSW2interface Vlanif2ip address 10.1.3.1 255.255.255.0#interface Vlanif4ip addres
3、s 10.1.4.2 255.255.255.0#interface MEth0/0/1#interface Ethernet0/0/1port link-type trunkport trunk allow-pass vlan 2 to 4094 #interface Ethernet0/0/2 port link-type access port default vlan 2三、测试:1.配置好上面的命令好以后:10.1.1.2 和10.1.2.2 之间能互ping通,但是与10.1.3.1 之间互ping不通:IPv6 g 3-teway,. 工口可4 address . Subneb
4、mmmk. + .+ Gateway PhysJ-cal address DNn server.:10.1.1.2:255.255.255.口i 10.1.1.1:OO-Ob-O ?-CF-0E-31PCpi ng- 10.1.2.2Ping 10.1.2.2:F r ora 10.1.2.2;From 101.2.Z:32 data, bytes, byte s=32 seq=l bytes-3Z seq=ZPress Ctrl_C to brek ttl=12 7 time=31 ma tLtl-12 7 time=15 ms- 10.1.2.2 ping 9七3dti3七工七日2 pac
5、ket(s) transmitted2 packet (s) received.0,00 packet lossrotund-teip min/avg/max = 15/23/31 ntsPOping 10.1.3.1Ping 1D.1.3.1! 32 data byte31 Press Ctrl C to brekReque st time oi,lt 1Hfqucwt out!Link local 工EvB addressIPvS addressIPv6 gateway .,.IPv4 addressSukmet iti&skGatewayPhysical add r ass.DNS se
6、tverfe80:20b:9ff:feet:el3d :! / 129 10.1.2.2255.255.355.01 0.1.2 . 1-OE-09-CF-E1-3DPress Ctrl C to breakPing 10.1.3,1: 32 data byte3Requ e st titneoutlRequest time out1Request time outL Request timeout!2 .在 LSW错己置:ip route-static 10.1.3.0 255.255.255.0 10.1.4.2在LSW睨置:ip route-static 10.1.1.0 255.255
7、.255.0 10.1.4.1ip route-static 10.1.2.0 255.255.255.0 10.1.4.1就能测试正常:FC!ipc onfigLink local 工 FvE addr 8 ss:fe8D: :Z0b:9ff:fBcf:e3LIPv6 address . : ! ! 7 129工口可6 g ateway * :IPv4 mddi:0 =*;LD 11 2Subnet, mask. :255 _ Z55_2S5 . CGateway :J-0 . J., J., J_Physical address,:9CF-0E31DNS s e rver. . T . :
8、ECping 10.1x3.2PingID.1_3.2:32 databyte s fPress Ctcl C tohr eak.Fcom10.1,3.2;byte 3=3 2seq1tEm e31.msFrom1口,L3 Z :byte-JZseq=Zttl=lZ6timu= 3 LmsFrom10.1-3.Z :bytes=32seq= 3ttl=12etime=(S3msFr am10.1_3.2 ibyte s-32seq=4七七1二126time=4 7msFt 口m110,1,3.2 :byte m=3 2seq=5七七1二126七工me=4 6ms精品文档3 .把两台交换机的in
9、terface ethernet 0/0/1port link-type trunkport trunk allow-pass vlan 2 to 4094改为:interface ethernet 0/0/1port link-type accessport default vlan 4测试的结果也是正常ping通的。四、收集信息:在两台交换机创建相同的 VLAN分配不同的网段, 之间用trunk链路,同台交换机的不同网段可 以互相ping通,不同的交换机之间是 ping不通,可以做安全,只需要通过路由协议就能互通。五、查看路由表:1.display ip routing-tableRout
10、e Flags: R - relayj D - lovnload to fibRout Lag Tables: Publicinat ions ; 9RcLit es:3Dest mat i on/W askProtaPreCctFlagsWest HopIrvterf ace10. 1. 1 - 0/21St atic600RD10. 1. 4. 1Vlanif410. 1. 2. 0/24StaciebO0KD10, 1.4. 1Vlanif410. 1. 3. 0/24Direct00D10. 1. 3 JVlanif?10. 1. 3. 1/32Direct00D127. L 0-1Vlanif?10. 1.4,0/24Diretjt0D10. 1.4.2VlsniflW. 1.4.2/32Direct00D127. 0. 0.1Vlanif4127. 0. 0.0/SDirect00D12T. CL,1InLoopB3ckO127. 0. 0. 1/32Direct0D1ZT.,CL 1IhLoopBckO5欢迎下载欢迎您的下载,资料仅供参考!致力为企业和个人提供合同协议,策划案计划书,学习资料等等打造全网一站式需求