蓝色动力网络

 找回密码
 立即注册

扫一扫,访问微社区

QQ登录

只需一步,快速开始

查看: 2333|回复: 0

思科OSPF配置+拓扑图

[复制链接]
发表于 2011-5-15 13:28:21 | 显示全部楼层 |阅读模式
注明: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.0R3(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 configurationcommands, one per line. End with CNTL/Z.
Router(config)#hostnameR1
R1(config)#int s0
R1(config-if)#ip addr192.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-UPDOWNine protocol on Interface Serial0, changed state to down
R1(config-if)#clockrate 64000
R1(config-if)#exit
R1(config)#int s1
R1(config-if)#ip addr192.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)#clockrate 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)#routerospf 100
R1(config-router)#network192.168.2.0 0.0.0.255 area 0
R1(config-router)#network192.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 lastresort 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 configurationcommands, one per line. End with CNTL/Z.
Router(config)#hostnameR2
R2(config)#int s0
R2(config-if)#ip addr192.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 addr192.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)#routerospf 100
R2(config-router)#192.168.1.00.0.0.255 area 0
% Invalid inputdetected at '^' marker.
R2(config-router)#network192.168.1.0 0.0.0.255 area 0
R2(config-router)#network192.168.2.0 0.0.0.255 area 0
R2(config-router)#end
R2#wr
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
E1 - OSPF external type 1, E2 - OSPFexternal 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 lastresort is not set
C      192.168.2.0/24 is directly connected,Serial0
C      192.168.1.0/24 is directly connected, FastEthernet0/0
R2#
Press Enter to Start
Router>
Router>en
Router#conf
Configuring fromterminal, memory, or network [terminal]?
Enter configurationcommands, one per line. End with CNTL/Z.
Router(config)#hostnameR3
R3(config)#int s1
R3(config-if)#ip addr192.168.3.3 255.255.255.0
R3(config-if)#no shut
%LINK-3-UPDOWN:Interface Serial1, changed state to up
R3(config-if)#exit
R3(config)#int f0/0
R3(config-if)#ip addr192.168.4.1 255.255.255.0
R3(config-if)#no shut
%LINK-3-UPDOWN:Interface FastEthernet0/0, changed state to up
R3(config-if)#exit
R3(config)#
R3(config)#routerospf 100
R3(config-router)#network192.168.3.0 0.0.0.255 area 0
R3(config-router)#network192.168.4.0 0.0.0.255 area 0
R3(config-router)#end
R3#wr
R3#

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

蓝色动力网络微信平台
网站管理,业务合作联系邮箱: admin#lansedongli.com    QQ:13412492 限网站业务问题.
网站帐号、密码、密保找回请使用注册邮箱,发送邮件至 password#lansedongli.com ,否则不予受理.
免责声明:本论坛所有文字和图片仅代表其个人观点.
本站某些资料或文章来自于互联网,不代表本站观点,如果侵犯了您的权益,请来信告知,我们会在三天内删除.
为了给大家一个更好的交流场所,请勿在本论坛发表与中华人民共和国法律相抵触的言论,请合作,谢谢!
Copyright © 2007-2019 Corporation Powered by网吧系统 版权所有    转载请注明!
浙ICP备11043737号-1 程序:Discuz! x3.4

湘公网安备 43018102000145号

手机版|Archiver|蓝色动力网络   

快速回复 返回顶部 返回列表