본문 바로가기
network/ccie-bgp

Using BGP Route Dampening

BGP Route Dampening

•  Dampening 은 flap 이 발생 시킬때 history 에 기록 한뒤 해당 기록을 확인 하고 해당 기록이 있는 route에 패널티를 주는 기법
• 불안정한 경로에 대한 라우터의 처리를 줄일 수 있도록 설계 (=>flap 현상에서 사용)
•  flap을 방지 하기 위해 사용 된다.=> flap현상이 없던 route 만 유지 하여 영향을 줄일 수 있다
• RFC2439 에 정의 된 표준이다.
• bgp 업데이트를 최소화 할 수 있도록 설계 되었다.
• flapping route 에 대하여 history 에 있으면 미리 suppressing 하여 미리 예방 한다.
• 이때 가끔 flapping 에 대하여  suppressing 하지 않고 주기적 flapping route 에 대하여만 suppressing 한다.

– Flap = Remove route (route 가 지워 진다)
– Suppress = Do not use a route after it reappears(route 가 bgp table 에 있지만 전파를 시키지 않는다)


Route-Dampening Operation

• EBGP route flaps 발생 할 때 마다 해당 route 에 penalty 1000 점이 추가 된다.(IBGP에서는 적용 되지 않는다.)
• 해당 penalty 는 decay알고리즘에 따라서 점점 감소 한다.
• 특정 suppress limit 이 넘으면 ,Suppress 시키고 전파 하지 않는다.
• dampened route 는 reuse limit 밑으로 내려 가면 다시 전파를 한다.
• maximum suppress limit 넘으면 점수가 추가 되지 않는다.
• Dampening 된 route 는 bgp 테이블에서 확인 된다. 이때 상태는 history 상태(h) 로 변경 되게 된다.)
•  penalty 점수는 bgp 테이블에서 개별 경로에 대하여 모두 적용이 된다.


Configuring BGP Route Dampening

# 설정은 아래와 같이 설정 가능 하다.
router(config-router)# bgp dampening [half-life reuse suppress maxsuppress- time] [route-map map-name]

• BGP dampening parameters:
– half-life Decay time in which the penalty is halved => penalty점수가 절반이 될 시간
– suppress Value when the route starts dampening=> dampening 되는 penalty점수
– reuse Value when the dampened route is reused=> suppress 된뒤 해당 penalty가 되어야 다시 외부로 전파 한다.
– max-suppress-time Maximum time to suppress the route=> 아무리 penalty가 많아도 해당 시간이 되면 초기화 되며 보통 half-life의 4배로 된다.
– route-map Name of route-map controlling dampening => route-map 을 이용하려 세부적인 parameter 를 수정 할 수 있다.


아래 예제는 한번 플래핑이 되면 1000점의 패널티 점수가 되고  half-life15분뒤 1000점의 절반 500 점이 된다.
만약 다시 플리핑이 된다면 decay알고리즘에 따라서 점점 감소 되는 중간에 다시 패널티 점수가 추가 된다. 
이런식으로 상승한 패널티 점수가 suppress 보다 넘으면 dampening되어 외부로 전파 되지 않는다.

또한 한번 suppress 되면 penalty가 reuse 까지 도달 해야지만 다시 외부로 전파 하게 된다.
reuse의 절반 점수가 되면 모든 penalty가 초기화 된다.
한번  flap 되어 패널티가 추가되어 max-suppress-time 60분동안 suppress되면 suppress를 중지 한다.

 

 


## route-map을 이용하여 디테일 한 조절이 가능하다.
router(config-route-map)#set dampening half-life reuse suppress max-suppresstime

##패널티 점수만 초기화 한다.
router#clear ip bgp ip-address flap-statistics [{regexp regexp} |  {filter-list list-name} | {ip-address network-mask}]

## Dampening을 초기화 한다.
router#clear ip bgp dampening [ip-address network-mask]

## Dampening route 를 확인 할 수 있다.
show ip bgp dampened-paths

## Dampening 되는 자세한 정보를 debug 할 수 있다.
debug ip bgp dampening
반응형