配置靜態路由實現兩個公司網路互聯


工作任務描述

AB兩公司都建有自己的獨立局域網。而且相聚較遠(超過100米),現在兩公司進行了合併,需要通過鋪設光纖來實現兩公司局域網的網絡通信和資源共享

問題1:靜態路由和動態路由的區別?

答:靜態路由實在路由器中設置的固定路由

動態路由是指路由器能夠自動地建立自己的路由表,並且能夠根據實際情況的變化適時地進行調整。

 

 

 

 

問題2:簡述路由的構成元素以及各個元素的作用?

答“構成元素:路由類別、目的網絡、子網掩碼、轉發接口、下一跳網關、管理距離、度量值等

路由類別表示該路由表的類別或者來源

目的網絡:恤轉發數據到達的目標網絡(子網)地址

子網掩碼:標定該路由表的類型或者來源

轉發接口:到達目的網絡的路由器的硬件接口

下一跳網關:到達目的網絡方向和本路由器鏈接的對端路由器接口IP地址

管路距離:設定各條路由的優先級(0-255

度量值:各種路由協議衡量到達目的網絡的路徑長度

 

 

 

問題3:普通路由和默認路由的區別?

答:默認路由是一種特殊的靜態路由,當 路由表中與包的目的地址之間沒有匹配的表項時,路由器能夠做出選擇。如果沒有默認路由,那麼目的地址在路由表中沒有匹配表項的包將被丟棄。




工作任務實施

1. 網絡拓撲結構設計(粘貼PT的拓撲圖,要有IP地址的規劃信息)

 

 wKiom1UWqC2gUpcaAACc4O7sKrA296.jpg

 

 

 

2. 設備配置命令(各個路由器分別配置)

Router0

Router>en

Router#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#int f0/0

Router(config-if)#ip ad 192.168.1.1 255.255.255.0

Router(config-if)#no sh

 

Router(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

 

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

 

Router(config-if)#exit

Router(config)#int f1/0

Router(config-if)#ip ad 172.16.1.1 255.255.255.252

Router(config-if)#no sh

 

%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to down

Router(config-if)#

%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up

 

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up

 

Router(config-if)#exit

Router(config)#ip route 192.168.2.0 255.255.255.0 172.16.1.2

Router1

Router>en

Router#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#int f0/0

Router(config-if)#ip ad 192.168.2.1 255.255.255.0

Router(config-if)#no sh

 

Router(config-if)#

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

 

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

 

Router(config-if)#exit

Router(config)#int f1/0

Router(config-if)#ip ad 172.16.1.2 255.255.255.252

Router(config-if)#no sh

 

Router(config-if)#

%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up

 

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up

 

Router(config-if)#exit

Router(config)#ip route 192.168.1.0 255.255.255.0 172.16.1.1

 

 

 

 

 

3. 單段測試結果

PC>ping 192.168.1.1

 

Pinging 192.168.1.1 with 32 bytes of data:

 

Reply from 192.168.1.1: bytes=32 time=1ms TTL=255

Reply from 192.168.1.1: bytes=32 time=0ms TTL=255

Reply from 192.168.1.1: bytes=32 time=0ms TTL=255

Reply from 192.168.1.1: bytes=32 time=0ms TTL=255

 

Ping statistics for 192.168.1.1:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 0ms, Maximum = 1ms, Average = 0ms

 

 

 

 

 

4. 綜合測試結果

 

PC>ping 192.168.2.2

 

Pinging 192.168.2.2 with 32 bytes of data:

 

Reply from 192.168.2.2: bytes=32 time=0ms TTL=126

Reply from 192.168.2.2: bytes=32 time=0ms TTL=126

Reply from 192.168.2.2: bytes=32 time=0ms TTL=126

Reply from 192.168.2.2: bytes=32 time=0ms TTL=126

 

Ping statistics for 192.168.2.2:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

    Minimum = 0ms, Maximum = 0ms, Average = 0ms

 

 

 

5. 查看各個路由器的路由

Route0

Router#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

       * - candidate default, U - per-user static route, o - ODR

       P - periodic downloaded static route

 

Gateway of last resort is not set

 

     172.16.0.0/30 is subnetted, 1 subnets

C       172.16.1.0 is directly connected, FastEthernet1/0

C    192.168.1.0/24 is directly connected, FastEthernet0/0

S    192.168.2.0/24 [1/0] via 172.16.1.2

Router#

 

Route1

Router#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

       * - candidate default, U - per-user static route, o - ODR

       P - periodic downloaded static route

 

Gateway of last resort is not set

 

     172.16.0.0/30 is subnetted, 1 subnets

C       172.16.1.0 is directly connected, FastEthernet1/0

S    192.168.1.0/24 [1/0] via 172.16.1.1

C    192.168.2.0/24 is directly connected, FastEthernet0/0

Router#

工作擴展

如果是三個路由器連接四個子網,該如何配置路由(見教材部分的任務擴展),請列出各個路由器配置的路由

1.使用精細路由配置

Route0

Router(config)#ip route 172.16.1.4 255.255.255.252 172.16.1.2

Router(config)#ip route 192.168.2.0 255.255.255.0 172.16.1.2

CNC

Router(config)#ip route 192.168.1.0 255.255.255.0 172.16.1.1

Router(config)#ip route 192.168.2.0 255.255.255.0 172.16.1.5

Route1

Router(config)#ip route 172.168.1.0 255.255.255.252 172.16.1.6

Router(config)#ip route 192.168.1.0 255.255.255.0 172.16.1.6

 

2.使用缺省路由配置

Route0

Router(config)#ip route 0.0.0.0 0.0.0.0 172.16.1.2

Route1

Router(config)#ip route 0.0.0.0 0.0.0.0 172.16.1.6

CNC

Router(config)#ip route 192.168.2.0 255.255.255.0 172.16.1.5

Router(config)#ip route 192.168.1.0 255.255.255.0 172.16.1.1

 

 

 



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章