BGP 경로결정 우선순위
– 웨이트(weight) 가 가장 큰 경로
– 로컬 프리퍼런스(local preference) 가 가장 큰 경로
– 현재 라우터가 bgp 에 포함시킨 경로(network, redistribute )
로컬 프리퍼런스(local preference)
– 인접 AS 로 나가는 경로 조절시 사용
– iBGP 피어간에만 전달 되며 AS 외부로는 전송되지 않는다.
– 높은값이 우선(0 ~ 4294967295)
웨이트(weight)
– 해당 라우터에서만 의미를 갖는다
– 다른 네이버에게는 전송되지 않는다
– 높은 값이 우선
******************* 로컬 프리퍼런스 ***********************
==R1
interface Loopback0
ip address 1.1.1.1 255.0.0.0
!
interface Serial1/0
ip address 192.168.12.1 255.255.255.
!
interface Serial1/1
ip address 192.168.15.1 255.255.255.
!
router bgp 100
no synchronization
network 1.0.0.0
neighbor 192.168.12.2 remote-as 100
neighbor 192.168.12.2 next-hop-self
neighbor 192.168.15.5 remote-as 500
neighbor 192.168.15.5 route-map setlocal in
!
route-map setlocal permit 10
set local-preference 1000
==R2
interface Serial1/0
ip address 192.168.12.2 255.255.255.0
!
interface Serial1/1
ip address 192.168.23.2 255.255.255.0
!
router bgp 100
no synchronization
network 2.0.0.0
neighbor 192.168.12.1 remote-as 100
neighbor 192.168.23.3 remote-as 300
==R3
interface Serial1/0
ip address 192.168.12.2 255.255.255.0
!
interface Serial1/1
ip address 192.168.23.2 255.255.255.0
!
router bgp 300
no synchronization
neighbor 192.168.23.2 remote-as 100
neighbor 192.168.34.4 remote-as 400
==R4
interface Loopback0
ip address 4.4.4.4 255.0.0.0
!
interface Serial1/2
ip address 192.168.34.4 255.255.255.0
!
interface Serial1/3
ip address 192.168.54.4 255.255.255.0
!
router bgp 400
no synchronization
network 4.0.0.0
neighbor 192.168.34.3 remote-as 300
neighbor 192.168.54.5 remote-as 500
==R5
interface Loopback0
ip address 5.5.5.5 255.0.0.0
!
interface Serial1/1
ip address 192.168.15.5 255.255.255.0
!
interface Serial1/3
ip address 192.168.54.5 255.255.255.0
!
router bgp 500
no synchronization
neighbor 192.168.15.1 remote-as 100
neighbor 192.168.54.4 remote-as 400
[테스트]
R4#debug ip packet
R1->R4 ping 테스트(출발지 1.1.1.1 목적지 4.4.4.4)
R2->R4 ping 테스트(출발지 2.2.2.2 목적지 4.4.4.4)
또는
R1,R2#traceroute 4.4.4.4
******************* weight 경로결정 *************************
== R2
router bgp 100
no synchronization
network 2.0.0.0
neighbor 192.168.12.1 remote-as 100
neighbor 192.168.23.3 remote-as 300
neighbor 192.168.23.3 weight 1000