要求:办公挂了不走生产 走路由器6(公共线路),生产挂了走办公
当生产线路挂了:生产走办公线路 当办公线路挂掉时,走公共线路
R1
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Loopback1
ip address 1.1.1.2 255.255.255.255
interface FastEthernet0/0.1
encapsulation dot1Q 1 native
ip address 14.1.1.1 255.255.255.0
!
interface FastEthernet0/0.2
encapsulation dot1Q 2
ip address 14.2.2.1 255.255.255.0
!
interface FastEthernet1/0.1
encapsulation dot1Q 1 native
ip address 12.1.1.1 255.255.255.0
ip ospf cost 2
!
interface FastEthernet1/0.2
encapsulation dot1Q 2
ip address 12.2.2.1 255.255.255.0
ip ospf cost 2
!
interface Serial3/0
ip address 12.0.0.1 255.255.255.0
serial restart-delay 0
!
interface Serial3/1
ip address 13.0.0.1 255.255.255.0
ip ospf cost 1
serial restart-delay 0
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 1
network 1.1.1.2 0.0.0.0 area 2
network 12.1.1.0 0.0.0.255 area 1
network 12.2.2.0 0.0.0.255 area 2
network 13.0.0.0 0.0.0.255 area 1
network 14.1.1.0 0.0.0.255 area 1
network 14.2.2.0 0.0.0.255 area 2
!
R2
interface Loopback0
ip address 2.2.2.1 255.255.255.255
!
interface Loopback1
ip address 2.2.2.2 255.255.255.255
!
!
interface FastEthernet0/0.1
encapsulation dot1Q 1 native
ip address 23.1.1.1 255.255.255.0
!
interface FastEthernet0/0.2
encapsulation dot1Q 2
ip address 23.2.2.1 255.255.255.0
!
!
interface FastEthernet1/0.1
encapsulation dot1Q 1 native
ip address 12.1.1.2 255.255.255.0
ip ospf cost 2
!
interface FastEthernet1/0.2
encapsulation dot1Q 2
ip address 12.2.2.2 255.255.255.0
ip ospf cost 2
!
!
interface Serial3/0
ip address 12.0.0.2 255.255.255.0
serial restart-delay 0
!
interface Serial3/1
ip address 24.0.0.1 255.255.255.0
ip ospf cost 1
serial restart-delay 0
!
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 2.2.2.1 0.0.0.0 area 1
network 2.2.2.2 0.0.0.0 area 2
network 12.1.1.0 0.0.0.255 area 1
network 12.2.2.0 0.0.0.255 area 2
network 23.1.1.0 0.0.0.255 area 1
network 23.2.2.0 0.0.0.255 area 2
network 24.0.0.0 0.0.0.255 area 2
!
R3
interface FastEthernet0/0.1
encapsulation dot1Q 1 native
ip address 35.1.1.1 255.255.255.0
!
interface FastEthernet0/0.2
encapsulation dot1Q 2
ip address 35.2.2.1 255.255.255.0
ip ospf cost 2
!
interface FastEthernet1/0
ip address 36.0.0.1 255.255.255.0
ip ospf 1 area 2
duplex auto
speed auto
!
interface FastEthernet1/1.1
encapsulation dot1Q 1 native
ip address 23.1.1.2 255.255.255.0
!
interface FastEthernet1/1.2
encapsulation dot1Q 2
ip address 23.2.2.2 255.255.255.0
!
!
interface Serial3/0
ip address 13.0.0.2 255.255.255.0
ip ospf cost 1
serial restart-delay 0
!
interface Serial3/1
ip address 34.0.0.1 255.255.255.0
ip ospf cost 1
serial restart-delay 0
!
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 13.0.0.0 0.0.0.255 area 1
network 23.1.1.0 0.0.0.255 area 1
network 23.2.2.0 0.0.0.255 area 2
network 34.0.0.0 0.0.0.255 area 0
network 35.1.1.0 0.0.0.255 area 1
network 35.2.2.0 0.0.0.255 area 2
!
R4
interface FastEthernet0/0.1
encapsulation dot1Q 1 native
ip address 45.1.1.1 255.255.255.0
ip ospf cost 2
!
interface FastEthernet0/0.2
encapsulation dot1Q 2
ip address 45.2.2.1 255.255.255.0
!
interface FastEthernet1/0
ip address 46.0.0.1 255.255.255.0
ip ospf 1 area 2
duplex auto
speed auto
!
!
interface FastEthernet1/1.1
encapsulation dot1Q 1 native
ip address 14.1.1.2 255.255.255.0
!
interface FastEthernet1/1.2
encapsulation dot1Q 2
ip address 14.2.2.2 255.255.255.0
!
!
interface Serial3/0
ip address 24.0.0.2 255.255.255.0
ip ospf cost 1
serial restart-delay 0
!
interface Serial3/1
ip address 34.0.0.2 255.255.255.0
ip ospf cost 1
serial restart-delay 0
!
router ospf 1
router-id 4.4.4.4
log-adjacency-changes
network 14.1.1.0 0.0.0.255 area 1
network 14.2.2.0 0.0.0.255 area 2
network 24.0.0.0 0.0.0.255 area 2
network 34.0.0.0 0.0.0.255 area 0
network 45.1.1.0 0.0.0.255 area 1
network 45.2.2.0 0.0.0.255 area 2
R5
interface Loopback0
ip address 5.5.5.1 255.255.255.255
!
interface Loopback1
ip address 5.5.5.2 255.255.255.255
!
!
interface FastEthernet0/0.1
encapsulation dot1Q 1 native
ip address 45.1.1.2 255.255.255.0
ip ospf cost 2
!
interface FastEthernet0/0.2
encapsulation dot1Q 2
ip address 45.2.2.2 255.255.255.0
!
!
interface FastEthernet1/0.1
encapsulation dot1Q 1 native
ip address 35.1.1.2 255.255.255.0
!
interface FastEthernet1/0.2
encapsulation dot1Q 2
ip address 35.2.2.2 255.255.255.0
ip ospf cost 65535
!
interface FastEthernet1/1
ip address 56.0.0.1 255.255.255.0
ip ospf 1 area 2
duplex auto
speed auto
!
router ospf 1
router-id 5.5.5.5
log-adjacency-changes
network 5.5.5.1 0.0.0.0 area 1
network 5.5.5.2 0.0.0.0 area 2
network 35.1.1.0 0.0.0.255 area 1
network 35.2.2.0 0.0.0.255 area 2
network 45.1.1.0 0.0.0.255 area 1
network 45.2.2.0 0.0.0.255 area 2
R6
interface FastEthernet0/0
ip address 36.0.0.2 255.255.255.0
ip ospf 1 area 2
duplex half
!
interface FastEthernet1/0
ip address 46.0.0.2 255.255.255.0
ip ospf 1 area 2
duplex auto
speed auto
!
interface FastEthernet1/1
ip address 56.0.0.2 255.255.255.0
ip ospf 1 area 2
duplex auto
speed auto
!
router ospf 1
router-id 6.6.6.6
log-adjacency-changes