N's Story

BGP Community 이론 및 실습 본문

■ Communications /↘ Cisco GNS

BGP Community 이론 및 실습

AndrewNa 2019. 5. 1. 23:25
728x90
반응형

BGP Community(커뮤니티)

여러 네트워크를 community로 그룹화 하여 속성 값을 변경하거나 전파 범위를 조절하며, 총 32비트로 이루어져 십진수로 표현한다. 범위는 '0~ 4294967295'이나 사용하기 어려워 새로운 포맷형식으로 변경해 사용(총 32비트 4옥텟을 2옥텟:2옥텟 형식으로 사용)한다.

 

 

Topology

 

 

 

Command (기본설정 제외)

// new format

Router(config)#ip bgp-community new-format // 커뮤니티 적용시 새로운 포맷 형식 적용​

 

Router(config-router)#neighbor ip-address send-community

// 사용하지 않는 BGP 피어로 불필요한 커뮤니티 정보 수신 방지

 

// community list

Router(config)#ip community-list community-list-number {permit | deny} community-number​

 

=> R5, R9의 200.1.X.0/24 대역 중

홀수 네트워크는 community를 as번호 100 // 300:100

짝수 네트워크는 community를 as번호 200 // 300:200

으로 지정하는 route-map 생성 후 R5와 R9사이의 네이버 설정시 route-map 적용(out)

community 값은 네이버 설정시 send-community로 전송

 


-R5-

R5(config)#access-list 1 permit 200.1.1.1 0.0.254.255 // 홀수 ACL

R5(config)#access-list 2 permit 200.1.0.1 0.0.254.255 // 짝수 ACL

 


R5(config)#route-map aa permit 10

R5(config-route-map)#match ip address 1

R5(config-route-map)#set community 300:100 // AS:300 커뮤니티번호:100

 


R5(config)#route-map aa permit 20

R5(config-route-map)#match ip address 2

R5(config-route-map)#set community 300:200 // AS:300 커뮤니티번호:200​

 

R5(config)#ip bgp-community new-format

 

R5(config)#router bgp 300

R5(config-router)#neighbor 10.1.59.9 send-community

R5(config-router)#neighbor 10.1.59.9 route-map aa out

 


-R9-​

R9(config)#access-list 1 permit 200.1.1.1 0.0.254.255

R9(config)#access-list 2 permit 200.1.0.1 0.0.254.255

 


R9(config)#route-map aa permit 10

R9(config-route-map)#match ip address 1

R9(config-route-map)#set community 400:100

 


R9(config)#route-map aa permit 20

R9(config-route-map)#match ip address 2

R9(config-route-map)#set community 400:200

 

R9(config)#ip bgp-community new-format

 

R9(config)#router bgp 65200

R9(config-router)#neighbor 10.1.59.5 send-community

R9(config-router)#neighbor 10.1.59.5 route-map aa out

 

R9#clear ip bgp * soft

 

 

Check

R5#show ip bgp 200.1.9.0​

 

R5#show ip bgp 200.1.10.0

 

 

728x90
반응형

'■ Communications > ↘ Cisco GNS' 카테고리의 다른 글

BGP Advertise-map 이론 및 실습  (0) 2019.05.01
BGP as-set 이론 및 실습  (0) 2019.05.01
BGP Suppress-map 이론 및 실습  (0) 2019.05.01
BGP EIGRP 실습 기본설정  (0) 2019.05.01
BGP AS_Path prepend 실습2  (0) 2019.05.01
Comments