Configuring routing protocols

Configure an IGP protocol (OSPF or IS-IS) to connect the router to other network elements within the same AS. BGP is used to establish the peering session with the external router.

IGP – OSPF

The following example displays the OSPF configuration to connect with a router R1 within the same AS. The port and interface configuration for this connection can be configured as described in Configuring ports and interfaces.

For more information about OSPF configuration, see the 7450 ESS, 7750 SR, 7950 XRS, and VSR Unicast Routing Protocols Guide.

Configuring OSPF

configure router "Base" ospf 0 admin-state enable
configure router "Base" ospf 0 area 0.0.0.0 interface "Interface-to-R1" interface-type point-to-point
Use the following command to display OSPF neighbor information.
show router ospf neighbor

OSPF neighbor information output

===============================================================================
Rtr Base OSPFv2 Instance 0 Neighbors
===============================================================================
Interface-Name                   Rtr Id          State      Pri  RetxQ   TTL
   Area-Id
-------------------------------------------------------------------------------
Interface-to-R1                  10.10.20.103    Full       1    0       35
   0.0.0.0
-------------------------------------------------------------------------------
No. of Neighbors: 1
===============================================================================

IGP – IS-IS

The following example displays the configuration to establish IS-IS adjacency with a router R1 within the same AS. The router is set to IS-IS Level 2 and native IPv6 routing is enabled. The port and interface configuration for this connection can be configured as described in Configuring ports and interfaces.

For more information about IS-IS configuration, see the 7450 ESS, 7750 SR, 7950 XRS, and VSR Unicast Routing Protocols Guide.

Configuring IS-IS

configure router "Base" isis 0 admin-state enable
configure router "Base" isis 0 ipv6-routing native
configure router "Base" isis 0 level-capability 2
configure router "Base" isis 0 system-id 0100.0000.0001
configure router "Base" isis 0 area-address [49.0000]
configure router "Base" isis 0 interface "Interface-to-R1" interface-type point-to-point
Use the following command to display IS-IS neighbor information.
show router isis adjacency

IS-IS adjacency status output

===============================================================================
Rtr Base ISIS Instance 0 Adjacency
===============================================================================
System ID                Usage State Hold Interface                     MT-ID
-------------------------------------------------------------------------------
sr103                    L2    Up    25   Interface-to-R1               0
-------------------------------------------------------------------------------
Adjacencies : 1
===============================================================================

BGP

In the following example, the External Border Gateway Protocol (EBGP) session is configured using the interface IP as the neighbor IP. The local AS is configured as 64501 and remote AS is 64503.

For more information about BGP configuration, see the 7450 ESS, 7750 SR, 7950 XRS, and VSR Unicast Routing Protocols Guide.

Configuring an EBGP session

configure router "Base" autonomous-system 64501
configure router "Base" bgp router-id 10.0.0.1
configure router "Base" bgp group "eBGP-Peering" type external
configure router "Base" bgp group "eBGP-Peering" peer-as 64503
configure router "Base" bgp group "eBGP-Peering" family ipv4 true
configure router "Base" bgp group "eBGP-Peering" family ipv6 true
configure router "Base" bgp neighbor "192.168.0.3" group "eBGP-Peering"
configure router "Base" bgp neighbor "192.168.0.4" group "eBGP-Peering"
Use the following command to display BGP neighbor status.
show router bgp summary

BGP neighbor status summary output

===============================================================================
 BGP Router ID:10.0.0.1         AS:64501       Local AS:64501
===============================================================================
BGP Admin State         : Up          BGP Oper State              : Up
Total Peer Groups       : 1           Total Peers                 : 2
Total VPN Peer Groups   : 0           Total VPN Peers             : 0
Current Internal Groups : 1           Max Internal Groups         : 1
Total BGP Paths         : 21          Total Path Memory           : 7416

...

===============================================================================
BGP Summary
===============================================================================
Legend : D - Dynamic Neighbor
===============================================================================
Neighbor
Description
                   AS PktRcvd InQ  Up/Down   State|Rcv/Act/Sent (Addr Family)
                      PktSent OutQ
-------------------------------------------------------------------------------
192.168.0.3
                64503      20    0 00h07m26s 3/0/0 (IPv4)
                           19    0           0/0/0 (IPv6)
