configuring external bgp point-to-point peer sessions.pdf
Post on 01-Jun-2018
231 Views
Preview:
TRANSCRIPT
-
8/9/2019 Configuring External BGP Point-to-Point Peer Sessions.pdf
1/7
Example: Configuring External BGP Point-
to-Point Peer Sessions
This example shows how to configure BGP point-to-point peer sessions. Requirements
Overview
Configuration
Verification
RequirementsBefore you begin, if the default BGP policy is not adequate for your network, configure routingpolicies to filter incoming BGP routes and to advertise BGP routes.
OverviewFigure 1shows a network with BGP peer sessions. In the sample network, Device E in AS 17 hasBGP peer sessions to a group of peers called ext er nal - peer s. Peers A, B, and C reside in AS
22 and have IP addresses 10.10.10.2, 10.10.10.6, and 10.10.10.10. Peer D resides in AS 79, at IPaddress 10.21.7.2. This example shows the configuration on Device E.
Figure 1: Typical Network with BGP Peer Sessions
http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e64http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e64http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e70http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e70http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e84http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e84http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e397http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e397http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23fig-bgp-peering-sessionshttp://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23fig-bgp-peering-sessionshttp://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23fig-bgp-peering-sessionshttp://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e397http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e84http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e70http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e64 -
8/9/2019 Configuring External BGP Point-to-Point Peer Sessions.pdf
2/7
Configuration
CLI Quick Configuration
To quickly configure this example, copy the following commands, paste them into a text file,remove any line breaks, change any details necessary to match your network configuration, and
then copy and paste the commands into the CLI at the [edi t ] hierarchy level.set interfaces ge-1/2/0 unit 0 description to-Aset interfaces ge-1/2/0 unit 0 family inet address 10.10.10.1/30set
interfaces ge-0/0/1 unit 5 description to-Bset interfaces ge-0/0/1 unit 5 family inet address 10.10.10.5/30set
interfaces ge-0/1/0 unit 9 description to-Cset interfaces ge-0/1/0 unit 9 family inet address 10.10.10.9/30set
interfaces ge-1/2/1 unit 21 description to-Dset interfaces ge-1/2/1 unit 21 family inet address 10.21.7.1/30set
protocols bgp group external-peers type externalset protocols bgp group external-peers peer-as 22set
protocols bgp group external-peers neighbor 10.10.10.2set protocols bgp group external-peers neighbor
10.10.10.6set protocols bgp group external-peers neighbor 10.10.10.10set protocols bgp group external-peers
neighbor 10.21.7.2 peer-as 79set routing-options autonomous-system 17
Step-by-Step ProcedureThe following example requires you to navigate various levels in the configuration hierarchy.
For information about navigating the CLI, seeUsing the CLI Editor in Configuration Mode
in theCLI
User Guide.
To configure the BGP peer sessions:
1. Configure the interfaces to Peers A, B, C, and D.
[ edi t i nt er f aces] user@E# set ge-1/2/0 unit 0 description to-Auser @E# set ge-1/2/0 unit 0 family inetaddress 10.10.10.1/30user @E# set ge-0/0/1 unit 5 description to-Buser @E# set ge-0/0/1 unit 5 family inetaddress 10.10.10.5/30user @E# set ge-0/1/0 unit 9 description to-Cuser @E# set ge-0/1/0 unit 9 family inetaddress 10.10.10.9/30user @E# set ge-1/2/1 unit 21 description to-Duser @E# set ge-1/2/1 unit 21 family inetaddress 10.21.7.1/30
2. Set the autonomous system (AS) number.
[ edi t r out i ng- opt i ons] user @E# set autonomous-system 17
3. Create the BGP group, and add the external neighbor addresses.
[ edi t pr otocol s bgp gr oup exter nal - peer s] user@E# set neighbor 10.10.10.2user @E# setneighbor 10.10.10.6user @E# set neighbor 10.10.10.10
4. Specify the autonomous system (AS) number of the external AS.
[ edi t pr otocol s bgp gr oup exter nal - peer s] user@E# set peer-as 22
5. Add Peer D, and set the AS number at the individual neighbor level.
The neighbor configuration overrides the group configuration. So, while peer - as 22is set for all the other neighbors in the group, peer - as
79is set for neighbor 10.21.7.2.[ edi t pr otocol s bgp gr oup exter nal - peer s] user@E# set neighbor 10.21.7.2 peer-as 79
6. Set the peer type to external BGP (EBGP).
[ edi t pr otocol s bgp gr oup exter nal - peer s] user@E# set type external
Results
http://www.juniper.net/documentation/en_US/junos13.2/topics/reference/general/cli-editor-configuration-mode-quick-reference-using.htmlhttp://www.juniper.net/documentation/en_US/junos13.2/topics/reference/general/cli-editor-configuration-mode-quick-reference-using.htmlhttp://www.juniper.net/documentation/en_US/junos13.2/topics/reference/general/cli-editor-configuration-mode-quick-reference-using.htmlhttp://www.juniper.net/documentation/en_US/junos13.2/information-products/pathway-pages/junos-cli/junos-cli.htmlhttp://www.juniper.net/documentation/en_US/junos13.2/information-products/pathway-pages/junos-cli/junos-cli.htmlhttp://www.juniper.net/documentation/en_US/junos13.2/information-products/pathway-pages/junos-cli/junos-cli.htmlhttp://www.juniper.net/documentation/en_US/junos13.2/information-products/pathway-pages/junos-cli/junos-cli.htmlhttp://www.juniper.net/documentation/en_US/junos13.2/information-products/pathway-pages/junos-cli/junos-cli.htmlhttp://www.juniper.net/documentation/en_US/junos13.2/information-products/pathway-pages/junos-cli/junos-cli.htmlhttp://www.juniper.net/documentation/en_US/junos13.2/topics/reference/general/cli-editor-configuration-mode-quick-reference-using.html -
8/9/2019 Configuring External BGP Point-to-Point Peer Sessions.pdf
3/7
From configuration mode, confirm your configuration by entering the show i nt er f aces, show
pr ot ocol s, and show r out i ng- opt i onscommands. If the output does not display the intended
configuration, repeat the instructions in this example to correct the configuration.[ edi t ] user@E# show i nterf acesge- 1/ 2/ 0 {uni t 0 {descr i pt i on t o- A; f ami l y i net {addr ess 10. 10. 10. 1/ 30; }}}ge- 0/ 0/ 1 {uni t 5 {descr i pt i on t o- B; f ami l y i net {addr ess 10. 10. 10. 5/ 30; }}}
ge- 0/ 1/ 0 {uni t 9 {descr i pt i on t o- C; f ami l y i net {addr ess 10. 10. 10. 9/ 30; }}}ge- 1/ 2/ 1 {uni t 21 {descr i pt i on t o- D; f ami l y i net {addr ess 10. 21. 7. 1/ 30; }}}
[ edi t ] user@E# show pr otocol sbgp {gr oup exter nal - peer s {t ype ext er nal ; peer - as 22; nei ghbor10. 10. 10. 2; nei ghbor 10. 10. 10. 6; nei ghbor 10. 10. 10. 10; nei ghbor 10. 21. 7. 2 {peer -as 79; }}}
[ edi t ] user@E# show r out i ng- opt i onsaut onomous- syst em17;
If you are done configuring the device, enter commi t from configuration mode.
Verification
Confirm that the configuration is working properly. Verifying BGP Neighbors
Verifying BGP Groups
Verifying BGP Summary Information
Verifying BGP Neighbors
Purpose
Verify that BGP is running on configured interfaces and that the BGP session is active for eachneighbor address.
ActionFrom operational mode, run the show bgp nei ghbor command.user @E> show bgp neighborPeer : 10. 10. 10. 2+179 AS 22 Local : 10. 10. 10. 1+65406 AS 17
Type: Ext er nal St at e: Est abl i shed Fl ags: Last St ate: OpenConf i r m Last Event : RecvKeepAl i veLast Er r or : NoneOpt i ons: Hol dt i me: 90 Pref erence: 170Number of f l aps: 0Peer I D: 10. 10. 10. 2 Local I D: 10. 10. 10. 1 Act i ve Hol dt i me: 90Keepal i ve I nt er val : 30 Peer i ndex: 0BFD: di sabl ed, down
Local I nt er f ace: ge- 1/ 2/ 0. 0NLRI f or r est ar t conf i gur ed on peer : i net - uni castNLRI adver t i sed by peer : i net - uni castNLRI f or t hi s sessi on: i net - uni castPeer suppor t s Ref r esh capabi l i t y ( 2)Rest art t i me conf i gur ed on t he peer : 120St al e rout es f r om peer ar e kept f or : 300Rest art t i me request ed by t hi s peer : 120NLRI t hat peer suppor t s restar t f or : i net - uni cast
http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e405http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e405http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e424http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e424http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e443http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e443http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e443http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e424http://www.juniper.net/documentation/en_US/junos13.2/topics/example/routing-protocol-bgp-security-point-to-point-peering-session-configuring-cli.html%23jd0e405 -
8/9/2019 Configuring External BGP Point-to-Point Peer Sessions.pdf
4/7
NLRI t hat r est ar t i s negot i at ed f or : i net - uni castNLRI of r ecei ved end- of - r i b mar ker s: i net - uni castNLRI of al l end- of - r i b mar ker s sent : i net - uni castPeer suppor t s 4 byt e AS ext ensi on ( peer - as 22)Peer does not suppor t Addpat hTabl e i net . 0 Bi t : 10000
RI B St ate: BGP r est art i s compl et eSend st ate: i n syncActi ve pr ef i xes: 0Recei ved pr ef i xes: 0Accept ed pr ef i xes: 0Suppr essed due t o dampi ng: 0Adver t i sed pr ef i xes: 0
Last t r af f i c ( seconds) : Recei ved 10 Sent 6 Checked 1I nput messages: Tot al 8522 Updat es 1 Ref r eshes 0 Oct et s 161922Output messages: Total 8433 Updat es 0 Ref r eshes 0 Oct et s 160290Output Queue[ 0] : 0
Peer : 10. 10. 10. 6+54781 AS 22 Local : 10. 10. 10. 5+179 AS 17Type: Ext er nal St at e: Est abl i shed Fl ags:
Last St ate: OpenConf i r m Last Event : RecvKeepAl i veLast Er r or : NoneOpt i ons: Hol dt i me: 90 Pref erence: 170Number of f l aps: 0Peer I D: 10. 10. 10. 6 Local I D: 10. 10. 10. 1 Act i ve Hol dt i me: 90Keepal i ve I nt er val : 30 Peer i ndex: 1BFD: di sabl ed, downLocal I nt er f ace: ge- 0/ 0/ 1. 5NLRI f or r est ar t conf i gur ed on peer : i net - uni castNLRI adver t i sed by peer : i net - uni castNLRI f or t hi s sessi on: i net - uni castPeer suppor t s Ref r esh capabi l i t y ( 2)Rest art t i me conf i gur ed on t he peer : 120St al e rout es f r om peer ar e kept f or : 300Rest art t i me request ed by t hi s peer : 120NLRI t hat peer suppor t s restar t f or : i net - uni castNLRI t hat r est ar t i s negot i at ed f or : i net - uni castNLRI of r ecei ved end- of - r i b mar ker s: i net - uni castNLRI of al l end- of - r i b mar ker s sent : i net - uni castPeer suppor t s 4 byt e AS ext ensi on ( peer - as 22)Peer does not suppor t Addpat hTabl e i net . 0 Bi t : 10000
RI B St ate: BGP r est art i s compl et eSend st ate: i n syncActi ve pr ef i xes: 0Recei ved pr ef i xes: 0
Accept ed pr ef i xes: 0Suppr essed due t o dampi ng: 0Adver t i sed pr ef i xes: 0
Last t r af f i c ( seconds) : Recei ved 12 Sent 6 Checked 33I nput messages: Tot al 8527 Updat es 1 Ref r eshes 0 Oct et s 162057Output messages: Total 8430 Updat es 0 Ref r eshes 0 Oct et s 160233Output Queue[ 0] : 0
Peer : 10. 10. 10. 10+55012 AS 22 Local : 10. 10. 10. 9+179 AS 17Type: Ext er nal St at e: Est abl i shed Fl ags:
-
8/9/2019 Configuring External BGP Point-to-Point Peer Sessions.pdf
5/7
Last St ate: OpenConf i r m Last Event : RecvKeepAl i veLast Er r or : NoneOpt i ons: Hol dt i me: 90 Pref erence: 170Number of f l aps: 0Peer I D: 10. 10. 10. 10 Local I D: 10. 10. 10. 1 Act i ve Hol dt i me: 90Keepal i ve I nt er val : 30 Peer i ndex: 2BFD: di sabl ed, downLocal I nt er f ace: f e- 0/ 1/ 0. 9NLRI f or r est ar t conf i gur ed on peer : i net - uni castNLRI adver t i sed by peer : i net - uni castNLRI f or t hi s sessi on: i net - uni castPeer suppor t s Ref r esh capabi l i t y ( 2)Rest art t i me conf i gur ed on t he peer : 120St al e rout es f r om peer ar e kept f or : 300Rest art t i me request ed by t hi s peer : 120NLRI t hat peer suppor t s restar t f or : i net - uni castNLRI t hat r est ar t i s negot i at ed f or : i net - uni castNLRI of r ecei ved end- of - r i b mar ker s: i net - uni castNLRI of al l end- of - r i b mar ker s sent : i net - uni cast
Peer suppor t s 4 byt e AS ext ensi on ( peer - as 22)Peer does not suppor t Addpat hTabl e i net . 0 Bi t : 10000
RI B St ate: BGP r est art i s compl et eSend st ate: i n syncActi ve pr ef i xes: 0Recei ved pr ef i xes: 0Accept ed pr ef i xes: 0Suppr essed due t o dampi ng: 0Adver t i sed pr ef i xes: 0
Last t r af f i c ( seconds) : Recei ved 15 Sent 6 Checked 37I nput messages: Tot al 8527 Updat es 1 Ref r eshes 0 Oct et s 162057Output messages: Total 8429 Updat es 0 Ref r eshes 0 Oct et s 160214Output Queue[ 0] : 0
Peer : 10. 21. 7. 2+61867 AS 79 Local : 10. 21. 7. 1+179 AS 17Type: Ext er nal St at e: Est abl i shed Fl ags: Last St ate: OpenConf i r m Last Event : RecvKeepAl i veLast Er r or : NoneOpt i ons: Hol dt i me: 90 Pref erence: 170Number of f l aps: 0Peer I D: 10. 21. 7. 2 Local I D: 10. 10. 10. 1 Act i ve Hol dt i me: 90Keepal i ve I nt er val : 30 Peer i ndex: 3BFD: di sabl ed, downLocal I nt er f ace: ge- 1/ 2/ 1. 21NLRI f or r est ar t conf i gur ed on peer : i net - uni cast
NLRI adver t i sed by peer : i net - uni castNLRI f or t hi s sessi on: i net - uni castPeer suppor t s Ref r esh capabi l i t y ( 2)Rest art t i me conf i gur ed on t he peer : 120St al e rout es f r om peer ar e kept f or : 300Rest art t i me request ed by t hi s peer : 120NLRI t hat peer suppor t s restar t f or : i net - uni castNLRI t hat r est ar t i s negot i at ed f or : i net - uni castNLRI of r ecei ved end- of - r i b mar ker s: i net - uni castNLRI of al l end- of - r i b mar ker s sent : i net - uni cast
-
8/9/2019 Configuring External BGP Point-to-Point Peer Sessions.pdf
6/7
Peer suppor t s 4 byt e AS ext ensi on ( peer - as 79)Peer does not suppor t Addpat hTabl e i net . 0 Bi t : 10000
RI B St ate: BGP r est art i s compl et eSend st ate: i n syncActi ve pr ef i xes: 0Recei ved pr ef i xes: 0Accept ed pr ef i xes: 0Suppr essed due t o dampi ng: 0Adver t i sed pr ef i xes: 0
Last t r af f i c ( seconds) : Recei ved 28 Sent 24 Checked 47I nput messages: Tot al 8521 Updat es 1 Ref r eshes 0 Oct et s 161943Output messages: Total 8427 Updat es 0 Ref r eshes 0 Oct et s 160176Output Queue[ 0] : 0
Verifying BGP Groups
Purpose
Verify that the BGP groups are configured correctly.
Action
From operational mode, run the show bgp groupcommand.user @E> show bgp groupGr oup Type: Ext ernal Local AS: 17
Name: ext ernal - peer s I ndex: 0 Fl ags: Hol dt i me: 0Tot al peer s: 4 Est abl i shed: 410. 10. 10. 2+17910. 10. 10. 6+5478110. 10. 10. 10+5501210. 21. 7. 2+61867
i net . 0: 0/ 0/ 0/ 0
Gr oups: 1 Peer s: 4 Exter nal : 4 I nt er nal : 0 Down peer s: 0 Fl aps: 0Tabl e Tot Pat hs Act Pat hs Suppr essed Hi st or y Damp St at ePendi ngi net . 0 0 0 0 0 00
Verifying BGP Summary Information
Purpose
Verify that the BGP configuration is correct.
Action
From operational mode, run the show bgp summar ycommand.user @E> show bgp summaryGr oups: 1 Peer s: 4 Down peer s: 0Tabl e Tot Pat hs Act Pat hs Suppressed Hi st or y Damp St at ePendi ngi net . 0 0 0 0 0 00
-
8/9/2019 Configuring External BGP Point-to-Point Peer Sessions.pdf
7/7
Peer AS I nPkt OutPkt OutQ Fl aps Last Up/ DwnSt ate| #Act i ve/ Recei ved/ Accept ed/ Damped. . .10. 10. 10. 2 22 8559 8470 0 0 2d 16: 12: 560/ 0/ 0/ 0 0/ 0/ 0/ 010. 10. 10. 6 22 8566 8468 0 0 2d 16: 12: 120/ 0/ 0/ 0 0/ 0/ 0/ 010. 10. 10. 10 22 8565 8466 0 0 2d 16: 11: 310/ 0/ 0/ 0 0/ 0/ 0/ 010. 21. 7. 2 79 8560 8465 0 0 2d 16: 10: 580/ 0/ 0/ 0 0/ 0/ 0/ 0Published: 2014-07-23
top related