网络 || 路由实验

练习1

1.规划好拓扑结构图

 2.给pc机和路由器接口配置好IP地址

 

 

 

3 在A路由器和B路由器上添加静态路由

命令行里添加静态路由

Router#config
Configuring from terminal, memory, or network [terminal]? 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console

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

S    192.168.1.0/24 [1/0] via 192.168.2.1
C    192.168.2.0/24 is directly connected, FastEthernet0/0
C    192.168.3.0/24 is directly connected, FastEthernet0/1

4.pc0上测试ping所有的ip地址

PC>ipconfig

IP Address......................: 192.168.1.1
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.1.254

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=10ms TTL=128
Reply from 192.168.1.1: bytes=32 time=15ms TTL=128
Reply from 192.168.1.1: bytes=32 time=0ms TTL=128
Reply from 192.168.1.1: bytes=32 time=16ms TTL=128

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 = 16ms, Average = 10ms

PC>ping 192.168.1.254

Pinging 192.168.1.254 with 32 bytes of data:

Reply from 192.168.1.254: bytes=32 time=120ms TTL=255
Reply from 192.168.1.254: bytes=32 time=62ms TTL=255
Reply from 192.168.1.254: bytes=32 time=63ms TTL=255
Reply from 192.168.1.254: bytes=32 time=61ms TTL=255

Ping statistics for 192.168.1.254:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 61ms, Maximum = 120ms, Average = 76ms

PC>ping 192.168.2.1

Pinging 192.168.2.1 with 32 bytes of data:

Reply from 192.168.2.1: bytes=32 time=55ms TTL=255
Reply from 192.168.2.1: bytes=32 time=48ms TTL=255
Reply from 192.168.2.1: bytes=32 time=37ms TTL=255
Reply from 192.168.2.1: bytes=32 time=62ms TTL=255

Ping statistics for 192.168.2.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 37ms, Maximum = 62ms, Average = 50ms

PC>ping 192.168.2.2

Pinging 192.168.2.2 with 32 bytes of data:

Request timed out.
Reply from 192.168.2.2: bytes=32 time=93ms TTL=254
Reply from 192.168.2.2: bytes=32 time=78ms TTL=254
Reply from 192.168.2.2: bytes=32 time=93ms TTL=254

Ping statistics for 192.168.2.2:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 78ms, Maximum = 93ms, Average = 88ms

PC>ping 192.168.3.254

Pinging 192.168.3.254 with 32 bytes of data:

Reply from 192.168.3.254: bytes=32 time=82ms TTL=254
Reply from 192.168.3.254: bytes=32 time=76ms TTL=254
Reply from 192.168.3.254: bytes=32 time=92ms TTL=254
Reply from 192.168.3.254: bytes=32 time=33ms TTL=254

Ping statistics for 192.168.3.254:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 33ms, Maximum = 92ms, Average = 70ms

PC>ping 192.168.3.1

Pinging 192.168.3.1 with 32 bytes of data:

Request timed out.
Reply from 192.168.3.1: bytes=32 time=139ms TTL=126
Reply from 192.168.3.1: bytes=32 time=98ms TTL=126
Reply from 192.168.3.1: bytes=32 time=124ms TTL=126

Ping statistics for 192.168.3.1:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 98ms, Maximum = 139ms, Average = 120ms

练习2

路由器router2添加接口

1.规划拓扑图连线

2.规划ip地址和网段

3.配置pc机和路由器的ip地址

 

4.在边缘路由器上添加默认路由,在核心路由器上添加3条静态路由

Router(config)#ip route  0.0.0.0 0.0.0.0 192.168.4.2
Router(config)#exit
Router#
%SYS-5-CONFIG_I: Configured from console by console

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 192.168.4.2 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.4.2

核心路由器上添加静态路由

5.在pc机上ping所有的ip地址

Packet Tracer PC Command Line 1.0
PC>ipconfig

IP Address......................: 192.168.1.1
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.1.254

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=9ms TTL=128
Reply from 192.168.1.1: bytes=32 time=0ms TTL=128
Reply from 192.168.1.1: bytes=32 time=15ms TTL=128
Reply from 192.168.1.1: bytes=32 time=0ms TTL=128

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 = 15ms, Average = 6ms

PC>ping 192.168.1.254

Pinging 192.168.1.254 with 32 bytes of data:

Reply from 192.168.1.254: bytes=32 time=102ms TTL=255
Reply from 192.168.1.254: bytes=32 time=48ms TTL=255
Reply from 192.168.1.254: bytes=32 time=32ms TTL=255
Reply from 192.168.1.254: bytes=32 time=64ms TTL=255

Ping statistics for 192.168.1.254:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 32ms, Maximum = 102ms, Average = 61ms

PC>ping 192.168.6.1

