Get the App
SLTechnology News&Howtos  ›  Network Security  › 

47. MED routing for BGP configuration experiment

Shulou Source: shulou.com Published: 2022-06-01 03:14:02 11月11日 Update

1. As-path routing analysis

Attribute

Spread range

Default value

Priority value direction

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

Local preferenceAS Internal 100th: border router, advertised to IBGP neighbors, telling how to leave this AS large value priority OUT

No short priority IN and OUT between As pathAS

Internal 0 of MEDAS: notify EBGP to tell you how to enter this AS small priority OUT

How to modify the MED value:

2. Experimental topology

3. 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

Network 4.4.4.0 mask 255.255.255.0

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

4. Default routing

According to Article 10 of the BGP routing principle, R3 reaches 4.4.4.0 and 24 goes through R1 by default.

5. Modify the MED value to allow R3 to access 4.4.4.0Universe 24 from R2.

R1 configuration

Ip prefix-list 1 seq 5 permit 4.4.4.0/24

Route-map MED permit 10

Match ip address prefix-list 1

Set metric 10

Route-map MED permit 20

Router bgp 4

Neighbor 13.1.1.3 route-map MED out

Tags: Configuration routing routers advertisements labs between principles fundamentals remarks properties topology direction methods time scope boundaries neighbors propagation private Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Apple Shulou Technology MySQL Redmi