- CheckMates
- :
- Products
- :
- Quantum
- :
- Security Gateways
- :
- Re: Change gateway routes
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Change gateway routes
Hello,
I need to change route destination on multi static routes,
i want to leave the comment that i added before,
and just replace the destination to a new one.
current destination 10.30.30.1 - new destination 10.30.30.254
how can i replace it by script to all routes, and not change/delete one by one?
example :
192.168.78.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.197.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.195.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.50.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.194.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.73.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.49.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.193.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.72.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.48.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.192.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.47.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.223.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.222.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.84.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.220.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.83.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.43.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.82.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.42.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.81.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.41.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.40.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.39.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.215.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.38.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.37.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.213.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.36.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.35.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.210.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.33.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.209.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
192.168.208.0 10.30.30.1 255.255.255.0 UGD 0 0 0 eth1-01.1022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why not putting clish config to a text file? Then it is replace/copy/paste operation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I want to keep the comments,
will it keep it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
execute "show configuration" and you will get something like this:
set static-route x.x.x.x/24 comment test
set static-route x.x.x.x/24 nexthop gateway address y.y.y.y priority 1 on
you can use those commands to change comments and gateways if needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
thanks,
I did :
clish -c "show configuration" |grep "static" > /var/my_config.txt
and edit the file to the new routes.
I want to make the .txt file to a .sh script and run it,
and not to change the routes with copy&paste.
how can I do it?
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
anyone knows how to do it?
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why do you need a script? CLISH does not allow scripted execution. You either need invoke GAIA API or add clish -c "......" for each entry in your .txt file.
Either way is much more complex than copy/paste we suggested already.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks,
but there is 700 lines,
when I copy&paste it into putty some of the lines do not paste complete.
and there is missing letters, so the command of some routes incomplete.
what can I do about it?
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Why would you need to have 700 static routes on a FW? You may want to re-think your network design, I am afraid...
