cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5162
Views
5
Helpful
4
Replies

remote change of route and ip address

pbogaerts
Level 1
Level 1

I need to change an ip address and route in remote, because this is the only access to the router I will loose connectivity.

I thought it was possible to put a file in flash and configure it from there, how should it be done, is there somewhere an explanation ?

Can I made a notepad file with the commands and upload it in flash ?

i.e.

int gi0/0

ip address 90.1.1.1 255.0.0.0

no ip route 192.168.1.1 255.255.255.0 87.1.1.2

ip route 192.168.1.1 255.255.255.0 90.1.1.2

do a tftp  to flash with name changes.txt

and when  I want to do the change copy flash:changes.txt running-config

?????

Thanks

4 Replies 4

John Blakley
VIP Alumni
VIP Alumni

Do you know for sure this change will work? If so, you could download the running config, make your change, copy it back over as the startup config and then reload the router.

OR

You could tftp the file back to a totally different name (flas:/newIP.txt) altogether and then in global config type "boot config flash:/newIP.txt". I would also save the current running config to a different name (copy runn flash:/oldIP.txt) and then put a second line "boot config flash:/oldIP.txt" in case the first one didn't load. You'll need to save the changes and then reload the router for it to take effect.

OR

Technically speaking, you can have 2 routes that go to the same subnet with different next hops. Don't remove the first static route, but add the second. Then change your address on the fly. You'll lose connection, but the other route should take over because now there's not an interface in the 87.1.1.0/x subnet.

Other people may have better ways, but here are 3 to choose from. The third option is the best to start off with because you can reload and everything will come back up on the old address since you wouldn't be saving changes.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The  Author of this posting offers the information contained within this  posting without consideration and with the reader's understanding that  there's no implied or expressed suitability or fitness for any purpose.  Information provided is for informational purposes only and should not  be construed as rendering professional advice of any kind. Usage of this  posting's information is solely at reader's own risk.

Liability Disclaimer

In  no event shall Author be liable for any damages whatsoever (including,  without limitation, damages for loss of use, data or profit) arising out  of the use or inability to use the posting's information even if Author  has been advised of the possibility of such damage.

Posting

I've done similar to what you describe, i.e. changes that in the process of being applied will temporarily break connectivity.

What I also do, though, is schedule a timed reload as failsafe.

Ryan Cigelske
Level 1
Level 1

I actually just completed the same task on Friday =).

I would recommend pulling the complete running configuration, then make your changes in the text file -

use an FTP server to upload the configuration remotely - save the file to disk but remember to not save it as a .txt file. Then run the script in the configuration you will loosing connectivity briefly - also your VPN will not come back up until you make to the IP address on the local firewall - After completing the IP address change you will have the tunnel come up after a little bit of traffic so make sure to ping a device on the other side.

Also - BE SURE TO PUT THE ROUTE IN THE CORRECT LOCATION; if you don't remove the old route the new route will be placed under the old entry and will only function1/2 the time. From your post it looks like you have it under control =)

Good luck!

Ryan

Corey Johnson
Level 1
Level 1

I had a similar task to do. Your question and the answers to it led me in the right direction. I wanted to share my fix (I know that nobody asked)

I have a spoke VPN router that is on one network obtaining a DHCP IP address.

That router will be powered down and moved to a different network in a different location where it will need to continue to function.

I was thinking of using a .txt file to make the changes because I will lose my connection when I make the change.

The problem was that I need to write the config after I lose connection but before the router is powered down. I needed the 'file prompt quiet' command.

I used something like the following and it worked!

int gi0/0

no ip address dhcp

ip address 10.1.1.2 255.0.0.0

!

no ip route 38.229.71.1 255.255.255.0 dhcp

ip route 38.229.71.1 255.255.255.0 10.1.1.1

!

file prompt quiet         ! This allows the startup-config to be written from the script.

do copy run start

And I ran this script as copy flash:/newip.txt run so that it would only edit my running config and I wouldn't have to be afraid of damaging my startup config.

Review Cisco Networking for a $25 gift card