ospf配置实例

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

ospf配置实例

注明:R1的S0连接R2的S0端口,R1的S1连接R3的S1

R1(S0):192.168.2.1 255.255.255.0 R1(S1):192.168.3.1 255.255.255.0 R2(S0): 192.168.2.2 255.255.255.0 R3(S1):192.168.3.3 255.255.255.0

R2(f0/0):192.168.1.1 255.255.255.0 R3(f0/0):192.168.4.1 255.255.255.0 PC2:192.168.1.2 255.255.255.0 192.168.1.1

PC3:192.168.4.2 255.255.255.0 192.168.4.1

具体配置如下

Press Enter to Start

Router>

Router>

Router>en

Router#conf t

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

Router(config)#hostname R1

R1(config)#int s0

R1(config-if)#ip addr 192.168.2.1 255.255.255.0

R1(config-if)#no shut

%LINK-3-UPDOWN: Interface Serial0, changed state to up

%LINK-3-UPDOWN: Interface Serial0, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down

R1(config-if)#clock rate 64000

R1(config-if)#exit

R1(config)#int s1

R1(config-if)#ip addr 192.168.3.1 255.255.255.0

R1(config-if)#no shut

%LINK-3-UPDOWN: Interface Serial1, changed state to up

%LINK-3-UPDOWN: Interface Serial1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed state to down

R1(config-if)#clock rate 125000

R1(config-if)#exit

R1(config)#

%LINK-3-UPDOWN: Interface Serial0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up

%LINK-3-UPDOWN: Interface Serial1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1, changed state to up

R1(config)#

R1(config)#router ospf 100

R1(config-router)#network 192.168.2.0 0.0.0.255 area 0

R1(config-router)#network 192.168.3.0 0.0.0.255 area 0

R1(config-router)#end

R1#wr

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

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, * - candidate default

U - per-user static route

Gateway of last resort is not set

C 192.168.2.0/24 is directly connected, Serial0

C 192.168.3.0/24 is directly connected, Serial1

R1#

Press Enter to Start

Router>

Router>en

Router#conf t

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

Router(config)#hostname R2

R2(config)#int s0

R2(config-if)#ip addr 192.168.2.2 255.255.255.0

R2(config-if)#no shut

%LINK-3-UPDOWN: Interface Serial0, changed state to up

R2(config-if)#exit

R2(config)#int f0/0

R2(config-if)#ip addr 192.168.1.1 255.255.255.0

R2(config-if)#no shut

%LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up

R2(config-if)#exit

R2(config)#

R2(config)#router ospf 100

R2(config-router)#192.168.1.0 0.0.0.255 area 0

相关文档
最新文档