配置静态路由实现两个公司网路互联


工作任务描述

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

 

 

 



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