How to configure Static Routing, Default Routes in Nokia router

in #tutorial3 years ago

How-to-configure-Static-Routing-Default-Routes-in-Nokia-router.jpg

In order to forward packets to destinations beyond the locally connected networks, additional entries are required in the routing table. These entries can be manually configured known as static routes. As with all entries in the routing table, static routes describe the remote destination network and the next-hop to which a packet must be forwarded in order to reach the destination. The destination is given as a network prefix (network address and subnet mask). Let’s lab with me for a deeper understanding on how to configure Static Routing, Default Routes and Floating Static Routes in Nokia Routers.

Static routing topology example

The following is the topology for practise lab How to configure Static Routing, Default Routes in Nokia router. Here are some things to keep in mind:

  • The system address is 10.10.10.R/32 with R as the router number
  • All router interfaces are named toRZ, where Z is the router number
  • The IP address for all interfaces is numbered 10.X.Y.R/27, where X is the lower router,Y is the higher router, and R is the local router.

1.png

Simulation execution environment:

  • EVE-NG version: 2.0
  • Nokia SROS TiMOS-B-15.0.R3
  • Initial configuration such as IP, Port, Interfaces… will not be described in this lab. You can buy full lab with initial configuration, final configuration and topology unl file in the comment page.

IPv4 Static Routes

We will start with 4 routers: R1, R2, R3 and R4. The purpose of this section is that the R1’s System IP can ping to the R4’s System IP and vice versa.

2.png

Step 1: Configure a static route on routers R1 through R4 in order to ping the system interface of each directly attached router.

R1: Configure static route to R2’s System IP and R3’s System IP

configure router
        static-route-entry 10.10.10.2/32
            next-hop 10.1.2.2
                no shutdown
            exit
        exit
        static-route-entry 10.10.10.3/32
            next-hop 10.1.3.3
                no shutdown
            exit
        exit

R2: Configure static route to R1’s System IP and R4’s System IP

configure router
        static-route-entry 10.10.10.1/32
            next-hop 10.1.2.1
                no shutdown
            exit
        exit
        static-route-entry 10.10.10.4/32
            next-hop 10.2.4.4
                no shutdown
            exit
        exit

R3: Configure static route to R1’s System IP and R4’s System IP

configure router
        static-route-entry 10.10.10.1/32
            next-hop 10.1.3.1
                no shutdown
            exit
        exit
        static-route-entry 10.10.10.4/32
            next-hop 10.3.4.4
                no shutdown
            exit
        exit

R4: Configure static route to R2’s System IP and R3’s System IP

configure router
        static-route-entry 10.10.10.2/32
            next-hop 10.2.4.2
                no shutdown
            exit
        exit
        static-route-entry 10.10.10.3/32
            next-hop 10.3.4.3
                no shutdown
            exit
        exit

Check from router R1: R1 can ping to R2 and R3 but can’t ping to R4 because router R1 does not have any static routes configured to reach IP addresses on router R4.

*A:R1# ping 10.10.10.2 rapid
PING 10.10.10.2 56 data bytes
!!!!!
---- 10.10.10.2 PING Statistics ----
5 packets transmitted, 5 packets received, 0.00% packet loss
round-trip min = 1.55ms, avg = 1.69ms, max = 1.85ms, stddev = 0.125ms
*A:R1# ping 10.10.10.3 rapid
PING 10.10.10.3 56 data bytes
!!!!!
---- 10.10.10.3 PING Statistics ----
5 packets transmitted, 5 packets received, 0.00% packet loss
round-trip min = 4.29ms, avg = 4.63ms, max = 4.88ms, stddev = 0.210ms
*A:R1# ping 10.10.10.4 rapid
PING 10.10.10.4 56 data bytes
.....
---- 10.10.10.4 PING Statistics ----
5 packets transmitted, 0 packets received, 100% packet loss

*A:R1# show router route-table protocol static

===============================================================================
Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags]                            Type    Proto     Age        Pref
      Next Hop[Interface Name]                                    Metric
-------------------------------------------------------------------------------
10.10.10.2/32                                 Remote  Static    00h20m04s  5
       10.1.2.2                                                     1
10.10.10.3/32                                 Remote  Static    00h20m04s  5
       10.1.3.3                                                     1
-------------------------------------------------------------------------------
No. of Routes: 2
Flags: n = Number of times nexthop is repeated
       B = BGP backup route available
       L = LFA nexthop available
       S = Sticky ECMP requested
