What are Static Routes?
Static routes are manually configured routes that define specific paths for network traffic to follow. Unlike dynamic routing protocols, which automatically adjust routes based on current network conditions, static routes require manual configuration. This makes them simple and predictable, ideal for networks with stable topologies or specific routing requirements.
Benefits of Static Routes
- Simplicity: Static routes are easy to configure and maintain, making them ideal for small networks or straightforward routing needs.
- Predictability: Because they do not change unless manually altered, static routes offer predictable paths for network traffic.
- Control: Administrators have complete control over the routing path, allowing for customized traffic flow.
Example Configuration
Let’s consider a scenario where you want to configure a static route to direct traffic destined for the 192.168.10.0/24 network through a gateway at 192.168.20.112 using the internal
interface:
Option 1: CLI Configuraiton
- Connect to the SSH interface on FortiGate Firewall
config router static
edit 1
set dst 192.168.10.0 255.255.255.0
set gateway 192.168.20.223
set device internal
set distance 10
next
end
Option 2: Web Interface Configuraiton
Access the FortiGate Management Interface:
- Log in to your FortiGate unit through the web-based GUI
Navigate to the Network Section:
- In the GUI, go to Network > Static Routes.
Add a New Static Route:
- In the GUI, click on Create New to open the new route configuration page.
Configure the Route Parameters:
- Destination IP/Netmask: Specify the destination network and its subnet mask.
- Gateway: Enter the IP address of the next hop gateway.
- Interface: Select the outgoing interface for the traffic.
- Distance: Set the administrative distance for the route, which determines its priority relative to other routes.
Save the Configuration:
- Click OK to save the new static route.