Configuring a Switch: Hostname, Banner, IP Address, Default Gateway, Password Access(Console, Enable and Telnet)

Basic Switch Configuration Lab

Basic Switch Configuration

SwitchA Configuration

Set the hostname

Switch>enable
Switch#configure terminal
Switch(config)#hostname SwitchA
      

Set enable passwords

SwitchA(config)#enable password cleartext123
SwitchA(config)#enable secret secret123
      

Configure the console password

SwitchA(config)#line console 0
SwitchA(config-line)#password console123
SwitchA(config-line)#login
SwitchA(config-line)#logging synchronous
SwitchA(config-line)#exit
      

Configure Telnet password

SwitchA(config)#line vty 0 4
SwitchA(config-line)#password telnet123
SwitchA(config-line)#login
SwitchA(config-line)#exit
      

Set MOTD and login banners

SwitchA(config)#banner motd # Unauthorized access is prohibited! #
SwitchA(config)#banner login # Welcome to SwitchA #
      

Configure IP address

SwitchA(config)#interface vlan 1
SwitchA(config-if)#ip address 172.16.0.5 255.255.224.0
SwitchA(config-if)#no shutdown
SwitchA(config-if)#exit
      

Set default gateway

SwitchA(config)#ip default-gateway 172.16.0.1
SwitchA(config)#exit
      

Save configuration

SwitchA#copy running-config startup-config
      

SwitchB Configuration

Set the hostname

Switch>enable
Switch#configure terminal
Switch(config)#hostname SwitchB
      

Set passwords

SwitchB(config)#enable password cleartext123
SwitchB(config)#enable secret secret123
      

Console and VTY password configurations

SwitchB(config)#line console 0
SwitchB(config-line)#password console123
SwitchB(config-line)#login
SwitchB(config-line)#logging synchronous
SwitchB(config-line)#exit

SwitchB(config)#line vty 0 4
SwitchB(config-line)#password telnet123
SwitchB(config-line)#login
SwitchB(config-line)#exit
      

Banners

SwitchB(config)#banner motd # Unauthorized access is prohibited! #
SwitchB(config)#banner login # Welcome to SwitchB #
      

IP address

SwitchB(config)#interface vlan 1
SwitchB(config-if)#ip address 172.16.0.6 255.255.224.0
SwitchB(config-if)#no shutdown
SwitchB(config-if)#exit
      

Default gateway

SwitchB(config)#ip default-gateway 172.16.0.1
SwitchB(config)#exit
      

Save configuration

SwitchB#copy running-config startup-config
      

SwitchC Configuration

Set the hostname

Switch>enable
Switch#configure terminal
Switch(config)#hostname SwitchC
      

Set passwords

SwitchC(config)#enable password cleartext123
SwitchC(config)#enable secret secret123
      

Console and VTY password configurations

SwitchC(config)#line console 0
SwitchC(config-line)#password console123
SwitchC(config-line)#login
SwitchC(config-line)#logging synchronous
SwitchC(config-line)#exit

SwitchC(config)#line vty 0 4
SwitchC(config-line)#password telnet123
SwitchC(config-line)#login
SwitchC(config-line)#exit
      

Banners

SwitchC(config)#banner motd # Unauthorized access is prohibited! #
SwitchC(config)#banner login # Welcome to SwitchC #
      

IP address

SwitchC(config)#interface vlan 1
SwitchC(config-if)#ip address 172.16.0.7 255.255.224.0
SwitchC(config-if)#no shutdown
SwitchC(config-if)#exit
      

Default gateway

SwitchC(config)#ip default-gateway 172.16.0.1
SwitchC(config)#exit
      

Save configuration

SwitchC#copy running-config startup-config
      

Multilayer Switch (MLS) Configuration

Set the hostname

Switch>enable
Switch#configure terminal
Switch(config)#hostname Multilayer-Switch
      

Set passwords

Multilayer-Switch(config)#enable password cleartext123
Multilayer-Switch(config)#enable secret secret123
      

Console and VTY password configurations

Multilayer-Switch(config)#line console 0
Multilayer-Switch(config-line)#password console123
Multilayer-Switch(config-line)#login
Multilayer-Switch(config-line)#logging synchronous
Multilayer-Switch(config-line)#exit

Multilayer-Switch(config)#line vty 0 4
Multilayer-Switch(config-line)#password telnet123
Multilayer-Switch(config-line)#login
Multilayer-Switch(config-line)#exit
      

Banners

Multilayer-Switch(config)#banner motd # Unauthorized access is prohibited! #
Multilayer-Switch(config)#banner login # Welcome to Multilayer-Switch #
      

IP address

Multilayer-Switch(config)#interface vlan 1
Multilayer-Switch(config-if)#ip address 172.16.0.1 255.255.224.0
Multilayer-Switch(config-if)#no shutdown
Multilayer-Switch(config-if)#exit
      

Set routing

Multilayer-Switch(config)#ip routing
      

Save configuration

Multilayer-Switch#copy running-config startup-config
      

About the Author

1 thought on “Configuring a Switch: Hostname, Banner, IP Address, Default Gateway, Password Access(Console, Enable and Telnet)

Leave a Reply

Your email address will not be published. Required fields are marked *

You may also like these

No Related Post