Solved

Static Route for Mandriva?

Posted on 2013-05-20
7
946 Views
Last Modified: 2013-06-24
I was wondering how do I put a static route into Mandriva? We have a software that runs off this OS on our network that is needing a static route. I'm into the console and everything, but I just need to know the commands on how to permanently add a static route.
0
Comment
Question by:Pancake_Effect
  • 3
  • 2
  • 2
7 Comments
 
LVL 14

Assisted Solution

by:comfortjeanius
comfortjeanius earned 250 total points
ID: 39182559
The correct way to add permanent static routes to a system besides setting the default gateway is to create a file /etc/sysconfig/network-scripts/route-eth0 (or whichever interface you want to route through). You can add as many routes as you would like per interface by simply incrementing the number at the end of each statement. Once saved a restart of the network services will force a read of this route file.
 The syntax of the file should look like this:
 ADDRESS0=x.x.x.x
 GATEWAY0=x.x.x.x
 NETMASK0=x.x.x.x
 ADDRESS1=x.x.x.x
 GATEWAY1=x.x.x.x
 NETMASK1=x.x.x.x


I hoped this helps
0
 
LVL 29

Assisted Solution

by:serialband
serialband earned 250 total points
ID: 39182563
Try this.

If you have eth0 enabled, edit the following corresponding file
/etc/sysconfig/network-scripts/route-eth0

Add the routes you need in the following format.
ADDRESS0=x.x.x.x
GATEWAY0=x.x.x.x
NETMASK0=x.x.x.x
ADDRESS1=x.x.x.x
GATEWAY1=x.x.x.x
NETMASK1=x.x.x.x

Open in new window

0
 
LVL 4

Author Comment

by:Pancake_Effect
ID: 39184656
The program that runs upon this OS, doesn't really have a easy way to create a file via the GUI. From my understanding it's a custom mandriva OS. The only GUI you are given is the program. The only tool I have is the system console, via their custom software.

So I don't think the above commands can work without a text editor?
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 14

Assisted Solution

by:comfortjeanius
comfortjeanius earned 250 total points
ID: 39184889
How do you make configuration changes if you do not use a text editor?  You should be able to edit a configuration files.
0
 
LVL 29

Expert Comment

by:serialband
ID: 39184917
The vi and emacs editors both run command line.  If you don't know how to use either of those, you may have other notepad like editors such as pico or nano on your system.

If don't have access to those editors, then you can use the catecho and redirect (>, <, >>, << ) commands. There's also the age-old ed line editor, which vi is built upon, from the days of the line printers.

An alternative to using ed is to use these commands
To display the contents of the file.
cat /etc/sysconfig/network-scripts/route-eth0

To append a line to a file.
echo "ADDRESS0=x.x.x.x" >> /etc/sysconfig/network-scripts/route-eth0

To delete the last line in a file you could use sed
sed '$d' filename.txt
0
 
LVL 4

Author Comment

by:Pancake_Effect
ID: 39226282
I found that "Route add –net #.#.#.# netmask #.#.#.# gw #.#.#.# dev eth#" seems to be working for it so far anyways!
0
 
LVL 29

Accepted Solution

by:
serialband earned 250 total points
ID: 39229055
Is that permanent?  You need to put it in a file.

/etc/sysconfig/network-scripts/route-eth0 or whichever network interface and add the following.
ADDRESS0=x.x.x.x
GATEWAY0=x.x.x.x
NETMASK0=x.x.x.x
ADDRESS1=x.x.x.x
GATEWAY1=x.x.x.x
NETMASK1=x.x.x.x

https://www.linuxquestions.org/questions/linux-networking-3/permanently-add-static-route-16769/
0

Featured Post

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question