Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Several methods of solving irregular regions of OSPF by eNSP and vlink-peer

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Because I just learned the OSPF routing protocol, the following are only the results of personal experiments, and there may be inaccuracies, please criticize and correct them. Thank you.

Solve the irregular area of OSPF

1. Two-way redistribution of multiple processes

2. Tunnel Tunnel

3 、 virtual-link

1. Two-way redistribution of multiple processes:

Topology:

There are two OSPF processes on R3. When R3 redistributes multiple processes in both directions, you can see that both routes can be learned.

Key configurations:

[R1] dis cur

#

Sysname R1

#

Router id 91.1.1.1

#

Interface Serial0/0/0

Link-protocol ppp

Ip address 12.1.1.1 255.255.255.0

#

Interface LoopBack0

Ip address 1.1.1.1 255.255.255.0

#

Ospf 10

Area 0.0.0.0

Network 1.1.1.1 0.0.0.0

Network 12.1.1.1 0.0.0.0

#

[R2] dis cur

#

Sysname R2

#

Router id 92.2.2.2

#

Interface Serial0/0/0

Link-protocol ppp

Ip address 12.1.1.2 255.255.255.0

#

Interface Serial0/0/1

Link-protocol ppp

Ip address 23.1.1.2 255.255.255.0

#

Interface LoopBack0

Ip address 2.2.2.2 255.255.255.0

#

Ospf 10

Area 0.0.0.0

Network 2.2.2.2 0.0.0.0

Network 12.1.1.2 0.0.0.0

Area 0.0.0.1

Network 23.1.1.2 0.0.0.0

#

[R3] dis cur

#

Sysname R3

#

Router id 93.3.3.3

#

Interface Serial0/0/0

Link-protocol ppp

Ip address 34.1.1.3 255.255.255.0

#

Interface Serial0/0/1

Link-protocol ppp

Ip address 23.1.1.3 255.255.255.0

#

Interface LoopBack0

Ip address 3.3.3.3 255.255.255.0

#

Ospf 10

Import-route ospf 100

Area 0.0.0.1

Network 3.3.3.3 0.0.0.0

Network 23.1.1.3 0.0.0.0

#

Ospf 100

Import-route ospf 10

Area 0.0.0.0

Network 34.1.1.3 0.0.0.0

#

[R4] dis cur

#

Sysname R4

#

Router id 94.4.4.4

#

Interface Serial0/0/0

Link-protocol ppp

Ip address 34.1.1.4 255.255.255.0

#

Interface LoopBack0

Ip address 4.4.4.4 255.255.255.0

#

Ospf 100

Area 0.0.0.0

Network 4.4.4.4 0.0.0.0

Network 34.1.1.4 0.0.0.0

#

In this way, the ospf on both sides can learn the routing of each other, but learn that it is an external route of the LSA5 class, and provide additional LSA4 classes:

[R4] dis ip rou p os

Route Flags: r-relay, D-downloadto fib

Public routing table: OSPF

Destinations: 5 Routes: 5

OSPF routing table status:

Destinations: 5 Routes: 5

Destination/Mask Proto Pre Cost Flags NextHop Interface

1.1.1.1/32 O_ASE 150 1 D 34.1.1.3 Serial0/0/0

2.2.2.2/32 O_ASE 150 1 D 34.1.1.3 Serial0/0/0

3.3.3.0/24 O_ASE 150 1 D 34.1.1.3 Serial0/0/0

12.1.1.0/24 O_ASE 150 1 D 34.1.1.3 Serial0/0/0

23.1.1.0/24 O_ASE 150 1 D 34.1.1.3 Serial0/0/0

2. Tunnel Tunnel

Topology:

Tunnel does it on R2 and R3, announces tunnel to Area0, and makes Area2 seem to hang on the backbone area.

Key configurations:

[R2] dis cur

#

Sysname R2

#

Router id 92.2.2.2

#

Interface Serial0/0/0

Link-protocol ppp

Ip address 12.1.1.2 255.255.255.0

#

Interface Serial0/0/1

Link-protocol ppp

Ip address 23.1.1.2 255.255.255.0

#

Interface LoopBack0

Ip address 2.2.2.2 255.255.255.0

#

Interface Tunnel0/0/0

Ip address 100.1.1.2 255.255.255.0

Tunnel-protocol gre

Source 23.1.1.2

Destination 23.1.1.3

#

Ospf 10

Area 0.0.0.0

Network 2.2.2.2 0.0.0.0

Network 12.1.1.2 0.0.0.0

Network 100.1.1.2 0.0.0.0

Area 0.0.0.1

Network 23.1.1.2 0.0.0.0

#

[R3] dis cur

#

Sysname R3

#

Router id 93.3.3.3

#

Interface Serial0/0/0

Link-protocol ppp

Ip address 34.1.1.3 255.255.255.0

#

Interface LoopBack0

Ip address 3.3.3.3 255.255.255.0

#

Interface Tunnel0/0/0

Ip address 100.1.1.3 255.255.255.0

Tunnel-protocol gre

Source 23.1.1.3

Destination 23.1.1.2

#

Ospf 10

Import-route ospf 100 cost 2 type 1 tag 100

Area 0.0.0.0

Network 100.1.1.3 0.0.0.0

Area 0.0.0.1

Network 3.3.3.3 0.0.0.0

Network 23.1.1.3 0.0.0.0

Area 0.0.0.2

Network 34.1.1.3 0.0.0.0

#

This is a very strange question, on R1:

[R1] dis ospf abr-asbr

OSPF Process 10 with Router ID91.1.1.1

Routing Table to ABR and ASBR

RtType Destination Area Cost Nexthop Type

Intra-area 92.2.2.2 0.0.0.0 1562 12.1.1.2 ABR

Intra-area 93.3.3.3 0.0.0.0 3124 12.1.1.2 ABR/ASBR

[R1] dis ospf asbr

OSPF Process 10 with Router ID91.1.1.1

[R1] dis ospf lsdb

OSPF Process 10 with Router ID91.1.1.1

Link State Database

Area: 0.0.0.0

Type LinkState ID AdvRouter Age Len Sequence Metric

Router 92.2.2.2 92.2.2.2 1562 84 80000003 1562

Router 91.1.1.1 91.1.1.1 1563 60 80000002 0

Router 93.3.3.3 93.3.3.3 1563 48 80000002 1562

Sum-Net 23.1.1.0 92.2.2.2 1573 28 80000001 1562

Sum-Net 23.1.1.0 93.3.3.3 1572 28 80000001 1562

Sum-Net 3.3.3.3 92.2.2.2 1563 28 80000001 1562

Sum-Net 3.3.3.3 93.3.3.3 1572 28 80000001 0

Sum-Net 4.4.4.4 93.3.3.3 1563 28 80000001 1562

Sum-Net 34.1.1.0 93.3.3.3 1572 28 80000001 1562

Sum-Asbr 93.3.3.3 92.2.2.2 1563 28 80000001 1562

R2 unexpectedly announced that R3 was ASBR and generated a LSA4.

[R1] dis ospf lsdb asbr

OSPF Process 10 with Router ID91.1.1.1

Area: 0.0.0.0

Link State Database

Type: Sum-Asbr

Ls id: 93.3.3.3

Adv rtr: 92.2.2.2

Ls age: 1648

Len: 28

Options: E

Seq#: 80000001

Chksum: 0xe65

Tos 0 metric: 1562

The same goes for restarting the OSPF process. In other words, on a Huawei router, LSA4 can be generated without LSA5. Later, after practicing the following vlink-peer, I came back to do this exercise and found that it was normal again. There was no LSA4 on R1, only LSA3 routing. This may be due to the fact that the cache was not completely cleared at that time.

Using the tunnel method, we can see that the Area2 routes received on R1 exist in the form of a LSA3 class, which is better than the first two-way multi-process redistribution.

3. Virtual-link professional tools

Topology:

Vlink's method still needs to deliver hello messages on the actual link, but because multicast cannot exceed one hop, unicast messages

Configure vlink on R2 and R3, key configurations:

[R2] dis cur config ospf

#

Ospf 10

Area 0.0.0.0

Network 2.2.2.2 0.0.0.0

Network 12.1.1.2 0.0.0.0

Area 0.0.0.1

Network 23.1.1.2 0.0.0.0

Vlink-peer 93.3.3.3

#

[R3] dis cur config ospf

#

Ospf 10

Area 0.0.0.1

Network 3.3.3.3 0.0.0.0

Network 23.1.1.3 0.0.0.0

Vlink-peer 92.2.2.2

Area 0.0.0.2

Network 34.1.1.3 0.0.0.0

#

See

[R1] dis ospf lsdb summary 4.4.4.4

OSPF Process 10 with Router ID91.1.1.1

Area: 0.0.0.0

Link State Database

Type: Sum-Net

Ls id: 4.4.4.4

Adv rtr: 93.3.3.3

Ls age: 510

Len: 28

Options: E

Seq#: 80000003

Chksum: 0x6262

Net mask: 255.255.255.255

Tos 0 metric: 1562

Priority: Medium

[R1] dis ip rou

Route Flags: r-relay, D-downloadto fib

Routing Tables: Public

Destinations: 12 Routes: 12

Destination/Mask Proto Pre Cost Flags NextHop Interface

1.1.1.0/24 Direct 0 0 D 1.1.1.1 LoopBack0

1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0

2.2.2.2/32 OSPF 10 1562 D 12.1.1.2 Serial0/0/0

