思科路由器 静态路由配置~~~~~~~~!!!!!!

来源:网友推荐     更新:2024-05-14

1、R1上配置接口IP:

> 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

> R2(config)#interface fastEthernet 0/1 R2(config-if)#ip address192.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 addres 192.168.3.254 255.255.255.0 

>  R2(config-if)#no shutdown

3、R1上添加静态路由

> R1(config)#ip route 192.168.3.0 255.255.255.0 192.168.2.2

4、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 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表示静态路由

5、R2上添加静态路由

> R2(config)#ip route 192.168.1.0 255.255.255.0 192.168.2.1

6、R2上查看路由条目

> 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

扩展资料:

拓扑网络验证:

测试网络连通性,PC1 ping 192.168.3.1

> PC>ping 192.168.3.1

 Pinging 192.168.3.1 with 32 bytes of data: 

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

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

 Reply from 192.168.3.1: bytes=32 time=10msTTL=126 

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

> Ping statistics for 192.168.3.1:

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

>  Approximate round trip times in milli-seconds:

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

参考资料来源:百度百科--静态路由



相关链接

  • 思科模拟器静态路由
  • 华为静态路由配置实例
  • enspospf配置命令
  • 静态路由配置详细教程
  • 静态路由的配置方式
  • 来自于网友分享,若有事请联系
    © 好有爱分享网