注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 IB客座主编(四)美国西蒙公..
 帮助

OSPF 三种验证


2007-02-13 22:49:29
 标签:ospf   [推送到技术圈]

版权声明:原创作品,如需转载,请与作者联系。否则将追究法律责任。

 

r1 配置

router>en
router#conf t
router(config)#host r1
r1(config)#no ip domain-lookup
r1(config)#ena sec 123
r1(config)#ban mot #Welcome to r1#
r1(config)#line vty 0 4
r1(config-line)#no login
r1(config-line)#int f 0/0
r1(config-if)#des link to r2
r1(config-if)#ip add 192.168.2.2 255.255.255.0
r1(config-if)#no shut
r1(config-if)#router ospf 1
r1(config-route)#network 192.168.2.0 0.0.0.255 area 1
r1(config-route)#end
r1#

r2 配置

router>en
router#conf t
router(config)#host r2
r2(config)#no ip domain-lookup
r2(config)#ena sec 123
r2(config)#ban mot #Welcome to r2#
r2(config)#line vty 0 4
r2(config-line)#no login
r2(config-line)#int f 0/0
r2(config-if)#des link to r1
r2(config-if)#ip add 192.168.2.1 255.255.255.0
r2(config-if)#no shut
r2(config-if)#int f 1/0
r2(config-if)#des link to r2
r2(config-if)#ip add 192.168.1.1 255.255.255.0
r2(config-if)#no shut
r2(config-if)#ip ospf authentication-key cisco
r2(config-if)#router ospf 1
r2(config-route)#network 192.168.2.0 0.0.0.255 area 1
r2(config-route)#network 192.168.1.0 0.0.0.255 area 0
r2(config-route)#area 0 authentication
r2(config-route)#end
r2#

r3 配置

router>en
router#conf t
router(config)#host r3
r3(config)#no ip domain-lookup
r3(config)#ena sec 123
r3(config)#ban mot #Welcome to r3#
r3(config)#line vty 0 4
r3(config-line)#no login
r3(config-line)#int f 0/0
r3(config-if)#des link to r2
r3(config-if)#ip add 192.168.1.2 255.255.255.0
r3(config-if)#no shut
r3(config-if)#ip ospf authentication-key cisco
r3(config-if)#int f 1/0
r3(config-if)#des link to r4
r3(config-if)#ip add 192.168.3.1 255.255.255.0
r3(config-if)#no shut
r3(config-if)#ip ospf message-digest-key 1 md5 cisco
r3(config-if)#router ospf 1
r3(config-route)#network 192.168.3.0 0.0.0.255 area 1
r3(config-route)#network 192.168.1.0 0.0.0.255 area 0
r3(config-route)#area 0 authentication
r3(config-route)#area 1 authentication message-digest
r3(config-route)#end
r3#

r4 配置


router>en
router#conf t
router(config)#host r4
r4(config)#no ip domain-lookup
r4(config)#ena sec 123
r4(config)#ban mot #Welcome to r4#
r4(config)#line vty 0 4
r4(config-line)#no login
r4(config-line)#int f 0/0
r4(config-if)#des link to r3
r4(config-if)#ip add 192.168.3.2 255.255.255.0
r4(config-if)#no shut
r4(config-if)#ip ospf message-digest-key 1 md5 cisco
r4(config-if)#router ospf 1
r4(config-route)#network 192.168.3.0 0.0.0.255 area 1
r4(config-route)#area 1 authentication message-digest
r4(config-route)#end
r4#

Welcome to r1
r1>en
Password:
r1#show run
Building configuration...

Current configuration : 666 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r1
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$A5SM$LZon8nI8u3ck9aQvPLjxH0
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 description link to r2
 ip address 192.168.2.2 255.255.255.0
 duplex half
!
router ospf 1
 log-adjacency-changes
 network 192.168.2.0 0.0.0.255 area 1
!
ip classless
no ip http server
!
!
!
!
!
!
!
!
!
gatekeeper
 shutdown
!
banner motd ^CWelcome to r1^C
!
line con 0
 stopbits 1
line aux 0
line vty 0 4
 no login
!
!
end

r1#192.168.1.1
Trying 192.168.1.1 ... Open
Welcome to r3
r2>en
Password:
r2#show run
Building configuration...

Current configuration : 864 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r2
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$qP1k$hGD7VD/cTZXIxk80aiY5z.
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 description link to r1
 ip address 192.168.2.1 255.255.255.0
 duplex half
!
interface FastEthernet1/0
 description link to r3
 ip address 192.168.1.1 255.255.255.0
 ip ospf authentication-key cisco
 duplex half
!
router ospf 1
 log-adjacency-changes
 area 0 authentication
 network 192.168.1.0 0.0.0.255 area 0
 network 192.168.2.0 0.0.0.255 area 1
!
ip classless
no ip http server
!
!
!
!
!
!
!
!
!
gatekeeper
 shutdown
!
banner motd ^CWelcome to r3^C
!
line con 0
 stopbits 1
line aux 0
line vty 0 4
 no login
!
!
end

r2#192.168.1.2
Trying 192.168.1.2 ... Open
Welcome to r3
r3>en
Password:
r3#show run
Building configuration...

Current configuration : 942 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r3
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$84v4$RpUXvOjdzrPxj/Fsgn7rp/
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 description link to r2
 ip address 192.168.1.2 255.255.255.0
 ip ospf authentication-key cisco
 duplex half
!
interface FastEthernet1/0
 description link to r4
 ip address 192.168.3.1 255.255.255.0
 ip ospf message-digest-key 1 md5 cisco
 duplex half
!
router ospf 1
 log-adjacency-changes
 area 0 authentication
 area 1 authentication message-digest
 network 192.168.1.0 0.0.0.255 area 0
 network 192.168.3.0 0.0.0.255 area 1
!
ip classless
no ip http server
!
!
!
!
!
!
!
!
!
gatekeeper
 shutdown
!
banner motd ^CWelcome to r3^C
!
line con 0
 stopbits 1
line aux 0
line vty 0 4
 no login
!
!
end

r3#192.168.3.2
Trying 192.168.3.2 ... Open
Welcome to r4
r4>en
Password:
r4#show run
Building configuration...

Current configuration : 744 bytes
!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname r4
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$6d6X$ALOzvpetaB2YeXZZGEVhr1
!
no aaa new-model
ip subnet-zero
!
!
no ip domain lookup
!
ip cef
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 description link to r3
 ip address 192.168.3.2 255.255.255.0
 ip ospf message-digest-key 1 md5 cisco
 duplex half
!
router ospf 1
 log-adjacency-changes
 area 1 authentication message-digest
 network 192.168.3.0 0.0.0.255 area 1
!
ip classless
no ip http server
!
!
!
!
!
!
!
!
!
gatekeeper
 shutdown
!
banner motd ^CWelcome to r4^C
!
line con 0
 stopbits 1
line aux 0
line vty 0 4
 no login
!
!
end

r4#

本文出自 “人类一思考,上帝都发笑” 博客,转载请与作者联系!



上一篇 BGP 权重  下一篇 static nat



    文章评论
 
 

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: