What a VDOM is: several firewalls in one device
This lesson is open to everyone. The other lessons open with a package: sign in or sign up, then choose a package.
Key points
- A VDOM is a separate virtual firewall inside one FortiGate: it has its own interfaces, routing table, policies, objects and VPNs. VDOMs do not see each other's traffic.
- VDOMs are enabled with
set vdom-mode multi-vdom. After that every setting in the CLI is written either underconfig globalor underconfig vdom→edit <name>. - Global settings belong to the whole device (hostname, firmware, HA, admins, physical ports). VDOM settings belong to each virtual firewall (routing, policies, objects, profiles, VPN).
- The root VDOM always exists and cannot be deleted. The management VDOM is for the device's own traffic (FortiGuard, NTP, DNS, logs) and must have internet access.
- A VDOM does not add power to the device: all VDOMs share the same CPU and memory.
The problem
One building holds three companies and each needs its own firewall: its own rules, its own admin, its own internet exit. Buying three devices is expensive.
Or in one company the production network must be completely separate from the office network: separate routing, separate policies, and the addresses may even overlap.
A VDOM solves both cases with one device.
When VDOMs are used
| Scenario | Why a VDOM |
|---|---|
| A service provider (one device, many customers) | Each customer has its own firewall and its own admin |
| Full separation of departments | Separate routing and policies; one department's admin does not see the other |
| Different operation modes | One VDOM in NAT mode, another in transparent mode |
| Overlapping addresses | Two networks use the same 10.0.0.0/24 |
What a VDOM is not: it is not a VLAN (a VLAN separates layer 2, a VDOM separates a whole firewall) and it does not increase speed.
Enabling multi-VDOM mode
FGT-HQ # config system global FGT-HQ (global) # set vdom-mode multi-vdom FGT-HQ (global) # end You will be logged out for the operation to take effect. Do you want to continue? (y/n)y
The device does not reboot, but it logs you out. When you log in again two things have changed:
- In the GUI a VDOM selector appears at the top left: Global and each VDOM separately.
- In the CLI commands are no longer typed directly. You first have to say where you are going.
The existing configuration is not lost: everything stays in the root VDOM.
Moving around in the CLI
FGT-HQ # config global FGT-HQ (global) # config system interface FGT-HQ (interface) # end FGT-HQ (global) # end FGT-HQ # config vdom FGT-HQ (vdom) # edit root current vf=root:0 FGT-HQ (root) # config firewall policy FGT-HQ (policy) # end FGT-HQ (root) # end FGT-HQ #
config global: device-level settings.config vdom→edit <name>: the inside of that VDOM. The prompt shows the VDOM name.- Type
endto leave.
get and diagnose commands also depend on the context: get router info routing-table all is typed inside a VDOM and shows the table of that VDOM only.
Watch out on a real device: under config vdom, edit creates a new VDOM when it sees a name that does not exist. If you type edit Root (with a capital R) you will not enter root; a new VDOM called "Root" is created. Names are case-sensitive. Check the existing names with edit ? first.
Global or VDOM?
| Global (the whole device) | VDOM (separate in each) |
|---|---|
| Hostname, time, NTP | Routing (static, OSPF, BGP) |
| Firmware, licences, FortiGuard | Firewall policies and objects |
| HA | NAT, VIPs, IP pools |
| Admin accounts and profiles | Security profiles |
| Physical ports and which VDOM they belong to | VPN (IPsec, SSL) |
| Creating and deleting VDOMs themselves | Users, groups, authentication |
| Inter-VDOM links (lesson 34) | Part of the log settings |
A practical rule: "Does this setting belong to the device or to the traffic?" If to the device it is global; if to the traffic it is in the VDOM.
Interfaces have a subtle point: which VDOM a port belongs to is a global setting, but settings such as the port's IP can also be changed from inside the VDOM.
root and the management VDOM
root is the default VDOM: it always exists, cannot be deleted and cannot be renamed.
The management VDOM is the VDOM through which traffic generated by the device itself leaves:
- FortiGuard updates and rating queries;
- NTP, DNS;
- log transmission (FortiAnalyzer, syslog);
- SNMP, email alerts.
By default the management VDOM is root. That is why root must have internet access even if customer traffic goes through other VDOMs. Otherwise antivirus will not update, the web filter cannot get categories and the clock will drift.
To change it: config global → config system global → set management-vdom <name>.
Admin and traffic VDOMs
In newer versions a VDOM has a type (config system settings → set vdom-type):
- traffic (default): an ordinary VDOM that passes traffic.
- admin: only for managing the device; no traffic passes through it. It is used to separate the management network completely from customer traffic.
Limits
- Count. Most models come with 10 VDOMs without a licence. For more (on mid-range and high-end models) an extra licence is needed.
- Resources. All VDOMs share the same CPU, memory and session table. If load rises in one VDOM, the others feel it too. You can set limits per VDOM for this (lesson 33).
- Complexity. Every VDOM means separate routing and policies. Opening a VDOM just to separate one VLAN is overkill: an ordinary policy is enough there.
Viewing
FGT-HQ # config global FGT-HQ (global) # get system status Virtual domain configuration: multiple Current virtual domain: root FGT-HQ (global) # diagnose sys vd list
get system status should show "Virtual domain configuration: multiple". diagnose sys vd list lists all VDOMs with their numbers.
🧪 Hands-on lab · Device: FortiGate-VM
Multi-VDOM mode: global and vdom
Enable multi-VDOM mode on the device: config system global → set vdom-mode multi-vdom → end. After that commands no longer work directly. Enter config global and type get system status (you should see "Virtual domain configuration: multiple"), then leave with end. Next enter the root VDOM with config vdom → edit root and type show system interface.
Checked:
- vdom-mode multi-vdom
- config global → get system status
- config vdom → edit root → show system interface
Check yourself
5 questions · answers are shown instantly · 3 correct answers complete the lesson
1What is a VDOM?
2In multi-VDOM mode, where is a firewall policy written?
3Which of these is a global setting?
4The management VDOM has no internet access. What happens?
5Under config vdom you typed edit Root while the existing VDOM is called root. What happens?
Comments
Sign in to comment.