config

Cisco – service config

Randomly, during bootup of Cisco hardware (IOS), error messages similar to these are displayed:

%Error opening tftp://255.255.255.255/network-confg (Socket error)

%Error opening tftp://255.255.255.255/cisconet.cfg (Socket error)

%Error opening tftp://255.255.255.255/hostname-confg (Socket error)

%Error opening tftp://255.255.255.255/hostname.cfg (Socket error)

These error messages are related to the default service configuration option built into Cisco IOS software, which attempts to access the service configuration files from a network Trivial File Transfer Protocol (TFTP) server.

In order to disable this feature, issue the no service config global command.

Router#config terminal
Enter configuration commands, one per line.

Router(config)#no service config

Router(config)#exit

Router#copy running-config startup-config

Cisco – Get & Save config using telnet

Vi è mai capitato di dover salvare delle configurazione da apparati cisco senza avere un tftp a disposizione?

In aiuto un piccolo script:

#!/bin/bash
host=xx.xx.xx.xx
port=23
login=user
passwd=pass
nobreak='terminal length 0'
cmd='show running-config all'
(echo open ${host} ${port}
sleep 1
echo ${login}
sleep 1
echo ${passwd}
sleep 1
echo ${nobreak}
sleep 1
echo ${cmd}
sleep 30
echo exit) | telnet > sw01.txt