Verify the BGP Configuration
Purpose
For BGP to run on the router, you must define the local AS number, configure at least one group, and include information about at least one peer in the group (the peer's IP address and AS number). When BGP is part of an MPLS network, you must ensure that the LSP is configured with a destination IP address equal to the BGP next hop in order for BGP routes to be installed with the LSP as the next hop for those routes.
Action
To verify the BGP configuration, enter the following Junos OS CLI operational mode command:
Sample Output 1
user@R1> show configuration [...Output truncated...] interfaces { so-0/0/0 { unit 0 { family inet { address 10.1.12.1/30; } family iso; family mpls; } } so-0/0/1 { unit 0 { family inet { address 10.1.15.1/30; } family iso; family mpls; } } so-0/0/2 { unit 0 { family inet { address 10.1.13.1/30; } family iso; family mpls; } } fxp0 { unit 0 { family inet { address 192.168.70.143/21; } } } lo0 { unit 0 { family inet { address 10.0.0.1/32; } family iso { address 49.0004.1000.0000.0001.00; } } } } routing-options { [...Output truncated...] route 100.100.1.0/24 reject; } router-id 10.0.0.1; autonomous-system 65432; } protocols { rsvp { interface so-0/0/0.0; interface so-0/0/1.0; interface so-0/0/2.0; interface fxp0.0 { disable; } } mpls { label-switched-path R1-to-R6 { to 10.0.0.6; <<< destination address of the LSP } inactive: interface so-0/0/0.0; inactive: interface so-0/0/1.0; interface so-0/0/2.0; interface fxp0.0 { disable; } } bgp { export send-statics; <<< missing local-address statement group internal { type internal; neighbor 10.0.0.2; neighbor 10.0.0.5; neighbor 10.0.0.4; neighbor 10.0.0.6; neighbor 10.0.0.3; neighbor 10.1.36.2; <<< incorrect interface address } } isis { level 1 disable; interface so-0/0/0.0; interface so-0/0/1.0; interface so-0/0/2.0; interface all { level 2 metric 10; } interface fxp0.0 { disable; } interface lo0.0 { passive; } } ospf { traffic-engineering; area 0.0.0.0 { interface so-0/0/0.0; interface so-0/0/1.0; interface so-0/0/2.0; interface lo0.0; { passive } } } } policy-options { policy-statement send-statics { term statics { from { route-filter 100.100.1.0/24 exact; } then accept; } } }
Sample Output 2
user@R6> show configuration [...Output truncated...] interfaces { so-0/0/0 { unit 0 { family inet { address 10.1.56.2/30; } family iso; family mpls; } } so-0/0/1 { unit 0 { family inet { address 10.1.46.2/30; } family iso; family mpls; } } so-0/0/2 { unit 0 { family inet { address 10.1.26.2/30; } family iso; family mpls; } } so-0/0/3 { unit 0 { family inet { address 10.1.36.2/30; } family iso; family mpls; } } fxp0 { unit 0 { family inet { address 192.168.70.148/21; } } } lo0 { unit 0 { family inet { address 10.0.0.6/32; address 127.0.0.1/32; } family iso { address 49.0004.1000.0000.0006.00; } } } } routing-options { [...Output truncated...] route 100.100.6.0/24 reject; } router-id 10.0.0.6; autonomous-system 65432; } protocols { rsvp { interface so-0/0/0.0; interface so-0/0/1.0; interface so-0/0/2.0; interface so-0/0/3.0; interface fxp0.0 { disable; } } mpls { label-switched-path R6-to-R1 { to 10.0.0.1; <<< destination address of the reverse LSP } inactive: interface so-0/0/0.0; inactive: interface so-0/0/1.0; inactive: interface so-0/0/2.0; interface so-0/0/3.0; } bgp { group internal { type internal; export send-statics; <<< missing local-address statement neighbor 10.0.0.2; neighbor 10.0.0.3; neighbor 10.0.0.4; neighbor 10.0.0.5; neighbor 10.0.0.1; neighbor 10.1.13.1; <<< incorrect interface address } } isis { level 1 disable; interface all { level 2 metric 10; } interface fxp0.0 { disable; } interface lo0.0 { passive; } } ospf { traffic-engineering; area 0.0.0.0 { interface so-0/0/0.0; interface so-0/0/1.0; interface so-0/0/2.0; interface so-0/0/3.0; interface lo0.0 { passive; } } } } policy-options { policy-statement send-statics { term statics { from { route-filter 100.100.6.0/24 exact; } then accept; } } }
Meaning
The sample output shows the BGP configurations on ingress router R1 and egress router R6. Both configurations show the local AS (65432), one group (internal), and six peers configured. The underlying interior gateway protocol is IS-IS, and the relevant interfaces are configured to run IS-IS.
![]() | Note: In this configuration, the RID is manually configured to avoid any duplicate RID problems, and all interfaces configured with BGP include the family inet statement at the [edit interfaces type-fpc/pic/port unit logical-unit-number] hierarchy level. |
Sample output for ingress router R1 and egress router R6 shows that the BGP protocol configuration is missing the local-address statement for the internal group. When the local-address statement is configured, BGP packets are forwarded from the local router loopback (lo0) interface address, which is the address to which BGP peers are peering. If the local-address statement is not configured, BGP packets are forwarded from the outgoing interface address, which does not match the address to which BGP peers are peering, and BGP does not come up.
On the ingress router, the IP address (10.0.0.1) in the local-address statement should be the same as the address configured for the LSP on the egress router (R6) in the to statement at the [edit protocols mpls label-switched-path lsp-path-name ] hierarchy level. BGP uses this address, which is identical to the LSP address, to forward BGP traffic through the LSP.
In addition, the BGP configuration on R1 includes two IP addresses for R6, an interface address (10.1.36.2) and a loopback (lo0) interface address (10.0.0.6), resulting in the LSP destination address (10.0.0.6) not matching the BGP next-hop address (10.1.36.2). The BGP configuration on R6 also includes two IP addresses for R1, an interface address (10.1.13.1) and a loopback (lo0) interface address, resulting in the reverse LSP destination address (10.0.0.1) not matching the BGP next-hop address (10.1.13.1).
In this instance, because the local-address statement is missing in the BGP configurations of both routers and the LSP destination address does not match the BGP next-hop address, BGP is not using the LSP to forward traffic.