ospf 多区域试验脚本

185阅读 0评论2011-12-07 wfeng
分类:系统运维

                                   ospf脚本

-----------------------------------------------------------------------
-----------------------------------------------------------------------
R1的配置


en
conf t
domain loo
line 0
exec-t 0 0
logg s
exit
ho R1
int e0/0
ip add 192.168.1.1 255.255.255.0
no sh
int e0/1
ip add 192.168.6.1 255.255.255.0
no sh
exit
router ospf 1
router-id 1.1.1.1
net 192.168.1.1 0.0.0.0 a 1
area 1 nssa no-su
red rip sub
exit
router rip
defaule-i ori
ver 2
net 192.168.6.1
no au

----------------------------------------------------------------------
----------------------------------------------------------------------
R2上的配置


en
conf t
no ip domain loo
line 0
exec-t 0 0
logg s
exit
ho R2
int e1/0
ip add 192.168.1.2 255.255.255.0
no sh
int s0/0
ip add 192.168.2.1 255.255.255.0
no sh
int e1/1
ip add 192.168.7.1 255.255.255.0
no sh
exit
router ospf 1
router-id 2.2.2.2
net 192.168.1.2 0.0.0.0 a 1
net 192.168.2.1 0.0.0.0 a 0
area 1 nssa no-su
red rip sub
exit
router rip
ver 2
net 192.168.7.1
no au
defaule-i ori

-----------------------------------------------------------------------
R3上的。。。。。。。。。

en
conf t
no ip domain loo
line 0
exec-t 0 0
logg s
exit
ho R3
int e1/0
ip add 192.168.3.1 255.255.255.0
no sh
int s0/0
ip add 192.168.2.2 255.255.255.0
no sh
int e1/1
ip add 192.168.8.1 255.255.255.0
no sh
exit
router ospf 1
router-id 12.12.12.12
net 192.168.3.1 0.0.0.0 a 2
net 192.168.2.2 0.0.0.0 a 0
red rip sub
area 2 vir 13.13.13.13
exit
router rip
ver 2
net 192.168.8.1
no au
red ospf 1
-----------------------------------------------------------------------
R4上的。。。。。。。
----------------------------------------------------------------------

en
conf t
no ip domain loo
line 0
exec-t 0 0
logg s
exit
ho R4
int e0/0
ip add 192.168.3.2 255.255.255.0
no sh
int e0/1
ip add 192.168.4.1 255.255.255.0
no sh
exit
router ospf 1
router-id 13.13.13.13
net 192.168.3.2 0.0.0.0 a 2
net 192.168.4.1 0.0.0.0 a 3
area 3 stub no
area 2 vir 12.12.12.12
-----------------------------------------------------------------------
----------------------------------------------------------------------
R5上的。。。。。。。。

en
conf t
no ip domain loo
line 0
exec-t 0 0
logg s
exit
ho R5
int e0/1
ip add 192.168.4.2 255.255.255.0
no sh
int l1
ip add 5.1.1.1 255.255.255.0
no sh
int l2
ip add 5.1.2.1 255.255.255.0
no sh
int l3
ip add 5.1.3.1 255.255.255.0
no sh
int l4
ip add 5.1.4.1 255.255.255.0
no sh
exit
router ospf 1
net 0.0.0.0 0.0.0.0 a 3
area 3 stub no
-----------------------------------------------------------------------
-----------------------------------------------------------------------
R6上的。。。。。。。。。。

en
conf t
no ip domain loo
line 0
exec-t 0 0
logg s
exit
ho R6
int e0/1
ip add 192.168.6.2 255.255.255.0
no sh
int l1
ip add 6.1.0.1 255.255.255.0
no sh
int l2
ip add 6.1.1.1 255.255.255.0
no sh
int l3
ip add 6.1.2.1 255.255.255.0
no sh
in l4
ip add 6.1.3.1 255.255.255.0
no sh
exit
router rip
net 0.0.0.0
ver 2
no au

----------------------------------------------------------------------
R7上的


en
conf t
no ip domain loo
line 0
exec-t 0 0
logg s
exit
ho R7
int e0/1
ip add 192.168.7.2 255.255.255.0
no sh
int l1
ip add 7.1.4.1 255.255.255.0
no sh
int l2
ip add 7.1.5.1 255.255.255.0
no sh
int l3
ip add 7.1.6.1 255.255.255.0
no sh
int l4
ip add 7.1.7.1 255.255.255.0
no sh
exit
router rip
net 0.0.0.0
ver 2
no au

-----------------------------------------------------------------------
R8上的

en
conf t
no ip domain loo
line 0
exec-t 0 0
logg s
exit
ho R8
int e0/1
ip add 192.168.8.2 255.255.255.0
no sh
int l1
ip add 8.1.8.1 255.255.255.0
no sh
int l2
ip add 8.1.9.1 255.255.255.0
no sh
int l3
ip add 8.1.10.1 255.255.255.0
no sh
int l4
ip add 8.1.11.1 255.255.255.0
no sh
exit
router rip
net 0.0.0.0
ver 2
no au

 


CCIE Security 2009 IOS防火墙合集


上一篇:Cisco IPSec 协商过程
下一篇:CISCO IOS VLAN