Setup a new Cisco switch remotely?

Time to save 6 hours in car, let’s set up a brand new Cisco switch remotely.
With some DHCP / TFTP magic, it’s definitely doable, just completed a LAB scenario witch worked out perfectly.

I do however have a remote connectivity to a C3650 switch, with ipservices, called “myswitch”

Setting up a temp vlan for my provisioning

myswitch(config)#
vlan 42
int vlan 42
ip address 10.255.255.1 255.255.255.0
ip dhcp excluded-address 10.255.255.1
ip dhcp pool vlan42
network 10.255.255.0 255.255.255.0
bootfile config-boot.text
default-router 10.255.255.1
option 150 ip 10.255.255.1

Setting up my interface that is going to be connected to the new switch.

 myswitch(config)#
!Temp access port to new switch
interface FastEthernet0/24
description DHCP-CONF-BOOT-TEST
switchport access vlan 42
switchport mode access

Using tclsh to write my minimal tftp-config

myswitch#tclsh
myswitch(tcl)#puts [open “flash:config-boot.text” w+] {
enable password myPassword
username myusername privilege 15 password 0 myPassword
aaa new-model
aaa authentication login default local
aaa session-id common
}

Using the last } to end my input of config, then hit exit to drop out of tclsh, just can also check the content of your config-boot.text by using more flash:config-boot.text

Starting TFTP server, and server my config

myswitch(config)#
tftp-server flash:config-boot.text

Boot your new switch, connected from any port, to “myswitch” port fa/24

If you want to see when your new switch is ready for some more config, check int status, then dhcp lease, ping it, and then log in.

!Checking interface status
myswitch#sh int status | inc 24
Fa0/24 DHCP-CONF-BOOT-TES connected 42 a-full a-100 10/100BaseTX
!Checking dhcp bindings
myswitch#sh ip dhcp binding
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type
Hardware address/
User name
10.255.255.6 0063.6973.636f.2d30. Apr 04 1993 03:20 AM Automatic
3032.372e.3063.3132.
2e30.3363.302d.566c.
31

myswitch#ping 10.255.255.6

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.255.255.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/4/9 ms
Test your telnet
myswitch#telnet 10.255.255.6
Trying 10.255.255.6 … Open
User Access Verification
Username: myusername
Password:
newSwitch#

You can now do what ever config you need to do! 🙂

One gotcha, if you do get;

myswitch#telnet 10.255.255.6
Trying 10.255.255.5 … Open
Password required, but none set
[Connection to 10.255.255.5 closed by foreign host]

You must wait for the config to be loaded from tftp, and check your tftp config settings.

One Comment to

  • Silje17/02/2015

    Thanks Honey for this wonderful post. I am so happy that you have a hobby you enjoy so much. Now it’s time for bed. Xx

  • Leave a Comments