1. higher Local Preference
R3, R4에 local-preference 값을 100, 200으로 설정 한 뒤, R2에서 bgp best 경로를 확인해 보면,
A:R3>config>router# show router policy "upper" entry 10 from protocol static tag 100 exit to protocol bgp exit action accept origin igp local-preference 100 next-hop 30.1.1.1 exit exit |
*A:R4>config>router# show router policy "upper" entry 10 from protocol static tag 100 exit to protocol bgp exit action accept origin igp local-preference 200 next-hop 30.1.1.2 exit exit |
2기준에서 R3보다 R4의 경로가 우선시 되어야 한다.
R2에서 확인해보면,
*A:R2>config>router# show router bgp routes 20.1.11.0/24 =============================================================================== BGP Router ID:2.2.2.2 AS:4766 Local AS:4766 =============================================================================== Legend - Status codes : u - used, s - suppressed, h - history, d - decayed, * - valid l - leaked, x - stale, > - best, b - backup, p - purge Origin codes : i - IGP, e - EGP, ? - incomplete
=============================================================================== BGP IPv4 Routes =============================================================================== Flag Network LocalPref MED Nexthop (Router) Path-Id Label As-Path ------------------------------------------------------------------------------- u*>i 20.1.11.0/24 200 None 30.1.1.2 None - No As-Path *i 20.1.11.0/24 100 None 30.1.1.1 None - No As-Path ------------------------------------------------------------------------------- Routes : 2 |
bgp의 경로가 local-preference의 값이 높은 R4쪽의 경로를 우선하는 것을 확인할 수 있으며,
TieBreakReason : LocalPref을 보아 R3으로의 경로는 local-preference 값이 낮은 것을 확인할 수 있다.
*A:R2>config>router# show router bgp routes 20.1.11.0/24 detail =============================================================================== BGP Router ID:2.2.2.2 AS:4766 Local AS:4766 =============================================================================== Legend - Status codes : u - used, s - suppressed, h - history, d - decayed, * - valid l - leaked, x - stale, > - best, b - backup, p - purge Origin codes : i - IGP, e - EGP, ? - incomplete
=============================================================================== BGP IPv4 Routes =============================================================================== Original Attributes
Network : 20.1.11.0/24 Nexthop : 30.1.1.2 Path Id : None From : 4.4.4.4 Res. Nexthop : 10.1.12.2 Local Pref. : 200 Interface Name : Te1/1/1 Aggregator AS : None Aggregator : None Atomic Aggr. : Not Atomic MED : None AIGP Metric : None Connector : None Community : No Community Members Cluster : No Cluster Members Originator Id : None Peer Router Id : 4.4.4.4 Fwd Class : None Priority : None Flags : Used Valid Best IGP Route Source : Internal AS-Path : No As-Path Route Tag : 0 Neighbor-AS : N/A Orig Validation: NotFound Source Class : 0 Dest Class : 0 Add Paths Send : Default Last Modified : 00h03m33s
Modified Attributes
Network : 20.1.11.0/24 Nexthop : 30.1.1.2 Path Id : None From : 4.4.4.4 Res. Nexthop : 10.1.12.2 Local Pref. : 200 Interface Name : Te1/1/1 Aggregator AS : None Aggregator : None Atomic Aggr. : Not Atomic MED : None AIGP Metric : None Connector : None Community : No Community Members Cluster : No Cluster Members Originator Id : None Peer Router Id : 4.4.4.4 Fwd Class : None Priority : None Flags : Used Valid Best IGP Route Source : Internal AS-Path : No As-Path Route Tag : 0 Neighbor-AS : N/A Orig Validation: NotFound Source Class : 0 Dest Class : 0 Add Paths Send : Default Last Modified : 00h03m36s
------------------------------------------------------------------------------- Original Attributes
Network : 20.1.11.0/24 Nexthop : 30.1.1.1 Path Id : None From : 3.3.3.3 Res. Nexthop : 10.1.12.2 Local Pref. : 100 Interface Name : Te1/1/1 Aggregator AS : None Aggregator : None Atomic Aggr. : Not Atomic MED : None AIGP Metric : None Connector : None Community : No Community Members Cluster : No Cluster Members Originator Id : None Peer Router Id : 3.3.3.3 Fwd Class : None Priority : None Flags : Valid IGP TieBreakReason : LocalPref Route Source : Internal AS-Path : No As-Path Route Tag : 0 Neighbor-AS : N/A Orig Validation: NotFound Source Class : 0 Dest Class : 0 Add Paths Send : Default Last Modified : 00h04m28s
Modified Attributes
Network : 20.1.11.0/24 Nexthop : 30.1.1.1 Path Id : None From : 3.3.3.3 Res. Nexthop : 10.1.12.2 Local Pref. : 100 Interface Name : Te1/1/1 Aggregator AS : None Aggregator : None Atomic Aggr. : Not Atomic MED : None AIGP Metric : None Connector : None Community : No Community Members Cluster : No Cluster Members Originator Id : None Peer Router Id : 3.3.3.3 Fwd Class : None Priority : None Flags : Valid IGP TieBreakReason : LocalPref Route Source : Internal AS-Path : No As-Path Route Tag : 0 Neighbor-AS : N/A Orig Validation: NotFound Source Class : 0 Dest Class : 0 Add Paths Send : Default Last Modified : 00h04m28s
------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Routes : 2 |
'Network' 카테고리의 다른 글
[BGP] best path selection_3 (0) | 2020.12.06 |
---|---|
[BGP] best path selection_2 (0) | 2020.12.06 |
[BGP] best path selection (0) | 2020.12.06 |
[BGP] routing protocol (0) | 2020.12.06 |
[IS-IS] routing protocol (0) | 2020.11.22 |