CCNP BGP
CCNP BGP
CCNP BGP
ENCOR 350-401
BGP
Communities – Part1
00919886861543 المدرب عبد الرحمن العلوش NO_E XPORT
www.everestacademy.in
everestacademy.in , Mob: 00919886861543
BGP Communities
❖ The BGP community is numerical value that can be assigned to a specific prefix and
advertised to other neighbors.
❖ When a neighbor receives the prefix it will examine the community value and take
proper action whether it is filtering or modifying other attributes.
❖ BGP communities are an optional transitive BGP attribute that can traverse from AS to
AS. It can be set, appended, removed, or modified selectively .
❖ By default the community attribute is removed from the update before being sent to the
neighbor. To allow community values to be sent to a specific neighbor the command
neighbor x.x.x.x send-community [standard | extended | both] must be applied.
❖ A standard BGP community is a 32-bit number (four octets) that can be included
with a route. It can be displayed as a full 32-bit number (0 – 4,294,967,295) or as
two 16-bit numbers (0–65535):(0–65535), commonly referred to as new format.
❖ Private BGP communities follow a particular convention where the first 16 bits
represent the AS of the community origination, and the second 16 bits represent a
pattern defined by the originating AS.
❖ A private BGP community pattern can vary from organization to organization, does
not need to be registered, and can signify geographic locations for one AS while
indicating a method of route advertisement in another AS.
❖ http://www.onesc.net/communities/
AS 65200
R5
eBGP
Routes received carrying this value cannot AS 65100
0xFFFFFF01 be advertised to EBGP peers .
NO_EXPORT 65535:65281 If a confederation is configured, the routes R1 R3
cannot be advertised outside of the iBGP
confederation boundary. iBGP iBGP
AS 65100
R(config-route-map)# set community ?
<1-4294967295> community number
R1 R3
aa:nn community number in aa:nn format eBGP
gshut Graceful Shutdown (well-known community)
iBGP AS 10 AS 20 iBGP
internet Internet (well-known community)
local-AS Do not send outside local AS (well-known community)
no-advertise Do not advertise to any peer (well-known community)
no-export Do not export to next AS (well-known community) R2 R4
none No community attribute
!R1 !R2
enable enable
conf t conf t
interface Loopback1 interface Loopback1
ip address 192.168.1.1 255.255.255.255 ip address 192.168.2.1 255.255.255.255
! !
interface Ethernet0/0 interface Ethernet0/0
ip address 10.12.1.1 255.255.255.0 ip address 10.12.1.2 255.255.255.0
! !
interface Ethernet0/1 interface Ethernet0/1
ip address 10.14.1.1 255.255.255.0 ip address 10.23.1.2 255.255.255.0
! !
router bgp 100 router bgp 100
bgp router-id 1.1.1.1 bgp router-id 2.2.2.2
no bgp default ipv4-unicast no bgp default ipv4-unicast
neighbor 10.12.1.2 remote-as 100 neighbor 10.12.1.1 remote-as 100
neighbor 10.14.1.4 remote-as 404 neighbor 10.23.1.3 remote-as 303
! !
address-family ipv4 address-family ipv4
redistribute connected redistribute connected
neighbor 10.12.1.2 activate neighbor 10.12.1.1 activate
neighbor 10.14.1.4 activate neighbor 10.23.1.3 activate
exit-address-family exit-address-family
end end
!R3 !R4
enable enable
conf t conf t
interface Loopback1 interface Loopback1
ip address 192.168.3.1 255.255.255.0 ip address 192.168.4.1 255.255.255.255
! !
interface Ethernet0/0 interface Ethernet0/0
ip address 10.23.1.3 255.255.255.0 ip address 10.14.1.4 255.255.255.0
! !
interface Ethernet0/1 interface Ethernet0/1
ip address 10.36.1.3 255.255.255.0 ip address 10.45.1.4 255.255.255.0
! !
router bgp 303 router bgp 404
bgp router-id 3.3.3.3 bgp router-id 4.4.4.4
no bgp default ipv4-unicast no bgp default ipv4-unicast
neighbor 10.23.1.2 remote-as 100 neighbor 10.14.1.1 remote-as 100
neighbor 10.36.1.6 remote-as 606 neighbor 10.45.1.5 remote-as 505
! !
address-family ipv4 address-family ipv4
redistribute connected redistribute connected
neighbor 10.23.1.2 activate neighbor 10.14.1.1 activate
neighbor 10.36.1.6 activate neighbor 10.45.1.5 activate
exit-address-family exit-address-family
end end
!R5 !R6
enable Enable
conf t conf t
interface Loopback1 interface Loopback1
ip address 192.168.5.1 255.255.255.255 ip address 192.168.6.1 255.255.255.255
! !
interface Ethernet0/0 interface Ethernet0/0
ip address 10.45.1.5 255.255.255.0 ip address 10.36.1.6 255.255.255.0
! !
router bgp 505 router bgp 606
bgp router-id 5.5.5.5 bgp router-id 6.6.6.6
no bgp default ipv4-unicast no bgp default ipv4-unicast
neighbor 10.45.1.4 remote-as 404 neighbor 10.36.1.3 remote-as 303
! !
address-family ipv4 address-family ipv4
redistribute connected redistribute connected
neighbor 10.45.1.4 activate neighbor 10.36.1.3 activate
exit-address-family exit-address-family
end end
R1# conf t
R1(config)# ip as-path access-list 1 permit _404_
NO_E XPORT
R1# conf t
R1(config)# ip as-path access-list 1 permit _303_