Reese Knowledgebase

Defining static and default gateway in route-eth file

View Kristian Reese's profile on LinkedIn


If you like this article, please +1 or Recommend via FB with the provided buttons above:

Article ID: 28
by: Reese K.
Posted: 02 Mar, 2012
Last updated: 24 Sep, 2013
Views: 1961

Define default gateway in route-eth file

[root@linux01 ~]# cat /etc/sysconfig/network-scripts/route-eth1
default via 10.195.30.1 dev eth1

Default gateway can also be defined in /etc/sysconfig/network:

[root@linux01 ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=linux01
GATEWAY=10.195.30.1

Define static and default route in respective route-eth file

[root@linux02 ~]# cat /etc/sysconfig/network-scripts/route-eth0
10.0.0.0/8 via 10.30.118.1
10.30.33.14 via 10.30.118.1 dev eth0


[root@linux02 ~]# cat /etc/sysconfig/network-scripts/route-eth1
default via 10.30.119.1 dev eth1

This article was:   Helpful | Not Helpful
Prev   Next
Create a chroot jail with openssh     Create a temp file with random characters

RSS