思科路由器配置ospf汇总和缺省路由发布

 

 

 

R4:
enable
config t
hostname R4
int s1/1
ip add 192.168.45.1 255.255.255.0
no shutdown
exit
int lo1
ip add 192.168.4.33 255.255.255.224
no shutdown
exit
int lo2
ip add 192.168.4.65 255.255.255.224
no shutdown
exit
int lo3
ip add 192.168.4.97 255.255.255.224
no shutdown
exit
router rip
version 2
no auto-summary
network 192.168.45.0
network 192.168.4.32
network 192.168.4.64
network 192.168.4.96
end

R5:
enable
config t
hostname R5
int s1/0
ip add 192.168.45.2 255.255.255.0
no shutdown
exit
int s1/1
ip add 192.168.56.1 255.255.255.0
no shutdown
exit
int fa0/0
ip add 192.168.5.1 255.255.255.0
no shutdown
exit
router ospf 100
network 192.168.5.0 0.0.0.255 area 0
network 192.168.56.0 0.0.0.255 area 0
summary-address 192.168.4.0 255.255.255.0
default-information originate always
redistribute rip subnets
exit
ip route 0.0.0.0 0.0.0.0 fa0/0
router rip
version 2
network 192.168.45.0
redistribute ospf 100 metric 10
end

R6:
enable
config t
hostname R6
int s1/0
ip add 192.168.56.2 255.255.255.0
no shutdown
exit
int s1/2
ip add 192.168.67.1 255.255.255.0
no shutdown
exit
router ospf 100
network 192.168.56.0 0.0.0.255 area 0
network 192.168.67.0 0.0.0.255 area 1
area 1 range 192.168.7.0 255.255.255.0
end

R7:
enable
config t
hostname R7
int s1/5
ip add 192.168.67.2 255.255.255.0
no shutdown
exit
int lo1
ip add 192.168.7.33 255.255.255.224
no shutdown
exit
int lo2
ip add 192.168.7.65 255.255.255.224
no shutdown
exit
int lo3
ip add 192.168.7.97 255.255.255.224
no shutdown
exit
router ospf 100
network 192.168.67.0 0.0.0.255 area 1
network 192.168.7.32 0.0.0.31 area 1
network 192.168.7.64 0.0.0.31 area 1
network 192.168.7.96 0.0.0.31 area 1
end

 

 

你可能感兴趣的:(路由器,休闲,思科,ospf,思科路由器)