2023年11月24日发(作者:)

- .

实验一:

实验名称

相同IP之间通信(设置静态路由用本地出口)

实验目的:

路由器之间设置相同的ip,设置静态路由用本地出口,测试两网段之间是否可

以通信。

实验拓扑

:如图1-1

1-1

实验步骤:

一、 连线。将设备,将两台路由器的se2/0口用串行线。

二、 R1R2s2/0口配置相同ip30.0.0.1

R1(config)#interface s2/0

R1(config-if)#ip address 30.0.0.1 255.0.0.0

R1(config-if)#no shutdown

(配置R2R1

三、 配置路由表

R1 :

R1(config)#ip route 20.0.0.0 255.0.0.0 Se2/0

R2

R1(config)#ip route 10.0.0.0 255.0.0.0 Se/0

- -可修编.

- .

实验结果:

pc0 pc1可以可以通信。

实验心得:

两路由器之间设置同一个ip,静态路由用本地出口。两网段可以通信。

实验二:

实验名称

不同网段IP之间通信(设置静态路由用本地出口)

实验目的:

路由器之间设置不同网段的ip,设置静态路由用本地出口,测试两网段之间是

否可以通信。

实验拓扑

:如图1-1

1-1

实验步骤:

一、 连线。将设备,将两台路由器的se2/0口用串行线。

二、 R1R2s2/0口配置不同网段ip分别为30.0.0.1192.168.1.1

- -可修编.

- .

R1

R1(config)#interface s2/0

R1(config-if)#ip address 30.0.0.1 255.0.0.0

R1(config-if)#no shutdown

R2

R2(config)#interface s2/0

R2(config-if)#ip address 192.168.1.1255.255.255.0

R2(config-if)#no shutdown

三、 配置路由表

R1 :

R1(config)#ip route 20.0.0.0 255.0.0.0 Se2/0

R2

R1(config)#ip route 10.0.0.0 255.0.0.0 Se/0

实验结果:

pc0 pc1可以通信。

实验心得:

两路由器之间设置不同网段ip,静态路由用本地出口。两网段可以通信。

实验三:

实验名称

相同IP之间通信(设置静态路由用下一跳)

实验目的:

路由器之间设置相同的ip,设置静态路由用下一跳,实验两网段之间是否可以

通信。

实验拓扑

:如图1-1

- -可修编.

- .

1-1

实验步骤:

一、 连线。将设备,将两台路由器的se2/0口用串行线。

二、 R1R2s2/0口配置相同ip30.0.0.1

R1(config)#interface s2/0

R1(config-if)#ip address 30.0.0.1 255.0.0.0

R1(config-if)#no shutdown

(设置R2R1相同)

三、 配置路由表

R1 :

R1(config)#ip route 20.0.0.0 255.0.0.0 30.0.0.0

R2

R1(config)#ip route 10.0.0.0 255.0.0.0 30.0.0.0

实验结果:

pc0 pc1可以通信。

实验心得:

第一次在配置路由表的下一跳时用的是30.0.0.1并无法添加路由表。原因是下一

跳的ip与本地出口ip相同。遇到这种情况需将下一跳改为网络地址。

- -可修编.

- .

实验四:

实验名称

不同网段IP之间通信(设置静态路由用下一跳)

实验目的:

路由器之间设置不同网段的ip,设置静态路由用下一跳,实验两网段之间是否

可以通信。

实验拓扑

:如图1-1

1-1

实验步骤:

一、 连线。将设备,将两台路由器的se2/0口用串行线。

二、 R1R2s2/0口配置ip分别为30.0.0.1 192.168.1.1

R1

R1(config)#interface s2/0

R1(config-if)#ip address 30.0.0.1 255.0.0.0

R1(config-if)#no shutdown

R2

R2(config)#interface s2/0

R2(config-if)#ip address 192.168.1.1 255.255.255.0

R2(config-if)#no shutdown

三、 配置路由表

- -可修编.

- .

R1 :

R1(config)#ip route 20.0.0.0 255.0.0.0 192.168.1.1

R2

R1(config)#ip route 10.0.0.0 255.0.0.0 30.0.0.1

实验结果:

pc0 pc1可以通信。

实验心得:

两路由器之间设置不同网段ip,静态路由用下一跳。两网段可以通信。

实验五:

实验名称

Ip无编号

实验目的:

路由器的串行口没有ip的情况下借用其它网段的ipip无编号)

实验拓扑

:如图1-1

1-1

实验步骤:

一、 连线。将设备,将两台路由器的se0/0/0口用串行线。

二、 配置路由器

1 创建换回接口

R1

R1(config)# Interface lookback 1

- -可修编.

- .

R1(config-if)# ip address 10.0.0.1 255.0.0.0

R1(config-if)#no shutdown

R2

R2(config)# Interface lookback 1

R2(config-if)# ip address 20.0.0.1 255.0.0.0

R2(config-if)#no shutdown

2 开启ip无编号

R1

R1(config-if)#ip unnumbered loopback 1

R1(config-if)#no shutdown

(配置R2R1)

3 添加路由表

R1 :

R1(config)#ip route 20.0.0.0 255.0.0.0 Se0/0/0

R2

R1(config)#ip route 10.0.0.0 255.0.0.0 Se0/0/0

实验结果:

10.0.0.0网段 20.0.0.0网段可以通信。

实验心得:

路由器不用设置ip,可以借用其直连网段的ipip无编号)

- -可修编.