Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
jashokprabhu
New Contributor

Unable to change physical port under interface

Hi,

I have a logical interface created on FG800D as below and I wanted to change the port from "port7" to "port8". In GUI, there is no option to edit the port number. In CLI, when I try to unset the port and set the port number to port8, i get an error message as "fortigate entry not found in datasource". Is it really possible on Fortigate to change physical port number on the logical interface? If yes, what is the procedure?

 

STG-TPVOFW1 $ config system interface

 STG-TPVOFW1 (interface) $ edit IF_DHCP_SERVICE

STG-TPVOFW1 (IF_DHCP_SERVICE) $ show

config system interface

    edit "IF_DHCP_SERVICE"

        set vdom "root"

        set ip 10.10.10.254 255.255.255.0

        set allowaccess ping

        set description "Test Interface"

        set snmp-index 35

        [style="background-color: #ffff00;"]set interface "port7"[/style]

        set vlanid 634

    next

end

 

STG-TPVOFW1 (IF_DHCP_SERVICE) $ [style="background-color: #ffff00;"]unset interface[/style]

 

STG-TPVOFW1 (IF_DHCP_SERVICE) $ show

config system interface

    edit "IF_DHCP_SERVICE"

        set vdom "root"

        set ip 10.10.10.254 255.255.255.0

        set allowaccess ping

        set description "Test Interface"

        set snmp-index 35

        set vlanid 634

    next

end

 

STG-TPVOFW1 (IF_DHCP_SERVICE) $ [style="background-color: #ffff00;"]set interface port8[/style]

 

STG-TPVOFW1 (IF_DHCP_SERVICE) $ [style="background-color: #ffff00;"]next[/style]

[style="background-color: #ffff00;"]entry not found in datasource[/style]

Attribute 'interface' MUST be set.

Command fail. Return code 1

 

STG-TPVOFW1 (interface) $ edit IF_DHCP_SERVICE

 

STG-TPVOFW1 (IF_DHCP_SERVICE) $ [style="background-color: #ffff00;"]show[/style]

config system interface

    edit "IF_DHCP_SERVICE"

        set vdom "root"

        set ip 10.10.10.254 255.255.255.0

        set allowaccess ping

        set description "Test Interface"

        set snmp-index 35

        set vlanid 634

    next

end

 

STG-TPVOFW1 (IF_DHCP_SERVICE) $[style="background-color: #ffff00;"] set interface port8[/style]

 

STG-TPVOFW1 (IF_DHCP_SERVICE) $ [style="background-color: #ffff00;"]end[/style]

[style="background-color: #ffff00;"]entry not found in datasource[/style]

Attribute 'interface' MUST be set.

Command fail. Return code -3

 

STG-TPVOFW1 $ config system interface

 

STG-TPVOFW1 (interface) $ edit IF_DHCP_SERVICE

 

STG-TPVOFW1 (IF_DHCP_SERVICE) $ [style="background-color: #ffff00;"]show[/style]

config system interface

    edit "IF_DHCP_SERVICE"

        set vdom "root"

        set ip 10.10.10.254 255.255.255.0

        set allowaccess ping

        set description "Test Interface"

        set snmp-index 35

        [style="background-color: #ffff00;"]set interface "port7"[/style]

        set vlanid 634

    next

end

 

Port Configuration

 

STG-TPVOFW1 (interface) $ edit port7

STG-TPVOFW1 (port7) $ show config system interface edit "port7" set vdom "root" set type physical set snmp-index 9 next end

 

STG-TPVOFW1 (port7) $ next

 

STG-TPVOFW1 (interface) $ edit port8

STG-TPVOFW1 (port8) $ show

config system interface edit "port8" set vdom "root" set allowaccess ping set type physical set snmp-index 10 next end

1 REPLY 1
lobstercreed
Valued Contributor

Truthfully I have never tried what you're doing.  I have had to do it, but I just deleted the logical interface and recreated it on the new physical interface.

 

You should be able to do this the way you're wanting though if you can afford a reboot.  Back up your config, edit the interface config offline (Notepad or whatever) and then do a restore of the config, which will necessitate a reboot.  As long as there aren't any other dependencies you haven't thought of, this should work fine.  I have done this when I needed to change a ton of my policies from a physical interface to a zone.

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors