Network Next Hop Metric LocPrf Weight Path
*>i 2.2.2.0/24 1.1.13.1 0 400 0 100 i
* 1.1.24.2 0 0 100 i
Network Next Hop Metric LocPrf Weight Path
*>i 2.2.2.0/24 1.1.13.1 0 400 0 100 i
* 1.1.24.2 0 0 100 i
Weight
Network Next Hop Metric LocPrf Weight Path
* 55.0.0.0/24 1.1.23.2 0 0 200 i
*> 1.1.13.1 0 0 100 i
neighbor 1.1.23.2 weight 5000
Network Next Hop Metric LocPrf Weight Path
*> 55.0.0.0/24 1.1.23.2 0 5000 200 i
* 1.1.13.1 0 0 100 i
Local Preference
R3#sh ip bgp
Network Next Hop Metric LocPrf Weight Path
* i 2.2.2.0/24 1.1.24.2 0 100 0 100 i
*> 1.1.13.1 0 100 i
R3에서 2.2.2.0/24에 대해 LP=400으로 변경 후 R3의 아래 상태
R3#sh ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 2.2.2.0/24 1.1.13.1 0 100 i
R3#sh ip bgp 2.2.2.0
BGP routing table entry for 2.2.2.0/24, version 9
Paths: (2 available, best #2, table default)
Advertised to update-groups:
1
Refresh Epoch 3
100
1.1.24.2 (metric 2) from 4.4.4.4 (4.4.4.4)
Origin IGP, metric 0, localpref 100, valid, internal
rx pathid: 0, tx pathid: 0
Refresh Epoch 3
100
1.1.13.1 from 1.1.13.1 (1.1.1.1)
Origin IGP, localpref 100, valid, external, best
rx pathid: 0, tx pathid: 0x0
R3에서 LP 적용 후 아래 상태
R3#sh ip bgp 2.2.2.0
BGP routing table entry for 2.2.2.0/24, version 9
Paths: (1 available, best #1, table default)
Advertised to update-groups:
1
Refresh Epoch 4
100
1.1.13.1 from 1.1.13.1 (1.1.1.1)
Origin IGP, localpref 400, valid, external, best
rx pathid: 0, tx pathid: 0x0
R4#sh ip bgp
Network Next Hop Metric LocPrf Weight Path
* i 2.2.2.0/24 1.1.13.1 0 100 0 100 i
*> 1.1.24.2 0 0 100 i
R4#sh ip bgp
Network Next Hop Metric LocPrf Weight Path
*>i 2.2.2.0/24 1.1.13.1 0 400 0 100 i
* 1.1.24.2 0 0 100 i
Weight
Network Next Hop Metric LocPrf Weight Path
* 55.0.0.0/24 1.1.23.3 0 0 300 i
*> 1.1.24.4 0 0 300 i
Network Next Hop Metric LocPrf Weight Path
*> 55.0.0.0/24 1.1.23.3 0 0 300 i
* 1.1.24.4 0 0 300 300 i
router bgp 300
neighbor 1.1.24.2 route-map RM_AS out
route-map RM_AS permit 10
set as-path prepend 300
MED
R1#sh ip bgp
Network Next Hop Metric LocPrf Weight Path
* 55.0.0.0/24 1.1.13.3 0 0 200 i
*> 1.1.12.2 0 0 200 i
R1#sh ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 55.0.0.0/24 1.1.13.3 0 0 200 i
* 1.1.12.2 200 0 200 i
router bgp 200
neighbor 1.1.12.1 route-map MED out
route-map MED permit 10
set metric 200
Local Originated
Network Next Hop Metric LocPrf Weight Path
*> 55.5.5.5/32 0.0.0.0 0 32768 i
* 1.1.12.2 0 0 2 i
network 1.1.1.1 mask ... 명령으로 BGP에 직접 경로를 "광고"하면
그 경로는 로컬 기원(local originated route) 으로 간주되어
BGP 테이블에서 Next Hop = 0.0.0.0, Weight = 32768 이 됩니다.
✅ 이유 1: Next Hop = 0.0.0.0
- network 명령은 BGP가 “내가 직접 이 네트워크를 가지고 있다”고 선언하는 방식입니다.
- 즉, 이 네트워크는 외부 피어로부터 배운 게 아니라, 로컬 라우팅 테이블(RIB) 에서 확인된 경로를 기반으로 BGP에 등록된 것입니다.
- 외부에서 배운 경로가 아니므로, BGP가 참조할 Next Hop 정보가 존재하지 않습니다.
- 그래서 Cisco는 이 경우 “나 자신이 출발지” 라는 의미로 Next Hop = 0.0.0.0 으로 표기합니다.
✅ 이유 2: Weight = 32768
- Cisco IOS에서 Weight는 BGP 경로 선택 시 가장 먼저 비교되는 로컬 전용 속성입니다.
- 경로 기원(origin)에 따라 Weight의 기본값이 다릅니다.
경로의 출처기본 Weight
| network 명령으로 광고된 로컬 경로 | 32768 |
| redistribute 명령으로 들어온 로컬 경로 | 32768 |
| 외부 BGP(eBGP) 피어로부터 배운 경로 | 0 |
| 내부 BGP(iBGP) 피어로부터 배운 경로 | 0 |
즉, 내가 직접 생성한 경로(local originated) 는 Weight 32768을 자동으로 부여받아
다른 피어에서 배운 경로보다 항상 우선합니다.
✅ 전체 요약
항목값이유
| Next Hop | 0.0.0.0 | 로컬에서 기원한 경로로, 외부 Next Hop이 없음 |
| Weight | 32768 | 로컬 기원 경로는 기본적으로 가장 우선하도록 설정됨 |
| Origin code | i (IGP) | network 명령으로 기원된 경로는 IGP 타입으로 표시됨 |
| Local Pref | 100 | 기본 로컬 프리퍼런스 값 |
AS-Paht