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

Example Analysis of self-made MPLS to solve routing Black Hole

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article shares with you an example analysis of self-made MPLS solution routing black holes. Xiaobian thinks it is quite practical, so share it with you to learn. I hope you can gain something after reading this article. Let's not say much. Let's take a look at it together with Xiaobian.

Using mpls to solve BGP routing black hole configuration command full analysis

--By Jim

What is a BGP routing black hole?

BGP stipulates that no matter whether the router starts bgp or not, it must unconditionally forward BGP messages and update packets (above IGP), which violates the IGP principle of "non-igp routers blocking igp domains," thus causing BGP routers to "ping through entries in the routing table," which is the so-called routing black hole.

This experiment is completed with gns3 simulator 3640 router, the author will configure full copy, readers according to the map to build topology directly after the right click copy command line to complete the experiment.

Experimental topology:

Step 1: Base Configuration

R1:

int e0/1

no shu

ip add 12.12.12.1 255.255.255.0

int loo 0

ip add 1.1.1.1 255.255.255.0

int loo 100

ip add 100.100.100.1 255.255.255.0

router os 1

router-id 1.1.1.1

net 12.12.12.1 255.255.255.0 a 0

net 1.1.1.1 255.255.255.0 a 0

!

!

!

R2:

int e0/1

no shu

ip add 12.12.12.2 255.255.255.0

int e0/2

no shu

ip add 23.23.23.2 255.255.255.0

no shu

int loo 0

ip add 2.2.2.2 255.255.255.0

router os 1

router-id 2.2.2.2

net 12.12.12.2 255.255.255.0 a 0

net 2.2.2.2 255.255.255.0 a 0

net 23.23.23.2 255.255.255.0 a 0

!

!

!

R3:

int e0/1

ip add 23.23.23.3 255.255.255.0

int e0/2

ip add 34.34.34.3 255.255.255.0

int lo 0

ip add 3.3.3.3 255.255.255.0

router os 1

router-id 3.3.3.3

net 23.23.23.3 255.255.255.0 a 0

net 34.34.34.3 255.255.255.0 a 0

net 3.3.3.3 255.255.255.0 a 0

!

!

!

R4

int e0/1

no shu

ip add 34.34.34.4 255.255.255.0

int e0/2

no shu

ip add 45.45.45.4 255.255.255.0

int loo 0

ip add 4.4.4.4 255.255.255.0

ROUTER OS 1

router-id 4.4.4.4

net 34.34.34.4 255.255.255.0 a 0

net 45.45.45.4 255.255.255.0 a 0

net 4.4.4.4 255.255.255.0 a 0

!

!

!

R5

int e0/1

no shu

ip add 45.45.45.5 255.255.255.0

int loo 0

ip add 5.5.5.5 255.255.255.0

int loo 200

ip add 200.200.200.1 255.255.255.0

router os 1

router-id 5.5.5.5

net 45.45.45.5 255.255.255.0 a 0

net 5.5.5.5 255.255.255.0 a 0

!

!

!

!

Step 2: configure bgp

R1

router bgp 12345

no au

no syn

bgp router-id 1.1.1.1

neighbor 5.5.5.5 remote-as 12345

neighbor 5.5.5.5 update-source loo 0

neighbor 5.5.5.5 next-hop-self

net 100.100.100.0 mask 255.255.255.0

!

!

!

R5:

router bgp 12345

no au

no syn

bgp router-id 5.5.5.5

neighbor 1.1.1.1 remote-as 12345

neighbor 1.1.1.1 update-source loopback 0

neighbor 1.1.1.1 next-hop-self

net 200.200.200.0 mask 255.255.255.0

!

!

!

=====================================================================

!

!

!

Step 3: Verification

R1#show ip route bgp

B 200.200.200.0/24 [200/0] via 5.5.5.5, 00:55:29

!

R5#show ip route bgp

100.0.0.0/24 is subnetted, 1 subnets

B 100.100.100.0 [200/0] via 1.1.1.1, 00:57:47

At this point R1 and R5 both learn routes outside the AS through BGP.

But!!!

R1#ping 200.200.200.0

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 200.200.200.0, timeout is 2 seconds:

UUUUU

Success rate is 0 percent (0/5)

!

R1#trace 200.200.200.0

Type escape sequence to abort.

Tracing the route to 200.200.200.0

1 12.12.12.2 36 msec 56 msec 16 msec

2 12.12.12.2 ! H ! H ! H

Similarly, R5 also failed to ping 100.100.100.0, the direct reason is stuck in the first.

Root cause: There is a routing black hole. R2, R3 and R4 do not have any routing entries outside the autonomous system. After receiving this routing packet, they are discarded directly!

Step 4: Configure mpls ldp

R1:

mpls ldp router-id loopback 0

mpls label range 100 199

int e0/1

mpls ip

!

!

!

R2:

mpls ldp router-id loopback 0

mpls label range 200 299

int e0/1

mpls ip

int e0/2

mpls ip

!

!

!

!

R3:

mpls ldp router-id loopback 0

mpls label range 300 399

int e0/1

mpls ip

int e0/2

mpls ip

!

!

!

R4:

mpls ldp router-id loopback 0

mpls label range 400 499

int e0/1

mpls ip

int e0/2

mpls ip

!

!

!

!

R5:

mpls ldp router-id loo 0

mpls label range 500 599

int e0/1

mpls ip

=====================================================================

Step 5: Verification

R1#ping 200.200.200.0

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 200.200.200.0, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 104/128/176 ms

!

!

R1#trace 200.200.200.0

Type escape sequence to abort.

Tracing the route to 200.200.200.0

1 12.12.12.2 [MPLS: Label 204 Exp 0] 120 msec 112 msec 136 msec

2 23.23.23.3 [MPLS: Label 303 Exp 0] 124 msec 120 msec 128 msec

3 34.34.34.4 [MPLS: Label 403 Exp 0] 108 msec 92 msec 112 msec

4 45.45.45.5 124 msec 140 msec 124 msec

Similarly, R5 can ping 100.100.100.0

The above is an example analysis of self-made MPLS to solve routing black holes. Xiaobian believes that some knowledge points may be seen or used in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.

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

Servers

Wechat

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

12
Report