
146
Fortinet Inc.
Configuring routing
Network configuration
Figure 11: Routing table
Policy routing
Policy routing extends the functions of destination routing. Using policy routing you
can route traffic based not only the destination address but also on:
• Source address
• Protocol, service type, or port range
• Incoming or source interface
Using policy routing you can build a routing policy database (RPDB) that selects the
appropriate route for traffic by executing a set of routing rules. To select a route for
traffic the FortiGate unit matches the traffic with the policy routes added to the RPDB
starting at the top of the list. The first policy route to match the traffic is used to set the
route for the traffic. The route supplies the net hop gateway as well as the FortiGate
interface to be used by the traffic.
Packets are matched with policy routes before they are matched with destination
routes. If a packet does not match a policy route it is routed using destination routes.
The gateway added to a policy route must also be added to a destination route. When
the FortiGate unit matches packets with a route in the RPDB, the FortiGate unit looks
in the destination routing table for the gateway that was added to the policy route. If a
match is found, the FortiGate routes the packet using the matched destination route. If
a match is not found, the FortiGate routes the packet using normal routing.
To find a route with a matching gateway, the FortiGate unit starts at the top of the
destination routing table and searches until it finds the first matching destination route.
This matched route is used to route the packet.
For policy routing examples, see
“Policy routing examples” on page 57
.
Policy routing command syntax
Configure policy routing using the following CLI command.
set system route policy <route_int> src <source_ip>
<source_mask> iifname <source-interface_name>
dst <destination_ip> <destination_mask>
oifname <destination-interface_name> protocol <protocol_int>
port <low-port_int> <high-port_int> gw <gateway_ip>
Complete policy routing command syntax is described in
Volume 6: FortiGate CLI
Reference Guide
.
Summary of Contents for FortiGate 400
Page 13: ...Contents FortiGate 400 Installation and Configuration Guide 13 Glossary 295 Index 299 ...
Page 14: ...Contents 14 Fortinet Inc ...
Page 44: ...44 Fortinet Inc Next steps Getting started ...
Page 74: ...74 Fortinet Inc Transparent mode configuration examples Transparent mode installation ...
Page 148: ...148 Fortinet Inc Providing DHCP services to your internal network Network configuration ...
Page 168: ...168 Fortinet Inc Customizing replacement messages System configuration ...
Page 200: ...200 Fortinet Inc Content profiles Firewall configuration ...
Page 258: ...258 Fortinet Inc Logging attacks Network Intrusion Detection System NIDS ...
Page 294: ...294 Fortinet Inc Configuring alert email Logging and reporting ...
Page 298: ...298 Fortinet Inc Glossary ...
Page 308: ...308 Fortinet Inc Index ...