===============================================================================

Useful information: The static routes have a preference of 5 and a metric of 1

Step 2: Configure a static route from router R4 to R1 and vice versa via router R2 (or R3)

R1: Configure static-route-entry to router R4 via next-hop router R2

configure router
        static-route-entry 10.10.10.4/32
            next-hop 10.1.2.2
                no shutdown
            exit
        exit
A:R1# show router route-table protocol static

===============================================================================
Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags]                            Type    Proto     Age        Pref
      Next Hop[Interface Name]                                    Metric
-------------------------------------------------------------------------------
10.10.10.2/32                                 Remote  Static    01h37m22s  5
       10.1.2.2                                                     1
10.10.10.3/32                                 Remote  Static    01h37m22s  5
       10.1.3.3                                                     1
10.10.10.4/32                                 Remote  Static    01h15m46s  5
       10.1.2.2                                                     1
-------------------------------------------------------------------------------
No. of Routes: 3
Flags: n = Number of times nexthop is repeated
       B = BGP backup route available
       L = LFA nexthop available
       S = Sticky ECMP requested
===============================================================================

R4: Configure static-route-entry to router R1 via next-hop router R2

configure router
        static-route-entry 10.10.10.1/32
            next-hop 10.2.4.2
                no shutdown
            exit
        exit
A:R4# show router route-table protocol static

===============================================================================
Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags]                            Type    Proto     Age        Pref
      Next Hop[Interface Name]                                    Metric
-------------------------------------------------------------------------------
10.10.10.1/32                                 Remote  Static    00h01m18s  5
       10.2.4.2                                                     1
10.10.10.2/32                                 Remote  Static    00h01m18s  5
       10.2.4.2                                                     1
10.10.10.3/32                                 Remote  Static    00h01m18s  5
       10.3.4.3                                                     1
-------------------------------------------------------------------------------
No. of Routes: 3
Flags: n = Number of times nexthop is repeated
       B = BGP backup route available
       L = LFA nexthop available
       S = Sticky ECMP requested
===============================================================================

Verification:

Check traceroute and ping from R1 to R4:

A:R1# traceroute 10.10.10.4
traceroute to 10.10.10.4, 30 hops max, 40 byte packets
  1  10.1.2.2 (10.1.2.2)    23.3 ms  7.65 ms  5.26 ms
  2  10.10.10.4 (10.10.10.4)    16.9 ms  4.72 ms  8.68 ms

A:R1# ping 10.10.10.4
PING 10.10.10.4 56 data bytes
64 bytes from 10.10.10.4: icmp_seq=1 ttl=63 time=10.5ms.
64 bytes from 10.10.10.4: icmp_seq=2 ttl=63 time=3.52ms.
64 bytes from 10.10.10.4: icmp_seq=3 ttl=63 time=3.18ms.
64 bytes from 10.10.10.4: icmp_seq=4 ttl=63 time=4.03ms.
64 bytes from 10.10.10.4: icmp_seq=5 ttl=63 time=3.37ms.

---- 10.10.10.4 PING Statistics ----
5 packets transmitted, 5 packets received, 0.00% packet loss
round-trip min = 3.18ms, avg = 4.92ms, max = 10.5ms, stddev = 2.80ms
A:R1#

Default Routes

In this lab, we will configure Default Routes on router R5 and static-route on other routers so that from R4 we can ping to R5. We use R1, R2, R4 and R5 for this lab.

3.png

Step 1: Configure Default Routes on router R5

configure router
        static-route-entry 0.0.0.0/0
            next-hop 10.1.5.1
                no shutdown
            exit
        exit

Step 2: Configure static-route on router R1, R2 and R4.
On router R4, configure a static-route to reach router R5 via router R2

configure router
        static-route-entry 10.10.10.5/32
            next-hop 10.2.4.2
                no shutdown
            exit

On router R2, configure a static-route to reach router R5 via router R1

configure router
        static-route-entry 10.10.10.5/32
            next-hop 10.1.2.1
                no shutdown
            exit

On router R1, configure a static-route to reach system address router R5 via connected address

configure router
        static-route-entry 10.10.10.5/32
            next-hop 10.1.5.5
                no shutdown
            exit

Verification:
Ping and traceroute from router R4 to router R5

