Select Page

BGP BasicS

Lab:

  iBGP With or Without a Loopback Address using Authentication

  eBGP With or Without a Loopback Address using Authentication

Juniper vMX 14 & EVE-NG Pro is used for this lab.

  iBGP With or Without a Loopback Address using Authentication

 Devices Configuration:

[email protected]> show configuration |display set
set version 14.1R4.8
set system host-name R5
set system root-authentication encrypted-password “$1$KXupLl/D$65BGnNAcLzC.mp/ZPKz5r0”
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/0 unit 0 family inet address 60.60.60.5/24
set interfaces ge-0/0/1 unit 0 family inet address 70.70.70.5/24
set interfaces ge-0/0/2 unit 0 family inet address 50.50.50.5/24
set interfaces lo0 unit 0 family inet address 5.5.5.5/32
set routing-options router-id 5.5.5.5
set routing-options autonomous-system 500
set protocols bgp group R5-To-R6 type internal
set protocols bgp group R5-To-R6 traceoptions file R5-R6
set protocols bgp group R5-To-R6 traceoptions flag all
set protocols bgp group R5-To-R6 local-address 5.5.5.5
set protocols bgp group R5-To-R6 log-updown
set protocols bgp group R5-To-R6 authentication-key “$9$FK2K6CuRhr8X-O1X-VwaJ369”
set protocols bgp group R5-To-R6 peer-as 500
set protocols bgp group R5-To-R6 graceful-restart
set protocols bgp group R5-To-R6 multipath
set protocols bgp group R5-To-R6 neighbor 6.6.6.6
set protocols bgp group R5-To-R7 type internal
set protocols bgp group R5-To-R7 traceoptions file R5-R7
set protocols bgp group R5-To-R7 traceoptions flag all
set protocols bgp group R5-To-R7 local-address 5.5.5.5
set protocols bgp group R5-To-R7 log-updown
set protocols bgp group R5-To-R7 authentication-key “$9$FK2K6CuRhr8X-O1X-VwaJ369”
set protocols bgp group R5-To-R7 peer-as 500
set protocols bgp group R5-To-R7 graceful-restart
set protocols bgp group R5-To-R7 multipath
set protocols bgp group R5-To-R7 neighbor 7.7.7.7
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0

[email protected]> show configuration |display set
set version 14.1R4.8
set system host-name R6
set system root-authentication encrypted-password “$1$KQifrb2I$3negJeaFNjcoI18ov0qCw0”
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/0 unit 0 family inet address 60.60.60.6/24
set interfaces ge-0/0/1 unit 0 family inet address 80.80.80.6/24
set interfaces lo0 unit 0 family inet address 6.6.6.6/32
set routing-options router-id 6.6.6.6
set routing-options autonomous-system 500
set protocols bgp group R6-To-R5 type internal
set protocols bgp group R6-To-R5 traceoptions file R6-R5
set protocols bgp group R6-To-R5 traceoptions flag all
set protocols bgp group R6-To-R5 local-address 6.6.6.6
set protocols bgp group R6-To-R5 log-updown
set protocols bgp group R6-To-R5 authentication-key “$9$FK2K6CuRhr8X-O1X-VwaJ369”
set protocols bgp group R6-To-R5 peer-as 500
set protocols bgp group R6-To-R5 graceful-restart
set protocols bgp group R6-To-R5 multipath
set protocols bgp group R6-To-R5 neighbor 5.5.5.5
set protocols bgp group R6-To-R8 type internal
set protocols bgp group R6-To-R8 traceoptions file R6-R8
set protocols bgp group R6-To-R8 traceoptions flag all
set protocols bgp group R6-To-R8 local-address 6.6.6.6
set protocols bgp group R6-To-R8 log-updown
set protocols bgp group R6-To-R8 authentication-key “$9$FK2K6CuRhr8X-O1X-VwaJ369”
set protocols bgp group R6-To-R8 peer-as 500
set protocols bgp group R6-To-R8 graceful-restart
set protocols bgp group R6-To-R8 multipath
set protocols bgp group R6-To-R8 neighbor 8.8.8.8
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0

