精华内容
下载资源
问答
  • 配置静态路由

    2021-04-01 16:34:02
    一、实验目的 ...(2)在AR1、AR2、AR3上配置静态路由: AR1静态路由表截图: AR2静态路由表截图: AR3静态路由表截图: (3)测试网络是否畅通 在PC1上ping 192.168.1.2,跟踪数据包的路径 在PC2上pi

    一、实验目的

    掌握静态路由配置,基于路由器和PC信息配置后,进行静态路由的添加和删除,并测试添加和删除后静态路由是否通畅。

    二、实验设备

    ENSP

    三、实验拓扑图

    在这里插入图片描述

    四、实验内容与主要步骤

    (1)配置AR1、AR2、AR3
    AR1配置截图:
    图4-1
    AR2配置截图:
    图4-2
    AR3配置截图:
    图4-3
    (2)在AR1、AR2、AR3上配置静态路由:
    AR1静态路由表截图:
    图4-4
    AR2静态路由表截图:
    图4-5
    AR3静态路由表截图:
    图4-6
    (3)测试网络是否畅通
    在PC1上ping 192.168.1.2,跟踪数据包的路径
    图4-7
    在PC2上ping192.168.0.2,跟踪数据包的路径
    图4-8
    (4)删除静态路由后,PC1 ping PC2的数据包不能达到PC2,即目标主机不可达。
    图4-9

    展开全文
  • 1:配置静态路由 1.1 问题 配置路由接口IP地址并通过静态路由的配置实现全网的互通。 1.2 方案 按如下网络拓扑配置接口IP地址并通过静态路由的配置实现全网的互通如图-1所示: 图-1 1.3 步骤 实现此案例...

    1:配置静态路由

    1.1 问题

    配置路由接口IP地址并通过静态路由的配置实现全网的互通。

    1.2 方案

    按如下网络拓扑配置接口IP地址并通过静态路由的配置实现全网的互通如图-1所示:

    图-1

    1.3 步骤

    实现此案例需要按照如下步骤进行。

    步骤一:配置静态路由

    1)R1上配置接口IP

    copytextpop-up

    1. R1(config)#interface fastEthernet 0/0
    2. R1(config-if)#ip address 192.168.1.254 255.255.255.0
    3. R1(config-if)#no shutdown
    4. R1(config-if)#exit
    5. R1(config)#interface fastEthernet 0/1
    6. R1(config-if)#ip address 192.168.2.1 255.255.255.0
    7. R1(config-if)#no shutdown

    R1(config)#interface fastEthernet 0/0

    R1(config-if)#ip address 192.168.1.254 255.255.255.0

    R1(config-if)#no shutdown

    R1(config-if)#exit

    R1(config)#interface fastEthernet 0/1

    R1(config-if)#ip address 192.168.2.1 255.255.255.0

    R1(config-if)#no shutdown

    2)R2上配置接口IP

    copytextpop-up

    1. R2(config)#interface fastEthernet 0/1
    2. R2(config-if)#ip address 192.168.2.2 255.255.255.0
    3. R2(config-if)#no shutdown
    4. R2config-if)#exit
    5. R2(config)#interface fastEthernet 0/0
    6. R2(config-if)#ip address 192.168.4.254 255.255.255.0
    7. R2(config-if)#no shutdown

    R2(config)#interface fastEthernet 0/1

    R2(config-if)#ip address 192.168.2.2 255.255.255.0

    R2(config-if)#no shutdown

    R2config-if)#exit

    R2(config)#interface fastEthernet 0/0

    R2(config-if)#ip address 192.168.4.254 255.255.255.0

    R2(config-if)#no shutdown

    3)R1上添加静态路由

    copytextpop-up

    1. R1(config)#ip route 192.168.4.0 255.255.255.0 192.168.2.2

    R1(config)#ip route 192.168.4.0 255.255.255.0 192.168.2.2

    4)R1上查看路由表

    copytextpop-up

    1. R1#show ip route
    2. Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
    3. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    4. N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    5. E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
    6. i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
    7. *-candidate default, U - per-user static route, o - ODR
    8. P - periodic downloaded static route
    9. Gateway of last resort is not set
    10. C 192.168.1.0/24 is directly connected, FastEthernet0/0
    11. C 192.168.2.0/24 is directly connected, FastEthernet0/1
    12. S 192.168.4.0/24 [1/0] via 192.168.2.2 //S表示静态路由

    R1#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

    C    192.168.1.0/24 is directly connected, FastEthernet0/0

    C    192.168.2.0/24 is directly connected, FastEthernet0/1

    S    192.168.4.0/24 [1/0] via 192.168.2.2                     //S表示静态路由

    5)R2上添加静态路由

    copytextpop-up

    1. R2(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1

    R2(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1

    6)R2上查看路由条目

    copytextpop-up

    1. R2#show ip route
    2. Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
    3. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    4. N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    5. E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
    6. i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
    7. *-candidate default, U - per-user static route, o - ODR
    8. P - periodic downloaded static route
    9. Gateway of last resort is not set
    10. S 192.168.1.0/24 [1/0] via 192.168.2.1 //S表示静态路由
    11. C 192.168.2.0/24 is directly connected, FastEthernet0/1
    12. C 192.168.3.0/24 is directly connected, FastEthernet0/0

    R2#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

    S    192.168.1.0/24 [1/0] via 192.168.2.1                     //S表示静态路由

    C    192.168.2.0/24 is directly connected, FastEthernet0/1

    C    192.168.3.0/24 is directly connected, FastEthernet0/0

    7)配置PC1的IP地址为192.168.1.1,网关为192.168.1.254

    8)配置PC2的IP地址为192.168.4.1,网关为192.168.4.254

    9)测试网络连通性,PC1 ping 192.168.4.1

    copytextpop-up

    1. PC>ping 192.168.4.1
    2. Pinging 192.168.4.1 with 32 bytes of data:
    3. Reply from 192.168.4.1: bytes=32 time=1ms TTL=126
    4. Reply from 192.168.4.1: bytes=32 time=11ms TTL=126
    5. Reply from 192.168.4.1: bytes=32 time=10ms TTL=126
    6. Reply from 192.168.4.1: bytes=32 time=11ms TTL=126
    7. Ping statistics for 192.168.4.1:
    8. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    9. Approximate round trip times in milli-seconds:
    10. Minimum = 1ms, Maximum = 11ms, Average = 8ms

    PC>ping 192.168.4.1

    Pinging 192.168.4.1 with 32 bytes of data:

    Reply from 192.168.4.1: bytes=32 time=1ms TTL=126

    Reply from 192.168.4.1: bytes=32 time=11ms TTL=126

    Reply from 192.168.4.1: bytes=32 time=10ms TTL=126

    Reply from 192.168.4.1: bytes=32 time=11ms TTL=126

    Ping statistics for 192.168.4.1:

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

    Approximate round trip times in milli-seconds:

        Minimum = 1ms, Maximum = 11ms, Average = 8ms

    2:配置浮动路由

    2.1 问题

    配置浮动静态路由

    2.2 方案

    按如下网络拓扑配置接口IP地址配置浮动路由实现链路的冗余,如图-2所示

    图-2

    2.3 步骤

    实现此案例需要按照如下步骤进行。

    步骤一:配置静态路由并添加模块

    1)R1上配置接口IP

    在以上静态路由实验的基础上,先分别进入R1与R2的特权模式输入write命令保存配置信息,然后分别进入R1与R2的物理配置界面,点击开关按钮关闭路由器,添加NM-1FE-TX模块并再次点击开关按钮,如下图-3所示。

    图-3

    2)添加模块后将R1的F1/0接口连接到R2的F1/0接口修改拓扑如下图-4所示:

    图-4

    3)配置R1的F1/0接口IP

    copytextpop-up

    1. R1(config)#interface fastEthernet 1/0
    2. R1(config-if)#ip address 192.168.3.1 255.255.255.0
    3. R1(config-if)#no shutdown

    R1(config)#interface fastEthernet 1/0

    R1(config-if)#ip address 192.168.3.1 255.255.255.0

    R1(config-if)#no shutdown

    4)配置R2的F1/0接口IP

    copytextpop-up

    1. R2(config)#interface fastEthernet 1/0
    2. R2(config-if)#ip address 192.168.3.2 255.255.255.0
    3. R2(config-if)#no shutdown

    R2(config)#interface fastEthernet 1/0

    R2(config-if)#ip address 192.168.3.2 255.255.255.0

    R2(config-if)#no shutdown

    5)R1上添加静态浮动路由

    copytextpop-up

    1. R1(config)#ip route 192.168.4.0 255.255.255.0 192.168.3.2 50 //管理距离50

    R1(config)#ip route 192.168.4.0 255.255.255.0 192.168.3.2 50   //管理距离50

    6)R2上添加静态浮动路由

    copytextpop-up

    1. R2(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1 50 //管理距离50

    R2(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1 50  //管理距离50

    7)R1上查看路由表

    copytextpop-up

    1. R1#show ip route
    2. Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
    3. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    4. N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    5. E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
    6. i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
    7. *-candidate default, U - per-user static route, o - ODR
    8. P - periodic downloaded static route
    9. Gateway of last resort is not set
    10. C 192.168.1.0/24 is directly connected, FastEthernet0/0
    11. C 192.168.2.0/24 is directly connected, FastEthernet0/1
    12. C 192.168.3.0/24 is directly connected, FastEthernet1/0
    13. S 192.168.4.0/24 [1/0] via 192.168.2.2 //只有下一跳为192.168.2.2的静态路由

    R1#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

    C    192.168.1.0/24 is directly connected, FastEthernet0/0

    C    192.168.2.0/24 is directly connected, FastEthernet0/1

    C    192.168.3.0/24 is directly connected, FastEthernet1/0

    S    192.168.4.0/24 [1/0] via 192.168.2.2  //只有下一跳为192.168.2.2的静态路由

    8)禁用F/01接口

    copytextpop-up

    1. R1(config)#interface fastEthernet 0/1
    2. R1(config-if)#shutdown

    R1(config)#interface fastEthernet 0/1

    R1(config-if)#shutdown

    9)R1上查看路由表

    copytextpop-up

    1. C 192.168.1.0/24 is directly connected, FastEthernet0/0
    2. S 192.168.4.0/24 [50/0] via 192.168.3.2//下一跳接口为192.168.4.2的路由生效
    3. C 192.168.4.0/24 is directly connected, FastEthernet1/0

    C    192.168.1.0/24 is directly connected, FastEthernet0/0

    S    192.168.4.0/24 [50/0] via 192.168.3.2//下一跳接口为192.168.4.2的路由生效

    C    192.168.4.0/24 is directly connected, FastEthernet1/0

    10)测试网络连通性,PC1 ping 192.168.4.1

    copytextpop-up

    1. PC>ping 192.168.4.1
    2. Pinging 192.168.4.1 with 32 bytes of data:
    3. Reply from 192.168.4.1: bytes=32 time=0ms TTL=126
    4. Reply from 192.168.4.1: bytes=32 time=10ms TTL=126
    5. Reply from 192.168.4.1: bytes=32 time=11ms TTL=126
    6. Reply from 192.168.4.1: bytes=32 time=1ms TTL=126
    7. Ping statistics for 192.168.4.1:
    8. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    9. Approximate round trip times in milli-seconds:
    10. Minimum = 0ms, Maximum = 11ms, Average = 5ms

    PC>ping 192.168.4.1

    Pinging 192.168.4.1 with 32 bytes of data:

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

    Reply from 192.168.4.1: bytes=32 time=10ms TTL=126

    Reply from 192.168.4.1: bytes=32 time=11ms TTL=126

    Reply from 192.168.4.1: bytes=32 time=1ms TTL=126

    Ping statistics for 192.168.4.1:

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

    Approximate round trip times in milli-seconds:

        Minimum = 0ms, Maximum = 11ms, Average = 5ms

    3 案例3:配置多路由的静态路由

    3.1 问题

    配置多路由的静态路由

    3.2 方案

    网络环境及IP地址规划,如图-5所示

    图-5

    3.3 步骤

    实现此案例需要按照如下步骤进行。

    步骤一:配置路由IP和静态路由

    1) R1上配置接口IP

    copytextpop-up

    1. Router(config)#interface fastEthernet 0/0
    2. R1(config-if)#ip address 192.168.1.254 255.255.255.0
    3. R1(config-if)#no shutdown
    4. R1(config-if)#exit
    5. R1(config)#interface fastEthernet 0/1
    6. R1(config-if)#ip address 192.168.2.1 255.255.255.0
    7. R1(config-if)#no shutdown

    Router(config)#interface fastEthernet 0/0

    R1(config-if)#ip address 192.168.1.254 255.255.255.0

    R1(config-if)#no shutdown

    R1(config-if)#exit

    R1(config)#interface fastEthernet 0/1

    R1(config-if)#ip address 192.168.2.1 255.255.255.0

    R1(config-if)#no shutdown

    2)R2上配置接口IP

    copytextpop-up

    1. R2(config)#interface f0/1
    2. R2(config-if)#ip address 192.168.2.2 255.255.255.0
    3. R2(config-if)#no shutdown
    4. R2(config-if)#exit
    5. R2(config)#interface fastEthernet 0/0
    6. R2(config-if)#ip address 192.168.3.1 255.255.255.0
    7. R2(config-if)#no shutdown

    R2(config)#interface f0/1

    R2(config-if)#ip address 192.168.2.2 255.255.255.0

    R2(config-if)#no shutdown

    R2(config-if)#exit

    R2(config)#interface fastEthernet 0/0

    R2(config-if)#ip address 192.168.3.1 255.255.255.0

    R2(config-if)#no shutdown

    3)R3上配置接口IP

    copytextpop-up

    1. R3(config)#interface fastEthernet 0/1
    2. R3(config-if)#ip address 192.168.3.2 255.255.255.0
    3. R3(config-if)#no shutdown
    4. R3(config-if)#exit
    5. R3(config)#interface fastEthernet 0/0
    6. R3(config-if)#ip address 192.168.4.254 255.255.255.0
    7. R3(config-if)#no shutdown

    R3(config)#interface fastEthernet 0/1

    R3(config-if)#ip address 192.168.3.2 255.255.255.0

    R3(config-if)#no shutdown

    R3(config-if)#exit

    R3(config)#interface fastEthernet 0/0

    R3(config-if)#ip address 192.168.4.254 255.255.255.0

    R3(config-if)#no shutdown

    4)R1、R2、R3上分别添加静态路由

    copytextpop-up

    1. R1(config)#ip route 192.168.3.0 255.255.255.0 192.168.2.2
    2. R1(config)#ip route 192.168.4.0 255.255.255.0 192.168.2.2
    3. R2(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1
    4. R2(config)#ip route 192.168.4.0 255.255.255.0 192.168.3.2
    5. R3(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1
    6. R3(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.1

    R1(config)#ip route 192.168.3.0 255.255.255.0 192.168.2.2

    R1(config)#ip route 192.168.4.0 255.255.255.0 192.168.2.2

    R2(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1

    R2(config)#ip route 192.168.4.0 255.255.255.0 192.168.3.2

    R3(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1

    R3(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.1

    5)R1上查看路由表

    copytextpop-up

    1. R1#show ip route
    2. Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
    3. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    4. N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    5. E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
    6. i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
    7. *-candidate default, U - per-user static route, o - ODR
    8. P - periodic downloaded static route
    9. Gateway of last resort is not set
    10. C 192.168.1.0/24 is directly connected, FastEthernet0/0
    11. C 192.168.2.0/24 is directly connected, FastEthernet0/1
    12. S 192.168.3.0/24 [1/0] via 192.168.2.2 //静态路由
    13. S 192.168.4.0/24 [1/0] via 192.168.2.2 //静态路由

    R1#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

    C    192.168.1.0/24 is directly connected, FastEthernet0/0

    C    192.168.2.0/24 is directly connected, FastEthernet0/1

    S    192.168.3.0/24 [1/0] via 192.168.2.2    //静态路由

    S    192.168.4.0/24 [1/0] via 192.168.2.2    //静态路由

    6)R2上查看路由表

    copytextpop-up

    1. R2#show ip route
    2. Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
    3. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    4. N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    5. E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
    6. i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
    7. *-candidate default, U - per-user static route, o - ODR
    8. P - periodic downloaded static route
    9. Gateway of last resort is not set
    10. S 192.168.1.0/24 [1/0] via 192.168.2.1 //静态路由
    11. C 192.168.2.0/24 is directly connected, FastEthernet0/1
    12. C 192.168.3.0/24 is directly connected, FastEthernet0/0
    13. S 192.168.4.0/24 [1/0] via 192.168.3.2 //静态路由

    R2#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

    S    192.168.1.0/24 [1/0] via 192.168.2.1    //静态路由

    C    192.168.2.0/24 is directly connected, FastEthernet0/1

    C    192.168.3.0/24 is directly connected, FastEthernet0/0

    S    192.168.4.0/24 [1/0] via 192.168.3.2    //静态路由

    7)R3上查看路由表

    copytextpop-up

    1. R3#show ip route
    2. Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
    3. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    4. N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    5. E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
    6. i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
    7. *-candidate default, U - per-user static route, o - ODR
    8. P - periodic downloaded static route
    9. Gateway of last resort is not set
    10. S 192.168.1.0/24 [1/0] via 192.168.3.1 //静态路由
    11. S 192.168.2.0/24 [1/0] via 192.168.3.1 //静态路由
    12. C 192.168.3.0/24 is directly connected, FastEthernet0/1
    13. C 192.168.4.0/24 is directly connected, FastEthernet0/0

    R3#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

    S    192.168.1.0/24 [1/0] via 192.168.3.1    //静态路由

    S    192.168.2.0/24 [1/0] via 192.168.3.1    //静态路由

    C    192.168.3.0/24 is directly connected, FastEthernet0/1

    C    192.168.4.0/24 is directly connected, FastEthernet0/0

    8)按图-4配置PC的IP地址

    9)测试网络连通性,PC1 ping 192.168.2.2、192.168.3.1、192.168.3.2、192.168.4.1

    copytextpop-up

    1. PC>ping 192.168.2.2 //ping 192.168.2.2
    2. Pinging 192.168.2.2 with 32 bytes of data:
    3. Reply from 192.168.2.2: bytes=32 time=0ms TTL=254
    4. Reply from 192.168.2.2: bytes=32 time=0ms TTL=254
    5. Reply from 192.168.2.2: bytes=32 time=0ms TTL=254
    6. Reply from 192.168.2.2: bytes=32 time=0ms TTL=254
    7. Ping statistics for 192.168.2.2:
    8. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    9. Approximate round trip times in milli-seconds:
    10. Minimum = 0ms, Maximum = 0ms, Average = 0ms
    11. PC>ping 192.168.3.1 //ping 192.168.3.1
    12. Pinging 192.168.3.1 with 32 bytes of data:
    13. Reply from 192.168.3.1: bytes=32 time=0ms TTL=254
    14. Reply from 192.168.3.1: bytes=32 time=3ms TTL=254
    15. Reply from 192.168.3.1: bytes=32 time=0ms TTL=254
    16. Reply from 192.168.3.1: bytes=32 time=0ms TTL=254
    17. Ping statistics for 192.168.3.1:
    18. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    19. Approximate round trip times in milli-seconds:
    20. Minimum = 0ms, Maximum = 3ms, Average = 0ms
    21. PC>ping 192.168.3.2 //ping 192.168.3.2
    22. Pinging 192.168.3.2 with 32 bytes of data:
    23. Reply from 192.168.3.2: bytes=32 time=0ms TTL=253
    24. Reply from 192.168.3.2: bytes=32 time=12ms TTL=253
    25. Reply from 192.168.3.2: bytes=32 time=0ms TTL=253
    26. Reply from 192.168.3.2: bytes=32 time=12ms TTL=253
    27. Ping statistics for 192.168.3.2:
    28. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    29. Approximate round trip times in milli-seconds:
    30. Minimum = 0ms, Maximum = 12ms, Average = 6ms
    31. PC>ping 192.168.4.1 //ping 192.168.4.1
    32. Pinging 192.168.4.1 with 32 bytes of data:
    33. Reply from 192.168.4.1: bytes=32 time=0ms TTL=125
    34. Reply from 192.168.4.1: bytes=32 time=10ms TTL=125
    35. Reply from 192.168.4.1: bytes=32 time=0ms TTL=125
    36. Reply from 192.168.4.1: bytes=32 time=22ms TTL=125
    37. Ping statistics for 192.168.4.1:
    38. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    39. Approximate round trip times in milli-seconds:
    40. Minimum = 0ms, Maximum = 22ms, Average = 8ms

    PC>ping 192.168.2.2                            //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=254

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

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

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

    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

    PC>ping 192.168.3.1                          //ping 192.168.3.1

    Pinging 192.168.3.1 with 32 bytes of data:

    Reply from 192.168.3.1: bytes=32 time=0ms TTL=254

    Reply from 192.168.3.1: bytes=32 time=3ms TTL=254

    Reply from 192.168.3.1: bytes=32 time=0ms TTL=254

    Reply from 192.168.3.1: bytes=32 time=0ms TTL=254

    Ping statistics for 192.168.3.1:

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

    Approximate round trip times in milli-seconds:

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

    PC>ping 192.168.3.2                          //ping 192.168.3.2

    Pinging 192.168.3.2 with 32 bytes of data:

    Reply from 192.168.3.2: bytes=32 time=0ms TTL=253

    Reply from 192.168.3.2: bytes=32 time=12ms TTL=253

    Reply from 192.168.3.2: bytes=32 time=0ms TTL=253

    Reply from 192.168.3.2: bytes=32 time=12ms TTL=253

    Ping statistics for 192.168.3.2:

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

    Approximate round trip times in milli-seconds:

        Minimum = 0ms, Maximum = 12ms, Average = 6ms

    PC>ping 192.168.4.1                          //ping 192.168.4.1

    Pinging 192.168.4.1 with 32 bytes of data:

    Reply from 192.168.4.1: bytes=32 time=0ms TTL=125

    Reply from 192.168.4.1: bytes=32 time=10ms TTL=125

    Reply from 192.168.4.1: bytes=32 time=0ms TTL=125

    Reply from 192.168.4.1: bytes=32 time=22ms TTL=125

    Ping statistics for 192.168.4.1:

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

    Approximate round trip times in milli-seconds:

        Minimum = 0ms, Maximum = 22ms, Average = 8ms

    4 案例4:配置默认路由

    4.1 问题

    配置默认路由

    4.2 方案

    网络环境及IP地址规划,如图-6所示

    图-6

    4.3 步骤

    1)在案例3基础上删除R1与R3的静态路由

    copytextpop-up

    1. R1(config)#no ip route 192.168.3.0 255.255.255.0 192.168.2.2
    2. R1(config)#no ip route 192.168.4.0 255.255.255.0 192.168.2.2
    3. R3(config)#no ip route 192.168.1.0 255.255.255.0 192.168.3.1
    4. R3(config)#no ip route 192.168.2.0 255.255.255.0 192.168.3.1

    R1(config)#no ip route 192.168.3.0 255.255.255.0 192.168.2.2

    R1(config)#no ip route 192.168.4.0 255.255.255.0 192.168.2.2

    R3(config)#no ip route 192.168.1.0 255.255.255.0 192.168.3.1

    R3(config)#no ip route 192.168.2.0 255.255.255.0 192.168.3.1

    2)R1、R3添加默认路由

    copytextpop-up

    1. R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.2.2
    2. R3(config)#ip route 0.0.0.0 0.0.0.0 192.168.3.1
    3. 12)R1上查看路由表
    4. R1#show ip route
    5. Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
    6. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    7. N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    8. E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
    9. i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
    10. *-candidate default, U - per-user static route, o - ODR
    11. P - periodic downloaded static route
    12. Gateway of last resort is 192.168.2.2 to network 0.0.0.0
    13. C 192.168.1.0/24 is directly connected, FastEthernet0/0
    14. C 192.168.2.0/24 is directly connected, FastEthernet0/1
    15. S* 0.0.0.0/0 [1/0] via 192.168.2.2 //默认路由

    R1(config)#ip route 0.0.0.0 0.0.0.0 192.168.2.2

    R3(config)#ip route 0.0.0.0 0.0.0.0 192.168.3.1

    12)R1上查看路由表

    R1#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 192.168.2.2 to network 0.0.0.0

    C    192.168.1.0/24 is directly connected, FastEthernet0/0

    C    192.168.2.0/24 is directly connected, FastEthernet0/1

    S*   0.0.0.0/0 [1/0] via 192.168.2.2     //默认路由

    3)R1、R3上查看路由表

    copytextpop-up

    1. R1#show ip route
    2. Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
    3. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    4. N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    5. E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
    6. i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
    7. *-candidate default, U - per-user static route, o - ODR
    8. P - periodic downloaded static route
    9. Gateway of last resort is 192.168.3.1 to network 0.0.0.0
    10. C 192.168.1.0/24 is directly connected, FastEthernet0/0
    11. C 192.168.2.0/24 is directly connected, FastEthernet0/1
    12. S* 0.0.0.0/0 [1/0] via 192.168.2.2 //默认路由
    13.  
    14. R3#show ip route
    15. Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
    16. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
    17. N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
    18. E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
    19. i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
    20. *-candidate default, U - per-user static route, o - ODR
    21. P - periodic downloaded static route
    22. Gateway of last resort is 192.168.3.1 to network 0.0.0.0
    23. C 192.168.3.0/24 is directly connected, FastEthernet0/1
    24. C 192.168.4.0/24 is directly connected, FastEthernet0/0
    25. S* 0.0.0.0/0 [1/0] via 192.168.3.1 //默认路由

    R1#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 192.168.3.1 to network 0.0.0.0

    C    192.168.1.0/24 is directly connected, FastEthernet0/0

    C    192.168.2.0/24 is directly connected, FastEthernet0/1

    S*   0.0.0.0/0 [1/0] via 192.168.2.2     //默认路由

     

    R3#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 192.168.3.1 to network 0.0.0.0

    C    192.168.3.0/24 is directly connected, FastEthernet0/1

    C    192.168.4.0/24 is directly connected, FastEthernet0/0

    S*   0.0.0.0/0 [1/0] via 192.168.3.1     //默认路由

    4)测试网络连通性,PC1 ping 192.168.4.1

    copytextpop-up

    1. PC>ping 192.168.4.1
    2. Pinging 192.168.4.1 with 32 bytes of data:
    3. Reply from 192.168.4.1: bytes=32 time=1ms TTL=125
    4. Reply from 192.168.4.1: bytes=32 time=0ms TTL=125
    5. Reply from 192.168.4.1: bytes=32 time=14ms TTL=125
    6. Reply from 192.168.4.1: bytes=32 time=14ms TTL=125
    7. Ping statistics for 192.168.4.1:
    8. Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    9. Approximate round trip times in milli-seconds:
    10. Minimum = 0ms, Maximum = 14ms, Average = 7ms = 0ms,平均 = 0ms

    PC>ping 192.168.4.1

    Pinging 192.168.4.1 with 32 bytes of data:

    Reply from 192.168.4.1: bytes=32 time=1ms TTL=125

    Reply from 192.168.4.1: bytes=32 time=0ms TTL=125

    Reply from 192.168.4.1: bytes=32 time=14ms TTL=125

    Reply from 192.168.4.1: bytes=32 time=14ms TTL=125

    Ping statistics for 192.168.4.1:

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

    Approximate round trip times in milli-seconds:

        Minimum = 0ms, Maximum = 14ms, Average = 7ms = 0ms,平均 = 0ms

     

    展开全文
  • 1 【单选题】 管理员想通过配置浮动静态路由来实现路由备份,正确的...在串行接口上配置静态路由时,可以通过指定下一跳地址来配置静态路由。 B、 在串行接口上配置静态路由时,可以通过指定出接口来配置静态路由。 C、

    1.基础概念

    静态路由具有容易维护,配置简单,方便快捷,小网管、大网管、电脑、路由、交换机都能使用的配置方式。首先是网络工程师手工配置的,本身是不会变化的。然后兼容性来说各种设备都能配置。只要掌握基本的IP地址网段划分就能配置好静态路由。

    2.配置方式:

    静态路由配置

    cisco

    ip route 10.1.1.0 255.255.255.0 172.16.12.2

    huawei

    ip route-static 10.1.1.0 255.255.255.0 172.16.12.2

    ip route-static 10.1.1.0 24 172.16.12.2

    3.默认路由

    默认路由(Default route),是对IP数据包中的目的地址找不到存在的其他路由时,路由器所选择的路由。目的地不在路由器的路由表里的所有数据包都会使用默认路由。这条路由一般会连去另一个路由器,而这个路由器也同样处理数据包: 如果知道应该怎么路由这个数据包,则数据包会被转发到已知的路由;否则,数据包会被转发到默认路由,从而到达另一个路由器。每次转发,路由都增加了一跳的距离。

    4.路由备份和负载分担

    它们各有优点,负载分担是两个路由都能一起使用。而路由备份是其中一条主路由down掉,启用备份路由。路由备份用处,根据实际情况,接入ISP有按流量和租用时间计费类型。平时主路由使用按租用时间计费类型,按流量计费的路由为备用路由不产生费用。

    1
    【单选题】
    管理员想通过配置浮动静态路由来实现路由备份,正确的方法是

    A、
    管理员需要为主路由和浮动静态路由配置不同的协议优先级。
    B、
    管理员只需要配置两个静态路由就可以。
    C、
    管理员需要为主路由和浮动静态路由配置不同的TAG。
    D、
    管理员需要为主路由和浮动静态路由配置不同的度量值。
    我的答案:A

    2
    【单选题】
    配置静态路由协议时,下面说法错误的是

    A、
    在串行接口上配置静态路由时,可以通过指定下一跳地址来配置静态路由。
    B、
    在串行接口上配置静态路由时,可以通过指定出接口来配置静态路由。
    C、
    在以太网接口上配置静态路由时,可以通过指定下一跳地址来配置静态路由。
    D、
    在以太网接口上配置静态路由时,可以通过指定出接口来配置静态路由。
    我的答案:D

    3
    【单选题】
    两个路由器R1和R2之间有3条链路,带宽分别是10Mbps、 20Mbps和30Mbps。如果使用等值负载分担,则R1和R2之间的总带宽为

    A、
    20M
    B、
    30M
    C、
    50M
    D、
    60M
    我的答案:B

    展开全文
  • eNSP配置静态路由

    万次阅读 多人点赞 2018-07-04 21:33:50
    eNSP配置静态路由 目标 配置目标:如下拓扑结构,从CLIENT1去pingCLIENT2,ping通 拓扑结构 路由配置 配置各个路由表的核心思想是:只有这个路由表中有一个网段的网络号,才可以从这个路由器跳转到该网段,...

    eNSP配置静态路由

    目标

    配置目标:如下拓扑结构,从CLIENT1去pingCLIENT2,ping通

    拓扑结构
    这里写图片描述

    路由配置

    配置各个路由表的核心思想是:只有这个路由表中有一个网段的网络号,才可以从这个路由器跳转到该网段,下面只展示R1的前往CLIENT2的路由配置,其他路由器及返回过程配置类似。

    CLIENT1配置
    这里写图片描述
    CLIENT2配置
    这里写图片描述
    R1配置
    这里写图片描述
    [R1]int gi0/0/0
    这里写图片描述

    说明:当命令打不全的时候可以用Tab键进行补全。上面配置了R1的两个接口的IP地址。如果要从CLIENT1发ping命令让CLIENT2回应,(CLIENT1会把报文抛到自己的网关R1),必须让R1的路由表中目的地址存在CLIENT1的IP地址,下一跳设置成192.168.16.2,目标网段是192.168.26.0,转发到R2之后,R2的路由表中也必须有CLIENT2的IP地址,下一跳设置成192.168.26.2,目标网段是192.168.20.0,这样从CLIENT1可以发报文到CLIENT2,但是从CLIENT2却无法回报文到CLIENT1,因为比如CLIENT2的网关中就没有CLIENT1的IP地址,类似地在回来的路上进行配置即可。下面只展示R1配置从CLIENT1发往CLIENT2的路由表。

    这里写图片描述
    ip route-static 192.168.20.0 255.255.255.0 192.168.16.2
    注意这个命令,三个分别是目标网段,子网掩码,下一跳。

    测试
    这里写图片描述
    这里写图片描述
    上面结果表明CLIENT1和CLIENT2可以互相ping通了。

    展开全文
  • 由于企业网规模不大,且要求网络简单,安全,可靠以及转发效率高,所以采用配置静态路由实现组网中任意两台主机之间都能互通。在配置IPv4静态路由之前。需完成以下任务:配置接口的链路层协议参数和IP地址,使相邻...
  • 在很早之前的《RH134小结(六)nmcli配置IPv4与IPv6网络》中就已提到过IPv6的配置,目前在工作中就遇到主机上需要配置ipv6地址的问题,在主机上存在多...ipv4下的静态路由配置,我在《linux配置静态路由》一篇中已经提...
  • 6 配置静态路由

    千次阅读 2020-02-21 14:27:12
    配置静态路由 网络拓扑图 1 在路由器R20上配置接口的IP地址 配置 路由器端口信息 串口信息 2 在路由器R20上配置静态路由 配置 路由表信息 3 在路由器R21上配置接口的IP地址和串口上的时钟频率 配置 路由器...
  • 华为交换机怎么配置静态路由?公司的华为交换机想要配置静态路由,因为把交换机当做路由使用,该怎么设置呢?下面我们就来看看详细的教程,需要的朋友可以参考下
  • 使用packet Tracer配置静态路由和动态路由-附件资源
  • 实验要求:1、PC1在LAN1中,PC2在LAN2中,配置静态路由实现两个LAN中的PC能够通信;2、去掉静态路由,配置默认路由使PC1与PC2能够通信;1、基本配置R1:system-view [Huawei]sysname R1[R1]interface g0/0/0[R1-...
  • 1、实验目的掌握如下技能:(1) 路由表的概念(2) ip route 命令的使用(3) 根据需求正确配置静态路由2. 实验拓扑3. 实验步骤我们要使得 1.1.1.0/24、2.2.2.0/24、3.3.3.0/24 网络之间能够互相通信。(1) 步骤 1:在各...
  • 配置静态路由与BFD联动(单跳检测)1.组网需求当Router A和Router B之间的链路出现故障时,Router A选择经过Router D到达Router C。2.组网图3.配置步骤(1)配置各接口的IP地址(略)(2)配置BFD和静态路由#在Router A上...
  • --------------------------------------------------------------------学习linux时,你可能会遇到配置静态路由的问题,这里将介绍配置linux静态路由问题的解决方法,在这里拿出来和大家分享一下。现在有五个设备,...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 7,626
精华内容 3,050
关键字:

配置静态路由