본문 바로가기
network/ccie-bgp

Route-maps are very complex access-lists

Route-maps are very complex access-lists

• Access-lists have lines.
􀃐 Route-maps contain statements.

• Access-lists use addresses and masks.
􀃐 Route-maps use match conditions.

• With access-lists, there is an access-list number.
􀃐 With route-maps, there is a route-map name.

• Statements in route-maps are numbered.
– You can insert and delete statements in a route-map.
– You can edit match conditions in a statement.
• Route-map statements can modify matched routes with “set”  options.

 

- route-map 기본 설정 config 


• The default statement action is “permit.”=> 기본 action 은 permit 
• A route not matched by any statement is dropped.=> match 되지 않는 경우는 drop처리 된다.

• Route-maps can match 
– Network number and subnet mask matched with an IP prefix-list
– Route originator
– BGP next-hop address
– BGP origin
– Tag attached to IGP route
– AS-path
– BGP community attached to BGP route
– IGP route type (internal/external …)

• Route-maps can set:
– Origin
– BGP next-hop
– Weight
– BGP community
– Local preference
– MED

BGP Route-Map Policy List Support
- policy list 를 이용 하여 미리 만들어놓은 정책을 route-map 에 적용 가능 하다.-> route-map 의 간편화
-> reconfig 필요 없음

## bgp policy list 생성(생성후 해당 프로세스에서 match ,set 정책을 적용 한다)
router#ip policy-list policy-list-name {permit | deny}

##  route-map 에서 해당 policy list 적용
router#match policy-list policy-list-name

## policy list 를 보여 준다.
router#show ip policy-list policy-list-name


BGP Route-Map Continue

- route-filtering 시 more proframmable 의 의미로 go to 개념과 유사 함
- route-map 사용시 추가적인 실행을 위해 사용 됨
- 단점은 seq 는 위로 올라 갈수 없고 , 밑으로 내려 갈 수 만 있다.
- 만약 continue 가 없으면 set이 된후 해당 route-map 프로세스가 빠져나가지만 
, 설정시 추가적인 필터링을 더  진행 한다.-> 추가적인 route-map 사용 

## 해당 seq으로 보낸다.
router# continue sequence-number

## route-map 을 확인 하여 설정을 확인 할 수 있다.
router# show route-map [map-name]



Prefix-List Use in Route-Maps

## 아이피에 대한 match 
router(config -route-map)#match ip address prefix-list list-name

## next-hop에 대한 match 
router(config -route-map)#match ip next-hop prefix-list list-name

## bgp peer 에 대한 match
router(config -route-map)#match ip route-source prefix-list list-name



Using Route-Maps as BGP Filters

router(config-router)#neighbor ip-address route-map name [in | out]


- 아래 그림은 def only prefix 에 경우 as-path가 387에서 보낸 route 에 대하여 weight 값을 150을 주며
그렇지 않은 prefix 를 100을 주어 해당 회선을 primary,backup 으로 구성 할 수 있다.
 

 

 


- 만약 해당 필터링이 없을 경우 origin code i 인 462 path 가 primary 가 되지만 수정후 변경 된 것 을 확인 할 수 있다.


- update debug를 통해서 필터링 되는 내용을 확인 할 수 있다.
반응형

'network > ccie-bgp' 카테고리의 다른 글

Influencing BGP Route Selection with Weights  (0) 2016.03.06
Implementing Changes in BGP Policy  (0) 2016.03.05
Filtering with Prefix-Lists  (0) 2016.03.05
Employing AS-Path Filters  (0) 2016.03.05
Using Multihomed BGP Networks  (0) 2016.03.05