3.3.3.3/32 OSPF 10 3124 D 12.1.1.2 Serial0/0/0

4.4.4.4/32 OSPF 10 4686 D 12.1.1.2 Serial0/0/0

12.1.1.0/24 Direct 0 0 D 12.1.1.1 Serial0/0/0

12.1.1.1/32 Direct 0 0 D 127.0.0.1 Serial0/0/0

12.1.1.2/32 Direct 0 0 D 12.1.1.2 Serial0/0/0

23.1.1.0/24 OSPF 10 3124 D 12.1.1.2 Serial0/0/0

34.1.1.0/24 OSPF 10 4686 D 12.1.1.2 Serial0/0/0

127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0

127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0

Comparing tunnel and vlink-peer, it is found that both of them are LSA3-like routes, and both are P2P links.

Vlink is still a P2P type:

[R2] dis ospf vlink

OSPF Process 10 with Router ID92.2.2.2

Virtual Links

Virtual-link Neighbor-id-> 93.3.3.3, Neighbor-State: Full

Interface: 23.1.1.2 (Serial0/0/1)

Cost: 1562 State: Pmur2murp Type: Virtual

Transit Area: 0.0.0.1

Timers: Hello 10, Dead 40, Retransmit 5, Transmit Delay 1

Tunnel is also a P2P type:

[R3] dis ospf int all

OSPF Process 10 with Router ID93.3.3.3

Interfaces

Area: 0.0.0.0 (MPLS TE not enabled)

Interface: 100.1.1.3 (Tunnel0/0/0)-- > 100.1.1.2

Cost: 1562 State: Pmur2murp Type: P2P MTU: 1500

Timers: Hello 10, Dead 40, Poll 120, Retransmit 5, Transmit Delay 1

The two are actually very similar.

Exams with vlink often say that you want to do regional authentication on Area0, so please complete the vlink certification. This problem is very simple on Huawei router, as long as you do the same authentication after vlink-peer.

Fill in irregular areas:

The gluttonous snake of vlink-peer

Topology:

Key configurations:

Focus on configuring vlink on Area1 and Area2

[R1] dis cur

#

Sysname R1

#

Router id 91.1.1.1

#

Interface Serial0/0/0

Link-protocol ppp

Ip address 12.1.1.1 255.255.255.0

#

Interface LoopBack0

Ip address 1.1.1.1 255.255.255.0

#

Ospf 10

Area 0.0.0.0

Network 1.1.1.1 0.0.0.0

Network 12.1.1.1 0.0.0.0

#

[R2] dis cur

#

Sysname R2

#

Router id 92.2.2.2

#

Interface Serial0/0/0

Link-protocol ppp

Ip address 12.1.1.2 255.255.255.0

#

Interface Serial0/0/1

Link-protocol ppp

Ip address 23.1.1.2 255.255.255.0

#

Interface LoopBack0

Ip address 2.2.2.2 255.255.255.0

#

Ospf 10

Area 0.0.0.0

Network 2.2.2.2 0.0.0.0

Network 12.1.1.2 0.0.0.0

Area 0.0.0.1

Network 23.1.1.2 0.0.0.0

Vlink-peer 93.3.3.3

#

[R3] dis cur

#

Sysname R3

#

Router id 93.3.3.3

#

Interface Serial0/0/0

Link-protocol ppp

Ip address 34.1.1.3 255.255.255.0

#

Interface Serial0/0/1

Link-protocol ppp

Ip address 23.1.1.3 255.255.255.0

#

Interface LoopBack0

Ip address 3.3.3.3 255.255.255.0

#

Ospf 10

Area 0.0.0.1

Network 3.3.3.3 0.0.0.0

Network 23.1.1.3 0.0.0.0

Vlink-peer 92.2.2.2

Area 0.0.0.2

Network 34.1.1.3 0.0.0.0

Vlink-peer 94.4.4.4

#

[R4] dis cur

#

Sysname R4

#

Router id 94.4.4.4

#

Interface Serial0/0/0

Link-protocol ppp

Ip address 34.1.1.4 255.255.255.0

#

Interface Serial0/0/1

Link-protocol ppp

Ip address 45.1.1.4 255.255.255.0

#

Interface LoopBack0

Ip address 4.4.4.4 255.255.255.0

#

Ospf 10

Area 0.0.0.2

Network 4.4.4.4 0.0.0.0

Network 34.1.1.4 0.0.0.0

Vlink-peer 93.3.3.3

Area 0.0.0.3

Network 45.1.1.4 0.0.0.0

#

[R5] dis cur

#

Sysname R5

#

Router id 95.5.5.5

#

Interface Serial0/0/1

Link-protocol ppp

Ip address 45.1.1.5 255.255.255.0

#

Interface LoopBack0

Ip address 5.5.5.5 255.255.255.0

#

Ospf 10

Area 0.0.0.3

