Jump to content
Калькуляторы

Первое знакомство с OSPF

Первое знакомство с OSPF и сразу грабли.

 

 

 

R1

interface Loopback1
ip address 192.168.0.1 255.255.255.255


interface GigabitEthernet0/2.16
encapsulation dot1Q 16
ip address 172.16.16.1 255.255.255.0

router ospf 1
network 172.16.16.0 0.0.0.255 area 0
network 192.168.0.0 0.0.0.0 area 0

 

 

 

R2

interface Loopback1
ip address 192.168.0.2 255.255.255.255


interface GigabitEthernet0/0.16
encapsulation dot1Q 16
ip address 172.16.16.2 255.255.255.0


router ospf 1
network 172.16.16.0 0.0.0.255 area 0
network 192.168.0.0 0.0.0.0 area 0

 

 

R1

show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.0.2       1   FULL/DR         00:00:39    172.16.16.2    GigabitEthernet0/1.16



show ip ospf database

           OSPF Router with ID (192.168.0.1) (Process ID 1)

               Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
192.168.0.1     192.168.0.1     1227        0x8000000A 0x00B9D5 1
192.168.0.2     192.168.0.2     1228        0x8000000D 0x00B1D7 1

               Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
172.16.16.2    192.168.0.2     1228        0x80000001 0x00B7DD

 

 

 

R2

 

show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
192.168.0.1       1   FULL/DR         00:00:39    172.16.16.1    GigabitEthernet0/1.16



R2
#show ip ospf database

           OSPF Router with ID (192.168.0.2) (Process ID 1)

Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
192.168.0.1     192.168.0.1     930         0x8000000A 0x00B9D5 1
192.168.0.2     192.168.0.2     929         0x8000000D 0x00B1D7 1

               Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
172.16.16.2    192.168.0.2     929         0x80000001 0x00B7DD

 

 

 

Но при попытке пропинговать с R1 адрес 192.168.0.2 в ответ вижу, что он не доступен? ну и в обратную с R2 192.168.0.1 такая же ситуация.

А почему?

Edited by RN3DCX

Share this post


Link to post
Share on other sites

R1

 

router ospf 1

network 172.16.16.0 0.0.0.255 area 0

network 192.168.0.1 0.0.0.0 area 0

 

 

R2

router ospf 1

network 172.16.16.0 0.0.0.255 area 0

network 192.168.0.2 0.0.0.0 area 0

 

 

 

