I removed lan2 from the CLI, and noticed that it is now greyed out and missing from Network in the GUI. Was expecting it to become a physical interface in Network when removed from the virtual-switch.
Original configuration of virtual-switch
config system virtual-switch
edit "lan"
config port
edit "lan2"
next
edit "lan3"
next
end
next
end
I then ran the following commands:
config system virtual-switch
edit "lan"
config port
delete "lan2"
Then I tried to added it back in with:
config system virtual-switch
edit "lan"
config port
edit lan2
It gave an error:
entry not found in datasource
If I do "edit ?" it shows that lan2 is not available:
*name Physical interface name.
lan3 interface
config system interface does show a lan2
How do I get it to show up as a physical interface via CLI after removing it from the virtual-switch?
How do I re-add it to the virtual-switch from the CLI?
Solved! Go to Solution.
Figured it out. Had to reboot the Fortigate, then lan2 showed up as a physical interface and was no-longer greyed out.
Looks like when I ran my commands, I didn't specify end to save the changes. After a reboot, I used these commands to add lan2 back to the virtual-switch:
config system virtual-switch
edit "lan"
config port
edit "lan2"
next
end
end
and then used these commands to remove it:
config system virtual-switch
edit "lan"
config port
delete "lan2"
end
end
Gui now shows lan2 as a physical interface and not part of the virtual switch.
Hello,
If the interface is greyed out, usually it means that it is admin disabled. Can you share with me output:
diag netlink interface list lan2
diag hardware deviceinfo nic lan2
fnsysctl lan2
Also this can be useful:
diagnose sys cmdb refcnt show system.interface.name lan2
Hello,
Can you please check if the lan2 is an alias or if it's the port name itself, as an example .
Physical Interface:
config system interface
edit "internal6" -------- > Interface name
set vdom "root"
set type physical
set alias "lan" -------- > Alias
set device-identification enable
set lldp-transmission enable
set role lan
set snmp-index 8
next
end
If I use the alias it will give an error:
FG80FP-1 (port) # edit lan
entry not found in datasource
value parse error before 'lan'
Command fail. Return code -3
If I use the name it will take it.
Figured it out. Had to reboot the Fortigate, then lan2 showed up as a physical interface and was no-longer greyed out.
Looks like when I ran my commands, I didn't specify end to save the changes. After a reboot, I used these commands to add lan2 back to the virtual-switch:
config system virtual-switch
edit "lan"
config port
edit "lan2"
next
end
end
and then used these commands to remove it:
config system virtual-switch
edit "lan"
config port
delete "lan2"
end
end
Gui now shows lan2 as a physical interface and not part of the virtual switch.
Hi ScotH,
We have created a bug internally to investigate this issue, there is a certain flaw in such CLI design that will cause the LAN2 interface to disappear.
Thanks
Kangming
Select Forum Responses to become Knowledge Articles!
Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.
User | Count |
---|---|
1737 | |
1107 | |
752 | |
447 | |
240 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.