Change Switch Mode to Interface Mode in Fortigate FortiOS 6.x/5.x

From the FortiOS 5.0 onwards, changing the switch mode to interface mode in FortiGate firewall devices is different than earlier versions. I experienced this situation and could not see the option to change switch mode to interface mode at the usual place. Finally, I have done it by CLI and let me share the way how to change switch mode to interface mode in Fortigate FortiOS 6.x and 5.x (by the way there is a way to do it in GUI also). Usually, this option used to available in the web interface under settings of network ports in earlier FortiOS, like 4.0 and 3.0. But, it had been removed in the FortiOS 5.x and later versions as part of removing some of the features in the web GUI interface. This change is similar to the feature removal of third party DDNS providers in the latest Fortigate OS.

Fortigate Devices Interface Mode

Fortigate is one of the best network security hardware device which can do a lot of things in the firewall, network security, internet proxy, VPN and more. You can find more information about their products, features and more technical details here on the official site.

Change Switch Mode to Interface Mode in Fortigate FortiOS 5.x & 6.x

In FortiOS 6.0 and later versions, we can remove the network ports from the default hardware switch easily. Once we remove these ports, they become Interface mode where we can have different settings separately.

To do that, right-click (or double click) the hardware switch and remove the ports you want to make in interface mode.

Delete Ports

There should be a minimum 1 port part of the hardware switch. We can’t remove all ports. Also, in this way, you can’t delete the entire hardware switch.

If you need to delete the entire hardware switch and make all ports to interface mode, then we need to follow the below steps.

Basically 3 steps involved in this process.

1) Complete the prerequisites

2) Change the mode from Switch mode to interface mode

3) Configure the network and allow access to a particular network port.

1) Prerequisites to change the mode

By default, a brand new Fortigate Firewall comes with the switch-mode enabled, default policy to allow Internet access, and DHCP to provide an IP addressed. Even if you do a factory reset of an old device, you will find these settings.

You must disable DHCP service on the FortiGate device and remove any policies related to the hardware switch interface.

Here is a Fortigate device 80C which is in switch mode. All interfaces are combined together as a single ‘internal’ interface. In this case, we can’t have different settings (IPs, policies, etc) for every LAN port in this device.

switch mode

a) To remove DHCP, double click on the ‘internal’ and press edit. Deselect the checkbox of the DHCP server as shown below.

disable DHCP

In FortiOS 6.x, it may look like below.

Disable DHCP FortiOS 6 X

Press Apply or Save.

b) Remove any policies which are related to ‘internal’ port (or the hardware switch), normally you will find only one policy.

remove the policy

Now we are ready to change the mode.

Once you removed the policy, you will get the option to delete the default hardware switch as shown below on FortiOS 6.x. Deleting it will make all ports to Interface mode.

Delete Option

2) Changing from Switch mode to interface mode (in CLI)

In the older version of FortiOS and even if you want to do it by CLI/Telnet on the latest version, here are the steps.

Use a serial cable and any telnet client software for this purpose. If you like to use a built-in telnet client of Windows 8 or 8.1, check this guide.

Login with default credentials which username is admin and no password.

Type following command,

config system global 
  set internal-switch-mode interface 

Once the device is rebooted, it will not have any network settings. Therefore, we must configure an IP address and allow access (http or https) to a particular network port that can be accessed through a network cable and internet browser later.

Interface Mode in Fortigate FortiOS 5 and 5.2 in GUI/Web

Once you have completed prerequisites to change the mode, you can go to System->Network->Interfaces, then Right Click on the Internal Interface to change mode. The option will be disabled if you have some policies and DHCP servers related to it.

change mode

Even after you changed the mode from switch to interface mode through CLI or GUI web interface and the device rebooted, you need to configure the next step by command-line interface only. Follow the below step 3 to assign IP and allow specific access.

3) Configure the network and allow access to a network port

Earlier we have changed switch port to interface mode. Now the device will have n number of individual network ports that can have individual settings and policies. After changing the mode, these ports will not have any settings, even no default IP address. Use the same CLI to configure IP and allow http or https access to a particular network port so that it can be accessed via the network with a browser.

To configure the access, (below example shows how to allow access of https and http on a particular port)

config system interface
edit <interface_name>
set allowaccess http https

Note: The latest models have a separate network management port to access the device. This port usually not part of the hardware switch. You do not need to worry about assigning IP and allowing access through Telnet if you have the access to Fortigate device via the Management port.

By the above steps, you should be able to change your Fortigate device from switch mode to interface mode in FortiOS 5.x and 6..x with CLI and GUI. This will enable you to have separate settings and configurations for every network port.

17 thoughts on “Change Switch Mode to Interface Mode in Fortigate FortiOS 6.x/5.x”

  1. Hi,
    Thankyou for the helpful info. I have another question. After changing to interface mode, the ports will have names like port1,2 etc. How can we change them back to WAN1, WAN2, internal etc for easier management?

    Thanks again.

  2. Hi, thanks for your info. I’ve seen that it’s also possible to delete the hardware switch in the interfaces overview. After deleting all correspoding policies, you can do it this way. I’ve checked this on my two Fortigate 100D, operating as a HA Cluster. Regards Chris

  3. You can change mode of the interface by

    Going into System->Network->Interfaces

    Right Click on the Internal Interface then you will see the “Change Mode” options usually it will be disabled as you have to remove the DHCP and POLICY settings as you have described above

  4. I had a problem were internal was in used, I couldn’t figure out where until i found this helpful command:

    # diagnose sys checkused internal
    entry used by table system.dns-server:name ‘internal’

    then I removed it from the dns-server:

    # config system dns-server
    (dns-server) # purge
    This operation will clear all table!
    Do you want to continue? (y/n)y

    Hope it helps someone…

    • I was not able to change to interface mode on one 60D until I found out that NTP server was enabled on internal. My approach to find it was: “ssh admin@my_fortigate show | grep -3 internal”

      The diag command would have been better, so thanks for the tip!

    • Thanks so much for that tip, I was starting to get annoyed because I was positive there was no policies called out for the internal interface

  5. Is it possible to configure 2 ports [outside of the WANs] for 2 web connections with fail over or load balancing between them?


    • Based on my knowledge, there is no difference between Internal and WAN ports. You can configure internal ports to connect to internet and configure policies. It will work fine.

  6. Thanks for the article… very useful!

    I have a 90D with 16 total ports. The product specs tell me that only 2 are provisioned for WAN. Is it possible to configure an additional 2 internal ports to act as WAN ports and add them to a load balancing group?

    Thanks again!

  7. I have a Fortigate 100D.
    I was really surprised to find that the “hardware switch” in fact works as a hub broadcasting all unicast traffic on all the member physical ports.
    Could somebody please enlighten me why this is and how to change it to actual switching.
    THank you

    martin3 (at) gmail . com

  8. Christian — yes, DHCP is supported individually on each port, as they break out the same as your WAN1, WAN2, INTERNAL (which goes away) into port1, port2…port16 (or however many ports your unit has).
    You can set up a DHCP server on each of these.
    (same as you can on a VLAN interface, as well).

Leave a Comment