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

Continuous CLI Command Configuration

hi,

is it possible to configure continously using CLI instead of type 'end' in each configuration section.

for example, after i've configured mgmt ip i can go straight to 'config router static' and type 'end' after the mgmt and static default route are configured? or will the system reject it?

 

edit - i just tried and indeed rejected the command when i go straight to 'config router static'

is there a way to type commands continuously or is it required typing 'end' each config section?

 

FG# config system interface

FG(interface) # edit mgmt

FG(mgmt) # set ip 192.168.200.202/24

FG(mgmt) # set allowaccess ping ssh https

FG(mgmt) # end   <<< CAN I SKIP THIS?


FG # config router static

FG(static) # edit 99
new entry '99' added

FG(99) # set dst 0.0.0.0/0

FG(99) # set gateway 192.168.200.1

FG(99) # set device mgmt

FG(99) # end

 

-----

 

FG(mgmt) # set allowaccess ping ssh https

FG(mgmt) # config router static

command parse error before 'router'
Command fail. Return code 1

1 Solution
AntonyChen
New Contributor III

I think no, "end" tag tell the system to finish your configuration for that section, unless you want to continue to config other same level object you can use "next" to continue, otherwise end tag must be used.

in your case you typed FG(mgmt) # config router static  , this is in  "mgmt " and this cli is invalid since it does not exist there.

View solution in original post

1 REPLY 1
AntonyChen
New Contributor III

I think no, "end" tag tell the system to finish your configuration for that section, unless you want to continue to config other same level object you can use "next" to continue, otherwise end tag must be used.

in your case you typed FG(mgmt) # config router static  , this is in  "mgmt " and this cli is invalid since it does not exist there.

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