[email protected]> show configuration |display set
set version 14.1R4.8
set system host-name R7
set system root-authentication encrypted-password “$1$GCnvDb/M$3gZTG4hlPtltVzuYlNVKJ0”
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/0 unit 0 family inet address 90.90.90.7/24
set interfaces ge-0/0/1 unit 0 family inet address 70.70.70.7/24
set interfaces lo0 unit 0 family inet address 7.7.7.7/32
set routing-options router-id 7.7.7.7
set routing-options autonomous-system 500
set protocols bgp group R7-To-R5 type internal
set protocols bgp group R7-To-R5 traceoptions file R7-R5
set protocols bgp group R7-To-R5 traceoptions flag all
set protocols bgp group R7-To-R5 local-address 7.7.7.7
set protocols bgp group R7-To-R5 log-updown
set protocols bgp group R7-To-R5 authentication-key “$9$FK2K6CuRhr8X-O1X-VwaJ369”
set protocols bgp group R7-To-R5 cluster 7.7.7.7
set protocols bgp group R7-To-R5 peer-as 500
set protocols bgp group R7-To-R5 graceful-restart
set protocols bgp group R7-To-R5 multipath
set protocols bgp group R7-To-R5 neighbor 5.5.5.5
set protocols bgp group R7-To-R8 type internal
set protocols bgp group R7-To-R8 traceoptions file R7-R8
set protocols bgp group R7-To-R8 traceoptions flag all
set protocols bgp group R7-To-R8 local-address 7.7.7.7
set protocols bgp group R7-To-R8 log-updown
set protocols bgp group R7-To-R8 authentication-key “$9$FK2K6CuRhr8X-O1X-VwaJ369”
set protocols bgp group R7-To-R8 peer-as 500
set protocols bgp group R7-To-R8 graceful-restart
set protocols bgp group R7-To-R8 multipath
set protocols bgp group R7-To-R8 neighbor 8.8.8.8
set protocols ospf area 0.0.0.0 interface lo0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0

[email protected]> show configuration |display set
set version 14.1R4.8
set system host-name R8
set system root-authentication encrypted-password “$1$sWratWTY$Q2/xxandN4G2RcUtXUUWU1”
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/0 unit 0 family inet address 90.90.90.8/24
set interfaces ge-0/0/1 unit 0 family inet address 80.80.80.8/24
set interfaces ge-0/0/2 unit 0 family inet address 100.100.100.0/32
set interfaces lo0 unit 0 family inet address 8.8.8.8/32
set routing-options router-id 8.8.8.8
set routing-options autonomous-system 500
set protocols bgp group R8-To-R6 type internal
set protocols bgp group R8-To-R6 traceoptions file R8-R6
set protocols bgp group R8-To-R6 traceoptions flag all
set protocols bgp group R8-To-R6 local-address 8.8.8.8
set protocols bgp group R8-To-R6 log-updown
set protocols bgp group R8-To-R6 authentication-key “$9$FK2K6CuRhr8X-O1X-VwaJ369”
set protocols bgp group R8-To-R6 export send-direct
set protocols bgp group R8-To-R6 peer-as 500
set protocols bgp group R8-To-R6 graceful-restart
set protocols bgp group R8-To-R6 multipath
set protocols bgp group R8-To-R6 neighbor 6.6.6.6
set protocols bgp group R8-To-R7 type internal
set protocols bgp group R8-To-R7 traceoptions file R8-R7
set protocols bgp group R8-To-R7 traceoptions flag all
set protocols bgp group R8-To-R7 local-address 8.8.8.8
set protocols bgp group R8-To-R7 log-updown
set protocols bgp group R8-To-R7 authentication-key “$9$FK2K6CuRhr8X-O1X-VwaJ369”
set protocols bgp group R8-To-R7 export send-direct
set protocols bgp group R8-To-R7 peer-as 500
set protocols bgp group R8-To-R7 graceful-restart
set protocols bgp group R8-To-R7 multipath
set protocols bgp group R8-To-R7 neighbor 7.7.7.7
set protocols ospf area 0.0.0.0 interface ge-0/0/1.0
set protocols ospf area 0.0.0.0 interface lo0.0
set protocols ospf area 0.0.0.0 interface ge-0/0/0.0
set policy-options policy-statement send-direct term 2 from protocol direct
set policy-options policy-statement send-direct term 2 then accept

** TASK Specific Config:

– R5 (WITHOUT LOOPBACK):

 set protocols bgp group R5-To-R6 traceoptions file R5-R6
