fortigate staticルート GUI

StaticRouteの設定

Network→Routing→Create Newを押下

f:id:slavex:20220319153235p:plain

 

下記項目入力して、OK押下すれば、登録完了。

サブネットは、/24 255.255.255.0 どちらでもOK

f:id:slavex:20220319153322p:plain

 

Priorityについて

オプションとして、優先度設定できます。

f:id:slavex:20220319160235p:plain

Priorityを設定すると、ルーティングテーブル上では2つ経路が表示されます。

 

Fortigate2 # get router info routing-table all
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
       O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default

C       172.16.0.0/24 is directly connected, wan2
C       172.16.1.0/24 is directly connected, vlan1
C       192.168.0.0/24 is directly connected, wan1
S       192.168.3.0/24 [250/0] is directly connected, wan1
S       192.168.4.0/24 [10/0] via 192.168.0.254, wan1, [10/0]
                       [10/0] via 172.16.0.254, wan2, [20/0]


Fortigate2 #

 

動作確認

構成

f:id:slavex:20220319161430p:plain

Priorityの値が小さい方(R1)を経由してます。

Fortigate2 # get router info routing-table static
S       192.168.3.0/24 [250/0] is directly connected, wan1
S       192.168.4.0/24 [10/0] via 192.168.0.254, wan1, [10/0]
                       [10/0] via 172.16.0.254, wan2, [20/0]

Fortigate2 #

 

Fortigate2 # execute traceroute 192.168.4.1
traceroute to 192.168.4.1 (192.168.4.1), 32 hops max, 72 byte packets
 1  192.168.0.254  0.701 ms  0.583 ms  0.460 ms
 2  192.168.4.1  1.124 ms  1.202 ms  1.056 ms

 

R1側をメトリック30に変更

R2側を経由するようになりました。

Fortigate2 # get router info routing-table static
S       192.168.3.0/24 [10/0] is directly connected, wan1
S       192.168.4.0/24 [10/0] via 172.16.0.254, wan2, [20/0]
                       [10/0] via 192.168.0.254, wan1, [30/0]

 

Fortigate2 # execute traceroute 192.168.4.1
traceroute to 192.168.4.1 (192.168.4.1), 32 hops max, 72 byte packets
 1  172.16.0.254  6.924 ms  0.931 ms  0.533 ms
 2  * 192.168.4.1  1.045 ms  1.064 ms