Re: How do I add a network route permanently using "route add" commandin linux.



Hi,

After adding /etc/route-eth0, Please find how the route looks like. Is this
fine, Please suggest.

[root@bgpcamd1 network-scripts]# ls -l route-eth0
-rw-r--r-- 1 root root 24 Feb 24 09:46 route-eth0
[root@bgpcamd1 network-scripts]# more route-eth0
0.0.0.0 via 172.22.40.1
[root@bgpcamd1 network-scripts]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
0.0.0.0 172.22.40.1 255.255.255.255 UGH 0 0 0 eth0
172.22.40.0 0.0.0.0 255.255.254.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 172.22.40.1 0.0.0.0 UG 0 0 0 eth0
[root@bgpcamd1 network-scripts]#

Thanks & Regards,
-GnanaShekar-


On 2/24/06, unix syzadmin <unixsyzadmin@xxxxxxxxx> wrote:

Hi,

Find below the contents of /etc/sysconfig/network-scripts/ifcfg-eth0

[root@bgpcamd1 network-scripts]# pwd
/etc/sysconfig/network-scripts
[root@bgpcamd1 network-scripts]# more ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=172.22.40.50
NETMASK=255.255.254.0
GATEWAY=172.22.40.1
[root@bgpcamd1 network-scripts]#


On 2/24/06, Michael Gale <Michael.Gale@xxxxxxxxx> wrote:

Hey,

In your /etc/sysconfig/network-scripts directory, create a route file or
add to one that is already there.

Example
route-eth1
'destination' via 'gateway ip'

However it looks like you want to add a default gateway ? That should be
taken care of by your /etc/sysconfig/network-scripts/ifcfg-eth# file.

Michael Gale


-----Original Message-----
From: redhat-list-bounces@xxxxxxxxxx on behalf of unix syzadmin
Sent: Thu 2/23/2006 8:42 PM
To: General Red Hat Linux discussion list
Subject: How do I add a network route permanently using "route add"
commandin linux.

Hi,

I have added the following route on a RHEL AS4 server. How do I make
this
route a permanent one. In other words, how do I add a route that
persists
after reboot.

route add -net 0.0.0.0 netmask 0.0.0.0 gw 172.22.40.1 dev eth0

Thanks & Regards,
-GnanaShekar-
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=subscribe
https://www.redhat.com/mailman/listinfo/redhat-list



--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • Re: How do I add a network route permanently using "route add" commandin linux.
    ... 'destination' via 'gateway ip' ... However it looks like you want to add a default gateway? ... How do I add a network route permanently using "route add" ...
    (RedHat)
  • Re: VPN and remote gateway
    ... > It seems you use the wrong route add command. ... > when the VPN connection is established. ... > | using the remote network as my gateway. ...
    (microsoft.public.windows.server.sbs)
  • Re: Persistent Route ignored on W2K when destination network is unavailable
    ... a global setting like the gateway to a particular subnet should be set ... this network access the internet via a NAT firewall (connected to ... via a WAN link. ... route on the Cisco firewall so that any traffic to the internet gets ...
    (microsoft.public.win2000.networking)
  • Re: AIX 1.3 Failures and Fables
    ... DESTINATION GATEWAY FLGS REFCNT USE INTERFACE ... Is my interpretation of the AIX 1.3 #man route correct? ... Manually manipulates the routing tables. ... Is the destination host or network. ...
    (comp.sys.ibm.ps2.hardware)
  • Re: AD-DNS-DHCP
    ... If I do NOT remove the gateway configurationfrom my DHCP ... scope but add route command to my logon script, ...
    (microsoft.public.windows.server.active_directory)