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

How do I set "Interface" Attribute

In the following:

conf sys int   edit port1     set vdom root     set description "LAN"     set alias "LAN"   next end   I get the following right after "next": "Attribute 'interface' MUST be set. Command fail. Return code 1"   I'm new to FG CLI and would greatly appreciate some help with this. Thank you! DonD

4 REPLIES 4
Toshi_Esumi
SuperUser
SuperUser

What is your FGT model? Are you sure "port1" physical interface exist? If not, the default interface type of a logical interface is vlan, which requires "set interface INTERFACE_NAME". Then you get that error.

You would know if you type "get" while you're in "edit port1" context before hitting "next". It would show you what kind of default values been set so far.

DonD

I have a FortiWiFi 50E, which has 5 physical Ethernet ports on its back.  Isn't "port1" one of those ports?

Attached is a screenshot of a PuTTY session with "get" while in "edit port1".

DonD

 

Toshi_Esumi

You needed hit one "space" bar. The attribute "type" is the next line after "wins-ip" you showd at the bottom.

I'm not sure the port naming on FWF50E. But my FGT50E's port naming is "lan1", "lan2",....."lan5". And by default all those ports are bound in a hard-switch "lan". So I can't configure lan1 directly until I remove lan1 from lan hard-switch.

Just go to GUI under Network->Interfaces to see what actually you have. I believe all FWF model use a soft-switch to combine "wifi" interface with LAN ports. You can see them when you drill down (Edit) each interface you see in GUI.

 

You must have created a new logical interface "port1" and its type is vlan. That's why you got an error "must set interface attribute" when you try exit/save it.

DonD

Toshi,

 

Sorry about the space bar.  Below is the entire "get" in two screenshots. Don't know why the first one has such small font.  Maybe, you can zoom in to read it. Via GUI, I have successfully setup a software-switch interface.  When I attempt to do another software-switch interface via GUI, and try to add interface members there are no interface sources.  I expected to find "lan" and "wifi". I found references where others had experienced this problem and recommended the CLI code I showed you.  Here's a link to where the CLI code was recommended - [link]https://github.com/librenms/librenms/issues/3859[/link]

 

By the way, my FortiWiFi 50E is running FortiOS 5.6.3

 

Thanks for helping me!

 

Don

 

Labels
Top Kudoed Authors