set protocols bgp group R5-To-R6 traceoptions flag all
set routing-options autonomous-system 500
set protocols bgp group R5-To-R6 type internal
set protocols bgp group R5-To-R6 log-updown
set protocols bgp group R5-To-R6 authentication-key “$9$FK2K6CuRhr8X-O1X-VwaJ369”
set protocols bgp group R5-To-R6 peer-as 500
set protocols bgp group R5-To-R6 graceful-restart
set protocols bgp group R5-To-R6 multipath
set protocols bgp group R5-To-R6 neighbor 60.60.60.6
 
set protocols bgp group R5-To-R7 traceoptions file R5-R7
set protocols bgp group R5-To-R7 traceoptions flag all
set routing-options autonomous-system 500
set protocols bgp group R5-To-R7 type internal
set protocols bgp group R5-To-R7 log-updown
set protocols bgp group R5-To-R7 authentication-key “$9$FK2K6CuRhr8X-O1X-VwaJ369”
set protocols bgp group R5-To-R7 peer-as 500
set protocols bgp group R5-To-R7 graceful-restart
set protocols bgp group R5-To-R7 multipath
set protocols bgp group R5-To-R7 neighbor 70.70.70.7

 

– R6 (WITHOUT LOOPBACK):

set protocols bgp group R6-To-R5 traceoptions file R6-R5
set protocols bgp group R6-To-R5 traceoptions flag all
set routing-options autonomous-system 500
set protocols bgp group R6-To-R5 type internal
set protocols bgp group R6-To-R5 log-updown
set protocols bgp group R6-To-R5 authentication-key “$9$FK2K6CuRhr8X-O1X-VwaJ369”
set protocols bgp group R6-To-R5 peer-as 500
set protocols bgp group R6-To-R5 graceful-restart
set protocols bgp group R6-To-R5 multipath
set protocols bgp group R6-To-R5 neighbor 60.60.60.5
 
set protocols bgp group R6-To-R8 traceoptions file R6-R8
set protocols bgp group R6-To-R8 traceoptions flag all
set routing-options autonomous-system 500
set protocols bgp group R6-To-R8 type internal
set protocols bgp group R6-To-R8 log-updown
set protocols bgp group R6-To-R8 authentication-key “$9$FK2K6CuRhr8X-O1X-VwaJ369”
set protocols bgp group R6-To-R8 peer-as 500
set protocols bgp group R6-To-R8 graceful-restart
set protocols bgp group R6-To-R8 multipath
set protocols bgp group R6-To-R8 neighbor 80.80.80.8
 

– R7 (WITHOUT LOOPBACK):

set protocols bgp group R7-To-R5 traceoptions file R7-R5
set protocols bgp group R7-To-R5 traceoptions flag all
set routing-options autonomous-system 500
set protocols bgp group R7-To-R5 type internal
set protocols bgp group R7-To-R5 log-updown
set protocols bgp group R7-To-R5 authentication-key “$9$FK2K6CuRhr8X-O1X-VwaJ369”
set protocols bgp group R7-To-R5 peer-as 500
set protocols bgp group R7-To-R5 graceful-restart
set protocols bgp group R7-To-R5 multipath
set protocols bgp group R7-To-R5 neighbor 70.70.70.5
 
set protocols bgp group R7-To-R8 traceoptions file R7-R8
set protocols bgp group R7-To-R8 traceoptions flag all
set routing-options autonomous-system 500
set protocols bgp group R7-To-R8 type internal
set protocols bgp group R7-To-R8 log-updown
set protocols bgp group R7-To-R8 authentication-key “$9$FK2K6CuRhr8X-O1X-VwaJ369”
set protocols bgp group R7-To-R8 peer-as 500
set protocols bgp group R7-To-R8 graceful-restart
set protocols bgp group R7-To-R8 multipath
set protocols bgp group R7-To-R8 neighbor 90.90.90.8
 
 

– R8 (WITHOUT LOOPBACK):

set protocols bgp group R8-To-R6 traceoptions file R8-R6
set protocols bgp group R8-To-R6 traceoptions flag all
set routing-options autonomous-system 500
set protocols bgp group R8-To-R6 type internal
set protocols bgp group R8-To-R6 log-updown
set protocols bgp group R8-To-R6 authentication-key “$9$FK2K6CuRhr8X-O1X-VwaJ369”
set protocols bgp group R8-To-R6 peer-as 500
set protocols bgp group R8-To-R6 graceful-restart
set protocols bgp group R8-To-R6 multipath
set protocols bgp group R8-To-R6 neighbor 80.80.80.6
 
