发新话题
打印

OSPF stub area

本主题由 网络小菜鸟 于 2008-12-21 00:52 移动

OSPF stub area

注:  R1~R2~R3~R4
             |
            R5

R1:

hostname R1
!
!
ip subnet-zero
!
!
no ip domain-lookup

interface Loopback0
ip address 172.16.1.1 255.255.255.0
ip ospf network point-to-point
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/1
ip address 172.16.255.1 255.255.255.252
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
log-adjacency-changes
area 1 stub no-summary
network 172.16.1.0 0.0.0.255 area 1
network 172.16.255.1 0.0.0.0 area 1
!
ip classless
ip http server
!
!
line con 0
exec-timeout 0 0
line aux 0
line vty 0 4
!
end




R2:

hostname R2
!
!
ip subnet-zero
!
!
no ip domain-lookup
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip address 172.16.255.2 255.255.255.252
serial restart-delay 0
!
interface Serial1/1
ip address 172.16.255.5 255.255.255.252
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
log-adjacency-changes
area 1 stub
network 172.16.255.2 0.0.0.0 area 1
network 172.16.255.5 0.0.0.0 area 0
!
ip classless
ip http server
!
!
line con 0
exec-timeout 0 0
line aux 0
line vty 0 4
!
end


R3:

hostname R3
!
!
ip subnet-zero
!
!
no ip domain-lookup
!
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
!
interface Serial1/0
ip address 172.16.255.6 255.255.255.252
serial restart-delay 0
!
interface Serial1/1
ip address 172.16.255.9 255.255.255.252
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
log-adjacency-changes
redistribute rip metric 200 subnets
network 172.16.255.6 0.0.0.0 area 0
network 172.16.255.9 0.0.0.0 area 0
!
router rip
redistribute ospf 1 metric 10
network 192.168.1.0
!
ip classless
ip http server
!
!
line con 0
exec-timeout 0 0
line aux 0
line vty 0 4
!
end


R4:

hostname R4
!
!
ip subnet-zero
!
!
no ip domain-lookup

interface Loopback0
ip address 172.16.2.1 255.255.255.0
ip ospf network point-to-point
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip address 172.16.255.10 255.255.255.252
serial restart-delay 0
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router ospf 1
log-adjacency-changes
network 172.16.2.1 0.0.0.0 area 0
network 172.16.2.0 0.0.0.255 area 2
network 172.16.255.10 0.0.0.0 area 0
!
ip classless
ip http server
!
!
line con 0
line aux 0
line vty 0 4
!
end



R5:
hostname R5
!
!
ip subnet-zero
!
!
no ip domain-lookup
!
interface Loopback0
ip address 10.1.1.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.1.2 255.255.255.0
duplex auto
speed auto
!
interface Serial1/0
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/1
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router rip
network 10.0.0.0
network 192.168.1.0
!
ip classless
ip http server
!
!
line con 0
exec-timeout 0 0
line aux 0
line vty 0 4
!
end

TOP

说明:R5连在R3上面呀,粘过来时出错了呀,不好意思!!!

TOP

发新话题
版块跳转