Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

BGP on Logical Systems

date_range 26-Feb-24

Logical Systems enable you to configure the internal BGP sessions. For more information, see the following topics:

Example: Configuring Internal BGP Peering Sessions on Logical Systems

This example shows how to configure internal BGP peer sessions on logical systems.

Requirements

In this example, no special configuration beyond device initialization is required.

Overview

In this example, you configure internal BGP (IBGP) peering sessions.

In the sample network, the devices in AS 17 are fully meshed in the group internal-peers. The devices have loopback addresses 192.168.6.5, 192.163.6.4, and 192.168.40.4.

Figure 1 shows a typical network with internal peer sessions.

Figure 1: Typical Network with IBGP SessionsTypical Network with IBGP Sessions

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 [edit] hierarchy level.

content_copy zoom_out_map
set logical-systems A interfaces lt-0/1/0 unit 1 description to-B
set logical-systems A interfaces lt-0/1/0 unit 1 encapsulation ethernet
set logical-systems A interfaces lt-0/1/0 unit 1 peer-unit 2
set logical-systems A interfaces lt-0/1/0 unit 1 family inet address 10.10.10.1/30
set logical-systems A interfaces lo0 unit 1 family inet address 192.168.6.5/32
set logical-systems A protocols bgp group internal-peers type internal
set logical-systems A protocols bgp group internal-peers local-address 192.168.6.5
set logical-systems A protocols bgp group internal-peers export send-direct
set logical-systems A protocols bgp group internal-peers neighbor 192.163.6.4
set logical-systems A protocols bgp group internal-peers neighbor 192.168.40.4
set logical-systems A protocols ospf area 0.0.0.0 interface lo0.1 passive
set logical-systems A protocols ospf area 0.0.0.0 interface lt-0/1/0.1
set logical-systems A policy-options policy-statement send-direct term 2 from protocol direct
set logical-systems A policy-options policy-statement send-direct term 2 then accept
set logical-systems A routing-options router-id 192.168.6.5
set logical-systems A routing-options autonomous-system 17
set logical-systems B interfaces lt-0/1/0 unit 2 description to-A
set logical-systems B interfaces lt-0/1/0 unit 2 encapsulation ethernet
set logical-systems B interfaces lt-0/1/0 unit 2 peer-unit 1
set logical-systems B interfaces lt-0/1/0 unit 2 family inet address 10.10.10.2/30
set logical-systems B interfaces lt-0/1/0 unit 5 description to-C
set logical-systems B interfaces lt-0/1/0 unit 5 encapsulation ethernet
set logical-systems B interfaces lt-0/1/0 unit 5 peer-unit 6
set logical-systems B interfaces lt-0/1/0 unit 5 family inet address 10.10.10.5/30
set logical-systems B interfaces lo0 unit 2 family inet address 192.163.6.4/32
set logical-systems B protocols bgp group internal-peers type internal
set logical-systems B protocols bgp group internal-peers local-address 192.163.6.4
set logical-systems B protocols bgp group internal-peers export send-direct
set logical-systems B protocols bgp group internal-peers neighbor 192.168.40.4
set logical-systems B protocols bgp group internal-peers neighbor 192.168.6.5
set logical-systems B protocols ospf area 0.0.0.0 interface lo0.2 passive
set logical-systems B protocols ospf area 0.0.0.0 interface lt-0/1/0.2
set logical-systems B protocols ospf area 0.0.0.0 interface lt-0/1/0.5
set logical-systems B policy-options policy-statement send-direct term 2 from protocol direct
set logical-systems B policy-options policy-statement send-direct term 2 then accept
set logical-systems B routing-options router-id 192.163.6.4
set logical-systems B routing-options autonomous-system 17
set logical-systems C interfaces lt-0/1/0 unit 6 description to-B
set logical-systems C interfaces lt-0/1/0 unit 6 encapsulation ethernet
set logical-systems C interfaces lt-0/1/0 unit 6 peer-unit 5
set logical-systems C interfaces lt-0/1/0 unit 6 family inet address 10.10.10.6/30
set logical-systems C interfaces lo0 unit 3 family inet address 192.168.40.4/32
set logical-systems C protocols bgp group internal-peers type internal
set logical-systems C protocols bgp group internal-peers local-address 192.168.40.4
set logical-systems C protocols bgp group internal-peers export send-direct
set logical-systems C protocols bgp group internal-peers neighbor 192.163.6.4
set logical-systems C protocols bgp group internal-peers neighbor 192.168.6.5
set logical-systems C protocols ospf area 0.0.0.0 interface lo0.3 passive
set logical-systems C protocols ospf area 0.0.0.0 interface lt-0/1/0.6
set logical-systems C policy-options policy-statement send-direct term 2 from protocol direct
set logical-systems C policy-options policy-statement send-direct term 2 then accept
set logical-systems C routing-options router-id 192.168.40.4
set logical-systems C routing-options autonomous-system 17

Device A

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure internal BGP peer sessions on Device A:

  1. Configure the interfaces.

    content_copy zoom_out_map
    [edit logical-systems A interfaces lt-0/1/0 unit 1]
    user@R1# set description to-B
    user@R1# set encapsulation ethernet
    user@R1# set peer-unit 2
    user@R1# set family inet address 10.10.10.1/30
    user@R1# set family inet address 192.168.6.5/32
    user@R1# up
    user@R1# up
    [edit  logical-systems A interfaces]
    user@R1# set lo0 unit 1 family inet address 192.168.6.5/32
    user@R1# exit
    [edit]
    user@R1# edit logical-systems B interfaces lt-0/1/0
    [edit logical-systems B interfaces lt-0/1/0]
    user@R1# set unit 2 description to-A
    user@R1# set unit 2 encapsulation ethernet
    user@R1# set unit 2 peer-unit 1
    user@R1# set unit 2 family inet address 10.10.10.2/30
    user@R1# set unit 5 description to-C
    user@R1# set unit 5 encapsulation ethernet
    user@R1# set unit 5 peer-unit 6
    user@R1# set family inet address 10.10.10.5/30
    user@R1# up
    [edit logical-systems B interfaces]
    user@R1# set lo0 unit 2 family inet address 192.163.6.4/32
    user@R1# exit
    [edit]
    user@R1# edit logical-systems C interfaces lt-0/1/0 unit 6
    [edit logical-systems C interfaces lt-0/1/0 unit 6]
    set description to-B
    set encapsulation ethernet
    set peer-unit 5
    set family inet address 10.10.10.6/30
    user@R1# up
    user@R1# up
    [edit  logical-systems C interfaces]
    set lo0 unit 3 family inet address 192.168.40.4/32
    
  2. Configure BGP.

    On Logical System A, the neighbor statements are included for both Device B and Device C, even though Logical System A is not directly connected to Device C.

    content_copy zoom_out_map
    [edit logical-systems A protocols bgp group internal-peers]
    user@R1# set type internal
    user@R1# set local-address 192.168.6.5
    user@R1# set export send-direct
    user@R1# set neighbor 192.163.6.4
    user@R1# set neighbor 192.168.40.4
    [edit logical-systems B protocols bgp group internal-peers]
    user@R1# set type internal
    user@R1# set local-address 192.163.6.4
    user@R1# set export send-direct
    user@R1# set neighbor 192.168.40.4
    user@R1# set neighbor 192.168.6.5
    [edit logical-systems C protocols bgp group internal-peers]
    user@R1# set type internal
    user@R1# set local-address 192.168.40.4
    user@R1# set export send-direct
    user@R1# set neighbor 192.163.6.4
    user@R1# set neighbor 192.168.6.5
    
  3. Configure OSPF.

    content_copy zoom_out_map
    [edit logical-systems A protocols ospf area 0.0.0.0]
    user@R1# set interface lo0.1 passive
    user@R1# set interface lt-0/1/0.1
    [edit logical-systems A protocols ospf area 0.0.0.0]
    user@R1# set interface lo0.2 passive
    user@R1# set interface lt-0/1/0.2
    user@R1# set interface lt-0/1/0.5
    [edit logical-systems A protocols ospf area 0.0.0.0]
    user@R1# set interface lo0.3 passive
    user@R1# set interface lt-0/1/0.6
    
  4. Configure a policy that accepts direct routes.

    Other useful options for this scenario might be to accept routes learned through OSPF or local routes.

    content_copy zoom_out_map
    [edit logical-systems A policy-options policy-statement send-direct term 2]
    user@R1# set from protocol direct
    user@R1# set then accept
    [edit logical-systems B policy-options policy-statement send-direct term 2]
    user@R1# set from protocol direct
    user@R1# set then accept
    [edit logical-systems C policy-options policy-statement send-direct term 2]
    user@R1# set from protocol direct
    user@R1# set then accept
    
  5. Configure the router ID and the autonomous system (AS) number.

    content_copy zoom_out_map
    [edit logical-systems A routing-options]
    user@R1# set router-id 192.168.6.5
    user@R1# set autonomous-system 17
    [edit logical-systems B routing-options]
    user@R1# set router-id 192.163.6.4
    user@R1# set autonomous-system 17
    [edit logical-systems C routing-options]
    user@R1# set router-id 192.168.40.4
    user@R1# set autonomous-system 17
    
Results

From configuration mode, confirm your configuration by entering the show logical-systems command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

