作业5:静态路由

实验目的:实现R1(直连接口)到达44.1.1.1的静态方式的负载均衡路由

实验拓扑:

实验步骤:

1、配置R1、R2、R3、R4的直连和R4上的loopback1接口地址,测试ping通直连

2、R1、R2、R3、R4配置往返静态路由

3、测试ping通R1的直连接口12.1.1.1到R4的环回接口44.1.1.1

4、查看R1(直连接口)到达44.1.1.1的静态方式的负载均衡路由

配置命令:

1、配置R1、R2、R3、R4的直连和R4上的loopback1接口地址,测试ping通直连

2、R1、R2、R3、R4配置往返静态路由

R1:

#
interface GigabitEthernet0/0/0
ip address 12.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 13.1.1.1 255.255.255.0
#
ip route-static 44.1.1.1 255.255.255.255 12.1.1.2
ip route-static 44.1.1.1 255.255.255.255 13.1.1.3
#

R2:

#
interface GigabitEthernet0/0/0
ip address 12.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 24.1.1.2 255.255.255.0
#
ip route-static 44.1.1.1 255.255.255.255 24.1.1.4
#

R3:

#
interface GigabitEthernet0/0/0
ip address 34.1.1.3 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 13.1.1.3 255.255.255.0
#
ip route-static 44.1.1.1 255.255.255.255 34.1.1.4
#

R4:

#
interface GigabitEthernet0/0/0
ip address 34.1.1.4 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 24.1.1.4 255.255.255.0
#
interface LoopBack1
ip address 44.1.1.1 255.255.255.255
#
ip route-static 12.1.1.1 255.255.255.255 24.1.1.2
ip route-static 12.1.1.1 255.255.255.255 34.1.1.3
#

3、测试ping通R1的直连接口12.1.1.1到R4的环回接口44.1.1.1

<R1>ping 44.1.1.1
PING 44.1.1.1: 56 data bytes, press CTRL_C to break
Request time out    //第一个报超时,是因为我们做了ARP的刷新过程
Reply from 44.1.1.1: bytes=56 Sequence=2 ttl=254 time=80 ms
Reply from 44.1.1.1: bytes=56 Sequence=3 ttl=254 time=40 ms
Reply from 44.1.1.1: bytes=56 Sequence=4 ttl=254 time=30 ms
Reply from 44.1.1.1: bytes=56 Sequence=5 ttl=254 time=30 ms

--- 44.1.1.1 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 30/45/80 ms

4、查看R1(直连接口)到达44.1.1.1的静态方式的负载均衡路由

<R1>display ip routing-table protocol static

Destination/Mask Proto Pre Cost Flags NextHop Interface

     44.1.1.1/32   Static 60 0 RD 12.1.1.2 GigabitEthernet0/0/0
             Static 60 0 RD 13.1.1.3 GigabitEthernet0/0/1

--------------------------思考问题1--------------------------

在R4上直接ping

<R4>ping 12.1.1.1
PING 12.1.1.1: 56 data bytes, press CTRL_C to break
Request time out
Request time out


为什么不通呢?

因为如果直接ping,是以出接口为源端口(24.1.1.4/32或者34.1.1.4/32)去ping目的端口
(12.1.1.1/32),路由表中是没有该路由的。所以要测试源44.1.1.1/32到12.1.1.1/32链路,需
要带上源端口(环回端口:44.1.1.1)去测试ping。

<R4>ping -a 24.1.1.2 12.1.1.1
Warning: The specified source address is not a local address, the ping command will not check the network connection.
PING 12.1.1.1: 56 data bytes, press CTRL_C to break
Request time out
Request time out
Request time out

--------------------------思考问题2--------------------------

R1上测试ping,数据包是从g0/0/0和g0/0/1哪个接口出去的,为什么?

猜你喜欢

转载自www.cnblogs.com/shenghuobushizulaide/p/9573994.html
今日推荐