Исправил, но чудо не случилось (((

 

или маску сменить

 

Если речь про лупбек, то все маны с такой маской.

Т.к. по стандарту /32

Share this post


Link to post
Share on other sites

R1

#sh ip route

Gateway of last resort is 85.X.X.4 to network 0.0.0.0   (На R1 поднят BGP)

     172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C        172.16.16.0/24 is directly connected, GigabitEthernet0/1.16
L        172.16.16.1/32 is directly connected, GigabitEthernet0/1.16
     85.X.0.0/16 is variably subnetted, 136 subnets, 6 masks
C        85.X.X.4/30 is directly connected, GigabitEthernet0/0
L        85.X.X.6/32 is directly connected, GigabitEthernet0/0
     192.168.0.0/32 is subnetted, 1 subnets
C        192.168.0.1 is directly connected, Loopback1

 

 

R2

#sh ip route

 

Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C        172.16.16.0/24 is directly connected, GigabitEthernet0/0.16
L        172.16.16.2/32 is directly connected, GigabitEthernet0/0.16
     192.168.0.0/32 is subnetted, 1 subnets
C        192.168.0.2 is directly connected, Loopback1

Share this post


Link to post
Share on other sites

R1

#sh ip ospf

 Routing Process "ospf 1" with ID 192.168.0.1
Start time: 00:01:14.356, Time elapsed: 00:57:11.940
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
Supports NSSA (compatible with RFC 1587)
Event-log enabled, Maximum number of events: 1000, Mode: cyclic
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Incremental-SPF disabled
Minimum LSA interval 5 secs
Minimum LSA arrival 1000 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 0. Checksum Sum 0x000000
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Number of areas transit capable is 0
External flood list length 0
IETF NSF helper support enabled
Cisco NSF helper support enabled
Reference bandwidth unit is 100 mbps
   Area BACKBONE(0) (Inactive)
       Number of interfaces in this area is 1 (1 loopback)
       Area has no authentication
       SPF algorithm last executed 00:57:01.332 ago
       SPF algorithm executed 1 times
       Area ranges are
       Number of LSA 1. Checksum Sum 0x00BF32
       Number of opaque link LSA 0. Checksum Sum 0x000000
       Number of DCbitless LSA 0
       Number of indication LSA 0
       Number of DoNotAge LSA 0

 

 

 

R2

#sh ip ospf

 Routing Process "ospf 1" with ID 192.168.0.2
Start time: 00:00:20.216, Time elapsed: 00:57:33.516
Supports only single TOS(TOS0) routes
Supports opaque LSA
Supports Link-local Signaling (LLS)
Supports area transit capability
Supports NSSA (compatible with RFC 3101)
Event-log enabled, Maximum number of events: 1000, Mode: cyclic
Router is not originating router-LSAs with maximum metric
Initial SPF schedule delay 5000 msecs
Minimum hold time between two consecutive SPFs 10000 msecs
Maximum wait time between two consecutive SPFs 10000 msecs
Incremental-SPF disabled
Minimum LSA interval 5 secs
Minimum LSA arrival 1000 msecs
LSA group pacing timer 240 secs
Interface flood pacing timer 33 msecs
Retransmission pacing timer 66 msecs
Number of external LSA 0. Checksum Sum 0x000000
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
Number of DoNotAge external and opaque AS LSA 0
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Number of areas transit capable is 0
External flood list length 0
IETF NSF helper support enabled
Cisco NSF helper support enabled
Reference bandwidth unit is 100 mbps
   Area BACKBONE(0) (Inactive)
       Number of interfaces in this area is 2 (1 loopback)
       Area has no authentication
       SPF algorithm last executed 00:57:26.452 ago
       SPF algorithm executed 1 times
       Area ranges are
       Number of LSA 1. Checksum Sum 0x00D8A2
       Number of opaque link LSA 0. Checksum Sum 0x000000
       Number of DCbitless LSA 0
       Number of indication LSA 0
       Number of DoNotAge LSA 0
       Flood list length 0

Share this post


Link to post
Share on other sites

У вас ОСПФ не поднялся. (Area BACKBONE(0) (Inactive))

Что за эрия такая - 0? Почему не 0.0.0.0 ?

Это ИОС так позволяет писать?

 

Рабочий пример:

router ospf 65045
router-id 172.23.0.253
passive-interface default
no passive-interface FastEthernet0/1.3882
no passive-interface Loopback3
network 172.23.0.32 0.0.0.3 area 0.0.0.0
network 172.23.0.253 0.0.0.0 area 0.0.0.0

Share this post


Link to post
Share on other sites

Ну тогда по пунктам опишу свои действия.

 

Чистый IOS. За исключением поднятой BGP сесии.

 

1. шаг

 

R1

interface Loopback1
ip address 192.168.0.1 255.255.255.255

interface GigabitEthernet0/2.16
encapsulation dot1Q 16
ip address 172.16.16.1 255.255.255.0


R2 

interface Loopback1
ip address 192.168.0.2 255.255.255.255

interface GigabitEthernet0/0.16
encapsulation dot1Q 16
ip address 172.16.16.2 255.255.255.0

 

 

 

 

2. шаг

 

R1

router ospf 1
network 172.16.16.0 0.0.0.255 area 0
network 192.168.0.1 0.0.0.0 area 0


R2
router ospf 1
network 172.16.16.0 0.0.0.255 area 0
network 192.168.0.2 0.0.0.0 area 0

 

 

На этом настройки были окончены.

Мож чё еще нужно указать?

 

 

 

 

Что за эрия такая - 0? Почему не 0.0.0.0 ?

Это ИОС так позволяет писать?

 

Так во многих манах написано.

Ну я и без задних мыслей копипаст.

 

Да, IOS принял area 0 без вопросов.

Edited by RN3DCX

Share this post


Link to post
Share on other sites

Есть еще мысль про:

R1 (Supports NSSA (compatible with RFC 1587)

R2 (Supports NSSA (compatible with RFC 3101)

 

http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_ospf/command/iro-cr-book/ospf-a1.html#wp8723318460

Share this post


Link to post
Share on other sites

В первом посте оспф работал, но были неправильно указаны нетворки лупбеков.

Чуть позже пропало соседство.

В последнем посте вообще конфликт ип.

 

Шоу ип оспф неи

Еще раз шоу ран инты и шоу ран оспф с реальных роутеров

Share this post


Link to post
Share on other sites

Если речь про лупбек, то все маны с такой маской.

Т.к. по стандарту /32

 

Нет никакого "стандарта" на лупбеки.

При маске /32 номер сети совпадает с адресом интерфейса. Т.е. если на интерфейсе адрес 192.168.0.1/32, то и network 192.168.0.1 0.0.0.0.

Share this post


Link to post
Share on other sites

Мистика....

1. Вообщем удалил существующие OSPF настройки на обоих маршрутизаторах.

2. Перезагрузил маршрутизаторы.

3. Создал заново OSPF на каждом маршрутизаторе.

И всё ок!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.