content_copy zoom_out_map
user@R1# show logical-systems
A {
    interfaces {
        lt-0/1/0 {
            unit 1 {
                description to-B;
                encapsulation ethernet;
                peer-unit 2;
                family inet {
                    address 10.10.10.1/30;
                }
            }
        }
        lo0 {
            unit 1 {
                family inet {
                    address 192.168.6.5/32;
                }
            }
        }
    }
    protocols {
        bgp {
            group internal-peers {
                type internal;
                local-address 192.168.6.5;
                export send-direct;
                neighbor 192.163.6.4;
                neighbor 192.168.40.4;
            }
        }
        ospf {
            area 0.0.0.0 {
                interface lo0.1 {
                    passive;
                }
                interface lt-0/1/0.1;
            }
        }
    }
    policy-options {
        policy-statement send-direct {
            term 2 {
                from protocol direct;
                then accept;
            }
        }
    }
    routing-options {
        router-id 192.168.6.5;
        autonomous-system 17;
    }
}
B {
    interfaces {
        lt-0/1/0 {
            unit 2 {
                description to-A;
                encapsulation ethernet;
                peer-unit 1;
                family inet {
                    address 10.10.10.2/30;
                }
            }
            unit 5 {
                description to-C;
                encapsulation ethernet;
                peer-unit 6;
                family inet {
                    address 10.10.10.5/30;
                }
            }
        }
        lo0 {
            unit 2 {
                family inet {
                    address 192.163.6.4/32;
                }
            }
        }
    }
    protocols {
        bgp {
            group internal-peers {
                type internal;
                local-address 192.163.6.4;
                export send-direct;
                neighbor 192.168.40.4;
                neighbor 192.168.6.5;
            }
        }
        ospf {
            area 0.0.0.0 {
                interface lo0.2 {
                    passive;
                }
                interface lt-0/1/0.2;
                interface lt-0/1/0.5;
            }
        }
    }
    policy-options {
        policy-statement send-direct {
            term 2 {
                from protocol direct;
                then accept;
            }
        }
    }
    routing-options {
        router-id 192.163.6.4;
        autonomous-system 17;
    }
}
C {
    interfaces {
        lt-0/1/0 {
            unit 6 {
                description to-B;
                encapsulation ethernet;
                peer-unit 5;
                family inet {
                    address 10.10.10.6/30;
                }
            }
        }
        lo0 {
            unit 3 {
                family inet {
                    address 192.168.40.4/32;
                }
            }
        }
    }
    protocols {
        bgp {
            group internal-peers {
                type internal;
                local-address 192.168.40.4;
                export send-direct;
                neighbor 192.163.6.4;
                neighbor 192.168.6.5;
            }
        }
        ospf {
            area 0.0.0.0 {
                interface lo0.3 {
                    passive;
                }
                interface lt-0/1/0.6;
            }
        }
    }
    policy-options {
        policy-statement send-direct {
            term 2 {
                from protocol direct;
                then accept;
            }
        }
    }
    routing-options {
        router-id 192.168.40.4;
        autonomous-system 17;
    }
}

If you are done configuring the device, enter commit from configuration mode.

Verification

Confirm that the configuration is working properly.

Verifying BGP Neighbors

Purpose

Verify that BGP is running on configured interfaces and that the BGP session is active for each neighbor address.

Action

From the operational mode, enter the show bgp neighbor command.

content_copy zoom_out_map
user@R1> show bgp neighbor logical-system A
Peer: 192.163.6.4+179 AS 17    Local: 192.168.6.5+58852 AS 17   
  Type: Internal    State: Established    Flags: <Sync>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Export: [ send-direct ] 
  Options: <Preference LocalAddress Refresh>
  Local Address: 192.168.6.5 Holdtime: 90 Preference: 170
  Number of flaps: 0
  Peer ID: 192.163.6.4     Local ID: 192.168.6.5       Active Holdtime: 90
  Keepalive Interval: 30         Peer index: 0   
  BFD: disabled, down
  NLRI for restart configured on peer: inet-unicast
  NLRI advertised by peer: inet-unicast
  NLRI for this session: inet-unicast
  Peer supports Refresh capability (2)
  Restart time configured on the peer: 120
  Stale routes from peer are kept for: 300
  Restart time requested by this peer: 120
  NLRI that peer supports restart for: inet-unicast
  NLRI that restart is negotiated for: inet-unicast
  NLRI of received end-of-rib markers: inet-unicast
  NLRI of all end-of-rib markers sent: inet-unicast
  Peer supports 4 byte AS extension (peer-as 17)
  Peer does not support Addpath
  Table inet.0 Bit: 10000
    RIB State: BGP restart is complete
    Send state: in sync
    Active prefixes:              0
    Received prefixes:            3
    Accepted prefixes:            3
    Suppressed due to damping:    0
    Advertised prefixes:          2
  Last traffic (seconds): Received 16   Sent 1    Checked 63  
  Input messages:  Total 15713  Updates 4       Refreshes 0     Octets 298622
  Output messages: Total 15690  Updates 2       Refreshes 0     Octets 298222
  Output Queue[0]: 0

Peer: 192.168.40.4+179 AS 17   Local: 192.168.6.5+56466 AS 17   
  Type: Internal    State: Established    Flags: <Sync>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Export: [ send-direct ] 
  Options: <Preference LocalAddress Refresh>
  Local Address: 192.168.6.5 Holdtime: 90 Preference: 170
  Number of flaps: 0
  Peer ID: 192.168.40.4    Local ID: 192.168.6.5       Active Holdtime: 90
  Keepalive Interval: 30         Peer index: 1   
  BFD: disabled, down
  NLRI for restart configured on peer: inet-unicast
  NLRI advertised by peer: inet-unicast
  NLRI for this session: inet-unicast
  Peer supports Refresh capability (2)
  Restart time configured on the peer: 120
  Stale routes from peer are kept for: 300
  Restart time requested by this peer: 120
  NLRI that peer supports restart for: inet-unicast
  NLRI that restart is negotiated for: inet-unicast
  NLRI of received end-of-rib markers: inet-unicast
  NLRI of all end-of-rib markers sent: inet-unicast
  Peer supports 4 byte AS extension (peer-as 17)
  Peer does not support Addpath
  Table inet.0 Bit: 10000
    RIB State: BGP restart is complete
    Send state: in sync
    Active prefixes:              0
    Received prefixes:            2
    Accepted prefixes:            2
    Suppressed due to damping:    0
    Advertised prefixes:          2
  Last traffic (seconds): Received 15   Sent 22   Checked 68  
  Input messages:  Total 15688  Updates 2       Refreshes 0     Octets 298111
  Output messages: Total 15688  Updates 2       Refreshes 0     Octets 298184
  Output Queue[0]: 0

Verifying BGP Groups

Purpose

Verify that the BGP groups are configured correctly.

Action

From the operational mode, enter the show bgp group command.

content_copy zoom_out_map
user@A> show bgp group logical-system A
Group Type: Internal    AS: 17                     Local AS: 17
  Name: internal-peers  Index: 0                   Flags: <Export Eval>
  Export: [ send-direct ] 
  Holdtime: 0
  Total peers: 2        Established: 2
  192.163.6.4+179
  192.168.40.4+179
  inet.0: 0/5/5/0

Groups: 1  Peers: 2    External: 0    Internal: 2    Down peers: 0   Flaps: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0                 5          0          0          0          0          0

Verifying BGP Summary Information

Purpose

Verify that the BGP configuration is correct.

Action

From the operational mode, enter the show bgp summary command.

content_copy zoom_out_map
user@A> show bgp summary logical-system A
Groups: 1 Peers: 2 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0                 5          0          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
192.163.6.4              17      15723      15700       0       0 4d 22:13:15 0/3/3/0              0/0/0/0
192.168.40.4             17      15698      15699       0       0 4d 22:13:11 0/2/2/0              0/0/0/0

Verifying That BGP Routes Are Installed in the Routing Table

Purpose

Verify that the export policy configuration is working.

Action

From the operational mode, enter the show route protocol bgp command.

