Sponsored Content
Full Discussion: Change Default gateway
Operating Systems Linux Red Hat Change Default gateway Post 302765387 by deljatt on Saturday 2nd of February 2013 06:44:33 AM
Old 02-02-2013
Change Default gateway

Hi..I have to change default gateway in my linux machine. Its OS is RHEL6.
I followed following steps.
1.run command ip route to check current default gateway
2.delete that gateway with command
route del default gw x.x.x.x eth2
3.Add new gatewy with command below
route add default gateway x.x.x.x eth0
4.Also ensure /etc/sysconfig/network has new gateway entry with eth name in it.
NETWORKING=yes
HOSTNAME=N1
GATEWAY=x.x.x.x
GATEWAYDEV=eth0

But when we restart network service it moves back to old gateway.

Kindly let me know how to make it permanent.

Thanks !!
 

9 More Discussions You Might Find Interesting

1. Solaris

How can I change the default gateway?

my actual default gatewas IP is: default 192.168.11.254 and I need to change it to 192.168.11.2, I'm using Solaris 9, how can i do it? and how i can save it in case that the machine restart and have the new default gateway IP saved? (5 Replies)
Discussion started by: Lestat
5 Replies

2. Shell Programming and Scripting

script to change default route when primary gateway dies

Hello all! We have two fedora routers one at each site. What we are trying to do worked using freesco but not on fedora, i'm not very good at scripting and need a little guidence. Basicly what we are trying to do is if the primary line dies, the router will change it's routes to go through our... (0 Replies)
Discussion started by: slacker
0 Replies

3. AIX

Help with Default Gateway

Hi, I have two interfaces on m AIX 5.3 box. One going to 192.168.1.x and it has a gateway of 192.168.1.1. I configured the other gateway with 192.168.2.x and the default gateway as 192.168.2.1. But I can't get connectivity to the 192.168.2.1 network. Can someone help me out and let me know... (7 Replies)
Discussion started by: bbbngowc
7 Replies

4. Solaris

Change gateway without reboot server

Hi Gurus Recently i had change the gateway for a server i had change the IP in the /etc/defaultrouter and run the below command # route add default 10.86.33.222 # route delete default 10.86.33.1 # netstat -rn Routing Table: IPv4 Destination Gateway Flags Ref ... (2 Replies)
Discussion started by: SmartAntz
2 Replies

5. HP-UX

where can i modify default gateway

where in configuration files can i modify default gateway in hp-ux11iv3 (5 Replies)
Discussion started by: h@foorsa.biz
5 Replies

6. Linux

GNUGK-How to setup static gateway to gateway routing

Dear Sir I am a newbie in the world of IP telephony. I have been working with Asterisk PBX (SIP) and Cisco Call Manager (MGCP) but now I am learning on how to work GNUGK for H.323 Gatekeeper. I am having a problem, configuring static call routing on GNUGK in the section ... (0 Replies)
Discussion started by: mfondoum
0 Replies

7. UNIX for Dummies Questions & Answers

Cannot ping default gateway

I have NCR MP-RAS unix. I have been trying for several months to get our network working since we had never used it before. I have setup all routes that I can think of. I know it has something to do with the routing table, because out of sheer luck I was able to get it working, and than like a... (4 Replies)
Discussion started by: Rutgerncas
4 Replies

8. IP Networking

Default Gateway

I am am using IPv6 IP's with an OS of Debian. Is it possible to set a *static* default gateway w/o the router being connected? Will that gateway change when the router is connected? TIA (0 Replies)
Discussion started by: Meow613
0 Replies

9. UNIX for Beginners Questions & Answers

Inconsistency between RedHat 6.5 global gateway and single gateway leads to loss of default gateway

Dear friends I use RedHat 6.5, which sets the gateway in the configuration file / etc / sysconfig / network as GATEWAY = 192.168.1.26, and the gateway in the configuration file / etc / sysconfig / network-scripts / ifcfg-eth11 as GATEWAY = 192.168.1.256. The two gateways are different.... (6 Replies)
Discussion started by: tanpeng
6 Replies
ripquery(8)						      System Manager's Manual						       ripquery(8)

NAME
ripquery - Queries RIP gateways SYNOPSIS
/usr/sbin/ripquery [-1] [-2] [-[a5] authkey] [-n] [-p] [-r] [-v] [-w time] gateway ... FLAGS
Sends the query as a version 1 packet. Sends the query as a version 2 packet (default). Specifies the authentication password to use for queries. If -a specified, an authentication type of SIMPLE will be used, if -5 is specified, an authentication type of MD5 will be used, otherwise the default is an authentication type of NONE. Authentication fields in incoming packets will be displayed, but not validated. Prevents the address of the responding host from being looked up to determine the symbolic name. Uses the RIP POLL command to request information from the routing table. This is the default. If there is no response to the RIP POLL command, the RIP REQUEST command is tried. The gated daemon responds to a POLL command with all the routes learned through RIP. Used the RIP REQUEST command to request information from the gateway's routing table. Unlike the RIP POLL command, all gateways should support the RIP REQUEST. If there is no response to the RIP REQUEST command, the RIP POLL command is tried. The gated daemon responds to a REQUEST command with all the routes he announces out the specified interface. Because of limitations in the UDP interface, on systems based on BSD 4.3 Reno or earlier, REQUESTs respond about the interface used to route packets back to the sender. This can be avoided by running ripquery on the host being queried. Displays version information about ripquery before querying the gateways. Specifies the time in seconds to wait for the initial response from a gateway. The default value is 5 seconds. DESCRIPTION
The ripquery command is used to request all routes known by a RIP gateway by sending a RIP request or POLL command. The routing informa- tion in any routing packets returned is displayed numerically and symbolically. The ripquery command is intended to be used as a tool for debugging gateways, not for network management. SNMP is the preferred protocol for network management. The ripquery command by default uses the RIP POLL command, which is an undocumented extension to the RIP specification supported by routed on SunOS 3.x and later and by gated 1.4 and later. The RIP POLL command is preferred over the RIP REQUEST command because it is not sub- ject to Split Horizon or Poisoned Reverse. See the RIP RFC for more information. RELATED INFORMATION
Commands: gated(8), gdc(8), ospf_monitor(8), routed(8) delim off ripquery(8)
All times are GMT -4. The time now is 08:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy