Перейти к основному содержимому

Виртуальные Линки

Виртуальные линки используются для подключения временно разобщенной area, не относящейся к магистральной (backbone), к магистральной area, либо для восстановления несмежной магистральной area. В этом примере ABR SW3 временно потерял соединение с areaю 0, что, в свою очередь, отключило area 2 от магистральной area. Виртуальный линк между ABR SW1 и ABR SW2 соединяет area 2 с areaю 0. area 1 используется как транзитная.

Топология

Image

Рисунок 4-65: Топология виртуальных линков

SW1

#configure terminalПерейти в режим конфигурации.
(config)#interface loУказать loopback как интерфейс, который нужно настроить.
(config-if)#ip address 192.168.1.62/32Настроить IP-адрес на этом интерфейсе.
(config-if)#exitВыйти из режима настройки интерфейса.
(config)#router ospf 100Настроить процесс маршрутизации и указать идентификатор процесса (100). Идентификатор процесса должен быть уникальным положительным числом, идентифицирующим процесс маршрутизации.
(config-router)#ospf router-id 192.168.1.62Настроить OSPF Router ID (192.168.1.62) для этого маршрутизатора.
(config-router)#network 10.10.21.0/24 area 0 (config-router)#network 10.10.22.0/24 area 1Определить интерфейсы, на которых работает OSPF, и ассоциировать идентификаторы areas (0 и 1) с интерфейсом.
(config-router)#area 1 virtual-link 192.168.2.63Настроить виртуальный линк между этим маршрутизатором SW1 и SW2 (Router ID 192.168.2.63) через транзитную area 1.

SW2