set protocols bgp group R8-To-R7 traceoptions file R8-R7
set protocols bgp group R8-To-R7 traceoptions flag all
set routing-options autonomous-system 500
set protocols bgp group R8-To-R7 type internal
set protocols bgp group R8-To-R7 log-updown
set protocols bgp group R8-To-R7 authentication-key “$9$FK2K6CuRhr8X-O1X-VwaJ369”
set protocols bgp group R8-To-R7 peer-as 500
set protocols bgp group R8-To-R7 graceful-restart
set protocols bgp group R8-To-R7 multipath
set protocols bgp group R8-To-R7 neighbor 90.90.90.7

 

— Loopbacks are reachable, connectivity  established using IGP (OSPF). 

*** WITH LOOPBACK **

R5 ——– WITH LOOPBACK:
del protocols bgp group R5-To-R6 neighbor 60.60.60.6
del protocols bgp group R5-To-R6 neighbor 70.70.70.7
set routing-options router-id 5.5.5.5
set protocols bgp group R5-To-R6 local-address 5.5.5.5
set protocols bgp group R5-To-R6 neighbor 6.6.6.6
set protocols bgp group R5-To-R7 local-address 5.5.5.5
set protocols bgp group R5-To-R7 neighbor 7.7.7.7

R6 ——– WITH LOOPBACK:
del protocols bgp group R6-To-R5 neighbor 60.60.60.5
del protocols bgp group R6-To-R8 neighbor 80.80.80.8
set routing-options router-id 6.6.6.6
set protocols bgp group R6-To-R5 local-address 6.6.6.6
set protocols bgp group R6-To-R5 neighbor 5.5.5.5
set protocols bgp group R6-To-R8 local-address 6.6.6.6
set protocols bgp group R6-To-R8 neighbor 8.8.8.8

R7 ——– WITH LOOPBACK:
del protocols bgp group R7-To-R5 neighbor 70.70.70.5
del protocols bgp group R7-To-R8 neighbor 90.90.90.8
set routing-options router-id 7.7.7.7
set protocols bgp group R7-To-R5 local-address 7.7.7.7
set protocols bgp group R7-To-R5 neighbor 5.5.5.5
set protocols bgp group R7-To-R8 local-address 7.7.7.7
set protocols bgp group R7-To-R8 neighbor 8.8.8.8

R8 —— WITH LOOPBACK:

del protocols bgp group R8-To-R6 neighbor 80.80.80.6
del protocols bgp group R8-To-R7 neighbor 90.90.90.7
set routing-options router-id 8.8.8.8
set protocols bgp group R8-To-R6 local-address 8.8.8.8
set protocols bgp group R8-To-R6 neighbor 6.6.6.6
set protocols bgp group R8-To-R7 local-address 8.8.8.8
set protocols bgp group R8-To-R7 neighbor 7.7.7.7


On R8: Let’s assign an IP to R8 interface, or create another loopback IP and advertise to neighbor R6/R7:
set interfaces ge-0/0/2 unit 0 family inet address 100.100.100.0/32
set protocols bgp group R8-To-R6 export send-direct
set protocols bgp group R8-To-R7 export send-direct
set policy-options policy-statement send-direct term 2 from protocol direct
set policy-options policy-statement send-direct term 2 then accept

*** Using protocol ‘direct’ instead ‘BGP’ to avoid iBGP default behavior (explained below).

–OUTPUT (R8):
[email protected]R8> show route 100.100.100.0 advertising-protocol bgp 6.6.6.6

