科技行者

行者学院 转型私董会 科技行者专题报道 网红大战科技行者

知识库

知识库 安全导航

至顶网网络频道路由交换路由器静态路由配置

路由器静态路由配置

  • 扫一扫
    分享文章到微信

  • 扫一扫
    关注官方公众号
    至顶头条

  //实现:通过静态路由实现网络的连通性。

来源:chinaitlab 2011年5月14日

关键字: 路由配置 路由器

  • 评论
  • 分享微博
  • 分享邮件

  //实现:通过静态路由实现网络的连通性。

  //环境:

  Router01

  Router02

  CISCO 2960-01

  CISCO 2960-02

  PC01

  PC02

  //拓扑:如图(110422-路由器静态路由配置)

  

  //配置Router01

  Router01>enable

  Router01#configure terminal

  Router01(config)#interface fastEthernet 1/0

  Router01(config-if)#no shutdown

  Router01(config-if)#ip address 192.168.1.1 255.255.255.0

  Router01(config-if)#exit

  Router01(config)#interface serial 2/0

  Router01(config-if)#ip address 192.168.3.1 255.255.255.0

  Router01(config-if)#clock rate 64000 //配置时钟频率

  Router01(config-if)#no shutdown

  Router01#configure terminal

  Router01(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.2 //静态路由配置(目标网段,下一跳地址)

  Router01#show ip route //查看路由表

  Router01#write

  //配置Router02

  Router02>enable

  Router02#configure terminal

  Router02(config)#interface fastEthernet 1/0

  Router02(config-if)#no shutdown

  Router02(config-if)#ip address 192.168.2.1 255.255.255.0

  Router02(config-if)#exit

  Router02(config)#interface serial 2/0

  Router02(config-if)#ip address 192.168.3.1 255.255.255.0

  Router02(config-if)#no shutdown

  Router02#configure terminal

  Router02(config)#ip route 192.168.1.0 255.255.255.0 192.168.3.1

  Router02#write

  //测试:(终端计算机)

  PC01>ping 192.168.1.1

  Pinging 192.168.1.1 with 32 bytes of data:

  Reply from 192.168.1.1: bytes=32 time=7ms TTL=255

  Ping statistics for 192.168.1.1:

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

  Approximate round trip times in milli-seconds:

  Minimum = 7ms, Maximum = 7ms, Average = 7ms

  Control-C

  PC01>ping 192.168.3.1

  Pinging 192.168.3.1 with 32 bytes of data:

  Reply from 192.168.3.1: bytes=32 time=13ms TTL=255

  Ping statistics for 192.168.3.1:

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

  Approximate round trip times in milli-seconds:

  Minimum = 13ms, Maximum = 13ms, Average = 13ms

  Control-C

  PC01>ping 192.168.3.2

  Pinging 192.168.3.2 with 32 bytes of data:

  Reply from 192.168.3.2: bytes=32 time=21ms TTL=254

  Ping statistics for 192.168.3.2:

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

  Approximate round trip times in milli-seconds:

  Minimum = 21ms, Maximum = 21ms, Average = 21ms

  Control-C

  PC01>ping 192.168.2.1

  Pinging 192.168.2.1 with 32 bytes of data:

  Reply from 192.168.2.1: bytes=32 time=19ms TTL=254

  Ping statistics for 192.168.2.1:

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

  Approximate round trip times in milli-seconds:

  Minimum = 19ms, Maximum = 19ms, Average = 19ms

  Control-C

  PC01>ping 192.168.2.101

  Pinging 192.168.2.101 with 32 bytes of data:

  Reply from 192.168.2.101: bytes=32 time=35ms TTL=126

  Ping statistics for 192.168.2.101:

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

  Approximate round trip times in milli-seconds:

  Minimum = 35ms, Maximum = 35ms, Average = 35ms

  Control-C

    • 评论
    • 分享微博
    • 分享邮件
    邮件订阅

    如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。

    重磅专题
    往期文章
    最新文章