Solved

Static Route for Mandriva?

Posted on 2013-05-20
7
875 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
Comment Utility
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 27

Assisted Solution

by:serialband
serialband earned 250 total points
Comment Utility
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
Comment Utility
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 14

Assisted Solution

by:comfortjeanius
comfortjeanius earned 250 total points
Comment Utility
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 27

Expert Comment

by:serialband
Comment Utility
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 cat & echo 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
Comment Utility
I found that "Route add –net #.#.#.# netmask #.#.#.# gw #.#.#.# dev eth#" seems to be working for it so far anyways!
0
 
LVL 27

Accepted Solution

by:
serialband earned 250 total points
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
David Varnum recently wrote up his impressions of PRTG, based on a presentation by my colleague Christian at Tech Field Day at VMworld in Barcelona. Thanks David, for your detailed and honest evaluation!
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now