PG1X WIKI

My Knowledge Base

User Tools

Site Tools


tech:network:cisco:bgp:bgp:bgp-peer-group:bgp-peer-group

BGP: BGP Peer Group

Project name: ccna-bgp11-bgp-peer-group

Issued BGP Configuration

  1. IGP: OSPF
  2. BGP: peering policy: do not advertise EBGP link inter public AS.

Base Configuration

  • R1
en
conf t
!
hostname R1
no ip domain-lookup
line console 0
exec-timeout 0 0
logging synchronous
!
int Lo1
ip address 10.1.1.1 255.255.255.255
no shut
exit
int gig0/0
ip address 10.1.2.1 255.255.255.0
no shut
exit
int gig0/1
ip address 10.1.3.1 255.255.255.0
no shut
exit
!
router ospf 1
network 10.1.1.1 0.0.0.0 area 0
network 10.1.2.1 0.0.0.0 area 0
network 10.1.3.1 0.0.0.0 area 0
exit
!
end
wr
  • R2
en
conf t
!
hostname R2
no ip domain-lookup
line console 0
exec-timeout 0 0
logging synchronous
!
int Lo1
ip address 10.2.2.2 255.255.255.255
no shut
int gig0/1
ip address 10.1.2.2 255.255.255.0
no shut
exit
int gig0/2
ip address 2.4.0.2 255.255.255.0
no shut
exit
int gig0/3
ip address 1.2.0.2 255.255.0.0
no shut
exit
!
router bgp 10
neighbor 2.4.0.4 remote-as 40
network 1.2.0.0 mask 255.255.0.0
exit
!
router ospf 1
network 10.2.2.2 0.0.0.0 area 0
network 10.1.2.2 0.0.0.0 area 0
exit
!
end
wr
  • R3
en
conf t
!
hostname R3
no ip domain-lookup
line console 0
exec-timeout 0 0
logging synchronous
!
int Lo1
ip address 10.3.3.3 255.255.255.255
no shut
int gig0/1
ip address 10.1.3.3 255.255.255.0
no shut
exit
int gig0/2
ip address 3.5.0.3 255.255.255.0
no shut
exit
int gig0/3
ip address 1.3.0.3 255.255.0.0
no shut
exit
!
router ospf 1
network 10.3.1.3 0.0.0.0 area 0
exit
!
router bgp 10
neighbor 3.5.0.5 remote-as 50
network 1.3.0.0 mask 255.255.0.0
exit
!
router ospf 1
network 10.3.3.3 0.0.0.0 area 0
network 10.1.3.3 0.0.0.0 area 0
exit
!
end
wr
  • R4
en
conf t
!
hostname R4
no ip domain-lookup
line console 0
exec-timeout 0 0
logging synchronous
!
int gig0/0
ip address 2.4.0.4 255.255.255.0
no shut
exit
int gig0/3
ip address 4.0.0.4 255.255.0.0
no shut
exit
!
router bgp 40
neighbor 2.4.0.2 remote-as 10
network 4.0.0.0 mask 255.255.0.0
exit
!
end
wr
  • R5
en
conf t
!
hostname R5
no ip domain-lookup
line console 0
exec-timeout 0 0
logging synchronous
!
int gig0/0
ip address 3.5.0.5 255.255.255.0
no shut
exit
int gig0/3
ip address 5.0.0.5 255.255.0.0
no shut
exit
!
router bgp 50
neighbor 3.5.0.3 remote-as 10
network 5.0.0.0 mask 255.255.0.0
exit
!
end
wr
  • PC-2
ip 1.2.0.102 255.255.0.0 1.2.0.2
save
  • PC-3
ip 1.3.0.103 255.255.0.0 1.3.0.3
save
  • PC-4
ip 4.0.0.104 255.255.0.0 4.0.0.4
save
  • PC-5
ip 5.0.0.105 255.255.0.0 5.0.0.5
save

IBGP Full Mesh without BGP peer group configuration

  • R1
conf t
!
router bgp 10
neighbor 10.2.2.2 remote-as 10
neighbor 10.2.2.2 update-source Lo1
neighbor 10.3.3.3 remote-as 10
neighbor 10.3.3.3 update-source Lo1
exit
!
end
  • R2
conf t
!
router bgp 10
neighbor 10.1.1.1 remote-as 10
neighbor 10.1.1.1 update-source Lo1
neighbor 10.1.1.1 next-hop-self
neighbor 10.3.3.3 remote-as 10
neighbor 10.3.3.3 update-source Lo1
neighbor 10.3.3.3 next-hop-self
exit
!
end
  • R3
conf t
!
router bgp 10
neighbor 10.1.1.1 remote-as 10
neighbor 10.1.1.1 update-source Lo1
neighbor 10.1.1.1 next-hop-self
neighbor 10.2.2.2 remote-as 10
neighbor 10.2.2.2 update-source Lo1
neighbor 10.2.2.2 next-hop-self
exit
!
end

IBGP Full Mesh with BGP peer group configuration

  • R1
conf t
!
router bgp 10
neighbor IBGP-POL1 peer-group
neighbor IBGP-POL1 remote-as 10
neighbor IBGP-POL1 update-source Lo1
neighbor 10.2.2.2 peer-group IBGP-POL1
neighbor 10.3.3.3 peer-group IBGP-POL1
exit
!
end
  • R2
conf t
!
router bgp 10
neighbor IBGP-POL1 peer-group
neighbor IBGP-POL1 remote-as 10
neighbor IBGP-POL1 update-source Lo1
neighbor IBGP-POL1 next-hop-self
neighbor 10.1.1.1 peer-group IBGP-POL1
neighbor 10.3.3.3 peer-group IBGP-POL1
exit
!
end
  • R3
conf t
!
router bgp 10
neighbor IBGP-POL1 peer-group
neighbor IBGP-POL1 remote-as 10
neighbor IBGP-POL1 update-source Lo1
neighbor IBGP-POL1 next-hop-self
neighbor 10.1.1.1 peer-group IBGP-POL1
neighbor 10.2.2.2 peer-group IBGP-POL1
exit
!
end

Verification

on PC-5

ping 4.0.0.104
ping 1.2.0.102
ping 1.3.0.103

on PC-3

ping 4.0.0.104
ping 1.2.0.102

References

tech/network/cisco/bgp/bgp/bgp-peer-group/bgp-peer-group.txt · Last modified: 2018/12/24 18:00 by wnoguchi