静态路由器配置

发布时间: 更新时间: 总字数:383 阅读时间:1m 作者: IP上海 分享 网址

静态路由器配置

配置

Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#inter fa0/0
Router(config-if)#ip address 192.168.0.1 255.255.255.0
Router(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#inter se1/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#clock rate 64000
Router(config-if)#no shut
%LINK-5-CHANGED: Interface Serial1/0, changed state to down
Router(config-if)#
%LINK-5-CHANGED: Interface Serial1/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
Router(config-if)#no shut
Router(config-if)#end
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
C   192.168.0.0/24 is directly connected, FastEthernet0/0
C   192.168.1.0/24 is directly connected, Serial1/0
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ip route 192.168.2.0 255.255.255.0 192.168.1.2
                                              目的网络  子网掩码   吓一跳地址
Router(config)#ip route 192.168.4.0 255.255.255.0 192.168.1.2
Router(config)#end
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
C   192.168.0.0/24 is directly connected, FastEthernet0/0
C   192.168.1.0/24 is directly connected, Serial1/0
S   192.168.2.0/24 [1/0] via 192.168.1.2
S   192.168.4.0/24 [1/0] via 192.168.1.2
Router#
Home Archives Categories Tags Statistics
本文总阅读量 次 本站总访问量 次 本站总访客数