Hello, everyone!
Today, I will shortly explain static and default routes. Then, I will show you the main commands and examples for static and default routes.
Routing is the process of moving packets from one network to another network by routers. Routers can have manually entered routes (static routes) or they can use dynamic routing protocols (dynamic routes). Routers use dynamic routing protocols to find all networks and ensure that all routers have the same routing table. There are many dynamic routing protocols: RIP, IS-IS, OSPF, BGP, etc.
Advantages of static routing
not much load on the router's processor,
no bandwidth usage between routers and
improved security.
Disadvantages of static routing
there have been changes to the network, requiring changes to static routes or adding new static routes, and
static routing is not acceptable on large networks.
The OLT supports IPv4 and IPv6 static routes. The difference between IPv4 and IPv6 static routes is in their destination IP address and the next hop IP address.
The command for configuration IPv4 static route is:
TEST(config)#ip route-static [destination IP address] [subnet mask] [next hop IP address]
For example:
TEST(config)#ip route-static 45.13.X.X 255.255.255.255 25.36.X.X
{ <cr>|bfd<K>|description<K>|inherit-cost<K>|permanent<K>|preference<K>|tag<K>|track<K> }:
Command:
ip route-static 45.13.X.X 255.255.255.255 25.36.X.X
The default route is a special route that can be manually configured or generated by dynamic routing protocols, such as OSPF and IS-IS. We use this special route when we want to allow all hosts to access a particular network or host. IP address and subnet mask of default route is 0.0.0.0 0.0.0.0.
The command for the configuration default route is:
TEST(config)#ip route-static 0.0.0.0 0.0.0.0 [next hop IP address]
For example:
TEST(config)#ip route-static 0.0.0.0 0.0.0.0 X.X.0.1
{ <cr>|bfd<K>|description<K>|inherit-cost<K>|permanent<K>|preference<K>|tag<K>|track<K> }:
Command:
ip route-static 0.0.0.0 0.0.0.0 X.X.0.1
The next command show us all routes in the OLT:
TEST(config)#display ip routing-table all-routes
{ <cr>|statistics<K>||<K> }:
Command:
display ip routing-table all-routes
Route Flags: R - relay, D - download to fib, T - to vpn-instance, B - black hole route
------------------------------------------------------------------------------
Routing Table : _public_
Destinations : 10 Routes : 10
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 Static 60 0 RD X.X.0.1 Vlanif500
X.X.76.0/20 Direct 0 0 D X.X.76.2 Vlanif600
X.X.76.2/32 Direct 0 0 D 127.0.X.X Vlanif600
X.X.0.0/17 Direct 0 0 D 10.75.X.X Vlanif500
X.X.0.2/32 Direct 0 0 D 127.0.X.X Vlanif500
X.X.28.0/19 Direct 0 0 D 10.75.X.X Vlanif400
X.X.200.2/32 Direct 0 0 D 127.0.X.X Vlanif400
45.13.X.X/32 Static 60 0 RD X.X.200.1 Vlanif400
127.0.X.X/8 Direct 0 0 D 127.0.X.X InLoopBack0
127.0.X.X/32 Direct 0 0 D 127.0.X.X InLoopBack0
There are two static routes (red lines) on the OLT, all other links are direct links. One static route is the default route.
With the next command, we can see only static routes on the OLT:
TEST(config)#display static-route routing-table
{ <cr>|prefix4<I><X.X.X.X>|vpn-instance<K>||<K> }:
Command:
display static-route routing-table
Summary Destinations : 2 Routes : 2
Destination : 0.0.0.0/0
Preference : 60 Tag : 0
Interface : -- InterfaceState : --
OriginNextHop : X.X.0.1 BfdDetect : Disable
BfdSession :
BfdType : --
NQAAdminName : -- NQATestName : --
NQADetect : Disable Label : NULL
EFMDetect : Disable EfmInterface : --
State : Active Primary Cost : 0
IndirectID : 0x1000068 RelayTunnel : Disable
IIDFlags : GateWay RelayDepth : 1
DestVrf : _public_ DestTopo :
RelayNextHop : X.X.0.1 RelayInterface :
Vlanif405
TunnelID : --
Destination : 45.13.X.X/32
Preference : 60 Tag : 0
Interface : -- InterfaceState : --
OriginNextHop : X.X.28.1 BfdDetect : Disable
BfdSession :
BfdType : --
NQAAdminName : -- NQATestName : --
NQADetect : Disable Label : NULL
EFMDetect : Disable EfmInterface : --
State : Active Primary Cost : 0
IndirectID : 0x1000069 RelayTunnel : Disable
IIDFlags : GateWay RelayDepth : 1
DestVrf : _public_ DestTopo :
RelayNextHop : X.X.28.1 RelayInterface :
Vlanif404
TunnelID : --
This was the most important information for static routing.
Thank you!




