Page 61 / 400 Scroll up to view Page 56 - 60
User Manual for the NETGEAR 7300S Series Layer 3 Managed Switch Software
Mode-based CLI
7-1
202-10088-01, March 2005
Chapter 7
Mode-based CLI
The CLI groups all the commands in appropriate modes according to the nature of the command.
A sample of the CLI command modes are described below. Each of the command modes support
specific 7300S Series L3 Switch commands.
User Exec Mode
Privileged Exec Mode
Global Config Mode
Vlan Mode
Interface Config Mode
Line Config Mode
Policy Map Mode
Policy Class Mode
Class Map Mode
Router Config RIP Mode
DHCP Pool Configuration Mode
The Command Mode table captures the command modes, the prompts visible in that mode and the
exit method from that mode.
Table 7-1.
Command Mode
Command Mode
Access Method
Prompt
Exit or Access Next
Mode
User Exec Mode
This is the first level of
access. Perform basic
tasks and list system
information.
Switch>
Enter Logout command
Privileged Exec Mode
From the User Exec
Mode, enter the
enable
command.
Switch#
To exit this mode, enter
exit or press Ctrl-Z.
Page 62 / 400
User Manual for the NETGEAR 7300S Series Layer 3 Managed Switch Software
7-2
Mode-based CLI
202-10088-01, March 2005
VLAN Mode
From the Privileged
User Exec mode, enter
the
vlan database
command.
Switch (Vlan) #
To exit to the Privileged
Exec mode, enter the
exit command, or press
Ctrl-Z to switch to user
exec mode.
Global Config Mode
From the Privileged
Exec mode, enter the
configure
command.
Switch (Config)#
To exit to the Privileged
Exec mode, enter the
exit command, or press
Ctrl-Z to switch to user
exec mode.
Interface Config Mode
From the Global
Configuration mode,
enter the
interface
config <slot/port>
command.
Switch (Interface-"if
number")#
To exit to the Global
Config mode enter exit.
To return to user EXEC
mode enter ctrl-Z.
Line Config Mode
From the Global
Configuration mode,
enter the
lineconfig
command.
Switch (line) #
To exit to the Global
Config mode enter exit.
To return to User Exec
mode enter ctrl-Z.
Policy Map Mode
From the Global
Configuration mode,
enter the
policy map
command.
Switch (Config-policy-
map)#
To exit to the Global
Config mode enter exit.
To return to user EXEC
mode enter ctrl-Z.
Policy Class Mode
From the Policy Map
mode enter the
class
command.
Switch (Config-policy-
classmap)#
To exit to Policy Map
mode enter exit. To
return to User Exec
mode enter ctrl-Z.
Class Map Mode
From the Global Config
mode, enter the
class-
map
command.
Switch (Config-class-
map)#
To exit to Global Config
mode enter exit. To
return to User Exec
mode enter ctrl-Z.
Router Config RIP
Mode
From the Global Config
mode, enter the
router
rip
command
Switch (Config-router)#
To exit to the Global
Config mode enter exit.
To return to User Exec
mode enter ctrl-Z.
DHCP Pool
Configuration Mode
From the Global
Configuration mode,
enter the
ip dhcp pool
<pool-name>
command.
Routing (Config-dhcp-
pool)
To exit to Global
Configuration mode
enter exit. To return to
user EXEC mode, enter
ctrl-Z
Table 7-1.
Command Mode
(continued)
Command Mode
Access Method
Prompt
Exit or Access Next
Mode
Page 63 / 400
User Manual for the NETGEAR 7300S Series Layer 3 Managed Switch Software
Mode-based CLI
7-3
202-10088-01, March 2005
Mode-based Topology
The CLI tree is built on a mode concept where the commands are available according to the
interface. Some of the modes are depicted in the mode-based CLI Figure 1.
FIGURE 1. Mode-based CLI
User Exec
ROOT
Enable
Passwd
Correct
Yes
No
Return to Exec
prompt
Global Config
VLAN
Privileged
User Exec commands
are also accessible in
Privileged Exec
mode.
Bwp
Policy Map
Interface
Class Map
Line Config
Router Config
Circuit Config
IP Config
Page 64 / 400
User Manual for the NETGEAR 7300S Series Layer 3 Managed Switch Software
7-4
Mode-based CLI
202-10088-01, March 2005
Access to all commands in the Privileged Exec mode and below are restricted through a password.
Mode-based Command Hierarchy
The CLI is divided into various modes. The Commands in one mode are not available until the
operator switches to that particular mode, with the exception of the User Exec mode commands.
The User Exec mode commands may also be executed in the Privileged Exec mode.
The commands available to the operator at any point in time depend upon the mode. Entering a
question mark (?) at the CLI prompt, displays a list of the available commands and descriptions of
the commands.
The CLI provides the following modes:
User Exec Mode
When the operator logs into the CLI, the User Exec mode is the
initial mode. The User Exec mode contains a limited set of com-
mands. The command prompt shown at this level is:
Command Prompt: $(Exec)>
Privileged Exec Mode
To have access to the full suite of commands, the operator must
enter the Privileged Exec mode. The Privileged Exec mode
requires password authentication. From Privileged Exec mode,
the operator can issue any Exec command or enter the Global
Configuration mode. The command prompt shown at this level is:
Command Prompt: $(Exec)#
Global Config Mode
This mode permits the operator to make modifications to the run-
ning configuration. General setup commands are grouped in this
mode. From the Global Configuration mode, the operator can
enter the System Configuration mode, the Physical Port config,
the Interface Configuration mode, or the Protocol Specific modes
specified below. The command prompt at this level is:
Command Prompt: $(Config)#
From the Global Config mode, the operator may enter the following config modes:
VLAN Mode
This mode groups all the commands pertaining to VLANs. The
command prompt shown at this level is:
Command Prompt: $(VLAN)#
Interface Config Mode
Many features are enabled for a particular interface. The Interface
commands enable or modify the operation of an interface.
Page 65 / 400
User Manual for the NETGEAR 7300S Series Layer 3 Managed Switch Software
Mode-based CLI
7-5
202-10088-01, March 2005
In this mode, a physical port is set up for a specific logical con-
nection operation. The Interface Config mode provides access to
the router interface configuration commands. The command
prompt at this level is:
Command Prompt: $(Interface <slot/port>)#
The resulting prompt for the interface configuration command
entered in the Global Configuration mode is shown below:
$(Config)# interface 2/1
$(Interface 2/1)#
Line Config Mode
This mode allows the operator to configure the console interface.
The operator may configure the interface from the directly con-
nected console or the virtual terminal used with Telnet. The com-
mand prompt at this level is:
Command Prompt: $(Line)#
Policy Map Mode
Use the policy-map command to access the QoS policy map con-
figuration mode to configure the QoS policy map.
$(Config)# policy-map
Command Prompt: $(Config policy-map)#
Policy Class Mode
Use the "class" command to access the QoS policy- classmap
mode to configure the QoS policy map.
$(Config-policy-map)# class
Command Prompt: $(Config - policy-classmap)#
Class Map Mode
This mode consists of class creation/deletion and matching com-
mands. The class match commands specify layer 2, layer 3 and
general match criteria. Use the class-map commands to access the
QoS class map configuration mode to configure QoS class maps.
$(Config)# class map
Command Prompt: $(Config - class)#
Router Config RIP Mode
In this mode, the operator is allowed to access the router RIP con-
figuration commands. The command prompt at this level is:
$(Config)# router rip
Command Prompt: $(Config-router)#
DHCP Pool Configuration Mode
Use the ip dhcp pool <pool-name> command to access the
DHCP Pool Config Mode.
$(Config)# ip dhcp pool <pool-name>
Command Prompt: (Config-dhcp-pool)#

Rate

4.5 / 5 based on 2 votes.

Bookmark Our Site

Press Ctrl + D to add this site to your favorites!

Share
Top