静态路由实验

【实验题目】静态路由实验

【实验目的】掌握静态路由的配置和使用方法,熟悉交换机端口镜像的方法以及如何用于监视端口。

【实验内容】

  实验结果和分析直接记录在下面每一个步骤后面(小组共用):

  (1) 完成路由器配置实验的实例4-1 静态路由实验P138),并检查两台主机之间的连通性。对一台主机ping另一台主机的结果进行截屏。

 

 

 

(2) (1)的基础上增加两台主机PC3和PC4,见下图。增加静态路由,并检查四台主机之间的连通性

 

 

记录两台路由器的路由表;

Router1:

Router2:

(b) 用PC3 ping其它主机的结果进行截屏。

【实验记录】(如有实验拓扑请自行画出, 要求自行画出拓扑图)

1、网络拓扑

 

 2.1 :配置IP地址:

RT1: <RT1>system-view

System View: return to User View with Ctrl+Z.

[RT1]int g0/0/1

[RT1-GigabitEthernet0/0/1]ip add 12.1.1.1 255.255.255.0

[RT1-GigabitEthernet0/0/1]int g0/0/2 [RT1-GigabitEthernet0/0/2]ip add 10.1.1.1 255.255.255.0

[RT1-GigabitEthernet0/0/2]int lo0

[RT1-LoopBack0]ip add 1.1.1.1 255.255.255.255

RT2:

<RT2>system-view System View: return to User View with Ctrl+Z.

[RT2]int g0/0/1 

[RT2-GigabitEthernet0/0/1]ip add 12.1.1.2 255.255.255.0

[RT2-GigabitEthernet0/0/1]int g0/0/2

[RT2-GigabitEthernet0/0/2]ip add 10.1.1.2 255.255.255.0

[RT2-GigabitEthernet0/0/2]int g0/0/0 [RT2-GigabitEthernet0/0/0]ip add 23.1.1.2 255.255.255.0

RT3:

<RT3>sy System View: return to User View with Ctrl+Z.

[RT3]int g0/0/0 [RT3-GigabitEthernet0/0/0]ip add 23.1.1.3 255.255.255.0

[RT3-GigabitEthernet0/0/0]int lo0

[RT3-LoopBack0]ip add 3.3.3.3 255.255.255.255

2.2.1 :配置RT3的静态路由:

[RT3]ip route-static 12.1.1.0 255.255.255.0 g0/0/0 23.1.1.2

[RT3]ip route-static 1.1.1.1 255.255.255.255 g0/0/0 23.1.1.2 2.2.2 :

配置RT2的静态路由:

[RT2]ip route-static 1.1.1.1 255.255.255.255 g0/0/1 12.1.1.1

[RT2]ip route-static 1.1.1.1 255.255.255.255 g0/0/2 10.1.1.1 preference 61

[RT2]ip route-static 3.3.3.3 255.255.255.255 g0/0/0 23.1.1.3 2.2.3 :

配置RT1的静态路由: [RT1]ip route-static 23.1.1.3 255.255.255.0 g0/0/1 12.1.1.2

[RT1]ip route-static 23.1.1.3 255.255.255.0 g0/0/2 10.1.1.2 preference

61

[RT1]ip route-static 3.3.3.3 255.255.255.255 g0/0/2 10.1.1.2 preference

61

[RT1]ip route-static 3.3.3.3 255.255.255.255 g0/0/1 12.1.1.2

验证:

Pc2能ping通pc1

 

 

查看路由表 

RT1: 

[RT1]dis ip routing-table  

Routing Tables: Public            

Destinations : 10       Routes : 11  

Destination/Mask    Proto  Pre  Cost         NextHop         Interface 

 8.8.8.0/24            Direct 0    0            8.8.8.1         GE0/0/2

 8.8.8.1/32            Direct 0    0            127.0.0.1       InLoop0 

10.0.12.0/24         Static 20   0            202.112.1.2     GE0/0/0 

127.0.0.0/8           Direct 0    0            127.0.0.1       InLoop0 

127.0.0.1/32         Direct 0    0            127.0.0.1       InLoop0 

192.168.1.0/24      Static 60   0            202.113.1.2     GE0/0/1                     

Static 60                  0         202.112.1.2            GE0/0/0                 

202.112.1.0/24      Direct 0    0            202.112.1.1           GE0/0/0                   

202.112.1.1/32      Direct 0    0            127.0.0.1       InLoop0 

202.113.1.0/24      Direct 0    0            202.113.1.1     GE0/0/1 

202.113.1.1/32      Direct 0    0            127.0.0.1       InLoop0  

RT2:

 [RT2]dis ip ro 

 

Routing Tables:Public         

              Destinations : 10       Routes : 10 

Destination/Mask    Proto  Pre  Cost         NextHop         Interface 

8.8.8.0/24          Static 20   0            202.112.1.1     GE0/0/0

10.0.12.0/24        Direct 0    0            10.0.12.1       GE0/0/1

10.0.12.1/32        Direct 0    0            127.0.0.1       InLoop0

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0

192.168.1.0/24      Static 60   0            10.0.12.2       GE0/0/1

202.112.1.0/24      Direct 0    0            202.112.1.2     GE0/0/0

202.112.1.2/32      Direct 0    0            127.0.0.1       InLoop0

202.113.1.0/24      Direct 0    0            202.113.1.2     GE0/0/2

202.113.1.2/32      Direct 0    0            127.0.0.1       InLoop0 

 

RT3:

[RT3]dis ip ro

 dis ip ro 

Routing Tables: Public        

      Destinations : 9        Routes : 9 

Destination/Mask       Proto  Pre   Cost         NextHop     Interface  

8.8.8.0/24                   Static 60   0               10.0.12.1       GE0/0/0 

10.0.12.0/24              Direct 0    0            10.0.12.2       GE0/0/0 

10.0.12.2/32       Direct 0    0            127.0.0.1       InLoop0 

127.0.0.0/8         Direct 0    0            127.0.0.1       InLoop0 

127.0.0.1/32        Direct 0    0            127.0.0.1       InLoop0 

192.168.1.0/24      Direct 0    0            192.168.1.1     GE0/0/1 

192.168.1.1/32      Direct 0    0            127.0.0.1       InLoop0 

202.112.1.0/24      Static 60   0            10.0.12.1       GE0/0/0 

202.113.1.0/24      Static 60   0            10.0.12.1       GE0/0/0    

 

 

 完成!

posted on 2021-05-31 12:46  本杰迷  阅读(442)  评论(0编辑  收藏  举报