Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

upload configuration

Status
Not open for further replies.

karib

Programmer
Mar 24, 2003
2
FI
Hi
I have a configuration file of a router on my linux-server. Now, I need to transfer it to a Cisco 2501 router. I do not have tftp.
What are all the options to get the configuration on there? Is it possible to write a little script to make a connection and then send the lines one by one??
I don't know if this makes any sense... I am new to Cisco routers.
Thanks,
Karib
 
if you can use something like a text editor in linus you can select and copy your configuration.
open a connection to the router and go to config mode
then paste back what is in memory.
Thie will write back the configuration
 
Hi

A couple of issues.

If you are going to edit the text at all use a simple text editor like notepad. Word processors add control characters in to the text and can cause problems in reloading or executing the config.

Cisco used to make a tftp server available on their website, but they no longer support this. Instead they recommend downloading a shareware tftp server from It is worth getting this if you are likely to handle config or IOS files on a frequent basis.

EB
 
Here is a sample script, which configures a static route on router 10.2.2.2
-----------------------
# Usage ./rtr-script < seed_file >>output_file
##################################################
#!/bin/sh
while read RADDR RNAME PW EPW
do
{ #echo $PW
echo cisco ! local password
sleep 1
echo enable
echo cisco ! enable password
echo conf t
echo ip route 192.168.1.0 255.255.255.0 10.1.1.1 --> u can use any command here
echo exit
echo quit
sleep 2
} | telnet $RADDR
done

-----------
seed_file
10.2.2.2 (just the ip address of your router), you can expand it to name, password, enable pwd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top