Pinging 192.168.6.1 with 32 bytes of data:

Reply from 192.168.6.1: bytes=32 time=53ms TTL=255
Reply from 192.168.6.1: bytes=32 time=61ms TTL=255
Reply from 192.168.6.1: bytes=32 time=63ms TTL=255
Reply from 192.168.6.1: bytes=32 time=63ms TTL=255

Ping statistics for 192.168.6.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 53ms, Maximum = 63ms, Average = 60ms

PC>ping 192.168.6.2

Pinging 192.168.6.2 with 32 bytes of data:

Request timed out.
Reply from 192.168.6.2: bytes=32 time=79ms TTL=254
Reply from 192.168.6.2: bytes=32 time=71ms TTL=254
Reply from 192.168.6.2: bytes=32 time=94ms TTL=254

Ping statistics for 192.168.6.2:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 71ms, Maximum = 94ms, Average = 81ms

PC>ping 192.168.4.2

Pinging 192.168.4.2 with 32 bytes of data:

Reply from 192.168.4.2: bytes=32 time=90ms TTL=254
Reply from 192.168.4.2: bytes=32 time=94ms TTL=254
Reply from 192.168.4.2: bytes=32 time=95ms TTL=254
Reply from 192.168.4.2: bytes=32 time=63ms TTL=254

Ping statistics for 192.168.4.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 63ms, Maximum = 95ms, Average = 85ms

PC>ping 192.168.4.1

Pinging 192.168.4.1 with 32 bytes of data:

Request timed out.
Reply from 192.168.4.1: bytes=32 time=80ms TTL=253
Reply from 192.168.4.1: bytes=32 time=112ms TTL=253
Reply from 192.168.4.1: bytes=32 time=8ms TTL=253

Ping statistics for 192.168.4.1:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 8ms, Maximum = 112ms, Average = 66ms

PC>ping 192.168.3.254

Pinging 192.168.3.254 with 32 bytes of data:

Reply from 192.168.3.254: bytes=32 time=107ms TTL=253
Reply from 192.168.3.254: bytes=32 time=108ms TTL=253
Reply from 192.168.3.254: bytes=32 time=126ms TTL=253
Reply from 192.168.3.254: bytes=32 time=125ms TTL=253

Ping statistics for 192.168.3.254:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 107ms, Maximum = 126ms, Average = 116ms

PC>ping 192.168.3.1

Pinging 192.168.3.1 with 32 bytes of data:

Request timed out.
Reply from 192.168.3.1: bytes=32 time=172ms TTL=125
Reply from 192.168.3.1: bytes=32 time=154ms TTL=125
Reply from 192.168.3.1: bytes=32 time=139ms TTL=125

Ping statistics for 192.168.3.1:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 139ms, Maximum = 172ms, Average = 155ms

PC>ping 192.168.5.2

Pinging 192.168.5.2 with 32 bytes of data:

Reply from 192.168.5.2: bytes=32 time=82ms TTL=254
Reply from 192.168.5.2: bytes=32 time=94ms TTL=254
Reply from 192.168.5.2: bytes=32 time=62ms TTL=254
Reply from 192.168.5.2: bytes=32 time=79ms TTL=254

Ping statistics for 192.168.5.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 62ms, Maximum = 94ms, Average = 79ms

PC>ping 192.168.5.1

Pinging 192.168.5.1 with 32 bytes of data:

Request timed out.
Reply from 192.168.5.1: bytes=32 time=124ms TTL=253
Reply from 192.168.5.1: bytes=32 time=35ms TTL=253
Reply from 192.168.5.1: bytes=32 time=113ms TTL=253

Ping statistics for 192.168.5.1:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 35ms, Maximum = 124ms, Average = 90ms

PC>ping 192.168.2.254

Pinging 192.168.2.254 with 32 bytes of data:

Reply from 192.168.2.254: bytes=32 time=99ms TTL=253
Reply from 192.168.2.254: bytes=32 time=95ms TTL=253
Reply from 192.168.2.254: bytes=32 time=124ms TTL=253
Reply from 192.168.2.254: bytes=32 time=97ms TTL=253

Ping statistics for 192.168.2.254:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 95ms, Maximum = 124ms, Average = 103ms

PC>ping 192.168.2.1

Pinging 192.168.2.1 with 32 bytes of data:

Request timed out.
Reply from 192.168.2.1: bytes=32 time=173ms TTL=125
Reply from 192.168.2.1: bytes=32 time=173ms TTL=125
Reply from 192.168.2.1: bytes=32 time=170ms TTL=125

Ping statistics for 192.168.2.1:
    Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),
Approximate round trip times in milli-seconds:
    Minimum = 170ms, Maximum = 173ms, Average = 172ms

PC>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

韩未零

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值