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 Weight routing in BGP configuration

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

Share

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

Today, I will talk to you about the example analysis of Weight routing in BGP configuration, which may not be well understood by many people. in order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.

1. BGP recognized attributes that must be followed: as-path, next-hop, origin

Origin: I represents the route issued by IBGP through the network command

E indicates the route reissued by EGP

? Indicates a redistribution or static route from IGP

2. Routing basis when there is a multi-hop optimal route in BGP.

3. Analysis of Weight routing

Attribute

Spread range

Default value

Application direction of priority value

Note: weight this router this router is 32768, other routers 0 large value priority INCISCO private

How to modify the weight value:

Method 1: all modify the weight value of the route passed by the neighbor, for example:

Router bgp 4

Neighbor 1.1.1.1 weight 1

Method 2: partially modify the weight value of the route passed by the neighbor, for example:

Ip prefix-list 1 permit 33.33.33.0/24

Route-map W permit 10

Match ip address prefix-list 1

Set weight 1

Route-map W permit 20

Router bgp 4

Neighbor 1.1.1.1 route-map W in

4. Experimental topology

5. Basic configuration

R1 configuration

Interface Loopback0

Ip address 1.1.1.1 255.255.255.0

Interface Serial0/0

Ip address 13.1.1.1 255.255.255.0

Interface Serial0/1

Ip address 14.1.1.1 255.255.255.0

Router ospf 110

Router-id 1.1.1.1

Log-adjacency-changes

Network 1.1.1.0 0.0.0.255 area 0

Network 14.1.1.0 0.0.0.255 area 0

Router bgp 4

No synchronization

Bgp router-id 1.1.1.1

Neighbor 4.4.4.4 remote-as 4

Neighbor 4.4.4.4 update-source Loopback0

Neighbor 4.4.4.4 next-hop-self

Neighbor 13.1.1.3 remote-as 3

No auto-summary

R2 configuration

Interface Loopback0

Ip address 2.2.2.2 255.255.255.0

Interface Serial0/1

Ip address 23.1.1.2 255.255.255.0

Interface FastEthernet1/0

Ip address 24.1.1.2 255.255.255.0

Router ospf 110

Router-id 2.2.2.2

Network 2.2.2.0 0.0.0.255 area 0

Network 24.1.1.0 0.0.0.255 area 0

Router bgp 4

No synchronization

Bgp router-id 2.2.2.2

Neighbor 4.4.4.4 remote-as 4

Neighbor 4.4.4.4 update-source Loopback0

Neighbor 4.4.4.4 next-hop-self

Neighbor 23.1.1.3 remote-as 3

No auto-summary

R3 configuration

Interface Loopback0

Ip address 3.3.3.3 255.255.255.0

Interface Loopback1

Ip address 33.33.33.33 255.255.255.0

Interface Serial0/0

Ip address 13.1.1.3 255.255.255.0

Interface Serial0/1

Ip address 23.1.1.3 255.255.255.0router bgp 3

No synchronization

Bgp router-id 3.3.3.3

Network 3.3.3.0 mask 255.255.255.0

Network 33.33.33.0 mask 255.255.255.0

Neighbor 13.1.1.1 remote-as 4

Neighbor 23.1.1.2 remote-as 4

No auto-summary

R4 configuration

Interface Loopback0

Ip address 4.4.4.4 255.255.255.0

Interface Serial0/1

Ip address 14.1.1.4 255.255.255.0

Interface FastEthernet1/0

Ip address 24.1.1.4 255.255.255.0

Router ospf 110

Router-id 4.4.4.4

Network 4.4.4.0 0.0.0.255 area 0

Network 14.1.1.0 0.0.0.255 area 0

Network 24.1.1.0 0.0.0.255 area 0

Router bgp 4

No synchronization

Bgp router-id 4.4.4.4

Neighbor 1.1.1.1 remote-as 4

Neighbor 1.1.1.1 update-source Loopback0

Neighbor 2.2.2.2 remote-as 4

Neighbor 2.2.2.2 update-source Loopback0

No auto-summary

6. Default routing

According to the eighth rule of BGP routing principle, R4 reaches 3.3.3.0 pick 24 and 33.33.33 pick 24 all pass through R2.

7. Modify all the weight values of routes passed by neighbors

From the front can R4 to 3.3.3.0ax 24 and 33.33.33.0ax 24 all pass through R2, we change the Weight value to reach R4 to 3.3.3.0Universe 24 and 33.33.33.0Uniple 24 all pass through R1.

R4 configuration

Router bgp 4

Neighbor 1.1.1.1 weight 1

8. Partially modify the weight value of the route passed by the neighbor

R4 to 3.3.3.0Compact 24 and 33.33.330Universe 24 are all through R2. We change the Weight value to reach R4 to 3.3.3.0Compact 24 through R2 and 33.33.33.0Universe 24 through R1.

R4 configuration

Ip prefix-list 1 seq 5 permit 33.33.33.0/24

Route-map W permit 10

Match ip address prefix-list 1

Set weight 1

Route-map W permit 20

Router bgp 4

Neighbor 1.1.1.1 route-map W in

After reading the above, do you have any further understanding of the example analysis of Weight routing in BGP configuration? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

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