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:
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
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.