A:R4# ping 10.10.10.5 rapid
PING 10.10.10.5 56 data bytes
!!!!!
---- 10.10.10.5 PING Statistics ----
5 packets transmitted, 5 packets received, 0.00% packet loss
round-trip min = 4.07ms, avg = 4.28ms, max = 4.57ms, stddev = 0.181ms

A:R4# traceroute 10.10.10.5
traceroute to 10.10.10.5, 30 hops max, 40 byte packets
  1  10.2.4.2 (10.2.4.2)    3.88 ms  8.12 ms  2.02 ms
  2  10.1.2.1 (10.1.2.1)    3.71 ms  4.00 ms  12.1 ms
  3  10.10.10.5 (10.10.10.5)    9.17 ms  25.1 ms  22.4 ms

Floating Static Routes

Floating static routes help us possible to create additional static routes to a destination that can be used as a backup to the original route. We will create 2 static-routes in 2 different directions from R2 to R3. The goal is that R2 will choose a lower metric route to R3 (path through R2). Let’s using R1, R2, R3 and R4 for this test case.

4.png

Step 1: On router R2, configure a static route to router R3 via router R1, using a metric of 10 and another static route to router R3 via router R4, using a metric of 20.

configure router
        static-route-entry 10.10.10.3/32
            next-hop 10.1.2.1
                metric 10
                no shutdown
            exit
            next-hop 10.2.4.2
                metric 20
                no shutdown
            exit
        exit

A:R2# show router static-route 10.10.10.3/32

===============================================================================
Static Route Table (Router: Base)  Family: IPv4
===============================================================================
Prefix                                        Tag         Met    Pref Type Act
   Next Hop                                    Interface
-------------------------------------------------------------------------------
10.10.10.3/32                                 0           10     5    NH   Y
   10.1.2.1                                    toR1
10.10.10.3/32                                 0           20     5    NH   N
   10.2.4.4                                    n/a
-------------------------------------------------------------------------------
No. of Static Routes: 2
===============================================================================

Step 2: On router R3, configure a static route to router R2 via router R4.

configure router
        static-route-entry 10.10.10.2/32
            next-hop 10.3.4.4
                no shutdown
            exit

Verification

A:R2# show router route-table 10.10.10.3

===============================================================================
Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags]                            Type    Proto     Age        Pref
      Next Hop[Interface Name]                                    Metric
-------------------------------------------------------------------------------
10.10.10.3/32                                 Remote  Static    00h09m04s  5
       10.1.2.1                                                     10
-------------------------------------------------------------------------------
No. of Routes: 1
Flags: n = Number of times nexthop is repeated
       B = BGP backup route available
       L = LFA nexthop available
       S = Sticky ECMP requested
===============================================================================

Traceroute from router R2 to router R3:

A:R2# traceroute 10.10.10.3
traceroute to 10.10.10.3, 30 hops max, 40 byte packets
  1  10.1.2.1 (10.1.2.1)    16.8 ms  6.94 ms  3.87 ms
  2  10.10.10.3 (10.10.10.3)    8.22 ms  7.48 ms  11.6 ms

The packet takes the path via router R1. Now let’s try to **shutdown ** interface toR1 from R2 router.

A:R2# configure router interface "toR1" shutdown

Show route-table and traceroute from router R2 to router R3 again!

A:R2# show router route-table 10.10.10.3

===============================================================================
Route Table (Router: Base)
===============================================================================
Dest Prefix[Flags]                            Type    Proto     Age        Pref
      Next Hop[Interface Name]                                    Metric
-------------------------------------------------------------------------------
10.10.10.3/32                                 Remote  Static    00h00m51s  5
       10.2.4.4                                                     20
-------------------------------------------------------------------------------
No. of Routes: 1
Flags: n = Number of times nexthop is repeated
       B = BGP backup route available
       L = LFA nexthop available
       S = Sticky ECMP requested
===============================================================================

A:R2# traceroute 10.10.10.3
traceroute to 10.10.10.3, 30 hops max, 40 byte packets
  1  10.2.4.4 (10.2.4.4)    13.5 ms  12.2 ms  4.97 ms
  2  10.10.10.3 (10.10.10.3)    6.62 ms  5.46 ms  9.39 ms

Your routing table on router R2 show that the floating static route has replaced the original static route that you configured to router R3.

If you need to discuss further, you can leave a comment below the article. Thanks you.