實驗三靜態(tài)路由協(xié)議.doc_第1頁
實驗三靜態(tài)路由協(xié)議.doc_第2頁
實驗三靜態(tài)路由協(xié)議.doc_第3頁
實驗三靜態(tài)路由協(xié)議.doc_第4頁
實驗三靜態(tài)路由協(xié)議.doc_第5頁
已閱讀5頁,還剩5頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

實驗三 靜態(tài)路由協(xié)議實驗3.1 VLAN/802.1Q VLAN 間通信【實驗名稱】VLAN/802.1Q VLAN 間通信【實驗目的】通過三層交換機實現(xiàn)VLAN 間互相通信。【背景描述】假設(shè)某企業(yè)有2 個主要部門:銷售部和技術(shù)部,其中銷售部門的個人計算機系統(tǒng)分散連接在2臺交換機上,他們之間需要相互進行通信,銷售部和技術(shù)部也需要進行相互通訊,現(xiàn)要在交換機上做適當配置來實現(xiàn)這一目標?!緦崿F(xiàn)功能】使在同一VLAN 里的計算機系統(tǒng)能跨交換機進行相互通信,而在不同VLAN 里的計算機系統(tǒng)也能進行相互通信?!緦嶒炌負洹?Switch A Switch B PC1 PC3 PC2 【實驗設(shè)備】S2126G (1 臺)、S3550-24 (1 臺)【實驗步驟】第一步:在交換機SwitchA 上創(chuàng)建Vlan 10 ,并將0/5 端口劃分到Vlan 10 中。SwitchA # configure terminal !進入全局配置模式。SwitchA(config)# vlan 10 !創(chuàng)建Vlan 10 。SwitchA(config-vlan)# name sales !將Vlan 10 命名為sales 。SwitchA(config-vlan)#exitSwitchA(config)#interface fastethernet 0/5 !進入接口配置模式。SwitchA(config-if)#switchport access vlan 10 !將0/5 端口劃分到Vlan 10 。驗證測試:驗證已創(chuàng)建了Vlan 10 ,并將0/5 端口已劃分到Vlan 10 中。SwitchA#show vlan id 10VLAN Name Status Ports- - - -10 sales active Fa0/5第二步:在交換機SwitchA 上創(chuàng)建Vlan 20 ,并將0/15 端口劃分到Vlan 20 中。SwitchA(config)# vlan 20 !創(chuàng)建Vlan 20 。SwitchA(config-vlan)# name technical !將Vlan 20 命名為technical 。SwitchA(config-vlan)#exitSwitchA(config)#interface fastethernet 0/15 !進入接口配置模式。SwitchA(config-if)#switchport access vlan 20 !將0/15 端口劃分到Vlan 20 。驗證測試:驗證已創(chuàng)建了Vlan 20 ,并將0/15 端口已劃分到Vlan 20 中。SwitchA#show vlan id 20VLAN Name Status Ports- - - -20 technical active Fa0/15第三步:在交換機SwitchA 上將與SwitchB 相連的端口(假設(shè)為0/24 端口)定義為tag vlan 模式。SwitchA(config)#interface fastethernet 0/24 !進入接口配置模式。SwitchA(config-if)#switchport mode trunk !將fastethernet 0/24 端口設(shè)為tag vlan 模式。驗證測試:驗證fastethernet 0/24 端口已被設(shè)置為tag vlan 模式。SwitchA#show interfaces fastEthernet 0/24 switchportInterface Switchport Mode Access Native Protected VLAN lists- - - - - - -Fa0/24 Enabled Trunk 1 1 Disabled All第四步:在交換機SwitchB 上創(chuàng)建Vlan 10 ,并將0/5 端口劃分到Vlan 10 中。SwitchB # configure terminal !進入全局配置模式。SwitchB(config)# vlan 10 !創(chuàng)建Vlan 10 。SwitchB(config-vlan)# name sales !將Vlan 10 命名為sales 。SwitchB(config-vlan)#exitSwitchB(config)#interface fastethernet 0/5 !進入接口配置模式。SwitchB(config-if)#switchport access vlan 10 !將0/5 端口劃分到Vlan 10 。驗證測試:驗證已在SwitchB 上創(chuàng)建了Vlan 10 ,并將0/5 端口已劃分到Vlan 10 中。SwitchB#show vlan id 10VLAN Name Status Ports- - - -10 sales active Fa0/5第五步:在交換機SwitchB 上將與SwitchA 相連的端口(假設(shè)為0/24 端口)定義為tag vlan 模式。SwitchB(config)#interface fastethernet 0/24 !進入接口配置模式。SwitchB(config-if)#switchport mode trunk !將fastethernet 0/24 端口設(shè)為tag vlan 模式。驗證測試:驗證fastethernet 0/24 端口已被設(shè)置為tag vlan 模式。SwitchB#show interfaces fastEthernet 0/24 switchportInterface Switchport Mode Access Native Protected VLAN lists- - - - - - -Fa0/24 Enabled Trunk 1 1 Disabled All第六步:驗證PC1 與PC3 能互相通信,但PC2 與PC3 不能互相通信。C: ping 192.168.10.30 !在PC1 的命令行方式下驗證能Ping 通PC3 。Pinging 192.168.10.30 with 32 bytes of data:Reply from 192.168.10.30: bytes=32 time10ms TTL=128Reply from 192.168.10.30: bytes=32 time10ms TTL=128Reply from 192.168.10.30: bytes=32 time10ms TTL=128Reply from 192.168.10.30: bytes=32 timeping 192.168.10.30 !在PC2 的命令行方式下驗證不能Ping 通PC3 。Pinging 192.168.10.30 with 32 bytes of data:Request timed out.Request timed out.Request timed out.Request timed out.Ping statistics for 192.168.10.30:Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),Approximate round trip times in milli-seconds:Minimum = 0ms, Maximum = 0ms, Average = 0ms第七步:設(shè)置三層交換機VLAN 間通訊。SwitchA(config)# int vlan 10 ! 創(chuàng)建虛擬接口vlan 10SwitchA(config-if)#ip address 192.168.10.254 255.255.255.0 ! 配置虛擬接口vlan 10 的地址為192.168.10.254SwitchA(config-if)#exit ! 返回到全局配置模式SwitchA(config)# int vlan 20 ! 創(chuàng)建虛擬接口vlan 20 SwitchA(config-if)#ip address 192.168.20.254 255.255.255.0 ! 配置虛擬接口vlan 20 的地址為192.168.20.254第八步:將PC1 和PC3 的默認網(wǎng)關(guān)設(shè)置為192.168.10.254 ,將PC2 的默認網(wǎng)關(guān)設(shè)置為192.168.20.254第九步:測試結(jié)果不同VLAN 內(nèi)的主機可以互相PING 通【注意事項】1.兩臺交換機之間相連的端口應(yīng)該設(shè)置為tag vlan 模式。2.需要設(shè)置PC 的網(wǎng)關(guān)【參考配置】SwitchA#show running-config ! 顯示交換機SwitchA 的全部配置。Building configuration.Current configuration : 349 bytes!version 1.0!hostname SwitchAinterface FastEthernet 0/5switchport access vlan 10!interface FastEthernet 0/15switchport access vlan 20!interface FastEthernet 0/24switchport mode trunk!interface Vlan 10ip address 192.168.10.254 255.255.255.0!interface Vlan 20ip address 192.168.20.254 255.255.255.0! endSwitchB#show running-config ! 顯示交換機SwitchB 的全部配置。Building configuration.Current configuration : 284 bytes!version 1.0!hostname SwitchBvlan 1!vlan 10name sales!interface fastEthernet 0/5switchport access vlan 10!interface fastEthernet 0/24switchport mode trunk!end實驗3.2 靜態(tài)路由【實驗名稱】靜態(tài)路由【實驗目的】掌握通過靜態(tài)路由方式實現(xiàn)網(wǎng)絡(luò)的連通性【背景描述】假設(shè)校園網(wǎng)通過一臺路由器連接到校園外的另一臺路由器上,現(xiàn)要在路由器上做適當配置,實現(xiàn)校園網(wǎng)內(nèi)部主機與校園網(wǎng)外部主機的相互通信?!緦崿F(xiàn)功能】實現(xiàn)網(wǎng)絡(luò)的互連互通,從而實現(xiàn)信息的共享和傳遞【實驗拓撲】 172.16.1.0/24 172.16.2.0/24 172.16.3.0/24 outer1 Router2 PC1 11 1 1 2 2 22 PC2 【實驗設(shè)備】R2624 (2 臺)、V35 DTE 線纜(1 根)、V35 DCE 線纜(1 根)【實驗步驟】第一步:在路由器Router1 上配置接口的IP 地址和串口上的時鐘頻率Router1(config)# interface fastethernet 0 !進入接口F0 的配置模式Router1(config-if)# ip address 172.16.1.1 255.255.255.0 !配置路由器接口F0 的IP 地址Router1(config)# no shutdown !開啟路由器fastethernet0 接口!Router1(config)# interface serial 0 !進入接口S0 配置模式Router1(config-if)# ip address 172.16.2.1 255.255.255.0 !配置路由器接口S0 的IP 地址Router1(config-if)#clock rate 64000 !配置Router1 的時鐘頻率(DCE )Router1(config)# no shutdown !開啟路由器fastethernet0 接口驗證測試:驗證路由器接口的配置Router1#show ip interface briefInterface IP-Address OK? Method Status ProtocolFastEthernet0 172.16.1.1 YES manual up upSerial0 172.16.2.1 YES manual down downSerial1 unassigned YES unset administratively down downRouter1#show interface serial 0Serial0 is down, line protocol is downHardware is HDLC4530AInternet address is 172.16.2.1/24MTU 1500 bytes, BW 2048 Kbit, DLY 20000 usec, rely 255/255, load 1/255Encapsulation HDLC, loopback not set, keepalive set (10 sec)Last input never, output never, output hang neverLast clearing of show interface counters neverInput queue: 0/75/0 (size/max/drops); Total output drops: 0Queueing strategy: weighted fairOutput queue: 0/64/0 (size/threshold/drops)Conversations 0/0 (active/max active)Reserved Conversations 0/0 (allocated/max allocated)5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec0 packets input, 0 bytes, 0 no bufferReceived 0 broadcasts0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort0 packets output, 0 bytes, 0 underruns0 output errors, 0 collisions, 8 interface resets0 output buffer failures, 0 output buffers swapped out0 carrier transitionsDCD=down DSR=down DTR=down RTS=down CTS=down第二步:在路由器Router1 上配置靜態(tài)路由Router1(config)#ip route 172.16.3.0 255.255.255.0 172.16.2.2或Router1(config)#ip route 172.16.3.0 255.255.255.0 serial 0驗證測試:驗證Router1 上的靜態(tài)路由配置Router1#show ip routeCodes: C - connected, S - static, R - RIPO - OSPF, IA - OSPF inter areaE1 - OSPF external type 1, E2 - OSPF external type 2Gateway of last resort is not set172.16.0.0/24 is subnetted, 1 subnetsC 172.16.1.0 is directly connected, FastEthernet0C 172.16.2.0 is directly connected, Serial0S 172.16.3.0/24 1/0 via 172.16.2.2第三步:在路由器Router2 上配置接口的IP 地址和串口上的時鐘頻率Router2(config)# interface fastethernet 0 !進入接口F0 的配置模式Router2(config-if)# ip address 172.16.3.2 255.255.255.0 !配置路由器接口F0 的IP 地址Router2(config)# no shutdown !開啟路由器fastethernet0 接口!Router2(config)# interface serial 0 !進入接口S0 配置模式Router2(config-if)# ip address 172.16.2.2 255.255.255.0 !配置路由器接口S0 的IP 地址Router2(config)# no shutdown !開啟路由器fastethernet0 接口驗證測試:驗證路由器接口的配置Router2#show ip interface briefInterface IP-Address OK? Method Status ProtocolFastEthernet0 172.16.3.2 YES manual up upSerial0 172.16.2.2 YES manual up upSerial1 unassigned YES unset administratively down downRouter2#show interface serial 0Serial0 is up, line protocol is upHardware is HDLC4530AInternet address is 172.16.2.2/24MTU 1500 bytes, BW 2048 Kbit, DLY 20000 usec, rely 255/255, load 1/255Encapsulation HDLC, loopback not set, keepalive set (10 sec)Last input never, output never, output hang neverLast clearing of show interface counters neverInput queue: 0/75/0 (size/max/drops); Total output drops: 0Queueing strategy: weighted fairOutput queue: 0/64/0 (size/threshold/drops)Conversations 0/0 (active/max active)Reserved Conversations 0/0 (allocated/max allocated)5 minute input rate 0 bits/sec, 0 packets/sec5 minute output rate 0 bits/sec, 0 packets/sec0 packets input, 0 bytes, 0 no bufferReceived 0 broadcasts0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort0 packets output, 0 bytes, 0 underruns0 output errors, 0 collisions, 8 interface resets0 output buffer failures, 0 output buffers swapped out0 carrier transitionsDCD=up DSR=up DTR=up RTS=up CTS=up第四步:在路由器Router2 上配置靜態(tài)路由Router2(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.1或Router2(config)#ip route 172.16.1.0 255.255.255.0 serial 0驗證測試:驗證Router2 上的靜態(tài)路由配置Router2#show ip routeCodes: C - connected, S - static, R - RIPO - OSPF, IA - OSPF inter areaE1 - OSPF external type 1, E2 - OSPF external type 2Gateway of last resort is not set172.16.0.0/24 is subnetted, 1 subnetsC 172.16.3.0 is directly connected, FastEthernet0C 172.16.2.0 is directly connected, Serial0S 172.16.1.0/24 1/0 via 172.16.2.1第五步:測試網(wǎng)絡(luò)的互連互通性C: ping 172.16.3.22 !從PC1 ping PC2Pinging 172.16.3.22 with 32 bytes of data:Reply from 172.16.3.22: bytes=32 time10ms TTL=126Reply from 172.16.3.22: bytes=32 time10ms TTL=126Reply from 172.16.3.22: bytes=32 time10ms TTL=126Reply from 172.16.3.22: bytes=32 timeping 172.16.1.11 !從PC2 ping PC1Pinging 172.16.1.11 with 32 bytes of data:Reply from 172.16.1.11: bytes=32 time10ms TTL=126Reply from 172.16.1.11: bytes=32 time10ms TTL=126Reply from 172.16.1.11: bytes=32 time10ms TTL=126Reply from 172.16.1.11: bytes=32 time10ms TTL=126【注意事項】如果兩臺路由器通過串口直接互連,則必須在其中一端設(shè)置時鐘頻率(DCE )。【參考配置】Router1#show run

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論