FortiGateでは物理インターフェース(例: port1
)の上に、VLAN IDを指定したサブインターフェースを作成することでタグVLANを扱います。
port1.10
のように設定。port1
)で受ける。スイッチと接続する際は、FortiGate側の設定とスイッチ側のトランク設定(許可VLAN・native VLAN)が一致していることが必須です。
config system interface
edit "port1.10"
set interface "port1"
set vlanid 10
set ip 192.168.10.1/24
set allowaccess ping
next
edit "port1.20"
set interface "port1"
set vlanid 20
set ip 192.168.20.1/24
set allowaccess ping
next
end
set interface
で親IFを指定set vlanid
でVLAN IDを設定allowaccess
は必要最小限に(管理VLAN以外では無効推奨)
config firewall policy
edit 1
set srcintf "port1.10"
set dstintf "port1.20"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
next
end
config system dhcp server
edit 10
set interface "port1.10"
set default-gateway 192.168.10.1
set netmask 255.255.255.0
config ip-range
edit 1
set start-ip 192.168.10.100
set end-ip 192.168.10.200
next
end
next
end
config firewall policy
edit 10
set srcintf "port1.10"
set dstintf "wan1"
set srcaddr "all"
set dstaddr "all"
set action accept
set service "ALL"
set nat enable
next
end
config router static
edit 0
set gateway 203.0.113.1
set device "wan1"
next
end
port1
)、タグはサブIF(例: port1.10
)に収容。agg1
)を作り、その上にVLANサブIFを定義。lan
がベース。親IFを確認して設定。switch-controller
配下で行い、ゲートウェイ用途のみFortiGateにVLAN IFを作成。diagnose netlink vlan list
get router info routing-table all
get system arp
diagnose debug flow filter addr 192.168.10.50 diagnose debug flow trace start 100 diagnose debug enable
diagnose sniffer packet any 'vlan 10 or vlan 20' 4 0 a
FortiGateのタグVLAN設定は「親IF上にVLANサブIFを作り、必要に応じてDHCP・ポリシー・NATを組み合わせる」というシンプルな流れです。
ただし、アンタグの扱いやスイッチとの整合性、HAやFortiLinkなど周辺機能との組み合わせには注意が必要です。
正しく設計すれば、社内LAN・ゲストLANの分離やマルチセグメント構築を安全に実現できます。
以上、FortiGateのタグVLAN設定についてでした。
最後までお読みいただき、ありがとうございました。