HCIP之BGP的选路原则

目录

HCIP之BGP的选路原则

实验

R1基本配置

R2基本配置

R3基本配置

R4基本配置

R5基本配置

ospf区域配置

AS1区域配置

AS2区域配置

BGP选路的原则

1.优选PV值最大的路由

修改PV影响选路的配置:

2.优选LP属性值最大的路由

通过修改LP值来影响选路

3.自己始发的路由

4.优选AS_PATH属性最短的路由

AS_PATH属性进行选路时,需要注意的两点:

干涉选路的方法

5.优选起源码属性最优的路由。

控制选路的方法

6.优选MED属性值较小的路由

干涉选路的方法

7.EBGP对等体路由优于IBGP对等体

HCIP之BGP的选路原则

BGP的选路原则 — 前提 — 丢弃所有不可用的路由系信息

实验

HCIP之BGP的选路原则

R1基本配置

[R1]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol
GigabitEthernet0/0/0              12.0.0.1/24          up         up
GigabitEthernet0/0/1              13.0.0.1/24          up         up
GigabitEthernet0/0/2              unassigned           down       down
LoopBack0                         1.1.1.1/24           up         up(s)
NULL0                             unassigned           up         up(s)
[R1]

R2基本配置

[R2]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol
GigabitEthernet0/0/0              12.0.0.2/24          up         up
GigabitEthernet0/0/1              24.0.0.1/24          up         up
GigabitEthernet0/0/2              unassigned           down       down
LoopBack0                         2.2.2.2/24           up         up(s)
NULL0                             unassigned           up         up(s)
[R2]

R3基本配置

[R3]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 4
The number of interface that is DOWN in Physical is 1
The number of interface that is UP in Protocol is 4
The number of interface that is DOWN in Protocol is 1

Interface                         IP Address/Mask      Physical   Protocol
GigabitEthernet0/0/0              13.0.0.2/24          up         up
GigabitEthernet0/0/1              34.0.0.1/24          up         up
GigabitEthernet0/0/2              unassigned           down       down
LoopBack0                         3.3.3.3/24           up         up(s)
NULL0                             unassigned           up         up(s)
[R3]

R4基本配置

[R4]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 5
The number of interface that is DOWN in Physical is 0
The number of interface that is UP in Protocol is 5
The number of interface that is DOWN in Protocol is 0

Interface                         IP Address/Mask      Physical   Protocol
GigabitEthernet0/0/0              24.0.0.2/24          up         up
GigabitEthernet0/0/1              34.0.0.2/24          up         up
GigabitEthernet0/0/2              45.0.0.1/24          up         up
LoopBack0                         4.4.4.4/24           up         up(s)
NULL0                             unassigned           up         up(s)
[R4]\

R5基本配置

[R5]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 3
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 3
The number of interface that is DOWN in Protocol is 2

Interface                         IP Address/Mask      Physical   Protocol
GigabitEthernet0/0/0              45.0.0.2/24          up         up
GigabitEthernet0/0/1              unassigned           down       down
GigabitEthernet0/0/2              unassigned           down       down
LoopBack0                         5.5.5.5/24           up         up(s)
NULL0                             unassigned           up         up(s)
[R5]

ospf区域配置

R2

[R2]display ip routing-table protocol ospf
Route Flags: R - relay, D - download to fib
Public routing table : OSPF
         Destinations : 3        Routes : 3

OSPF routing table status :
         Destinations : 3        Routes : 3

Destination/Mask    Proto   Pre  Cost      Flags NextHop         Interface

        2.2.2.2/32  OSPF    10   2           D   34.0.0.2        GigabitEthernet
0/0/1
        4.4.4.4/32  OSPF    10   1           D   34.0.0.2        GigabitEthernet
0/0/1
       24.0.0.0/24  OSPF    10   2           D   34.0.0.2        GigabitEthernet
0/0/1

OSPF routing table status :
         Destinations : 0        Routes : 0

[R3]

R4

`vbnet
[R4]display ip routing-table protocol ospf
Route Flags: R – relay, D – download to fib

Original: https://blog.csdn.net/qq_57289939/article/details/127820528
Author: White乄joker
Title: HCIP之BGP的选路原则

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/660205/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球