Thursday, April 28, 2016

BGP Community Attribute LAB


BGP Community Attribute Lab 5

Questions :

1 - R1 such that when it advertises network 1.1.1.0/24 to R2 in AS 200, the network is not advertised to any of R2's iBGP or eBGP neighbors

2 - Configure R5 such that when it advertises its network 5.5.5.0/24 to R3 in AS 2300, the routers in AS 2300 do Not advertise that Network to any of their eBGP Peer's DO Not Configure R3 to accomplish this task

3 - Configure R3 in AS 2300 to advertise network 3.3.3.0/24 to the routers in its own AS Only, R3 Should Not Advertise this network to any of its eBGP peers

4 - R2 Should be Configured to advertise network 1.1.1.0/24 to all of its iBGP and eBGP peers. you should utilize a well known community attribute to accomplish this task.

" - Internet - if assigned to network, that network should be advertised.

- Local-as - if assigned to network, that network should ONLY be
advetised within that AS

- No-advertise - if assigned to network, that network should NOT be
advertised to any BGP Neighbor ( NOT adv to iBGP + eBGP )

- No-export - if assigned to network, that network should NOT be
advertised to an eBGP neighbor ( NOT adv to eBGP ) "

Best Regards,
Team RHC
====================================================
1)Assign IP add:
2)Configure bgp to get connection in each routers
R1
router bgp 100
net 1.1.1.0 mask 255.255.255.0
nei 10.1.12.2 remote-as 2300

R2
router bgp 2300
net 2.2.2.0 mask 255.255.255.0
nei 10.1.12.1 remote-as 100
nei 10.1.23.3 remote-as 2300
nei 10.1.23.3 next-hop-self
nei 10.1.24.4 remote-as 400

R3
router bgp 2300
net 3.3.3.0 mask 255.255.255.0
nei 10.1.23.2 remote-as 2300
nei 10.1.23.2 next-hop-self
nei 10.1.35.5 remote-as 500

R4
router bgp 400
net 4.4.4.0 mask 255.255.255.0
nei 10.1.24.2 remote-as 2300

R5
router bgp 500
net 5.5.5.0 mask 255.255.255.0
nei 10.1.35.3 remote-as 2300

*Can ping every loopback int with source interface
*See every loopback network


Question 1:
R1
access-list 1 permit 1.1.1.0 0.0.0.255
route-map TEST permit 10
match ip address 1
set community no-advertise
route-map TEST permit 100

router bgp 100
nei 10.1.12.2 route-map TEST out
nei 10.1.12.2 send-community
Verify configuration on R2
sh ip bgp 1.1.1.0
Verify configuration R3
sh ip bgp

*Check sh ip bgp 1.1.1.0 on R2
*Check sh ip bgp 1.1.1.0 on R3       

Question 2:
R5
access-list 1 permit 5.5.5.0
route-map TEST permit 10
match ip address 1
set community no export
route-map TEST permit 100


router bgp 500
nei 10.1.35.3 route-map TEST out
nei 10.1.35.3 send-community
Verify the config on R3
router bgp 2300
nei 10.1.23.2 send-community

R3
router bgp 2300
nei 10.1.23.2 send-community

Question 3:
R3
access-list 1 permit 3.3.3.0
route-map TEST permit 10
match ip address 1
set community local as
route-map TEST permit 100

router bgp 2300
net 3.3.3.0 mask 255.255.255.0 route-map TEST
nei 10.1.23.2 send-community
Verify the config on R3
sh ip bgp 3.3.3.0

R5
sh ip bgp

Question 4:
R2
access-list 1 permit 1.1.1.0
route-map TEST permit 10
match ip address 1
set community internet
route-map TEST permit 100

router bgp 2300
nei 10.1.12.1 route-map TEST in
Verify the config on R2
sh ip bgp 1.1.1.0
sh ip bgp on R4
sh ip bgp on R3

R1
#sh ip bgp nei 10.1.12.2
#sh ip bgp 2.2.2.0
#sh ip bp nei 10.1.12.2 received
#sh ip bp nei 10.1.12.2 received-routes
#sh ip bp nei 10.1.12.2 advertised-routes
====================================
You can set BGP communities in any point where you can use a route-map within BGP:

on routes you’re receiving from a neighbour with the neighbour route-map in router configuration command:

on routes you’re sending to a neighbour with the neighbour route-map out router configuration command:

on routes originated into BGP with the network route-map router configuration command:

on routes redistributed into BGP with the redistribute route-map router configuration command.

Using the community attribute configure R1 such that when it advertises network 1.0.0.0/24 to R2 in 2300, the network is not advertised is not advertised to any of R2’s iBGP or ebgp neighbours.

Configure R5 such that when it advertises its network 5.0.0.0/24 to R3, R3 does NOT advertise that network to any of its eBGP peers. Don’t configure R3 to accomplish this task.

Configure R3 in AS 2300 to advertise network 3.0.0.0/24 to the routers in its own AS Only, R3 shouldn’t advertise this network to any of its eBGP peers.

R1 is advertising network 1.0.0.0/24 which has an attached community attribute of “no advertise” to R2 (Task 2). Router R2 should be configured to advertise network 1.0.0.0/24 to all of its iBGP and eBGP peers. You should utilise a well known community attribute to accomplish this task.

No comments:

Post a Comment