文档详情

华为交换机静态路由配置

工****
实名认证
店铺
DOC
137.50KB
约5页
文档ID:474010732
华为交换机静态路由配置_第1页
1/5

实 验 拓 扑 图j Ethernet OflO/1CUENT1CLIENT2CUENT310. 11. 1 ・ 2 / 24 网 1 Ou 1. 1 . 1/54 属于10. 1. 2.2/24 冈关;1罠 1.2.1/24 离于vlan310+ 1. 3.2/34 网关口氐1.3.1/34 属于vlan 2二、配置:LSW1in terface Via nif2ip address 10.1.1.1 255.255.255.0#in terface Via nif3ip address 10.1.2.1 255.255.255.0#in terface Vla nif4ip address 10.1.4.1 255.255.255.0#in terface MEth0/0/1#in terface Ethernet0/0/1port lin k-type trunkport trunk allow-pass vla n 2 to 4094 in terface Ethernet0/0/2 port lin k-type access port default vla n 2# in terface Ethernet0/0/10 port lin k-type access port default vla n 3LSW2in terface Via nif2ip address 10.1.3.1 255.255.255.0#in terface Via nif4ip address 10.1.4.2 255.255.255.0#in terface MEth0/0/1#in terface Ethernet0/0/1port lin k-type trunkport trunk allow-pass vla n 2 to 4094#in terface Ethernet0/0/2port lin k-type accessport default vla n 2三、测试:1.配置好上面的命令好以后:10.1.1.2 和10.1.2.2 之间能互ping通,但是与10.1.3.1 之间互ping不通:IPv6 g nzr宜丫 IPv-4 address Subnet- mask Gateway Physical address.DK3 server ID.1-1.2255.255.255.0J_0.1.1.1OiQ-Ob-O 3-CF-OE- 31Ping ID.1.2.2:From 丄0 + 丄-2-2: byte3=32 seq=l ttl—127 tirae= 3丄 Fuocn3Z data bytes, PressCtrl C tobreakias10.1.2.2:byte 3 Z seq=2 七七1~12 七ime=15ma- J.0 ・ 1.2.2 pinj etatisti<3S E packettransmittedZ packet(s) received0.00% packet 丄ass round.一七rip mLn/avg/max — 15/23/31 msbtefikPOpang' 丄口. 1.3.丄Ping ID * 丄.H”丄! 32 riatA bytes. Press Ctrl_C toReq ue 91 t j_me □ u_t 1RutfVl 好营 t time QUt 1PC^>j_p u on "fjLgLink local IPv6 ®dci匸&"■… … ………;IPv6 addr:ess ■■::f e8□: : 20b: : f ecf: el3d:::/ 1Z31 » Bi 10.1.2,2:25S-255.255.0:£0.1.2.1:OO-OE-O ?-CF-El-3DlEvfi eratewav. , . * :IPv4 add t es s iSubnet mask. ■■:Gaibeway B 萼聲■■半■■■■■■■■■甲■■■■■卡半; Phv^ica1 addressa ■曲・■.・■ 乂 .・■負・■ ■丘 < :DNS servet ・ ■■■■■■■■■■■■■■■:POping 10.1*3.1Ping 10.1.3^1: 32 d ata byte 3f Pres 3 0七匕1 C 七口 bre ak 1Request 七immou七1Reques七 timeou七1Hequea七 time□ utLRequest, timeoutl 12.在 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.255.0 10.141ip route-static 10.1.2.0 255.255.255.0 10.1.4.1就能测试正常:ipconfigLink local IPv6 addr essB- . , B . ■・.■■::fe80::20b:9ff:fect:e31IPv6 add res s ・■ ■ ■ ■ ■;:::/ J.23IPv6 gateway *・》 *・:1 p 11 ■' IIPv4 atldrDS s :10.1.1.2Subnet mask■■・...■■■・■:255.255.255.0・ * * * ;;LO.l.i.LPhy a j-C a_l add r ess :;□O-OE-U 9^CF-0E-31DNS s e rver.. POp.in.g- 10 . J.3.2Ping 10i132 data bytesEcesi3 Ctrl C to break.Fr om 10.1.3.Z: byte5=3Z seq=l ttl=12 6 cime= 31 msFrom 10,1.3.2: byte^32 seq=Z ttl=12 6 七)口吕二3丄 msFrom 10.1.3.2: bytes=3Z seq=3 七七1二12 £ 七讪 m二 EM msFtam L0.1_3.2: bytes=32 seq—4 ttl=12 G time—47 msFrotn 10,1.2 .2 : byte3=22 曰总耳=5 ttl—12 £ 七ime=4£ msi 2 3.把两台交换机的 in terface ethernet 0/0/1port lin k-type trunkport trunk allow-pass vlan 2 to 4094改为:in terface ethernet 0/0/1port lin k-type accessport default vla n 4测试的结果也是正常ping通的。

四、收集信息:在两台交换机创建相同的 VLAN分配不同的网段, 之间用trunk链路,同台交换机的不同网段可 以互相ping通,不同的交换机之间是 ping不通,可以做安全,只需要通过路由协议就能互通五、查看路由表:1.display ip routing-tableRoute Flags: R - relayj D - download to fibRouting Tables: Public;8Destinations : 8RoutesDest ination/MaskProtoPreCostFlags Next HopInterface10. 1. 1.0/24Static600RD10. 1.4. 1Vlanx£410. 1.2.0/24Static600RD10. 1.4. 1Vlanif410. 1.3.0/24Direct00D10. 1.3. 1Vlanif210. 1. 3. 1/32Direct00D127. 0. 0.1Vlanif210. 1.4.0/24Direct00D10. 1.4.2Vlanif410. 1.4.2/32Direct00D127. 0. 0.1¥lanif4127. 0. 0.0/8Direct00D127.0.0.1InLoopBackO127. 0.0. 1/32Direct00D127.0.0.1InLoopBackO。

下载提示
相似文档
正为您匹配相似的精品文档