inet.0: 12 destinations, 13 routes (12 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 100.100.100.0/32 Self 100 I

[email protected]> show route 100.100.100.0 advertising-protocol bgp 7.7.7.7

inet.0: 12 destinations, 13 routes (12 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 100.100.100.0/32 Self 100 I

–OUTPUT (R7):
[email protected]> show route 100.100.100.0 receive-protocol bgp 8.8.8.8

inet.0: 12 destinations, 15 routes (12 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 100.100.100.0/32 8.8.8.8 100 I

Now on R7, ibgp learned route, advertise to R5:
Additional Theory: By default, only active BGP routes are advertised.
The rules are as simple as follows:
1. IBGP peers advertise routes received from EBGP peers to other IBGP peers.
2. EBGP peers advertise routes learned from IBGP or EBGP peers to other EBGP peers.
To be Noticed: IBGP peers do not advertise routes received from IBGP peers to other IBGP peers[unless it is functioning as a route reflector]. The purpose of the advertisement rules is to prevent routing loops on a BGP network.

[email protected]# edit protocols bgp group R7-To-R5
[edit protocols bgp group R7-To-R5]
[email protected]# set cluster 7.7.7.7
[email protected]# exit

[email protected]> show route advertising-protocol bgp 5.5.5.5 extensive

inet.0: 12 destinations, 15 routes (12 active, 0 holddown, 0 hidden)
* 100.100.100.0/32 (1 entry, 1 announced)
BGP group R7-To-R5 type Internal
Nexthop: 8.8.8.8
Localpref: 100
AS path: [500] I
Cluster ID: 7.7.7.7
Originator ID: 8.8.8.8

[email protected]> show route receive-protocol bgp 7.7.7.7 extensive

inet.0: 14 destinations, 14 routes (14 active, 0 holddown, 0 hidden)
* 100.100.100.0/32 (1 entry, 1 announced)
Accepted
Nexthop: 8.8.8.8
Localpref: 100
AS path: I (Originator)
Cluster list: 7.7.7.7
Originator ID: 8.8.8.8

[email protected]> show bgp neighbor 7.7.7.7 |match prefix
Active prefixes: 1
Received prefixes: 1
Accepted prefixes: 1
Advertised prefixes: 0


 

Without /With  Loopback

[email protected]> show log R5-R6

LOG for Established BGP session (i-e, b/w R5-R6)

Apr 12 11:09:58.758086 BGP SEND 60.60.60.5+179 -> 60.60.60.6+56266
Apr 12 11:09:58.758092 BGP SEND message type 2 (Update) length 23
Apr 12 11:09:58.758097 BGP SEND End of RIB: AFI 1 SAFI 1
Apr 12 11:09:58.758109 bgp_rt_walk_job: BGP init policy walk job done with group R5-To-R6 type Internal, table: inet.0
Apr 12 11:09:58.758115 bgp_rt_walk_job: BGP init policy walk job All done
Apr 12 11:09:58.758151 task_job_delete: delete background job BGP init policy walk for task BGP_Group_R5-To-R6
Apr 12 11:09:58.758161 background dispatch completed job BGP init policy walk for task BGP_Group_R5-To-R6
Apr 12 11:09:58.761588 task_process_events: recv ready for BGP_500.60.60.60.6+56266
Apr 12 11:09:58.761618 bgp_read_v4_message: receiving packet(s) from 60.60.60.6 (Internal AS 500)
Apr 12 11:09:58.761639
Apr 12 11:09:58.761639 BGP RECV 60.60.60.6+56266 -> 60.60.60.5+179
Apr 12 11:09:58.761646 BGP RECV message type 4 (KeepAlive) length 19
Apr 12 11:09:58.761652 bgp_read_v4_message: done with 60.60.60.6 (Internal AS 500) received 19 octets 0 updates 0 routes
Apr 12 11:09:58.763166 task_process_events: recv ready for BGP_500.60.60.60.6+56266
Apr 12 11:09:58.763185 bgp_read_v4_message: receiving packet(s) from 60.60.60.6 (Internal AS 500)
Apr 12 11:09:58.763196
Apr 12 11:09:58.763196 BGP RECV 60.60.60.6+56266 -> 60.60.60.5+179
Apr 12 11:09:58.763202 BGP RECV message type 2 (Update) length 23
Apr 12 11:09:58.763206 BGP RECV End of RIB: AFI 1 SAFI 1
Apr 12 11:09:58.763252 bgp_read_v4_message: done with 60.60.60.6 (Internal AS 500) received 23 octets 1 update 0 routes

LOG for “CONNECT”  BGP session (i-e, b/w R6-R8)

Apr 12 11:12:32.174271 task_connect: task BGP_500.80.80.80.8+179 addr 80.80.80.8+179
Apr 12 11:12:32.174364 task_timer_reset: reset BGP_500.80.80.80.8+179_Connect
Apr 12 11:12:32.174382 task_timer_set_oneshot_latest: timer BGP_500.80.80.80.8+179_Connect interval set to 32
Apr 12 11:13:04.184348 bgp_connect_timeout: BGP_500.80.80.80.8+179_Connect
Apr 12 11:13:04.184407 task_timer_reset: reset BGP_500.80.80.80.8+179_Connect
Apr 12 11:13:47.175388 task_process_events: connect ready for BGP_500.80.80.80.8+179
Apr 12 11:13:47.175455 bgp_connect_complete: error connecting to 80.80.80.8 (Internal AS 500): Socket is not connected
Apr 12 11:13:47.175470 bgp_close_socket: peer 80.80.80.8 (Internal AS 500)
Apr 12 11:13:47.175477 task_close: close socket 61 task BGP_500.80.80.80.8+179
Apr 12 11:13:47.175484 task_reset_socket: task BGP_500.80.80.80.8+179 socket 61
Apr 12 11:13:47.175552 bgp_event: peer 80.80.80.8 (Internal AS 500) old state Connect event OpenFail new state Idle
Apr 12 11:13:47.175858 bgp_event: peer 80.80.80.8 (Internal AS 500) old state Idle event Start new state Connect
Apr 12 11:13:47.175870 bgp_connect_start: peer 80.80.80.8 (Internal AS 500)
Apr 12 11:13:47.175875 bgp_event: peer 80.80.80.8 (Internal AS 500) old state Connect event ConnectRetry new state Connect
Apr 12 11:13:47.175903 task_get_socket: domain AF_INET type SOCK_STREAM protocol 0 socket 61
Apr 12 11:13:47.175923 task_set_option_internal: task BGP_500.80.80.80.8 socket 61 option RecvBuffer(0)

[email protected]> show bgp summary
Groups: 2 Peers: 2 Down peers: 0
Table Tot Paths Act Paths Suppressed History Damp State Pending
inet.0
0 0 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped…
60.60.60.6 500 71 71 0 0 30:50 0/0/0/0 0/0/0/0
70.70.70.7 500 56 56 0 0 24:10 0/0/0/0 0/0/0/0

[email protected]> show bgp neighbor
Peer: 60.60.60.6+56266 AS 500 Local: 60.60.60.5+179 AS 500
Type: Internal State: Established Flags:
Last State: OpenConfirm Last Event: RecvKeepAlive
Last Error: None
Options: Authentication key is configured
Holdtime: 90 Preference: 170
Number of flaps: 0
Peer ID: 6.6.6.6 Local ID: 5.5.5.5 Active Holdtime: 90
Keepalive Interval: 30 Group index: 0 Peer index: 0
BFD: disabled, down

[email protected]> show bgp summary 

Groups: 2 Peers: 2 Down peers: 0

Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending

inet.0               

                       0          0          0          0          0          0

Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped…

6.6.6.6                 500          3          4       0       1          47 0/0/0/0              0/0/0/0

7.7.7.7                 500         15         16       0       1        5:58 0/0/0/0              0/0/0/0

 

[email protected]> show bgp summary
Groups: 2 Peers: 2 Down peers: 0
Table Tot Paths Act Paths Suppressed History Damp State Pending
inet.0
0 0 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped…
60.60.60.5 500 71 72 0 0 31:26 0/0/0/0 0/0/0/0
80.80.80.8 500 50 50 0 0 21:26 0/0/0/0 0/0/0/0

[email protected]> show bgp summary 

Groups: 2 Peers: 2 Down peers: 0

Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending

inet.0               

                       0          0          0          0          0          0

Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped…

5.5.5.5                 500          5          5       0       1        1:00 0/0/0/0              0/0/0/0

8.8.8.8                 500          4          5       0       0        1:00 0/0/0/0              0/0/0/0

 

[email protected]> show bgp summary
Groups: 2 Peers: 2 Down peers: 0
Table Tot Paths Act Paths Suppressed History Damp State Pending
inet.0
0 0 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped…
70.70.70.5 500 57 58 0 0 25:08 0/0/0/0 0/0/0/0
90.90.90.8 500 51 51 0 0 21:44 0/0/0/0 0/0/0/0

[email protected]> show bgp summary 

Groups: 2 Peers: 2 Down peers: 0

Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending

inet.0               

                       0          0          0          0          0          0

Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped…

5.5.5.5                 500         16         16       0       1        6:17 0/0/0/0              0/0/0/0

8.8.8.8                 500         16         16       0       1        6:04 0/0/0/0              0/0/0/0

 

[email protected]> show bgp summary
Groups: 2 Peers: 2 Down peers: 0
Table Tot Paths Act Paths Suppressed History Damp State Pending
inet.0
0 0 0 0 0 0
Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped…
80.80.80.6 500 50 52 0 0 22:09 0/0/0/0 0/0/0/0
90.90.90.7 500 50 52 0 0 22:05 0/0/0/0 0/0/0/0

[email protected]> show bgp summary 

Groups: 2 Peers: 2 Down peers: 0

Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending

inet.0               

                       0          0          0          0          0          0

Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped…

6.6.6.6                 500          5          5       0       0        1:11 0/0/0/0              0/0/0/0

7.7.7.7                 500         15         16       0       1        6:10 0/0/0/0              0/0/0/0

 

eBGP With or Without a Loopback Address using Authentication

eBGP:

eBGP peering use the same kind of  configuration as iBGP for Authentication and Loopback. Below config shows Basic eBGP peering config with loopback advertisement  into eBGP .

 Devices Configuration:

[email protected]> show configuration |display set
set version 14.1R4.8
set groups R1-To-R2
set system host-name R1
set system root-authentication encrypted-password “$1$CAGTAoE3$C4CtKI82gDrLZr7kZb/B71”
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/0 unit 0 family inet address 10.10.10.1/24
set interfaces ge-0/0/1 unit 0 family inet address 20.20.20.1/24
set interfaces lo0 unit 0 family inet address 1.1.1.1/32
set routing-options autonomous-system 100
set protocols bgp group R1-To-R2 type external
set protocols bgp group R1-To-R2 export R1-loop
set protocols bgp group R1-To-R2 neighbor 10.10.10.2 peer-as 200
set protocols bgp group R1-To-R3 type external
set protocols bgp group R1-To-R3 peer-as 300
set protocols bgp group R1-To-R3 neighbor 20.20.20.3
set policy-options policy-statement R1-loop term t1 from interface lo0.0
set policy-options policy-statement R1-loop then accept

[email protected]> show configuration |display set
set version 14.1R4.8
set system host-name R2
set system root-authentication encrypted-password “$1$3uZoejHi$o/p3sErMK9gyTeKnsCObk/”
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/0 unit 0 family inet address 10.10.10.2/24
set interfaces ge-0/0/1 unit 0 family inet address 30.30.30.2/24
set interfaces lo0 unit 0 family inet address 2.2.2.2/32
set routing-options autonomous-system 200
set protocols bgp group R2-To-R1 type external
set protocols bgp group R2-To-R1 export R2-loop
set protocols bgp group R2-To-R1 neighbor 10.10.10.1 peer-as 100
set protocols bgp group R2-To-R4 type external
set protocols bgp group R2-To-R4 peer-as 400
set protocols bgp group R2-To-R4 neighbor 30.30.30.4
set policy-options policy-statement R2-loop term t1 from interface lo0.0
set policy-options policy-statement R2-loop then accept

[email protected]> show configuration |display set
set version 14.1R4.8
set system host-name R3
set system root-authentication encrypted-password “$1$WUX4GRHr$JRBeysSarhY8McSF2U7Uv/”
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/0 unit 0 family inet address 40.40.40.3/24
set interfaces ge-0/0/1 unit 0 family inet address 20.20.20.3/24
set interfaces lo0 unit 0 family inet address 3.3.3.3/32
set routing-options autonomous-system 300
set protocols bgp group R3-To-R4 type external
set protocols bgp group R3-To-R4 neighbor 40.40.40.4 peer-as 400
set protocols bgp group R3-To-R1 type external
set protocols bgp group R3-To-R1 peer-as 100
set protocols bgp group R3-To-R1 neighbor 20.20.20.1 export R3-loop
set policy-options policy-statement R3-loop term t1 from interface lo0.0
set policy-options policy-statement R3-loop then accept

[email protected]> show configuration |display set
set version 14.1R4.8
set system host-name R4
set system root-authentication encrypted-password “$1$l2Usj1wj$WqQBgv89JawjC5QWFh5lb1”
set system syslog user * any emergency
set system syslog file messages any notice
set system syslog file messages authorization info
set system syslog file interactive-commands interactive-commands any
set interfaces ge-0/0/0 unit 0 family inet address 40.40.40.4/24
set interfaces ge-0/0/1 unit 0 family inet address 30.30.30.4/24
set interfaces ge-0/0/2 unit 0 family inet address 50.50.50.4/29
set interfaces lo0 unit 0 family inet address 4.4.4.4/32
set routing-options autonomous-system 400
set protocols bgp group R4-To-R2 type external
set protocols bgp group R4-To-R2 peer-as 200
set protocols bgp group R4-To-R2 neighbor 30.30.30.2
set protocols bgp group R4-To-R3 type external
set protocols bgp group R4-To-R3 export R4-loop
set protocols bgp group R4-To-R3 peer-as 300
set protocols bgp group R4-To-R3 neighbor 40.40.40.3
set policy-options policy-statement R4-loop term t1 from interface lo0.0
set policy-options policy-statement R4-loop then accept

TASK Specific Config:

set routing-options autonomous-system 100
set protocols bgp group R1-To-R2 type external
set protocols bgp group R1-To-R2 export R1-loop
set protocols bgp group R1-To-R2 neighbor 10.10.10.2 peer-as 200
set protocols bgp group R1-To-R3 type external
set protocols bgp group R1-To-R3 peer-as 300
set protocols bgp group R1-To-R3 neighbor 20.20.20.3
set policy-options policy-statement R1-loop term t1 from interface lo0.0
set policy-options policy-statement R1-loop then accept

/** Additional Theory: 

2. EBGP peers advertise routes learned from IBGP or EBGP peers to other EBGP peers.

R4> set interfaces ge-0/0/3 unit 0 family inet address 200.200.200.4/24

—–  R2 learn 200.x from R4 and advertise to R1 (eBGP Peers) ———

[email protected]> show route 200.200.200.0 receive-protocol bgp 30.30.30.4

inet.0: 12 destinations, 18 routes (12 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 200.200.200.0/24 30.30.30.4 400 I

[email protected]> show route 200.200.200.0 advertising-protocol bgp 10.10.10.1

inet.0: 12 destinations, 18 routes (12 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 200.200.200.0/24 Self 400 I

—–  eBGP: R1 learn 200.x  ———

[email protected]> show route 200.200.200.0 receive-protocol bgp 10.10.10.2

inet.0: 12 destinations, 19 routes (12 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
200.200.200.0/24 10.10.10.2 200 400 I

—– iBGP:  R5 learn 200.x  ———

[email protected]> show route 200.200.200.4 receive-protocol bgp 50.50.50.4

inet.0: 18 destinations, 19 routes (18 active, 0 holddown, 0 hidden)
Prefix Nexthop MED Lclpref AS path
* 200.200.200.0/24 50.50.50.4 400 I

 

[email protected]> show bgp summary 

Groups: 2 Peers: 2 Down peers: 0

Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending

inet.0               

                       9          6          0          0          0          0

Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped…

10.10.10.2              200         84         86       0       0       36:28 2/3/3/0              0/0/0/0

20.20.20.3              300         87         84       0       0       36:23 4/6/6/0              0/0/0/0

 
 [email protected]> show bgp summary 
Groups: 2 Peers: 2 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0               
                       7          6          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped…
10.10.10.1              100         85         84       0       0       36:27 6/7/7/0              0/0/0/0
30.30.30.4              400         84         86       0       0       36:27 0/0/0/0              0/0/0/0
 
 [email protected]> show bgp summary 
Groups: 2 Peers: 2 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0               
                       8          5          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped…
20.20.20.1              100         83         87       0       0       36:23 1/2/2/0              0/0/0/0
40.40.40.4              400         85         85       0       0       36:27 4/6/6/0              0/0/0/0
 
[email protected]> show bgp summary 
Groups: 2 Peers: 2 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0               
                       5          4          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped…
30.30.30.2              200         86         85       0       0       36:27 3/4/4/0              0/0/0/0
40.40.40.3              300         85         86       0       0       36:27 1/1/1/0              0/0/0/0
 
Share on print
Print
Share on google
Google+
Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

The Juniper All-Access | Reading List

Leave a reply

Your email address will not be published. Required fields are marked *

ADENTECH guides

We love to help.

Get our newsletter, join the community: