Step 2: Verify BGP on a Border Router
Action
To verify the BGP configuration of a border router, enter the following JUNOS CLI operational mode command:
user@host>show configurationSample Output
The following sample output is for a BGP configuration on two border routers from AS 65002 (
R2andR4) shown in Figure 14:user@R2>show configuration[...Output truncated...]interfaces {so-0/0/0 {unit 0 {family inet {address 10.1.12.2/30;}family iso;}}so-0/0/1 {unit 0 {family inet {address 10.1.23.1/30;}family iso;}}so-0/0/3 {unit 0 {family inet {address 10.1.24.1/30;}family iso;}}lo0 {unit 0 {family inet {address 10.0.0.2/32;}family iso {address 49.0002.1000.0000.0002.00;}}}}routing-options {[...Output truncated...]router-id 10.0.0.2;autonomous-system 65002;}protocols {bgp {group internal {type internal;export next-hop-self;neighbor 10.0.0.3;neighbor 10.0.0.4;neighbor 10.0.0.6;}group toR1 {type external;import import-toR1;peer-as 65001;neighbor 10.1.12.1;}}isis {level 1 disable;interface all {level 2 metric 10;}interface lo0.0;}}policy-options {policy-statement next-hop-self{term change-next-hop {from neighbor 10.1.12.1;then {next-hop self;}}}policy-statement import-toR1 {term 1 {from {route-filter 100.100.1.0/24 exact;}then {local-preference 200;}}}user@R4>show configuration[...Output truncated...]interfaces {so-0/0/1 {unit 0 {family inet {address 10.1.46.1/30;}family iso;}}so-0/0/2 {unit 0 {family inet {address 10.1.45.1/30;}family iso;}}so-0/0/3 {unit 0 {family inet {address 10.1.24.2/30;}family iso;}}lo0 {unit 0 {family inet {address 10.0.0.4/32;}family iso {address 49.0001.1000.0000.0004.00;}}}}routing-options {[...Output truncated...]router-id 10.0.0.4;autonomous-system 65002;}protocols {bgp {group internal {type internal;local-address 10.0.0.4;export next-hop-self;neighbor 10.0.0.2;neighbor 10.0.0.3;neighbor 10.0.0.6;}group toR5 {type external;peer-as 65001;neighbor 10.1.45.2;}}isis {level 1 disable;interface all {level 2 metric 10;}interface lo0.0;}}policy-options {policy-statement next-hop-self{term change-next-hop {from neighbor 10.1.45.2;then {next-hop self;}}}What It Means
The sample output shows a basic BGP configuration on border routers
R2andR4. Both routers have the AS (65002) included at the [routing-options] hierarchy level. Each router has two groups included at the [protocols bgp groupgroup] hierarchy level. External peers are included in the external group, eithertoR1ortoR5, depending on the router. Internal peers are included in theinternalgroup. The underlying IGP protocol is IS-IS on both routers, and relevant interfaces are configured to run IS-IS.Note that in the configuration on both routers, the router ID is manually configured to avoid duplicate router ID problems, and the
next-hop-selfstatement is included to avoid any BGP next-hop reachability problems.