Static Routes

Static routes are manually configured routes that

  • direct data packets through a network using predetermined paths
  • provides a stable and predictable network environment, and
  • is ideal for smaller networks or scenarios where network stability and security are paramount.

Unlike dynamic routing, which adjusts routes based on real-time network conditions, static routes remain fixed unless manually modified.

admin@sonic:~$ sudo config route add prefix -h
Usage: config route add [OPTIONS] prefix [vrf <vrf_name>] <A.B.C.D/M> nexthop
                        <[vrf <vrf_name>] <A.B.C.D>>|<dev <dev_name>>

  Add route command

Options:
  -h, -?, --help  Show this message and exit.

For example:

sudo config route add prefix 0.0.0.0/0 nexthop 192.1.1.1