Home Routing BGP Cisco BGP Configuration How to configure BGP peer-session template

Here is "How to configure BGP peer-session template"

[ Assignement ]

All 4 routers are in AS 100 and linked in same Ethernet segment.
Establish BGP sessions, using Loopback 0 interface. Use RIPv2 as IGP.
Use template name "common" and "ibgp" and follow below guides;

common - verizon 4
                password showipbgp

ibgp -       remote-as 100
                update-source loopback 0

[ IP Address Table ]

Router 1 - FastEthernet0/0 : 192.168.1.1/24
                 Loopback0 : 1.1.1.1/8
                 Loopback1 : 10.10.10.0/24

Router 2 - FastEthernet0/0 : 192.168.1.2/24
                 Loopback0 : 2.2.2.2/8
                 Loopback1 : 20.20.20.0/24

Router 3 - FastEthernet0/0 : 192.168.1.3/24
                 Loopback0 : 3.3.3.3/8
                 Loopback1 : 30.30.30.0/24

Router 4 - FastEthernet0/0 : 192.168.1.4/24
                 Loopback0 : 4.4.4.4/8
                 Loopback1 : 40.40.40.0/24

 

[ Network Outline ]

 

[ Router 1 ]

router rip
 version 2
 network 1.0.0.0
 network 192.168.1.0
!
router bgp 100
 template peer-session common
  password showipbgp
  version 4
 exit-peer-session
 !
 template peer-session ibgp
  remote-as 100
  update-source Loopback0
  inherit peer-session common
 exit-peer-session
 !
 no synchronization
 bgp log-neighbor-changes
 network 10.10.10.0 mask 255.255.255.0
 neighbor 2.2.2.2 inherit peer-session ibgp
 neighbor 3.3.3.3 inherit peer-session ibgp
 neighbor 4.4.4.4 inherit peer-session ibgp
no auto-summary

 

[ Router 2 ]

router rip
 version 2
 network 2.0.0.0
 network 192.168.1.0
!
router bgp 100
 template peer-session common
  password showipbgp
  version 4
 exit-peer-session
 !
 template peer-session ibgp
  remote-as 100
  update-source Loopback0
  inherit peer-session common
 exit-peer-session
 !
 no synchronization
 bgp log-neighbor-changes
 network 20.20.20.0 mask 255.255.255.0
 neighbor 1.1.1.1 inherit peer-session ibgp
 neighbor 3.3.3.3 inherit peer-session ibgp
 neighbor 4.4.4.4 inherit peer-session ibgp
no auto-summary

 

[ Router 3 ]

router rip
 version 2
 network 3.0.0.0
 network 192.168.1.0
!
router bgp 100
 template peer-session common
  password showipbgp
  version 4
 exit-peer-session
 !
 template peer-session ibgp
  remote-as 100
  update-source Loopback0
  inherit peer-session common
 exit-peer-session
 !
 no synchronization
 bgp log-neighbor-changes
 network 30.30.30.0 mask 255.255.255.0
 neighbor 1.1.1.1 inherit peer-session ibgp
 neighbor 2.2.2.2 inherit peer-session ibgp
 neighbor 4.4.4.4 inherit peer-session ibgp
no auto-summary

 

[ Router 4 ]

router rip
 version 2
 network 4.0.0.0
 network 192.168.1.0
!
router bgp 100
 template peer-session common
  password showipbgp
  version 4
 exit-peer-session
 !
 template peer-session ibgp
  remote-as 100
  update-source Loopback0
  inherit peer-session common
 exit-peer-session
 !
 no synchronization
 bgp log-neighbor-changes
 network 40.40.40.0 mask 255.255.255.0
 neighbor 1.1.1.1 inherit peer-session ibgp
 neighbor 2.2.2.2 inherit peer-session ibgp
 neighbor 3.3.3.3 inherit peer-session ibgp
no auto-summary

 

[Verifying]

Router1#sh ip bgp template peer-session ibgp
Template:ibgp, index:2
Local policies:0x81, Inherited polices:0x2
This template inherits:
  common index:1 flags:0x0
Locally configured session commands:
 remote-as 100
 update-source Loopback0
Inherited session commands:
 version 4

Router1#sh ip bgp
BGP table version is 15, local router ID is 10.10.10.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.10.10.0/24    0.0.0.0                  0         32768 i
*>i20.20.20.0/24    2.2.2.2                  0    100      0 i
*>i30.30.30.0/24    3.3.3.3                  0    100      0 i
*>i40.40.40.0/24    4.4.4.4                  0    100      0 i
Router1#

 

Router2#sh ip bgp template peer-session ibgp
Template:ibgp, index:2
Local policies:0x81, Inherited polices:0x2
This template inherits:
  common index:1 flags:0x0
Locally configured session commands:
 remote-as 100
 update-source Loopback0
Inherited session commands:
 version 4

Router2#sh ip bgp
BGP table version is 20, local router ID is 20.20.20.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i10.10.10.0/24    1.1.1.1                  0    100      0 i
*> 20.20.20.0/24    0.0.0.0                  0         32768 i
*>i30.30.30.0/24    3.3.3.3                  0    100      0 i
*>i40.40.40.0/24    4.4.4.4                  0    100      0 i
Router2#

 

Router3#sh ip bgp template peer-session ibgp
Template:ibgp, index:2
Local policies:0x81, Inherited polices:0x2
This template inherits:
  common index:1 flags:0x0
Locally configured session commands:
 remote-as 100
 update-source Loopback0
Inherited session commands:
 version 4

Router3#sh ip bgp
BGP table version is 7, local router ID is 30.30.30.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i10.10.10.0/24    1.1.1.1                  0    100      0 i
*>i20.20.20.0/24    2.2.2.2                  0    100      0 i
*> 30.30.30.0/24    0.0.0.0                  0         32768 i
*>i40.40.40.0/24    4.4.4.4                  0    100      0 i
Router3#

 

Router4#sh ip bgp template peer-session ibgp
Template:ibgp, index:2
Local policies:0x81, Inherited polices:0x2
This template inherits:
  common index:1 flags:0x0
Locally configured session commands:
 remote-as 100
 update-source Loopback0
Inherited session commands:
 version 4

Router4#sh ip bgp
BGP table version is 5, local router ID is 40.40.40.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i10.10.10.0/24    1.1.1.1                  0    100      0 i
*>i20.20.20.0/24    2.2.2.2                  0    100      0 i
*>i30.30.30.0/24    3.3.3.3                  0    100      0 i
*> 40.40.40.0/24    0.0.0.0                  0         32768 i
Router4#

 

 
Smart Link
Search
Statistics
Content View Hits : 2152202
Related Items
Polls
Highly recommended firewall vendor?
 
Google Translation
English Arabic Chinese (Simplified) Czech Dutch French German Italian Korean Portuguese Russian Spanish Filipino Vietnamese Thai Turkish
BGP routing issue?
Banner
World Route Servers
Banner
Who's Online
We have 95 guests online