路由器静态路由配置命令入门

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

ROUTE 1配置

Router>

Router>en

Router#config t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#hostname R1 修改路由器名称

R1(config)#int f1/0 进入端口配置模式

R1(config-if)#no shut 开启端口

%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up R1(config-if)#ip address 192.168.1.1 255.255.255.0 为端口配置IP

R1(config-if)#exit

R1(config)#int se2/0 进入端口配置模式

R1(config-if)#no shut 开启端口

%LINK-5-CHANGED: Interface Serial2/0, changed state to up

R1(config-if)#ip address 192.168.3.1 255.255.255.0 为端口配置IP

R1(config-if)#clock rate 64000 设置端口时钟

R1(config-if)#

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up

R1(config)#^Z

%SYS-5-CONFIG_I: Configured from console by console

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, FastEthernet1/0

C 192.168.3.0/24 is directly connected, Serial2/0

R1#config t

Enter configuration commands, one per line. End with CNTL/Z.

R1(config)#ip route ?

A.B.C.D Destination prefix

R1(config)#ip route 192.168.2.0 255.255.255.0 ?

A.B.C.D Forwarding router's address

Ethernet IEEE 802.3

FastEthernet FastEthernet IEEE 802.3

GigabitEthernet GigabitEthernet IEEE 802.3z

Loopback Loopback interface

Null Null interface

Serial Serial

R1(config)#ip route 192.168.2.0 255.255.255.0 192.168.3.2 配置静态路由

R1(config)#^Z 非直连目的网络直连本路由器的另一个路由器端口

%SYS-5-CONFIG_I: Configured from console by console

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, FastEthernet1/0

S 192.168.2.0/24 [1/0] via 192.168.3.2

C 192.168.3.0/24 is directly connected, Serial2/0

R1#

ROUTE 2配置

Router>

Router>en

Router#config t

Enter configuration commands, one per line. End with CNTL/Z.

Router(config)#int f1/0 进入端口配置模式

Router(config-if)#no shut 开启端口

%LINK-5-CHANGED: Interface FastEthernet1/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up Router(config-if)#ip address 192.168.2.1 255.255.255.0 为端口配置IP

Router(config-if)#int serial 2/0 进入端口配置模式

Router(config-if)#ip address 192.168.3.2 255.255.255.0 为端口配置IP

Router(config-if)#no shut 开启端口

%LINK-5-CHANGED: Interface Serial2/0, changed state to up

相关文档
最新文档