(config)#interface loУказать loopback как интерфейс, который нужно настроить.
(config-if)#ip address 192.168.2.63/32Настроить IP-адрес на этом интерфейсе.
(config-if)#exitВыйти из режима настройки интерфейса.
(config)#router ospf 100Настроить процесс маршрутизации и указать идентификатор процесса (100). Идентификатор процесса должен быть уникальным положительным числом, идентифицирующим процесс маршрутизации.
(config-router)#ospf router-id 192.168.2.63Настроить OSPF Router ID (192.168.1.63) для этого маршрутизатора.
(config-router)#network 10.10.23.0/24 area 1 (config-router)#network 10.10.24.0/24 area 2 (config-router)#network 192.168.2.63/32 area 2Определить интерфейсы, на которых работает OSPF, и ассоциировать идентификаторы areas (1 и 2) с интерфейсом.
(config-router)#area 1 virtual-link 192.168.1.62Настроить виртуальный линк между этим маршрутизатором SW2 и SW1 (Router ID 192.168.2.62) через транзитную area 1.
Проверка
SW1#show ip ospf virtual-links
Virtual Link VLINK0 to router 2.2.2.2 is up
Transit area 0.0.0.1 via interface eth2
Hello suppression enabled
DoNotAge LSA allowed
Local address 13.13.13.1/32
Remote address 12.12.12.1/32
Transmit Delay is 1 sec, State Point-To-Point,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:05
No authentication
Adjacency state Down
SW2#show ip ospf virtual-links
Virtual Link VLINK0 to router 1.1.1.1 is up
Transit area 0.0.0.1 via interface eth1
Hello suppression enabled
DoNotAge LSA allowed
Local address 12.12.12.1/32
Remote address 13.13.13.1/32
Transmit Delay is 1 sec, State Point-To-Point,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:05
No authentication
Adjacency state Init
SW1#show ip ospf neighbor
Total number of full neighbors: 1 OSPF process 100 VRF(default):
Neighbor ID     Pri   State            Dead Time   Address         Interface           Instance ID
192.168.20.5      1   Full/DR          00:00:34    13.13.13.2      eth2                    0
SW2#show ip ospf neighbor
Total number of full neighbors: 1 OSPF process 100 VRF(default):
Neighbor ID     Pri   State            Dead Time   Address         Interface           Instance ID
192.168.20.5      1   Full/DR          00:00:36    12.12.12.2      eth1                    0
1.1.1.1           1   Init/ -          00:00:32    13.13.13.1      VLINK0
SW1#show ip ospf route
OSPF process 100:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
IA 2.2.2.2/32 [12] via 13.13.13.2, eth2, Area 0.0.0.1
O  12.12.12.0/24 [2] via 13.13.13.2, eth2, Area 0.0.0.1
C  13.13.13.0/24 [1] is directly connected, eth2, Area 0.0.0.1
SW2#show ip ospf route
OSPF process 100:
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
C  2.2.2.2/32 [10] is directly connected, lo, Area 0.0.0.2
C  12.12.12.0/24 [1] is directly connected, eth1, Area 0.0.0.1
O  13.13.13.0/24 [2] via 12.12.12.2, eth1, Area 0.0.0.1
SW1#show ip ospf
Routing Process "ospf 100" with ID 1.1.1.1
Process uptime is 39 minutes
Process bound to VRF default
Conforms to RFC2328, and RFC1583 Compatibility flag is disabled
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Graceful Restart
This router is an ABR, ABR Type is Alternative Cisco (RFC3509)
SPF schedule delay initial 0 secs 500 msecs
SPF schedule delay min 0 secs 500 msecs
SPF schedule delay max 50 secs 0 msecs
Refresh timer 10 secs
Number of incoming current DD exchange neighbors 0/64
Number of outgoing current DD exchange neighbors 0/64
Initial LSA throttle delay 0 secs 0 msecs
Minimum hold time for LSA throttle 5 secs 0 msecs
Maximum wait time for LSA throttle 5 secs 0 msecs
Minimum LSA arrival 1 secs 0 msecs
Number of external LSA 0. Checksum 0x000000
Number of opaque AS LSA 0. Checksum 0x000000
Number of non-default external LSA 0
External LSA database is unlimited.
Number of LSA originated 6
Number of LSA received 15
Number of areas attached to this router: 2
MemPool - struct ospf lsa             : (0-16) | Total (16/100000) blk_size:160
MemPool - struct rxmt                 : | Total (0/0) blk_size:8
Area 0.0.0.0 (BACKBONE)
Number of interfaces in this area is 1(1)
Number of fully adjacent neighbors in this area is 0
Area has no authentication
SPF algorithm last executed 00:10:05.434 ago
SPF algorithm executed 1 times
Number of LSA 3. Checksum 0x01bf9c
Area 0.0.0.1
Number of interfaces in this area is 1(1)
Number of fully adjacent neighbors in this area is 1
Number of fully adjacent virtual neighbors through this area is 0
Area has no authentication
SPF algorithm last executed 00:09:57.432 ago
SPF algorithm executed 7 times
Number of LSA 13. Checksum 0x076e78
Dste Staus: Disabled
SW2#show ip ospf
Routing Process "ospf 100" with ID 2.2.2.2
Process uptime is 16 hours 48 minutes
Process bound to VRF default
Conforms to RFC2328, and RFC1583 Compatibility flag is disabled
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Graceful Restart
This router is an ABR, ABR Type is Alternative Cisco (RFC3509)
SPF schedule delay initial 0 secs 500 msecs
SPF schedule delay min 0 secs 500 msecs
SPF schedule delay max 50 secs 0 msecs
Refresh timer 10 secs
Number of incoming current DD exchange neighbors 0/64
Number of outgoing current DD exchange neighbors 0/64
Initial LSA throttle delay 0 secs 0 msecs
Minimum hold time for LSA throttle 5 secs 0 мсек
Maximum wait time for LSA throttle 5 сек 0 мсек
Minimum LSA arrival 1 сек 0 мсек
Number of external LSA 0. Checksum 0x000000
Number of opaque AS LSA 0. Checksum 0x000000  Number of non-default external LSA 0
External LSA database is unlimited.
Number of LSA originated 11
Number of LSA received 12
Number of areas attached to this router: 3
MemPool - struct ospf lsa             : (0-20) | Total (20/100000) blk_size:160
MemPool - struct rxmt                 : | Total (0/0) blk_size:8
Area 0.0.0.0 (BACKBONE)
Number of interfaces in this area is 1(1)
Number of fully adjacent neighbors in this area is 0
Area has no authentication
SPF algorithm last executed 00:11:05.618 ago
SPF algorithm executed 1 times
Number of LSA 4. Checksum 0x018ce2
Area 0.0.0.1
Number of interfaces in this area is 1(1)
Number of fully adjacent neighbors in this area is 1
Number of fully adjacent virtual neighbors through this area is 0
Area has no authentication
SPF algorithm last executed 00:11:03.619 ago
SPF algorithm executed 6 times
Number of LSA 13. Checksum 0x076e78
Area 0.0.0.2
Number of interfaces in this area is 1(1)
Number of fully adjacent neighbors in this area is 0
Number of fully adjacent virtual neighbors through this area is 0
Area has no authentication
SPF algorithm last executed 00:11:05.618 ago
SPF algorithm executed 3 times
Number of LSA 3. Checksum 0x0139cf
Dste Staus: Disabled