192.168.0.4
                64503      27    0 00h10m05s 2/0/0 (IPv4)
                           41    0           1/0/0 (IPv6)
-------------------------------------------------------------------------------
Use the following command to display routes received from a neighbor.
show router bgp neighbor 2001:a8::5 received-routes

Routes received from a neighbor output

===============================================================================
 BGP Router ID:10.0.0.1         AS:64501       Local AS:64501
===============================================================================
 Legend -
 Status codes  : u - used, s - suppressed, h - history, d - decayed, * - valid
                 l - leaked, x - stale, > - best, b - backup, p - purge
 Origin codes  : i - IGP, e - EGP, ? - incomplete

===============================================================================
BGP IPv4 Routes
===============================================================================
Flag  Network                                            LocalPref   MED
      Nexthop (Router)                                   Path-Id     IGP Cost
      As-Path                                                        Label
-------------------------------------------------------------------------------
i     10.10.1.24/29                                      n/a         None
      192.168.0.3                                        None        0
      64503                                                          -
i     10.10.20.103/32                                    n/a         None
      192.168.0.3                                        None        0
      64503                                                          -
i     192.168.0.0/24                                     n/a         None
      192.168.0.3                                        None        0
      64503                                                          -
-------------------------------------------------------------------------------
Routes : 3
===============================================================================
Use the following command to display the number of routes installed per line card summary output.
show router fib 1 summary ipv4

Number of routes installed per line card summary output

===============================================================================
FIB Summary
===============================================================================
                              Active
-------------------------------------------------------------------------------
Static                        0
Direct                        3
Host                          0
BGP                           0
BGP VPN                       0
--snip---
VPN Leak                      0
-------------------------------------------------------------------------------
Total Installed               4
-------------------------------------------------------------------------------
Current Occupancy             1%
Overflow Count                0
Suppressed by Selective FIB   0
Occupancy Threshold Alerts
    Alert Raised 0 Times;
===============================================================================

BGP dynamic peering with unnumbered interfaces

SR OS supports unnumbered interfaces and dynamic peers for both IPv4 and IPv6. Dynamic sessions are identified using one of the following methods:

  1. the source IP address of an incoming BGP TCP connection matches an IP prefix associated with dynamic BGP sessions
  2. an ICMPv6 router advertisement message is received from a potential BGP router on an interface listed as a dynamic neighbor interface. This allows a dynamic peer to be set up over an unnumbered interface using only the IPv6 Link Local Address (LLA) as shown in the following configuration

Configuring BGP dynamic peering with unnumbered interface

configure router "Base" interface "to-R2" admin-state enable
configure router "Base" interface "to-R2" port 1/1/c3/1
configure router "Base" interface "to-R2" ipv4 unnumbered system
configure router "Base" interface "to-R2" ipv6

configure router "Base" bgp group "BGP_Unnumbered" type external
configure router "Base" bgp group "BGP_Unnumbered" family ipv4 true
configure router "Base" bgp group "BGP_Unnumbered" family ipv6 true
configure router "Base" bgp group "BGP_Unnumbered" dynamic-neighbor interface "to-R2" allowed-peer-as ["64500..65500"]

configure router "Base" ipv6 router-advertisement interface "to-R2" admin-state enable
configure router "Base" ipv6 router-advertisement interface "to-R2" min-advertisement-interval 10

Use the following command to display BGP neighbor status.

show router bgp summary

BGP neighbor status summary output


===============================================================================
 BGP Router ID:10.0.0.1         AS:64501       Local AS:64501
===============================================================================
BGP Admin State         : Up          BGP Oper State              : Up
Total Peer Groups       : 1           Total Peers                 : 2
Total VPN Peer Groups   : 0           Total VPN Peers             : 0
Current Internal Groups : 1           Max Internal Groups         : 1
Total BGP Paths         : 21          Total Path Memory           : 7416
===============================================================================
BGP Summary
===============================================================================
Legend : D - Dynamic Neighbor
===============================================================================
Neighbor
Description
                   AS PktRcvd InQ  Up/Down   State|Rcv/Act/Sent (Addr Family)
                      PktSent OutQ
-------------------------------------------------------------------------------
fe80::e00:5ff:fe86:500-"to-R2"(D)
                65100     105    0 00h50m25s 0/0/0 (IPv4)
                          106    0           0/0/0 (IPv6)
-------------------------------------------------------------------------------