[SOLVED] Adding Static Route on CentOS 6.5 Minimal

Issues related to configuring your network
Post Reply
Sakretsos
Posts: 9
Joined: 2014/02/08 03:23:30

[SOLVED] Adding Static Route on CentOS 6.5 Minimal

Post by Sakretsos » 2014/02/08 20:13:53

hello there , as the title says. i need some help to add a static route on centos 6.5 Minimal.. !
so, i add this commands on Centos 6.5 Minimal but when i restart centos the network not works again .. so can someone tell me how to add this routes to static routes !

Routes

Image

how i can add this as static ? thnx in advance !.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Adding Static Route on CentOS 6.5 Minimal

Post by TrevorH » 2014/02/08 20:41:45

Create a file /etc/sysconfig/network-scripts/route-eth0 and add your `ip route add` command to it but without the "ip route add" on the front. You'll need to work out the syntax for your `route add` command to use `ip route add`...
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Sakretsos
Posts: 9
Joined: 2014/02/08 03:23:30

Re: Adding Static Route on CentOS 6.5 Minimal

Post by Sakretsos » 2014/02/08 20:45:26

TrevorH wrote:Create a file /etc/sysconfig/network-scripts/route-eth0 and add your `ip route add` command to it but without the "ip route add" on the front. You'll need to work out the syntax for your `route add` command to use `ip route add`...
when i add route-eth0 i get this route -n static

Image

default gateway is not added... ! , how i can add UG flag? .

how to permanent add " route add default gw 188.165.229.254 " ?

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Adding Static Route on CentOS 6.5 Minimal

Post by TrevorH » 2014/02/08 22:42:58

What does your route-eth0 file contain?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Adding Static Route on CentOS 6.5 Minimal

Post by gerald_clark » 2014/02/08 23:05:49

You should really keep your problem to a single thread.

[edit/avij: good point, topics merged]
[edit2/avij: these might actually be different problems (well, different servers at least), split the topics again ..]

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Adding Static Route on CentOS 6.5 Minimal

Post by avij » 2014/02/11 21:53:33

Your route-eth0 file is incorrect. According to the link you posted earlier, the file should contain:

Code: Select all

188.165.229.254 dev eth0
default via 188.165.229.254 dev eth0
ASSUMING your IP address for this server is 188.165.229.xxx. If not, adjust accordingly.

Sakretsos
Posts: 9
Joined: 2014/02/08 03:23:30

Re: Adding Static Route on CentOS 6.5 Minimal

Post by Sakretsos » 2014/02/12 00:40:16

thnx you ! , you can close this thread !.

Post Reply