Student here. Could someone please explain to me the difference between these two? I'm using a serial connection for this. Does the latter refer to one individual serial terminal session? Why would one use line configuration mode over global? Thanks, I appreciate any help.
Global configuration mode is for configuring global parameters. This is the default mode when you enter configuration mode.
Some commands will cause you to enter a more specific configuration mode. Line configuration mode (similar to interface configuration mode) is entered when you specify a line to configure. Line configuration mode is then where you enter configuration appropriate to that specific line.
When you are in a specific configuration mode, if you prompt for help (i.e. type "?") you will only be shown commands that are relevant to that configuration mode rather than commands that are relevant in global configuration mode.
Here is the output of line configuration mode from one of my test switches:
Test(config-line)#? Line configuration commands: access-class Filter connections based on an IP access list accounting Accounting parameters authorization Authorization parameters autocommand Automatically execute an EXEC command autocommand-options Autocommand options data-character-bits Size of characters being handled databits Set number of data bits per character default Set a command to its defaults domain-lookup Enable domain lookups in show commands editing Enable command line editing escape-character Change the current line's escape character exec Configure EXEC exec-banner Enable the display of the EXEC banner exec-character-bits Size of characters to the command exec exec-timeout Set the EXEC timeout exit Exit from line configuration mode flowcontrol Set the flow control full-help Provide help to unprivileged user help Description of the interactive help system history Enable and control the command history function international Enable international 8-bit character support ip IP options length Set number of lines on a screen location Enter terminal location description logging Modify message logging facilities login Enable password checking modem Configure the Modem Control Lines monitor Copy debug output to the current terminal line motd-banner Enable the display of the MOTD banner no Negate a command or set its defaults notify Inform users of output from concurrent sessions padding Set padding for a specified output character parity Set terminal parity password Set a password privilege Change privilege level for line refuse-message Define a refuse banner rotary Add line to a rotary group rxspeed Set the receive speed session-timeout Set interval for closing connection when there is no input traffic special-character-bits Size of the escape (and other special) characters speed Set the transmit and receive speeds start-character Define the start character stop-character Define the stop character stopbits Set async line stop bits terminal-type Set the terminal type timeout Timeouts for the line transport Define transport protocols for line txspeed Set the transmit speeds vacant-message Define a vacant banner width Set width of the display terminal
Notice that while some of the commands are the same (or similar), many of the global configuration mode commands you might expect are not present, such as
cdp. This last would be present in interface configuration mode, but there is no CDP on the console so it is not present.
It doesn't matter if you are connected to the router via console, telnet, SSH, etc., you configure a specific feature in the mode for that specific feature.
If you need to configure global commands, you do that in global configuration.
If you are configuring interfaces, you do that in interface configuration.
If you are configuring lines, you do that in line configuration.
If you are configuring a routing protocol, you do that in router configuration.