content_copy zoom_out_map
user@A> show route protocol bgp logical-system A
inet.0: 7 destinations, 12 routes (7 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

10.10.10.0/30       [BGP/170] 4d 11:05:55, localpref 100, from 192.163.6.4
                      AS path: I
                    > to 10.10.10.2 via lt-0/1/0.1
10.10.10.4/30       [BGP/170] 4d 11:05:55, localpref 100, from 192.163.6.4
                      AS path: I
                    > to 10.10.10.2 via lt-0/1/0.1
                    [BGP/170] 4d 11:03:10, localpref 100, from 192.168.40.4
                      AS path: I
                    > to 10.10.10.2 via lt-0/1/0.1
192.163.6.4/32      [BGP/170] 4d 11:05:55, localpref 100, from 192.163.6.4
                      AS path: I
                    > to 10.10.10.2 via lt-0/1/0.1
192.168.40.4/32     [BGP/170] 4d 11:03:10, localpref 100, from 192.168.40.4
                      AS path: I
                    > to 10.10.10.2 via lt-0/1/0.1

Example: Configuring External BGP on Logical Systems with IPv6 Interfaces

This example shows how to configure external BGP (EBGP) point-to-point peer sessions on logical systems with IPv6 interfaces.

Requirements

In this example, no special configuration beyond device initialization is required.

Overview

Junos OS supports EBGP peer sessions by means of IPv6 addresses. An IPv6 peer session can be configured when an IPv6 address is specified in the neighbor statement. This example uses EUI-64 to generate IPv6 addresses that are automatically applied to the interfaces. An EUI-64 address is an IPv6 address that uses the IEEE EUI-64 format for the interface identifier portion of the address (the last 64 bits).

Note:

Alternatively, you can configure EBGP sessions using manually assigned 128-bit IPv6 addresses.

If you use 128-bit link-local addresses for the interfaces, you must include the local-interface statement. This statement is valid only for 128-bit IPv6 link-local addresses and is mandatory for configuring an IPv6 EBGP link-local peer session.

Configuring EBGP peering using link-local addresses is only applicable for directly connected interfaces. There is no support for multihop peering.

After your interfaces are up, you can use the show interfaces terse command to view the EUI-64-generated IPv6 addresses on the interfaces. You must use these generated addresses in the BGP neighbor statements. This example demonstrates the full end-to-end procedure.

In this example, Frame Relay interface encapsulation is applied to the logical tunnel (lt) interfaces. This is a requirement because only Frame Relay encapsulation is supported when IPv6 addresses are configured on the lt interfaces.

Figure 2 shows a network with BGP peer sessions. In the sample network, Router R1 has five logical systems configured. Device E in autonomous system (AS) 17 has BGP peer sessions to a group of peers called external-peers. Peers A, B, and C reside in AS 22. This example shows the step-by-step configuration on Logical System A and Logical System E.

Topology

Figure 2: Typical Network with BGP Peer SessionsTypical Network with BGP Peer Sessions

Configuration

Procedure

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, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.

Device A

content_copy zoom_out_map
set logical-systems A interfaces lt-0/1/0 unit 1 description to-E
set logical-systems A interfaces lt-0/1/0 unit 1 encapsulation frame-relay
set logical-systems A interfaces lt-0/1/0 unit 1 dlci 1
set logical-systems A interfaces lt-0/1/0 unit 1 peer-unit 25
set logical-systems A interfaces lt-0/1/0 unit 1 family inet6 address 2001:db8:0:1::/64 eui-64
set logical-systems A interfaces lo0 unit 1 family inet6 address 2001:db8::1/128
set logical-systems A protocols bgp group external-peers type external
set logical-systems A protocols bgp group external-peers peer-as 17
set logical-systems A protocols bgp group external-peers neighbor 2001:db8:0:1:2a0:a502:0:19da
set logical-systems A protocols bgp group external-peers family inet6 unicast
set logical-systems A routing-options router-id 172.16.1.1
set logical-systems A routing-options autonomous-system 22

Device B

content_copy zoom_out_map
set logical-systems B interfaces lt-0/1/0 unit 6 description to-E
set logical-systems B interfaces lt-0/1/0 unit 6 encapsulation frame-relay
set logical-systems B interfaces lt-0/1/0 unit 6 dlci 6
set logical-systems B interfaces lt-0/1/0 unit 6 peer-unit 5
set logical-systems B interfaces lt-0/1/0 unit 6 family inet6 address 2001:db8:0:2::/64 eui-64
set logical-systems B interfaces lo0 unit 2 family inet6 address 2001:db8::2/128
set logical-systems B protocols bgp group external-peers type external
set logical-systems B protocols bgp group external-peers peer-as 17
set logical-systems B protocols bgp group external-peers neighbor 2001:db8:0:2:2a0:a502:0:5da
set logical-systems B protocols bgp group external-peers family inet6 unicast
set logical-systems B routing-options router-id 172.16.2.2
set logical-systems B routing-options autonomous-system 22

Device C

content_copy zoom_out_map
set logical-systems C interfaces lt-0/1/0 unit 10 description to-E
set logical-systems C interfaces lt-0/1/0 unit 10 encapsulation frame-relay
set logical-systems C interfaces lt-0/1/0 unit 10 dlci 10
set logical-systems C interfaces lt-0/1/0 unit 10 peer-unit 9
set logical-systems C interfaces lt-0/1/0 unit 10 family inet6 address 2001:db8:0:3::/64 eui-64
set logical-systems C interfaces lo0 unit 3 family inet6 address 2001:db8::3/128
set logical-systems C protocols bgp group external-peers type external
set logical-systems C protocols bgp group external-peers peer-as 17
set logical-systems C protocols bgp group external-peers neighbor 2001:db8:0:3:2a0:a502:0:9da
set logical-systems C protocols bgp group external-peers family inet6 unicast
set logical-systems C routing-options router-id 172.16.3.3
set logical-systems C routing-options autonomous-system 22

Device D

content_copy zoom_out_map
set logical-systems D interfaces lt-0/1/0 unit 7 description to-E
set logical-systems D interfaces lt-0/1/0 unit 7 encapsulation frame-relay
set logical-systems D interfaces lt-0/1/0 unit 7 dlci 7
set logical-systems D interfaces lt-0/1/0 unit 7 peer-unit 21
set logical-systems D interfaces lt-0/1/0 unit 7 family inet6 address 2001:db8:0:4::/64 eui-64
set logical-systems D interfaces lo0 unit 4 family inet6 address 2001:db8::4/128
set logical-systems D protocols bgp group external-peers type external
set logical-systems D protocols bgp group external-peers peer-as 17
set logical-systems D protocols bgp group external-peers neighbor 2001:db8:0:4:2a0:a502:0:15da
set logical-systems D protocols bgp group external-peers family inet6 unicast
set logical-systems D routing-options router-id 172.16.4.4
set logical-systems D routing-options autonomous-system 79

Device E

content_copy zoom_out_map
set logical-systems E interfaces lt-0/1/0 unit 5 description to-B
set logical-systems E interfaces lt-0/1/0 unit 5 encapsulation frame-relay
set logical-systems E interfaces lt-0/1/0 unit 5 dlci 6
set logical-systems E interfaces lt-0/1/0 unit 5 peer-unit 6
set logical-systems E interfaces lt-0/1/0 unit 5 family inet6 address 2001:db8:0:2::/64 eui-64
set logical-systems E interfaces lt-0/1/0 unit 9 description to-C
set logical-systems E interfaces lt-0/1/0 unit 9 encapsulation frame-relay
set logical-systems E interfaces lt-0/1/0 unit 9 dlci 10
set logical-systems E interfaces lt-0/1/0 unit 9 peer-unit 10
set logical-systems E interfaces lt-0/1/0 unit 9 family inet6 address 2001:db8:0:3::/64 eui-64
set logical-systems E interfaces lt-0/1/0 unit 21 description to-D
set logical-systems E interfaces lt-0/1/0 unit 21 encapsulation frame-relay
set logical-systems E interfaces lt-0/1/0 unit 21 dlci 7
set logical-systems E interfaces lt-0/1/0 unit 21 peer-unit 7
set logical-systems E interfaces lt-0/1/0 unit 21 family inet6 address 2001:db8:0:4::/64 eui-64
set logical-systems E interfaces lt-0/1/0 unit 25 description to-A
set logical-systems E interfaces lt-0/1/0 unit 25 encapsulation frame-relay
set logical-systems E interfaces lt-0/1/0 unit 25 dlci 1
set logical-systems E interfaces lt-0/1/0 unit 25 peer-unit 1
set logical-systems E interfaces lt-0/1/0 unit 25 family inet6 address 2001:db8:0:1::/64 eui-64
set logical-systems E interfaces lo0 unit 5 family inet6 address 2001:db8::5/128
set logical-systems E protocols bgp group external-peers type external
set logical-systems E protocols bgp group external-peers peer-as 22
set logical-systems E protocols bgp group external-peers neighbor 2001:db8:0:1:2a0:a502:0:1da
set logical-systems E protocols bgp group external-peers neighbor 2001:db8:0:2:2a0:a502:0:6da
set logical-systems E protocols bgp group external-peers neighbor 2001:db8:0:3:2a0:a502:0:ada
set logical-systems E protocols bgp group external-peers neighbor 2001:db8:0:4:2a0:a502:0:7da peer-as 79
set logical-systems E protocols bgp group external-peers family inet6 unicast
set logical-systems E routing-options router-id 172.16.5.5
set logical-systems E routing-options autonomous-system 17
Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure the BGP peer sessions:

  1. Run the show interfaces terse command to verify that the physical router has a logical tunnel (lt) interface.

    content_copy zoom_out_map
    user@R1> show interfaces terse
    Interface               Admin Link Proto    Local                 Remote
    ...
    lt-0/1/0                up    up  
    ...
  2. On Logical System A, configure the interface encapsulation, peer-unit number, and DLCI to reach Logical System E.

    content_copy zoom_out_map
    user@R1> set cli logical-system A
    Logical system: A
    [edit]
    user@R1:A> edit
    Entering configuration mode
    [edit]
    user@R1:A# edit interfaces
    [edit interfaces]
    user@R1:A# set lt-0/1/0 unit 1 encapsulation frame-relay
    user@R1:A# set lt-0/1/0 unit 1 dlci 1
    user@R1:A# set lt-0/1/0 unit 1 peer-unit 25
    
  3. On Logical System A, configure the network address for the link to Peer E, and configure a loopback interface.

    content_copy zoom_out_map
    [edit interfaces]
    user@R1:A# set lt-0/1/0 unit 1 description to-E
    user@R1:A# set lt-0/1/0 unit 1 family inet6 address 2001:db8:0:1::/64 eui-64
    user@R1:A# set lo0 unit 1 family inet6 address 2001:db8::1/128
    
  4. On Logical System E, configure the interface encapsulation, peer-unit number, and DLCI to reach Logical System A.

    content_copy zoom_out_map
    user@R1> set cli logical-system E
    Logical system: E
    [edit]
    user@R1:E> edit
    Entering configuration mode
    [edit]
    user@R1:E# edit interfaces
    [edit interfaces]
    user@R1:E# set lt-0/1/0 unit 25 encapsulation frame-relay
    user@R1:E# set lt-0/1/0 unit 25 dlci 1
    user@R1:E# set lt-0/1/0 unit 25 peer-unit 1
    
  5. On Logical System E, configure the network address for the link to Peer A, and configure a loopback interface.

    content_copy zoom_out_map
    [edit interfaces]
    user@R1:E# set lt-0/1/0 unit 25 description to-A
    user@R1:E# set lt-0/1/0 unit 25 family inet6 address 2001:db8:0:1::/64 eui-64
    user@R1:E# set lo0 unit 5 family inet6 address 2001:db8::5/128
    
  6. Run the show interfaces terse command to see the IPv6 addresses that are generated by EUI-64.

    The 2001 addresses are used in this example in the BGP neighbor statements.

    Note:

    The fe80 addresses are link-local addresses and are not used in this example.

    content_copy zoom_out_map
    user@R1:A> show interfaces terse
    Interface               Admin Link Proto    Local                 Remote
    Logical system: A
    
    betsy@tp8:A> show interfaces terse 
    Interface               Admin Link Proto    Local                 Remote
    lt-0/1/0               
    lt-0/1/0.1              up    up   inet6    2001:db8:0:1:2a0:a502:0:1da/64
                                                fe80::2a0:a502:0:1da/64
    lo0                    
    lo0.1                   up    up   inet6    2001:db8::1     
                                                fe80::2a0:a50f:fc56:1da
    content_copy zoom_out_map
    user@R1:E> show interfaces terse
    Interface               Admin Link Proto    Local                 Remote
    lt-0/1/0               
    lt-0/1/0.25             up    up   inet6    2001:db8:0:1:2a0:a502:0:19da/64
                                                fe80::2a0:a502:0:19da/64
    lo0                    
    lo0.5                   up    up   inet6    2001:db8::5     
                                                fe80::2a0:a50f:fc56:1da
  7. Repeat the interface configuration on the other logical systems.

Configuring the External BGP Sessions

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure the BGP peer sessions:

  1. On Logical System A, create the BGP group, and add the external neighbor address.

    content_copy zoom_out_map
    [edit protocols bgp group external-peers]
    user@R1:A# set neighbor 2001:db8:0:1:2a0:a502:0:19da
    user@R1:A# set family inet6 unicast
  2. On Logical System E, create the BGP group, and add the external neighbor address.

    content_copy zoom_out_map
    [edit protocols bgp group external-peers]
    user@R1:E# set neighbor 2001:db8:0:1:2a0:a502:0:1da 
    user@R1:E# set family inet6 unicast
    
  3. On Logical System A, specify the autonomous system (AS) number of the external AS.

    content_copy zoom_out_map
    [edit protocols bgp group external-peers]
    user@R1:A# set peer-as 17
    
  4. On Logical System E, specify the autonomous system (AS) number of the external AS.

    content_copy zoom_out_map
    [edit protocols bgp group external-peers]
    user@R1:E# set peer-as 22
    
  5. On Logical System A, set the peer type to EBGP.

    content_copy zoom_out_map
    [edit protocols bgp group external-peers]
    user@R1:A# set type external
    
  6. On Logical System E, set the peer type to EBGP.

    content_copy zoom_out_map
    [edit protocols bgp group external-peers]
    user@R1:E# set type external
    
  7. On Logical System A, set the autonomous system (AS) number and router ID.

    content_copy zoom_out_map
    [edit routing-options]
    user@R1:A# set router-id 172.16.1.1
    user@R1:A# set autonomous-system 22
    
  8. On Logical System E, set the AS number and router ID.

    content_copy zoom_out_map
    [edit routing-options]
    user@R1:E# set router-id 172.16.5.5
    user@R1:E# set autonomous-system 17
    
  9. Repeat these steps for Peers A, B, C, and D.

Results

From configuration mode, confirm your configuration by entering the show logical-systems command. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

content_copy zoom_out_map
[edit]
user@R1# show logical-systems
A {
    interfaces {
        lt-0/1/0 {
            unit 1 {
                description to-E;
                encapsulation frame-relay;
                dlci 1;
                peer-unit 25;
                family inet6 {
                    address 2001:db8:0:1::/64 {
                        eui-64;
                    }
                }
            }
        }
        lo0 {
            unit 1 {
                family inet6 {
                    address 2001:db8::1/128;
                }
            }
        }
    }
    protocols {
        bgp {
            group external-peers {
                type external;
                peer-as 17;
                neighbor 2001:db8:0:1:2a0:a502:0:19da;
            }
        }
        routing-options {
            router-id 172.16.1.1;
            autonomous-system 22;
        }
    }
    B {
        interfaces {
            lt-0/1/0 {
                unit 6 {
                    description to-E;
                    encapsulation frame-relay;
                    dlci 6;
                    peer-unit 5;
                    family inet6 {
                        address 2001:db8:0:2::/64 {
                            eui-64;
                        }
                    }
                }
            }
            lo0 {
                unit 2 {
                    family inet6 {
                        address 2001:db8::2/128;
                    }
                }
            }
        }
        protocols {
            bgp {
                group external-peers {
                    type external;
                    peer-as 17;
                    neighbor 2001:db8:0:2:2a0:a502:0:5da;
                }
            }
            routing-options {
                router-id 172.16.2.2;
                autonomous-system 22;
            }
        }
        C {
            interfaces {
                lt-0/1/0 {
                    unit 10 {
                        description to-E;
                        encapsulation frame-relay;
                        dlci 10;
                        peer-unit 9;
                        family inet6 {
                            address 2001:db8:0:3::/64 {
                                eui-64;
                            }
                        }
                    }
                }
                lo0 {
                    unit 3 {
                        family inet6 {
                            address 2001:db8::3/128;
                        }
                    }
                }
            }
            protocols {
                bgp {
                    group external-peers {
                        type external;
                        peer-as 17;
                        neighbor 2001:db8:0:3:2a0:a502:0:9da;
                    }
                }
            }
            routing-options {
                router-id 172.16.3.3;
                autonomous-system 22;
            }
        }
        D {
            interfaces {
                lt-0/1/0 {
                    unit 7 {
                        description to-E;
                        encapsulation frame-relay;
                        dlci 7;
                        peer-unit 21;
                        family inet6 {
                            address 2001:db8:0:4::/64 {
                                eui-64;
                            }
                        }
                    }
                }
                lo0 {
                    unit 4 {
                        family inet6 {
                            address 2001:db8::4/128;
                        }
                    }
                }
            }
            protocols {
                bgp {
                    group external-peers {
                        type external;
                        peer-as 17;
                        neighbor 2001:db8:0:4:2a0:a502:0:15da;
                    }
                }
                routing-options {
                    router-id 172.16.4.4;
                    autonomous-system 79;
                }
            }
            E {
                interfaces {
                    lt-0/1/0 {
                        unit 5 {
                            description to-B;
                            encapsulation frame-relay;
                            dlci 6;
                            peer-unit 6;
                            family inet6 {
                                address 2001:db8:0:2::/64 {
                                    eui-64;
                                }
                            }
                        }
                        unit 9 {
                            description to-C;
                            encapsulation frame-relay;
                            dlci 10;
                            peer-unit 10;
                            family inet6 {
                                address 2001:db8:0:3::/64 {
                                    eui-64;
                                }
                            }
                        }
                        unit 21 {
                            description to-D;
                            encapsulation frame-relay;
                            dlci 7;
                            peer-unit 7;
                            family inet6 {
                                address 2001:db8:0:4::/64 {
                                    eui-64;
                                }
                            }
                        }
                        unit 25 {
                            description to-A;
                            encapsulation frame-relay;
                            dlci 1;
                            peer-unit 1;
                            family inet6 {
                                address 2001:db8:0:1::/64 {
                                    eui-64;
                                }
                            }
                        }
                    }
                    lo0 {
                        unit 5 {
                            family inet6 {
                                address 2001:db8::5/128;
                            }
                        }
                    }
                }
                protocols {
                    bgp {
                        group external-peers {
                            type external;
                            peer-as 22;
                            neighbor 2001:db8:0:1:2a0:a502:0:1da;
                            neighbor 2001:db8:0:2:2a0:a502:0:6da;
                            neighbor 2001:db8:0:3:2a0:a502:0:ada;
                            neighbor 2001:db8:0:4:2a0:a502:0:7da {
                                peer-as 79;
                            }
                        }
                    }
                }
                routing-options {
                    router-id 172.16.5.5;
                    autonomous-system 17;
                }
            }

If you are done configuring the device, enter commit from configuration mode.

Verification

Confirm that the configuration is working properly.

Verifying BGP Neighbors

Purpose

Verify that BGP is running on configured interfaces and that the BGP session is active for each neighbor address.

Action

From operational mode, run the show bgp neighbor command.

content_copy zoom_out_map
user@R1:E> show bgp neighbor
Peer: 2001:db8:0:1:2a0:a502:0:1da+54987 AS 22 Local: 2001:db8:0:1:2a0:a502:0:19da+179 AS 17   
  Type: External    State: Established    Flags: <Sync>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: Open Message Error
  Options: <Preference PeerAS Refresh>
  Holdtime: 90 Preference: 170
  Number of flaps: 0
  Error: 'Open Message Error' Sent: 20 Recv: 0
  Peer ID: 172.16.1.1         Local ID: 172.16.5.5           Active Holdtime: 90
  Keepalive Interval: 30         Peer index: 0   
  BFD: disabled, down
  Local Interface: lt-0/1/0.25                      
  NLRI for restart configured on peer: inet6-unicast
  NLRI advertised by peer: inet6-unicast
  NLRI for this session: inet6-unicast
  Peer supports Refresh capability (2)
  Stale routes from peer are kept for: 300
  Peer does not support Restarter functionality
  NLRI that restart is negotiated for: inet6-unicast
  NLRI of received end-of-rib markers: inet6-unicast
  NLRI of all end-of-rib markers sent: inet6-unicast
  Peer supports 4 byte AS extension (peer-as 22)
  Peer does not support Addpath
  Table inet6.0 Bit: 10000
    RIB State: BGP restart is complete
    Send state: in sync
    Active prefixes:              0
    Received prefixes:            0
    Accepted prefixes:            0
    Suppressed due to damping:    0
    Advertised prefixes:          0
  Last traffic (seconds): Received 7    Sent 18   Checked 81  
  Input messages:  Total 1611   Updates 1       Refreshes 0     Octets 30660
  Output messages: Total 1594   Updates 0       Refreshes 0     Octets 30356
  Output Queue[0]: 0

Peer: 2001:db8:0:2:2a0:a502:0:6da+179 AS 22 Local: 2001:db8:0:2:2a0:a502:0:5da+55502 AS 17   
  Type: External    State: Established    Flags: <Sync>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: Open Message Error
  Options: <Preference PeerAS Refresh>
  Holdtime: 90 Preference: 170
  Number of flaps: 0
  Error: 'Open Message Error' Sent: 26 Recv: 0
  Peer ID: 172.16.2.2         Local ID: 172.16.5.5           Active Holdtime: 90
  Keepalive Interval: 30         Peer index: 2   
  BFD: disabled, down
  Local Interface: lt-0/1/0.5                       
  NLRI for restart configured on peer: inet6-unicast
  NLRI advertised by peer: inet6-unicast
  NLRI for this session: inet6-unicast
  Peer supports Refresh capability (2)
  Stale routes from peer are kept for: 300
  Peer does not support Restarter functionality
  NLRI that restart is negotiated for: inet6-unicast
  NLRI of received end-of-rib markers: inet6-unicast
  NLRI of all end-of-rib markers sent: inet6-unicast
  Peer supports 4 byte AS extension (peer-as 22)
  Peer does not support Addpath
  Table inet6.0 Bit: 10000
    RIB State: BGP restart is complete
    Send state: in sync
    Active prefixes:              0
    Received prefixes:            0
    Accepted prefixes:            0
    Suppressed due to damping:    0
    Advertised prefixes:          0
  Last traffic (seconds): Received 15   Sent 8    Checked 8   
  Input messages:  Total 1610   Updates 1       Refreshes 0     Octets 30601
  Output messages: Total 1645   Updates 0       Refreshes 0     Octets 32417
  Output Queue[0]: 0

Peer: 2001:db8:0:3:2a0:a502:0:ada+55983 AS 22 Local: 2001:db8:0:3:2a0:a502:0:9da+179 AS 17   
  Type: External    State: Established    Flags: <Sync>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Options: <Preference PeerAS Refresh>
  Holdtime: 90 Preference: 170
  Number of flaps: 0
  Peer ID: 172.16.3.3         Local ID: 172.16.5.5           Active Holdtime: 90
  Keepalive Interval: 30         Peer index: 3   
  BFD: disabled, down
  Local Interface: lt-0/1/0.9                       
  NLRI for restart configured on peer: inet6-unicast
  NLRI advertised by peer: inet6-unicast
  NLRI for this session: inet6-unicast
  Peer supports Refresh capability (2)
  Stale routes from peer are kept for: 300
  Peer does not support Restarter functionality
  NLRI that restart is negotiated for: inet6-unicast
  NLRI of received end-of-rib markers: inet6-unicast
  NLRI of all end-of-rib markers sent: inet6-unicast
  Peer supports 4 byte AS extension (peer-as 22)
  Peer does not support Addpath
  Table inet6.0 Bit: 10000
    RIB State: BGP restart is complete
    Send state: in sync
    Active prefixes:              0
    Received prefixes:            0
    Accepted prefixes:            0
    Suppressed due to damping:    0
    Advertised prefixes:          0
  Last traffic (seconds): Received 21   Sent 21   Checked 67  
  Input messages:  Total 1610   Updates 1       Refreshes 0     Octets 30641
  Output messages: Total 1587   Updates 0       Refreshes 0     Octets 30223
  Output Queue[0]: 0

Peer: 2001:db8:0:4:2a0:a502:0:7da+49255 AS 79 Local: 2001:db8:0:4:2a0:a502:0:15da+179 AS 17   
  Type: External    State: Established    Flags: <Sync>
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Options: <Preference PeerAS Refresh>
  Holdtime: 90 Preference: 170
  Number of flaps: 0
  Peer ID: 172.16.4.4         Local ID: 172.16.5.5           Active Holdtime: 90
  Keepalive Interval: 30         Peer index: 1   
  BFD: disabled, down
  Local Interface: lt-0/1/0.21                      
  NLRI for restart configured on peer: inet6-unicast
  NLRI advertised by peer: inet6-unicast
  NLRI for this session: inet6-unicast
  Peer supports Refresh capability (2)
  Stale routes from peer are kept for: 300
  Peer does not support Restarter functionality
  NLRI that restart is negotiated for: inet6-unicast
  NLRI of received end-of-rib markers: inet6-unicast
  NLRI of all end-of-rib markers sent: inet6-unicast
  Peer supports 4 byte AS extension (peer-as 79)
  Peer does not support Addpath
  Table inet6.0 Bit: 10000
    RIB State: BGP restart is complete
    Send state: in sync
    Active prefixes:              0
    Received prefixes:            0
    Accepted prefixes:            0     
    Suppressed due to damping:    0
    Advertised prefixes:          0
  Last traffic (seconds): Received 6    Sent 17   Checked 25  
  Input messages:  Total 1615   Updates 1       Refreshes 0     Octets 30736
  Output messages: Total 1593   Updates 0       Refreshes 0     Octets 30337
  Output Queue[0]: 0
Meaning

IPv6 unicast network layer reachability information (NLRI) is being exchanged between the neighbors.

Verifying BGP Groups

Purpose

Verify that the BGP groups are configured correctly.

Action

From operational mode, run the show bgp group command.

content_copy zoom_out_map
user@R1:E> show bgp group
Group Type: External                               Local AS: 17
  Name: external-peers  Index: 0                   Flags: <>
  Holdtime: 0
  Total peers: 4        Established: 4
  2001:db8:0:1:2a0:a502:0:1da+54987
  2001:db8:0:2:2a0:a502:0:6da+179
  2001:db8:0:3:2a0:a502:0:ada+55983
  2001:db8:0:4:2a0:a502:0:7da+49255
  inet6.0: 0/0/0/0

Groups: 1  Peers: 4    External: 4    Internal: 0    Down peers: 0   Flaps: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet6.0                0          0          0          0          0          0
inet6.2                0          0          0          0          0          0
Meaning

The group type is external, and the group has four peers.

Verifying BGP Summary Information

Purpose

Verify that the BGP peer relationships are established.

Action

From operational mode, run the show bgp summary command.

content_copy zoom_out_map
user@R1:E> show bgp summary
Groups: 1 Peers: 4 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet6.0                0          0          0          0          0          0
inet6.2                0          0          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
2001:db8:0:1:2a0:a502:0:1da          22       1617       1600       0       0    12:07:00 Establ
  inet6.0: 0/0/0/0
2001:db8:0:2:2a0:a502:0:6da          22       1616       1651       0       0    12:06:56 Establ
  inet6.0: 0/0/0/0
2001:db8:0:3:2a0:a502:0:ada          22       1617       1594       0       0    12:04:32 Establ
  inet6.0: 0/0/0/0
2001:db8:0:4:2a0:a502:0:7da          79       1621       1599       0       0    12:07:00 Establ
  inet6.0: 0/0/0/0
Meaning

The Down peers: 0 output shows that the BGP peers are in the established state.

Checking the Routing Table

Purpose

Verify that the inet6.0 routing table is populated with local and direct routes.

Action

From operational mode, run the show route command.

content_copy zoom_out_map
user@R1:E> show route
inet6.0: 15 destinations, 18 routes (15 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

2001:db8::5/128    *[Direct/0] 12:41:18
                    > via lo0.5
2001:db8:0:1::/64  *[Direct/0] 14:40:01
                    > via lt-0/1/0.25
2001:db8:0:1:2a0:a502:0:19da/128
                   *[Local/0] 14:40:01
                      Local via lt-0/1/0.25
2001:db8:0:2::/64  *[Direct/0] 14:40:02
                    > via lt-0/1/0.5
2001:db8:0:2:2a0:a502:0:5da/128
                   *[Local/0] 14:40:02
                      Local via lt-0/1/0.5
2001:db8:0:3::/64  *[Direct/0] 14:40:02
                    > via lt-0/1/0.9
2001:db8:0:3:2a0:a502:0:9da/128
                   *[Local/0] 14:40:02
                      Local via lt-0/1/0.9
2001:db8:0:4::/64  *[Direct/0] 14:40:01
                    > via lt-0/1/0.21
2001:db8:0:4:2a0:a502:0:15da/128
                   *[Local/0] 14:40:01
                      Local via lt-0/1/0.21
fe80::/64          *[Direct/0] 14:40:02
                    > via lt-0/1/0.5
                    [Direct/0] 14:40:02
                    > via lt-0/1/0.9
                    [Direct/0] 14:40:01
                    > via lt-0/1/0.21
                    [Direct/0] 14:40:01
                    > via lt-0/1/0.25
fe80::2a0:a502:0:5da/128
                   *[Local/0] 14:40:02
                      Local via lt-0/1/0.5
fe80::2a0:a502:0:9da/128
                   *[Local/0] 14:40:02
                      Local via lt-0/1/0.9
fe80::2a0:a502:0:15da/128
                   *[Local/0] 14:40:01
                      Local via lt-0/1/0.21
fe80::2a0:a502:0:19da/128
                   *[Local/0] 14:40:01
                      Local via lt-0/1/0.25
fe80::2a0:a50f:fc56:1da/128
                   *[Direct/0] 12:41:18
                    > via lo0.5
Meaning

The inet6.0 routing table contains local and direct routes. To populate the routing table with other types of routes, you must configure routing policies.

Example: Configuring BFD on Internal BGP Peer Sessions

This example shows how to configure internal BGP (IBGP) peer sessions with the Bidirectional Forwarding Detection (BFD) protocol to detect failures in a network.

Requirements

No special configuration beyond device initialization is required before you configure this example.

Overview

The minimum configuration to enable BFD on IBGP sessions is to include the bfd-liveness-detection minimum-interval statement in the BGP configuration of all neighbors participating in the BFD session. The minimum-interval statement specifies the minimum transmit and receive intervals for failure detection. Specifically, this value represents the minimum interval after which the local routing device transmits hello packets as well as the minimum interval that the routing device expects to receive a reply from a neighbor with which it has established a BFD session. You can configure a value from 1 through 255,000 milliseconds.

Optionally, you can specify the minimum transmit and receive intervals separately using the transmit-interval minimum-interval and minimum-receive-interval statements. For information about these and other optional BFD configuration statements, see bfd-liveness-detection.

Note:

BFD is an intensive protocol that consumes system resources. Specifying a minimum interval for BFD less than 100 milliseconds for Routing Engine-based sessions and less than 10 milliseconds for distributed BFD sessions can cause undesired BFD flapping.

Depending on your network environment, these additional recommendations might apply:

  • To prevent BFD flapping during the general Routing Engine switchover event, specify a minimum interval of 5000 milliseconds for Routing Engine-based sessions. This minimum value is required because, during the general Routing Engine switchover event, processes such as RPD, MIBD, and SNMPD utilize CPU resources for more than the specified threshold value. Hence, BFD processing and scheduling is affected because of this lack of CPU resources.

  • For BFD sessions to remain up during the dual chassis cluster control link scenario, when the first control link fails, specify the minimum interval of 6000  milliseconds to prevent the LACP from flapping on the secondary node for Routing Engine-based sessions.

  • For large-scale network deployments with a large number of BFD sessions, specify a minimum interval of 300 milliseconds for Routing Engine-based sessions and 100 milliseconds for distributed BFD sessions.

  • For very large-scale network deployments with a large number of BFD sessions, contact Juniper Networks customer support for more information.

  • For BFD sessions to remain up during a Routing Engine switchover event when nonstop active routing (NSR) is configured, specify a minimum interval of 2500 milliseconds for Routing Engine-based sessions. For distributed BFD sessions with NSR configured, the minimum interval recommendations are unchanged and depend only on your network deployment.

BFD is supported on the default routing instance (the main router), routing instances, and logical systems. This example shows BFD on logical systems.

Figure 3 shows a typical network with internal peer sessions.

Figure 3: Typical Network with IBGP SessionsTypical Network with IBGP Sessions

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 [edit] hierarchy level.

Device A

content_copy zoom_out_map
set logical-systems A interfaces lt-1/2/0 unit 1 description to-B 
set logical-systems A interfaces lt-1/2/0 unit 1 encapsulation ethernet 
set logical-systems A interfaces lt-1/2/0 unit 1 peer-unit 2 
set logical-systems A interfaces lt-1/2/0 unit 1 family inet address 10.10.10.1/30 
set logical-systems A interfaces lo0 unit 1 family inet address 192.168.6.5/32 
set logical-systems A protocols bgp group internal-peers type internal 
set logical-systems A protocols bgp group internal-peers traceoptions file bgp-bfd 
set logical-systems A protocols bgp group internal-peers traceoptions flag bfd detail 
set logical-systems A protocols bgp group internal-peers local-address 192.168.6.5 
set logical-systems A protocols bgp group internal-peers export send-direct 
set logical-systems A protocols bgp group internal-peers bfd-liveness-detection minimum-interval 1000 
set logical-systems A protocols bgp group internal-peers neighbor 192.163.6.4 
set logical-systems A protocols bgp group internal-peers neighbor 192.168.40.4 
set logical-systems A protocols ospf area 0.0.0.0 interface lo0.1 passive 
set logical-systems A protocols ospf area 0.0.0.0 interface lt-1/2/0.1 
set logical-systems A policy-options policy-statement send-direct term 2 from protocol direct 
set logical-systems A policy-options policy-statement send-direct term 2 then accept 
set logical-systems A routing-options router-id 192.168.6.5 
set logical-systems A routing-options autonomous-system 17

Device B

content_copy zoom_out_map
set logical-systems B interfaces lt-1/2/0 unit 2 description to-A
set logical-systems B interfaces lt-1/2/0 unit 2 encapsulation ethernet
set logical-systems B interfaces lt-1/2/0 unit 2 peer-unit 1
set logical-systems B interfaces lt-1/2/0 unit 2 family inet address 10.10.10.2/30
set logical-systems B interfaces lt-1/2/0 unit 5 description to-C
set logical-systems B interfaces lt-1/2/0 unit 5 encapsulation ethernet
set logical-systems B interfaces lt-1/2/0 unit 5 peer-unit 6
set logical-systems B interfaces lt-1/2/0 unit 5 family inet address 10.10.10.5/30
set logical-systems B interfaces lo0 unit 2 family inet address 192.163.6.4/32
set logical-systems B protocols bgp group internal-peers type internal
set logical-systems B protocols bgp group internal-peers local-address 192.163.6.4
set logical-systems B protocols bgp group internal-peers export send-direct
set logical-systems B protocols bgp group internal-peers bfd-liveness-detection minimum-interval 1000
set logical-systems B protocols bgp group internal-peers neighbor 192.168.40.4
set logical-systems B protocols bgp group internal-peers neighbor 192.168.6.5
set logical-systems B protocols ospf area 0.0.0.0 interface lo0.2 passive
set logical-systems B protocols ospf area 0.0.0.0 interface lt-1/2/0.2
set logical-systems B protocols ospf area 0.0.0.0 interface lt-1/2/0.5
set logical-systems B policy-options policy-statement send-direct term 2 from protocol direct
set logical-systems B policy-options policy-statement send-direct term 2 then accept
set logical-systems B routing-options router-id 192.163.6.4
set logical-systems B routing-options autonomous-system 17

Device C

content_copy zoom_out_map
set logical-systems C interfaces lt-1/2/0 unit 6 description to-B
set logical-systems C interfaces lt-1/2/0 unit 6 encapsulation ethernet
set logical-systems C interfaces lt-1/2/0 unit 6 peer-unit 5
set logical-systems C interfaces lt-1/2/0 unit 6 family inet address 10.10.10.6/30
set logical-systems C interfaces lo0 unit 3 family inet address 192.168.40.4/32
set logical-systems C protocols bgp group internal-peers type internal
set logical-systems C protocols bgp group internal-peers local-address 192.168.40.4
set logical-systems C protocols bgp group internal-peers export send-direct
set logical-systems C protocols bgp group internal-peers bfd-liveness-detection minimum-interval 1000
set logical-systems C protocols bgp group internal-peers neighbor 192.163.6.4
set logical-systems C protocols bgp group internal-peers neighbor 192.168.6.5
set logical-systems C protocols ospf area 0.0.0.0 interface lo0.3 passive
set logical-systems C protocols ospf area 0.0.0.0 interface lt-1/2/0.6
set logical-systems C policy-options policy-statement send-direct term 2 from protocol direct
set logical-systems C policy-options policy-statement send-direct term 2 then accept
set logical-systems C routing-options router-id 192.168.40.4
set logical-systems C routing-options autonomous-system 17

Configuring Device A

Step-by-Step Procedure

The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure Device A:

  1. Set the CLI to Logical System A.

    content_copy zoom_out_map
    user@host> set cli logical-system A
    
  2. Configure the interfaces.

    content_copy zoom_out_map
    [edit interfaces lt-1/2/0 unit 1]
    user@host:A# set description to-B 
    user@host:A# set encapsulation ethernet 
    user@host:A# set peer-unit 2 
    user@host:A# set family inet address 10.10.10.1/30 
    [edit interfaces lo0 unit 1]
    user@host:A# set family inet address 192.168.6.5/32 
    
  3. Configure BGP.

    The neighbor statements are included for both Device B and Device C, even though Device A is not directly connected to Device C.

    content_copy zoom_out_map
    [edit protocols bgp group internal-peers]
    user@host:A# set type internal 
    user@host:A# set local-address 192.168.6.5 
    user@host:A# set export send-direct 
    user@host:A# set neighbor 192.163.6.4 
    user@host:A# set neighbor 192.168.40.4 
    
  4. Configure BFD.

    content_copy zoom_out_map
    [edit protocols bgp group internal-peers]
    user@host:A# set bfd-liveness-detection minimum-interval 1000 
    

    You must configure the same minimum interval on the connecting peer.

  5. (Optional) Configure BFD tracing.

    content_copy zoom_out_map
    [edit protocols bgp group internal-peers]
    user@host:A# set traceoptions file bgp-bfd 
    user@host:A# set traceoptions flag bfd detail 
    
  6. Configure OSPF.

    content_copy zoom_out_map
    [edit protocols ospf area 0.0.0.0]
    user@host:A# set interface lo0.1 passive 
    user@host:A# set interface lt-1/2/0.1 
    
  7. Configure a policy that accepts direct routes.

    Other useful options for this scenario might be to accept routes learned through OSPF or local routes.

    content_copy zoom_out_map
    [edit policy-options policy-statement send-direct term 2]
    user@host:A# set from protocol direct 
    user@host:A# set then accept 
    
  8. Configure the router ID and the autonomous system (AS) number.

    content_copy zoom_out_map
    [edit routing-options]
    user@host:A# set router-id 192.168.6.5 
    user@host:A# set autonomous-system 17
    
  9. If you are done configuring the device, enter commit from configuration mode. Repeat these steps to configure Device B and Device C.

Results

From configuration mode, confirm your configuration by entering the show interfaces, show policy-options, show protocols, and show routing-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

content_copy zoom_out_map
user@host:A# show interfaces
lt-1/2/0 {
    unit 1 {
        description to-B;
        encapsulation ethernet;
        peer-unit 2;
        family inet {
            address 10.10.10.1/30;
        }
    }
}
lo0 {
    unit 1 {
        family inet {
            address 192.168.6.5/32;
        }
    }
}
content_copy zoom_out_map
user@host:A# show policy-options
policy-statement send-direct {
    term 2 {
        from protocol direct;
        then accept;
    }
}
content_copy zoom_out_map
user@host:A# show protocols
bgp {
    group internal-peers {
        type internal;
        traceoptions {
            file bgp-bfd;
            flag bfd detail;
        }
        local-address 192.168.6.5;
        export send-direct;
        bfd-liveness-detection {
            minimum-interval 1000;
        }
        neighbor 192.163.6.4;
        neighbor 192.168.40.4;
    }
}
ospf {
    area 0.0.0.0 {
        interface lo0.1 {
            passive;
        }
        interface lt-1/2/0.1;
    }
}
content_copy zoom_out_map
user@host:A# show routing-options
router-id 192.168.6.5;
autonomous-system 17;

Verification

Confirm that the configuration is working properly.

Verifying That BFD Is Enabled

Purpose

Verify that BFD is enabled between the IBGP peers.

Action

From operational mode, enter the show bgp neighbor command. You can use the | match bfd filter to narrow the output.

content_copy zoom_out_map
user@host:A> show bgp neighbor | match bfd
Options: <BfdEnabled>
  BFD: enabled, up
  Trace file: /var/log/A/bgp-bfd size 131072 files 10
  Options: <BfdEnabled>
  BFD: enabled, up
  Trace file: /var/log/A/bgp-bfd size 131072 files 10
Meaning

The output shows that Logical System A has two neighbors with BFD enabled. When BFD is not enabled, the output displays BFD: disabled, down, and the <BfdEnabled> option is absent. If BFD is enabled and the session is down, the output displays BFD: enabled, down. The output also shows that BFD-related events are being written to a log file because trace operations are configured.

Verifying That BFD Sessions Are Up

Purpose

Verify that the BFD sessions are up, and view details about the BFD sessions.

Action

From operational mode, enter the show bfd session extensive command.

content_copy zoom_out_map
user@host:A> show bfd session extensive
                                                  Detect   Transmit
Address                  State     Interface      Time     Interval  Multiplier
192.163.6.4              Up                       3.000     1.000        3   
 Client BGP, TX interval 1.000, RX interval 1.000
 Session up time 00:54:40
 Local diagnostic None, remote diagnostic None
 Remote state Up, version 1
 Logical system 12, routing table index 25
 Min async interval 1.000, min slow interval 1.000
 Adaptive async TX interval 1.000, RX interval 1.000
 Local min TX interval 1.000, minimum RX interval 1.000, multiplier 3
 Remote min TX interval 1.000, min RX interval 1.000, multiplier 3
 Local discriminator 10, remote discriminator 9
 Echo mode disabled/inactive
 Multi-hop route table 25, local-address 192.168.6.5

                                                  Detect   Transmit
Address                  State     Interface      Time     Interval  Multiplier
192.168.40.4             Up                       3.000     1.000        3   
 Client BGP, TX interval 1.000, RX interval 1.000
 Session up time 00:48:03
 Local diagnostic None, remote diagnostic None
 Remote state Up, version 1
 Logical system 12, routing table index 25
 Min async interval 1.000, min slow interval 1.000
 Adaptive async TX interval 1.000, RX interval 1.000
 Local min TX interval 1.000, minimum RX interval 1.000, multiplier 3
 Remote min TX interval 1.000, min RX interval 1.000, multiplier 3
 Local discriminator 14, remote discriminator 13
 Echo mode disabled/inactive
 Multi-hop route table 25, local-address 192.168.6.5

2 sessions, 2 clients
Cumulative transmit rate 2.0 pps, cumulative receive rate 2.0 pps
Meaning

The TX interval 1.000, RX interval 1.000 output represents the setting configured with the minimum-interval statement. All of the other output represents the default settings for BFD. To modify the default settings, include the optional statements under the bfd-liveness-detection statement.

Viewing Detailed BFD Events

Purpose

View the contents of the BFD trace file to assist in troubleshooting, if needed.

Action

From operational mode, enter the file show /var/log/A/bgp-bfd command.

content_copy zoom_out_map
user@host:A> file show /var/log/A/bgp-bfd
Aug 15 17:07:25 trace_on: Tracing to "/var/log/A/bgp-bfd" started
Aug 15 17:07:26.492190 bgp_peer_init: BGP peer 192.163.6.4 (Internal AS 17) local address 192.168.6.5 not found.  Leaving peer idled
Aug 15 17:07:26.493176 bgp_peer_init: BGP peer 192.168.40.4 (Internal AS 17) local address 192.168.6.5 not found.  Leaving peer idled
Aug 15 17:07:32.597979 task_connect: task BGP_17.192.163.6.4+179 addr 192.163.6.4+179: No route to host
Aug 15 17:07:32.599623 bgp_connect_start: connect 192.163.6.4 (Internal AS 17): No route to host
Aug 15 17:07:36.869394 task_connect: task BGP_17.192.168.40.4+179 addr 192.168.40.4+179: No route to host
Aug 15 17:07:36.870624 bgp_connect_start: connect 192.168.40.4 (Internal AS 17): No route to host
Aug 15 17:08:04.599220 task_connect: task BGP_17.192.163.6.4+179 addr 192.163.6.4+179: No route to host
Aug 15 17:08:04.601135 bgp_connect_start: connect 192.163.6.4 (Internal AS 17): No route to host
Aug 15 17:08:08.869717 task_connect: task BGP_17.192.168.40.4+179 addr 192.168.40.4+179: No route to host
Aug 15 17:08:08.869934 bgp_connect_start: connect 192.168.40.4 (Internal AS 17): No route to host
Aug 15 17:08:36.603544 advertising receiving-speaker only capabilty to neighbor 192.163.6.4 (Internal AS 17)
Aug 15 17:08:36.606726 bgp_read_message: 192.163.6.4 (Internal AS 17): 0 bytes buffered
Aug 15 17:08:36.609119 Initiated BFD session to peer 192.163.6.4 (Internal AS 17): address=192.163.6.4 ifindex=0 ifname=(none) txivl=1000 rxivl=1000 mult=3 ver=255
Aug 15 17:08:36.734033 advertising receiving-speaker only capabilty to neighbor 192.168.40.4 (Internal AS 17)
Aug 15 17:08:36.738436 Initiated BFD session to peer 192.168.40.4 (Internal AS 17): address=192.168.40.4 ifindex=0 ifname=(none) txivl=1000 rxivl=1000 mult=3 ver=255
Aug 15 17:08:40.537552 BFD session to peer 192.163.6.4 (Internal AS 17) up
Aug 15 17:08:40.694410 BFD session to peer 192.168.40.4 (Internal AS 17) up
Meaning

Before the routes are established, the No route to host message appears in the output. After the routes are established, the last two lines show that both BFD sessions come up.

Viewing Detailed BFD Events After Deactivating and Reactivating a Loopback Interface

Purpose

Check to see what happens after bringing down a router or switch and then bringing it back up. To simulate bringing down a router or switch, deactivate the loopback interface on Logical System B.

Action
  1. From configuration mode, enter the deactivate logical-systems B interfaces lo0 unit 2 family inet command.

    content_copy zoom_out_map
    user@host:A# deactivate logical-systems B interfaces lo0 unit 2 family inet
    user@host:A# commit
  2. From operational mode, enter the file show /var/log/A/bgp-bfd command.

    content_copy zoom_out_map
    user@host:A> file show /var/log/A/bgp-bfd
    ...
    Aug 15 17:20:55.995648 bgp_read_v4_message:9747: NOTIFICATION received from 192.163.6.4 (Internal AS 17): code 6 (Cease) subcode 6 (Other Configuration Change)
    Aug 15 17:20:56.004508 Terminated BFD session to peer 192.163.6.4 (Internal AS 17)
    Aug 15 17:21:28.007755 task_connect: task BGP_17.192.163.6.4+179 addr 192.163.6.4+179: No route to host
    Aug 15 17:21:28.008597 bgp_connect_start: connect 192.163.6.4 (Internal AS 17): No route to host
  3. From configuration mode, enter the activate logical-systems B interfaces lo0 unit 2 family inet command.

    content_copy zoom_out_map
    user@host:A# activate logical-systems B interfaces lo0 unit 2 family inet
    user@host:A# commit
  4. From operational mode, enter the file show /var/log/A/bgp-bfd command.

    content_copy zoom_out_map
    user@host:A> file show /var/log/A/bgp-bfd
    ...
    Aug 15 17:25:53.623743 advertising receiving-speaker only capabilty to neighbor 192.163.6.4 (Internal AS 17)
    Aug 15 17:25:53.631314 Initiated BFD session to peer 192.163.6.4 (Internal AS 17): address=192.163.6.4 ifindex=0 ifname=(none) txivl=1000 rxivl=1000 mult=3 ver=255
    Aug 15 17:25:57.570932 BFD session to peer 192.163.6.4 (Internal AS 17) up

Example: Configuring EBGP Multihop Sessions on Logical Systems

This example shows how to configure an external BGP (EBGP) peer that is more than one hop away from the local router. This type of session is called a multihop EBGP session.

Requirements

In this example, no special configuration beyond device initialization is required.

Overview

When EBGP peers are not directly connected to each other, they must cross one or more non-BGP routing devices to reach each other. Configuring multihop EBGP enables the peers to pass through the other routing devices to form peer relationships and exchange update messages. This type of configuration is typically used when a Juniper Networks routing device needs to run EBGP with a third-party routing device that does not allow direct connection of the two EBGP peers. EBGP multihop enables a neighbor connection between two EBGP peers that do not have a direct connection.

The configuration to enable multihop EBGP sessions requires connectivity between the two EBGP peers. This example uses static routes to provide connectivity between the devices.

For directly connected EBGP sessions, physical addresses are typically used in the neighbor statements. For multihop EBGP, you must use loopback interface addresses, and specify the loopback interface address of the indirectly connected peer. In the use of loopback interfaces addresses, EBGP multihop is similar to internal BGP (IBGP).

Finally, you must add the multihop statement. Optionally, you can set a maximum time-to-live (TTL) value with the ttl statement. The TTL is carried in the IP header of BGP packets. If you do not specify a TTL value, the system’s default maximum TTL value is used. The default TTL value is 64 for multihop EBGP sessions. Another option is to retain the BGP next-hop value for route advertisements by including the no-nexthop-change statement.

Figure 4 shows a typical EBGP multihop network.

Device C and Device E have an established EBGP session. Device D is not a BGP-enabled device. All of the devices have connectivity via static routes.

Figure 4: Typical Network with EBGP Multihop SessionsTypical Network with EBGP Multihop Sessions

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 [edit] hierarchy level.

Device C

content_copy zoom_out_map
set logical-systems C interfaces lt-1/2/0 unit 9 description to-D
set logical-systems C interfaces lt-1/2/0 unit 9 encapsulation ethernet
set logical-systems C interfaces lt-1/2/0 unit 9 peer-unit 10
set logical-systems C interfaces lt-1/2/0 unit 9 family inet address 10.10.10.9/30
set logical-systems C interfaces lo0 unit 3 family inet address 192.168.40.4/32
set logical-systems C protocols bgp group external-peers type external
set logical-systems C protocols bgp group external-peers multihop ttl 2
set logical-systems C protocols bgp group external-peers local-address 192.168.40.4
set logical-systems C protocols bgp group external-peers export send-static
set logical-systems C protocols bgp group external-peers peer-as 18
set logical-systems C protocols bgp group external-peers neighbor 192.168.6.7
set logical-systems C policy-options policy-statement send-static term 1 from protocol static
set logical-systems C policy-options policy-statement send-static term 1 then accept
set logical-systems C routing-options static route 10.10.10.14/32 next-hop 10.10.10.10
set logical-systems C routing-options static route 192.168.6.7/32 next-hop 10.10.10.10
set logical-systems C routing-options router-id 192.168.40.4
set logical-systems C routing-options autonomous-system 17

Device D

content_copy zoom_out_map
set logical-systems D interfaces lt-1/2/0 unit 10 description to-C
set logical-systems D interfaces lt-1/2/0 unit 10 encapsulation ethernet
set logical-systems D interfaces lt-1/2/0 unit 10 peer-unit 9
set logical-systems D interfaces lt-1/2/0 unit 10 family inet address 10.10.10.10/30
set logical-systems D interfaces lt-1/2/0 unit 13 description to-E
set logical-systems D interfaces lt-1/2/0 unit 13 encapsulation ethernet
set logical-systems D interfaces lt-1/2/0 unit 13 peer-unit 14
set logical-systems D interfaces lt-1/2/0 unit 13 family inet address 10.10.10.13/30
set logical-systems D interfaces lo0 unit 4 family inet address 192.168.6.6/32
set logical-systems D routing-options static route 192.168.40.4/32 next-hop 10.10.10.9
set logical-systems D routing-options static route 192.168.6.7/32 next-hop 10.10.10.14
set logical-systems D routing-options router-id 192.168.6.6

Device E

content_copy zoom_out_map
set logical-systems E interfaces lt-1/2/0 unit 14 description to-D
set logical-systems E interfaces lt-1/2/0 unit 14 encapsulation ethernet
set logical-systems E interfaces lt-1/2/0 unit 14 peer-unit 13
set logical-systems E interfaces lt-1/2/0 unit 14 family inet address 10.10.10.14/30
set logical-systems E interfaces lo0 unit 5 family inet address 192.168.6.7/32
set logical-systems E protocols bgp group external-peers multihop ttl 2
set logical-systems E protocols bgp group external-peers local-address 192.168.6.7
set logical-systems E protocols bgp group external-peers export send-static
set logical-systems E protocols bgp group external-peers peer-as 17
set logical-systems E protocols bgp group external-peers neighbor 192.168.40.4
set logical-systems E policy-options policy-statement send-static term 1 from protocol static
set logical-systems E policy-options policy-statement send-static term 1 then accept
set logical-systems E routing-options static route 10.10.10.8/30 next-hop 10.10.10.13
set logical-systems E routing-options static route 192.168.40.4/32 next-hop 10.10.10.13
set logical-systems E routing-options router-id 192.168.6.7
set logical-systems E routing-options autonomous-system 18

Device C

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure Device C:

  1. Set the CLI to Logical System C.

    content_copy zoom_out_map
    user@host> set cli logical-system C
    
  2. Configure the interface to the directly-connected device (to-D), and configure the loopback interface.

    content_copy zoom_out_map
    [edit interfaces lt-1/2/0 unit 9]
    user@host:C# set description to-D
    user@host:C# set encapsulation ethernet
    user@host:C# set peer-unit 10
    user@host:C# set family inet address 10.10.10.9/30
    [edit interfaces lo0 unit 3]
    user@host:C# set family inet address 192.168.40.4/32
    
  3. Configure an EBGP session with Logical System E.

    The neighbor statement points to the loopback interface on Logical System E.

    content_copy zoom_out_map
    [edit protocols bgp group external-peers]
    user@host:C# set type external
    user@host:C# set local-address 192.168.40.4
    user@host:C# set export send-static
    user@host:C# set peer-as 18
    user@host:C# set neighbor 192.168.6.7
    
  4. Configure the multihop statement to enable Logical System C and Logical System E to become EBGP peers.

    Because the peers are two hops away from each other, the example uses the ttl 2 statement.

    content_copy zoom_out_map
    [edit protocols bgp group external-peers]
    user@host:C# set multihop ttl 2
    
  5. Configure connectivity to Logical System E, using static routes.

    You must configure a route to both the loopback interface address and to the address on the physical interface.

    content_copy zoom_out_map
    [edit  logical-systems C routing-options]
    user@host:C# set static route 10.10.10.14/32 next-hop 10.10.10.10
    user@host:C# set static route 192.168.6.7/32 next-hop 10.10.10.10
    
  6. Configure the local router ID and the autonomous system (AS) number.

    content_copy zoom_out_map
    [edit routing-options]
    user@host:C# set router-id 192.168.40.4
    user@host:C# set autonomous-system 17
    
  7. Configure a policy that accepts direct routes.

    Other useful options for this scenario might be to accept routes learned through OSPF or local routes.

    content_copy zoom_out_map
    [edit policy-options policy-statement send-static term 1]
    user@host:C# set from protocol static
    user@host:C# set then accept
    
Results

From configuration mode, confirm your configuration by entering the show interfaces, show protocols, show policy-options, and show routing-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

content_copy zoom_out_map
user@host:C# show interfaces
lt-1/2/0 {
    unit 9 {
        description to-D;
        encapsulation ethernet;
        peer-unit 10;
        family inet {
            address 10.10.10.9/30;
        }
    }
}
lo0 {
    unit 3 {
        family inet {
            address 192.168.40.4/32;
        }
    }
}
content_copy zoom_out_map
user@host:C# show protocols
bgp {
    group external-peers {
        type external;
        multihop {
            ttl 2;
        }
        local-address 192.168.40.4;
        export send-static;
        peer-as 18;
        neighbor 192.168.6.7;
    }
}
content_copy zoom_out_map
user@host:C# show policy-options
policy-statement send-static {
    term 1 {
        from protocol static;
        then accept;
    }
}
content_copy zoom_out_map
user@host:C# show routing-options
static {
    route 10.10.10.14/32 next-hop 10.10.10.10;
    route 192.168.6.7/32 next-hop 10.10.10.10;
}
router-id 192.168.40.4;
autonomous-system 17;

If you are done configuring the device, enter commit from configuration mode. Repeat these steps for all BFD sessions in the topology.

Device D

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure Device D:

  1. Set the CLI to Logical System D.

    content_copy zoom_out_map
    user@host> set cli logical-system D
    
  2. Configure the interfaces to the directly-connected devices, and configure a loopback interface.

    content_copy zoom_out_map
    [edit interfaces lt-1/2/0 unit 10]
    user@host:D# set description to-C
    user@host:D# set encapsulation ethernet
    user@host:D# set peer-unit 9
    user@host:D# set family inet address 10.10.10.10/30
    [edit interfaces lt-1/2/0 unit 13]
    user@host:D# set description to-E
    user@host:D# set encapsulation ethernet
    user@host:D# set peer-unit 14
    user@host:D# set family inet address 10.10.10.13/30
    [edit interfaces lo0 unit 4]
    user@host:D# set family inet address 192.168.6.6/32
    
  3. Configure connectivity to the other devices using a static routes to the loopback interface addresses.

    On Logical System D, you do not need static routes to the physical addresses because Logical System D is directly connected to Logical System C and Logical System E.

    content_copy zoom_out_map
    [edit routing-options]
    user@host:D# set static route 192.168.40.4/32 next-hop 10.10.10.9
    user@host:D# set static route 192.168.6.7/32 next-hop 10.10.10.14
    
  4. Configure the local router ID and the autonomous system (AS) number.

    content_copy zoom_out_map
    [edit routing-options]
    user@host:D# set router-id 192.168.6.6
    
Results

From configuration mode, confirm your configuration by entering the show interfaces and show routing-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

content_copy zoom_out_map
user@host:D# show interfaces
lt-1/2/0 {
    unit 10 {
        description to-C;
        encapsulation ethernet;
        peer-unit 9;
        family inet {
            address 10.10.10.10/30;
        }
    }
    unit 13 {
        description to-E;
        encapsulation ethernet;
        peer-unit 14;
        family inet {
            address 10.10.10.13/30;
        }
    }
}
lo0 {
    unit 4 {
        family inet {
            address 192.168.6.6/32;
        }
    }
}
content_copy zoom_out_map
user@host:D# show protocols
content_copy zoom_out_map
user@host:D# show routing-options
static {
    route 192.168.40.4/32 next-hop 10.10.10.9;
    route 192.168.6.7/32 next-hop 10.10.10.14;
}
router-id 192.168.6.6;

If you are done configuring the device, enter commit from configuration mode. Repeat these steps for all BFD sessions in the topology.

Device E

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure Device E:

  1. Set the CLI to Logical System E.

    content_copy zoom_out_map
    user@host> set cli logical-system E
    
  2. Configure the interface to the directly-connected device (to-D), and configure the loopback interface.

    content_copy zoom_out_map
    [edit interfaces lt-1/2/0 unit 14]
    user@host:E# set description to-D
    user@host:E# set encapsulation ethernet
    user@host:E# set peer-unit 13
    user@host:E# set family inet address 10.10.10.14/30
    [edit interfaces lo0 unit 5]
    user@host:E# set family inet address 192.168.6.7/32
    
  3. Configure an EBGP session with Logical System E.

    The neighbor statement points to the loopback interface on Logical System C.

    content_copy zoom_out_map
    [edit protocols bgp group external-peers]
    user@host:E# set local-address 192.168.6.7
    user@host:E# set export send-static
    user@host:E# set peer-as 17
    user@host:E# set neighbor 192.168.40.4
    
  4. Configure the multihop statement to enable Logical System C and Logical System E to become EBGP peers.

    Because the peers are two hops away from each other, the example uses the ttl 2 statement.

    content_copy zoom_out_map
    [edit protocols bgp group external-peers]
    user@host:E# set multihop ttl 2
    
  5. Configure connectivity to Logical System E, using static routes.

    You must configure a route to both the loopback interface address and to the address on the physical interface.

    content_copy zoom_out_map
    [edit routing-options]
    user@host:E# set static route 10.10.10.8/30 next-hop 10.10.10.13
    user@host:E# set static route 192.168.40.4/32 next-hop 10.10.10.13
    
  6. Configure the local router ID and the autonomous system (AS) number.

    content_copy zoom_out_map
    [edit routing-options]
    user@host:E# set router-id 192.168.6.7
    user@host:E# set autonomous-system 18
    
  7. Configure a policy that accepts direct routes.

    Other useful options for this scenario might be to accept routes learned through OSPF or local routes.

    content_copy zoom_out_map
    [edit policy-options policy-statement send-static term 1]
    user@host:E# set from protocol static
    user@host:E# set send-static then accept
    
Results

From configuration mode, confirm your configuration by entering the show interfaces, show protocols, show policy-options, and show routing-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

content_copy zoom_out_map
user@host:E# show interfaces
lt-1/2/0 {
    unit 14 {
        description to-D;
        encapsulation ethernet;
        peer-unit 13;
        family inet {
            address 10.10.10.14/30;
        }
    }
}
lo0 {
    unit 5 {
        family inet {
            address 192.168.6.7/32;
        }
    }
}
content_copy zoom_out_map
user@host:E# show protocols
bgp {
    group external-peers {
        multihop {
            ttl 2;
        }
        local-address 192.168.6.7;
        export send-static;
        peer-as 17;
        neighbor 192.168.40.4;
    }
}
content_copy zoom_out_map
user@host:E# show policy-options
policy-statement send-static {
    term 1 {
        from protocol static;
        then accept;
    }
}
content_copy zoom_out_map
user@host:E# show routing-options
static {
    route 10.10.10.8/30 next-hop 10.10.10.13;
    route 192.168.40.4/32 next-hop 10.10.10.13;
}
router-id 192.168.6.7;
autonomous-system 18;

If you are done configuring the device, enter commit from configuration mode.

Verification

Confirm that the configuration is working properly.

Verifying Connectivity

Purpose

Make sure that Device C can ping Device E, specifying the loopback interface address as the source of the ping request.

The loopback interface address is the source address that BGP will be using.

Action

From operational mode, enter the ping 10.10.10.14 source 192.168.40.4 command from Logical System C, and enter the ping 10.10.10.9 source 192.168.6.7 command from Logical System E.

content_copy zoom_out_map
user@host:C> ping 10.10.10.14 source 192.168.40.4PING 10.10.10.14 (10.10.10.14): 56 data bytes
64 bytes from 10.10.10.14: icmp_seq=0 ttl=63 time=1.262 ms
64 bytes from 10.10.10.14: icmp_seq=1 ttl=63 time=1.202 ms
^C
--- 10.10.10.14 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.202/1.232/1.262/0.030 ms
content_copy zoom_out_map
user@host:E> ping 10.10.10.9 source 192.168.6.7PING 10.10.10.9 (10.10.10.9): 56 data bytes
64 bytes from 10.10.10.9: icmp_seq=0 ttl=63 time=1.255 ms
64 bytes from 10.10.10.9: icmp_seq=1 ttl=63 time=1.158 ms
^C
--- 10.10.10.9 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.158/1.206/1.255/0.049 ms
Meaning

The static routes are working if the pings work.

Verifying the BGP Sessions Are Established

Purpose

Verify that the BGP sessions are up.

Action

From operational mode, enter the show bgp summary command.

content_copy zoom_out_map
user@host:C> show bgp summaryGroups: 1 Peers: 1 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0                 2          0          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
192.168.6.7              18        147        147       0       1     1:04:27 0/2/2/0              0/0/0/0
content_copy zoom_out_map
user@host:E> show bgp summary

Groups: 1 Peers: 1 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0                 2          0          0          0          0          0
Peer                     AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped...
192.168.40.4             17        202        202       0       1     1:02:18 0/2/2/0              0/0/0/0
Meaning

The output shows that both devices have one peer each. No peers are down.

Viewing Advertised Routes

Purpose

Checking to make sure that routes are being advertised by BGP.

Action

From operational mode, enter the show route advertising-protocol bgp neighbor command.

content_copy zoom_out_map
user@host:C> show route advertising-protocol bgp 192.168.6.7inet.0: 5 destinations, 7 routes (5 active, 0 holddown, 0 hidden)
  Prefix                  Nexthop              MED     Lclpref    AS path
* 10.10.10.14/32          Self                                    I
* 192.168.6.7/32          Self                                    I
content_copy zoom_out_map
user@host:E> show route advertising-protocol bgp 192.168.40.4

inet.0: 5 destinations, 7 routes (5 active, 0 holddown, 0 hidden)
  Prefix                  Nexthop              MED     Lclpref    AS path
* 10.10.10.8/30           Self                                    I
* 192.168.40.4/32         Self                                    I
Meaning

The send-static routing policy is exporting the static routes from the routing table into BGP. BGP is advertising these routes between the peers because the BGP peer session is established.

footer-navigation