Network 5.5.5.5 0.0.0.0

Network 45.1.1.5 0.0.0.0

#

Vlink-peer Snake II

Topology:

To do vlink on Area 1, Area 2, Area 3, the key configurations are:

[R1] dis cur

#

Sysname R1

#

Router id 91.1.1.1

#

Interface Serial0/0/0

Link-protocol ppp

Ip address 12.1.1.1 255.255.255.0

#

Interface Serial0/0/1

Link-protocol ppp

Ip address 13.1.1.1 255.255.255.0

#

Interface LoopBack0

Ip address 1.1.1.1 255.255.255.0

#

Ospf 10

Area 0.0.0.0

Network 1.1.1.1 0.0.0.0

Network 13.1.1.1 0.0.0.0

Area 0.0.0.1

Network 12.1.1.1 0.0.0.0

Vlink-peer 92.2.2.2

#

[R2] dis cur

#

Sysname R2

#

Router id 92.2.2.2

#

Interface Serial0/0/0

Link-protocol ppp

Ip address 12.1.1.2 255.255.255.0

#

Interface Serial0/0/1

Link-protocol ppp

Ip address 24.1.1.2 255.255.255.0

#

Interface LoopBack0

Ip address 2.2.2.2 255.255.255.0

#

Ospf 10

Area 0.0.0.1

Network 2.2.2.2 0.0.0.0

Network 12.1.1.2 0.0.0.0

Vlink-peer 91.1.1.1

Area 0.0.0.3

Network 24.1.1.2 0.0.0.0

Vlink-peer 94.4.4.4

#

[R3] dis cur

#

Sysname R3

#

Router id 93.3.3.3

#

Interface Serial0/0/0

Link-protocol ppp

Ip address 34.1.1.3 255.255.255.0

#

Interface Serial0/0/1

Link-protocol ppp

Ip address 13.1.1.3 255.255.255.0

#

Interface LoopBack0

Ip address 3.3.3.3 255.255.255.0

#

Ospf 10

Area 0.0.0.0

Network 13.1.1.3 0.0.0.0

Area 0.0.0.2

Network 34.1.1.3 0.0.0.0

Network 3.3.3.3 0.0.0.0

Vlink-peer 94.4.4.4

#

[R4] dis cur

#

Sysname R4

#

Router id 94.4.4.4

#

Interface Serial0/0/0

Link-protocol ppp

Ip address 34.1.1.4 255.255.255.0

#

Interface Serial0/0/1

Link-protocol ppp

Ip address 24.1.1.4 255.255.255.0

#

Interface LoopBack0

Ip address 4.4.4.4 255.255.255.0

#

Ospf 10

Area 0.0.0.2

Network 34.1.1.4 0.0.0.0

Vlink-peer 93.3.3.3

Area 0.0.0.3

Network 4.4.4.4 0.0.0.0

Network 24.1.1.4 0.0.0.0

Vlink-peer 92.2.2.2

#

Here is the problem of LSA3 routing:

[R4] dis ip routing-table

Route Flags: r-relay, D-downloadto fib

Routing Tables: Public

Destinations: 15 Routes: 15

Destination/Mask Proto Pre Cost Flags NextHop Interface

1.1.1.1/32 OSPF 10 3124 D 24.1.1.2 Serial0/0/1

2.2.2.2/32 OSPF 10 1562 D 24.1.1.2 Serial0/0/1

3.3.3.3/32 OSPF 10 1562 D 34.1.1.3 Serial0/0/0

4.4.4.0/24 Direct 0 0 D 4.4.4.4 LoopBack0

The following is a brief introduction.

It should be said that the route of R4 for 1.1.1.1Accord 32 is received from R2 and R3, and there are two routes for load balancing, but there is only one.

The real situation is as follows:

[R4] dis ospf lsdb

OSPF Process 10 with Router ID 94.4.4.4

Link State Database

Area: 0.0.0.0

Slightly

Area: 0.0.0.2

Type LinkState ID AdvRouter Age Len Sequence Metric

Sum-Net 1.1.1.1 94.4.4.4 940 28 80000002 3124

Sum-Net 1.1.1.1 93.3.3.3 1275 28 80000001 1562

Area: 0.0.0.3

Type LinkState ID AdvRouter Age Len Sequence Metric

Sum-Net 1.1.1.1 92.2.2.2 960 28 80000002 1562

As you can see, R4 received two routes from Area 2, and one from Area 3 about 1.1.1.1 LSA 32 host routes. because the same LSA in Area 2 compares metric, and the last two routes are Area 2 and Area 3 routes, their metric is the same, but they are in different Area areas. because OSPF stipulates such an equal cost route to compare the Area area number, which is the most important one. So ospf puts the 1.1.1.1 route of 92.2.2.2 in the routing table (area zero exception, because area zero is the smallest)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report