Download PNETLab Platform
PNETLAB Store
PNETLab.com
BGP Community No Advertise
Lab Topology:
Please use the following topology to complete this lab exercise:
Lab Objective:
The objective of this lab exercise is for you to learn and understand how can you configure BGP
Community No Advertise
Task list:
Task 1: Configure the hostname and IP address for the interface for Routers as topo. Check the
reachability between Routers.
Task 2: Configure BGP (IBGP, EBGP) at all Router. R1 advertise L0 interface to BGP. Check the
status of 1.1.1.1/32 at the others Router.
Task 3: Config Community BGP at R1 so that R1 tell R2 will not advertise prefix to others
Router (R3,R4)
Task 4: Check BGP Table on R2, R3 and R4 to verify the configuration at Task 3.
1
Download PNETLab Platform
PNETLAB Store
PNETLab.com
SOLUTION:
Task 1: Configure the hostname and IP address for the interface for Routers as topo. Check the
reachability between Routers.
On R1
!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Ethernet0/0
ip address 10.1.12.1 255.255.255.0
!
On R2
!
interface Ethernet0/0
ip address 10.1.12.2 255.255.255.0
!
interface Ethernet0/1
ip address 10.1.23.2 255.255.255.0
!
interface Ethernet0/2
ip address 10.1.24.2 255.255.255.0
!
On R3
!
interface Ethernet0/1
ip address 10.1.23.3 255.255.255.0
!
On R4
!
interface Ethernet0/2
ip address 10.1.24.4 255.255.255.0
!
Verification:
R2#ping 10.1.12.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.12.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
R2#ping 10.1.23.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.23.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
R2#ping 10.1.24.4
Type escape sequence to abort.
2
Download PNETLab Platform
PNETLAB Store
PNETLab.com
Sending 5, 100-byte ICMP Echos to 10.1.24.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms
Task 2: Configure BGP (IBGP, EBGP) at all Router. R1 advertise L0 interface to BGP. Check the
status of 1.1.1.1/32 at the others Router.
On R1
!
router bgp 1
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
neighbor 10.1.12.2 remote-as 23
!
On R2
!
router bgp 23
bgp log-neighbor-changes
neighbor 10.1.12.1 remote-as 1
neighbor 10.1.23.3 remote-as 23
neighbor 10.1.23.3 next-hop-self
neighbor 10.1.24.4 remote-as 4
neighbor 10.1.24.4 next-hop-self
!
On R3
!
router bgp 23
bgp log-neighbor-changes
neighbor 10.1.23.2 remote-as 23
!
On R4
!
router bgp 4
bgp log-neighbor-changes
neighbor 10.1.24.2 remote-as 23
!
Verification:
R2#show ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 10.1.12.1 0 0 1 i
R3#show ip bgp
Network Next Hop Metric LocPrf Weight Path
*>i 1.1.1.1/32 10.1.23.2 0 100 0 1 i
R4#show ip bgp
Network Next Hop Metric LocPrf Weight Path
3
Download PNETLab Platform
PNETLAB Store
PNETLab.com
*> 1.1.1.1/32 10.1.24.2 0 23 1 i
// So every Router has the prefix 1.1.1.1/32 in BGP Table. No need to talk so much in here.
Task 3: Config Community BGP at R1 so that R1 tell R2 will not advertise prefix to others
Router (R3,R4)
On R1
!
route-map SET_COMMUNITY permit 10
set community no-advertise
!
router bgp 1
neighbor 10.1.12.2 send-community
neighbor 10.1.12.2 route-map SET_COMMUNITY out
!
//Create Route-map to set community no-advertise
//Configure bgp neighbor with R2 but specify we will send 1 community with note that R2 don’t
advertise to other Router.
//After configuration, please use command “clear ip bgp * soft” in both R1 and R2.
Task 4: Check BGP Table on R2, R3 and R4 to verify the configuration at Task 3.
On R2
R2#show ip bgp 1.1.1.1
BGP routing table entry for 1.1.1.1/32, version 3
Paths: (1 available, best #1, table default, not advertised to any
peer)
Not advertised to any peer
Refresh Epoch 2
1
10.1.12.1 from 10.1.12.1 (1.1.1.1)
Origin IGP, metric 0, localpref 100, valid, external, best
Community: no-advertise
rx pathid: 0, tx pathid: 0x0
R2#show ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 10.1.12.1 0 0 1 i
R3#show ip bgp
R4#show ip bgp
//So we will recognize that, in R2, it still get the prefix 1.1.1.1/32 but it will not advertise to
other Router (R3,R4).