bgp community parametri and config-example application

Home » Blog » Routing » bgp » bgp design cisco » bgp community parametri and config-example application

bgp community parametri and config-example application

09.01 2020 | by massimiliano

bgp community parametri     Sono implementate come route-tag, usate per: ADVERTISEMENT POLICY FILTERING POLICY BEST PATH SELECTION POLICY   […]


https://www.ingegnerianetworking.com/wp-content/uploads/2020/01/bgp-community-example-1-5ac.png

bgp community parametri

 

 

Sono implementate come route-tag, usate per:

ADVERTISEMENT POLICY

FILTERING POLICY

BEST PATH SELECTION POLICY

 

 

WELL KNOW Community

NO-EXPORT: No Advertisement to EBGP Peers

NO-ADVERTISE: No Advertisement to both EBGP and IBGP Peers

NO-EXPORT -SUBCONF (LOCAL-AS): No Advertisement to Confederation EBGP Peers

 

 

Nota:

Il setting è fatto direttamente in route-map

Il matching è fatto via community-list di tipo standard oppure expanded.

 

Example:

 

ip-community-list standard 400:1 permit 400:1

ip-community-lit standard 400:2 permit 400:2

!

route-map TO-IN permit 10

match community 400:1

set as-path prepend 400

!

route-map TO-IN permit 20

match community 400:2

set as-path prepend 400 400 400

!

router bgp 400

neighbor 155.28.0.4 route-map TO-IN out

 

 

# sul router originatore dell’annuncio:


route-map SET -COMM

set community 400:2

!

router bgp 400 network 155.28.28.0 mask 255.255.255.0 route-map SET -COMM

 

ESEMPIO DI APPLICAZIONE COMMUNITY

 

Le community BGP, quindi, sono dei tag con determinati valori che possono essere propagati ai peer neighbors, i quali a seconda del valore di community ricevuto intraprendono delle azioni per determinare politiche di routing.

 

L’invio di community BGP deve essere esplicitamente indicato, assegnate da route-map e referenziate sempre da route-map:

 

router bgp < as >

neighbor < ip_address_peer > remote as < as_remote >

neighbor < ip_address_peer > send-community

neighbor < ip_address_peer > route-map assegna-community out

!

access-list < num > permit ip < source-subnet > < destination-subnet >

!

route-map assegna-community permit 10

match ip address < acl_num >

set community AS:NN

!

!

ip community list 1 permit AS:NN

!

route-map referenzia-community permit 10

match community 1

set local-preference 150  

 

 

 

ESEMPIO GRAFICO DI APPLICAZIONE COMMUNITY:

 

 

 

bgp community example 1

 

 

CE

 

access-list 101 permit ip host 10.10.10.0 host 255.255.255.255

access-list 102 permit ip host 20.20.20.0 host 255.255.255.255

!

route-map to-PE1 permit 10

match ip address 101

set community 100:250

!

route-map to-PE1 permit 20

match ip address 102

set community 100:150

!

route-map to-PE2 permit 10

match ip address 102

set community 100:250

!

route-map to-PE2 permit 20

match ip address 101

set community 100:150

!

router bgp 65000

router-id < loopback0 >

network 10.10.10.0 mask 255.255.255.0

network 20.20.20.0 mask 255.255.255.0

neighbor 1.1.1.1 remote-as 100

neighbor 1.1.1.1 send-community

neighbor 1.1.1.1 route-map to-PE1 out

neighbor 2.2.2.1 remote-as 100

neighbor 2.2.2.1 send-community

neighbor 2.2.2.1 route-map to-PE2 out

 

 

PE1:

 

ip bgp community new-format

!

ip community-list 101 permit 100:250

ip community-list 102 permit 100:150

!

route-map from-ce permit 10

match community 101

set local-preference 250

!

route-map from-ce permit 20

match community 102

set local-preference 150

!

router bgp 100

router-id < loopback0 >

neighbor 1.1.1.2 remote-as 65000

neighbor 1.1.1.2 send-community

neighbor 1.1.1.2 route-map from-ce in

 

 

PE2:

 

ip bgp community new-format

!

ip community-list 101 permit 100:150

ip community-list 102 permit 100:250

!

route-map from-ce permit 10

match community 1

set local-preference 150

!

route-map from-ce permit 20

match community 2

set local-preference 250

!

router bgp 100

router-id < loopback0 >

neighbor 2.2.2.2 remote-as 65000

neighbor 2.2.2.2 send-community

neighbor 2.2.2.2 route-map from-ce in

 

 

 

 

 

 

Torna in alto