Switch Configuration

From DISI
Revision as of 23:03, 14 May 2018 by Benrwong (talk | contribs) (Backup and Restore managed switch configurations)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Switches may only be accessed through Cluster 0. Gain access to cluster 0 by ssh'ing through gimel -> sgehead -> then ssh to your desired switch.

Logging into the Switch

To log into cluster 0, log into gimel first from any computer on the network. Then, log into sgehead with:

ssh -l <username> sgehead.bkslab.org

Once on sgehead, log into your desired switch with ssh:

ssh switch-1-1 || ssh switch-3-1

Switch passwd is cluster0formula with switch name/number.

Changes to Configuration

When using command line to make configuration changes to the switch, the changes will be written to the Running-config file in volatile memory. These changes will not be saved permanently. To make your changes permanent, you must use the write memory command. NOTE: This only applies to HP Pro Switches. This command will not work with the DELL PCT 6248

switch-3-1# write memory

Any reboot without using the switch's write memory command will erase all changes since the last write memory command or the last reboot.

VLAN Port Assignment

Ports on the switch may be chosen to be assigned to a specific VLAN. They can be tagged, untagged, or not assigned. The terminology can be a bit tricky but here is the jist:

Tagged - Port is used for Interswitch Link 
Untagged - Port is used to connect to a host 
No - No VLAN assigned.  

Backing Up Switch Configurations

Switch configurations can be backed up. The backup configurations are useful for us because switches can always break. If we have a similar switch to the one that broke, we simply have to hook the switch into the network then have the switch access tftp locations in our clusters.

cluster 0 tftp server: installer:/tftpboot

cluster 2 tftp server: alpha7:/var/lib/tftpboot

At the moment, switch-1-1,2-1,3-1 have cluster 0 networks.

switch-4-1 has a cluster 2 network.

Below is an example of me backing up the configuration of switch-4-1 to the tftp server (this uses a Dell PowerConnect 6248 as an example):

switch-4-1#copy startup-config tftp://10.20.81.128/switch-4-1.config
Mode........................................... TFTP  
Set TFTP Server IP............................. 10.20.81.128
TFTP Path...................................... ./
TFTP Filename.................................. switch-4-1.config
Data Type...................................... Config Script   
Source Filename................................ startup-config
Management access will be blocked for the duration of the transfer
Are you sure you want to start? (y/n) y
6902 bytes transferred  
File transfer operation completed successfully.

If you want to restore a backup configuration to your startup configuration, you switch the two arguments:

# this will copy the configuration from alpha7's tftp server and write it to the startup configuration.
switch-4-1#copy startup-config tftp://10.20.81.128/switch-4-1.config