I'm having problems with persistent routes.
I have the route added to route-eth1.
But when I run the 'route' command to display the routes, it does not show the newly added route.
I did restart the network service. That did not help.
I also rebooted the server, but still did not help.
I'm able to add route via command line, but they are not persistent. They go away once the network service is restarted or the server is rebooted.
When you set route with route command, it sets temporary and restarting network service will brush up all your temporary set routes.
In case of linux, permanent static routes are added on a per interface basis in files located in the /etc/sysconfig/network-scripts directory. The filename format is route-interface-name so the filename for interface wlan0 would be route-wlan0.
The format of the file is quite intuitive with the target network coming in the first column followed by the word via and then the gateway's IP address. In our routing example, to set up a route to network 10.0.0.0 with a subnet mask of 255.0.0.0 (a mask with the first 8 bits set to 1) via the 192.168.1.254 gateway, we would have to configure file /etc/sysconfig/network-scripts/route-wlan0 to look like this:
Quote:
#
# File /etc/sysconfig/network-scripts/route-wlan0
#
10.0.0.0/8 via 192.168.1.254
Note: The /etc/sysconfig/network-scripts/route-* filename is very important. Adding the wrong interface extension at the end will result in the routes not being added after the next reboot. There will also be no reported errors on the screen or any of the log files in the /var/log/ directory.
You can test the new file by running the
You can try this too..
- nilesh
Hello,
I am on a Mac and trying to clean up some monthly files with a very simple SED:
sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt
(from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file)
then output to output.txt
Even when I try... (2 Replies)
Hi All,
Is there a quick way to check whether the current routes on my centos are
persistent or not before rebooting ?
i can take a route -n output but i may completely lost access to my server if the routes are gone.
thanks. (1 Reply)
I have 2 computers, from now on i shall call these computers A and B.
Made a live linux distro (bodhi) on A which has 1GB internal memory , because windows is unstable on B, which has 512MB internal memory.
I mean with memory the internal memory of the computer, not the memory of the usb... (0 Replies)
Dear all,
I am totally despaired and puzzled.
Using Filezilla under Windows under the same network as our Linux servers is working. Using FTP command-line client under any of our Linux debian servers is not working ! I tried with different FTP servers -> same problem !
All commands are... (12 Replies)
Solaris Guru's
What is the proper way to add routes in the routing table so after a node reboot the routes will not be lost.
I understand the /etc/defaultrouter for the default router
and the <route add> command but using this command routes will be removed once the node reboots.
Thanks (7 Replies)
Hi there
When adding a route (or indeed deleting a route) which file is amended ? I am moving a box from one network to another and when it starts up it tries to connect run 'add net 192.x.x.x' etc etc ...but i dont want it to do that
where do I edit these route additions
cheers (5 Replies)
Hi All,
I have a AIX server running v5.2 and its having multiple default routes configured to two seperate gateway.
Here's the output of -- netstat -rn
Routing tables
Destination Gateway Flags Refs Use If PMTU Exp Groups
Route Tree for Protocol Family 2... (2 Replies)
Ok, I made changes to my routing tables..... which file do I modify to make the routes initialize correctly when the machine boots up? I work with all flavours of Unix/Linux... but this is an older box...
Linux, Release 2.2.14-5.0.
I did a grep for the default route in /etc, but didnt find... (2 Replies)
I have a Unix box with 2 network interfaces on the same IP subnet and would like to add a host route via a specific interface. Any assistance would be greatly appreciated. (3 Replies)