linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* determine gateway on remote server?
@ 2004-05-21 17:39 luke
  2004-05-21 18:57 ` Adam Lang
  0 siblings, 1 reply; 3+ messages in thread
From: luke @ 2004-05-21 17:39 UTC (permalink / raw)
  To: linux-admin

Hey all,

I have a new dedicated RH9 server and need to assign three new IPs
to virtual devices. Normally, I just copy the basic ifcfg-eth0
iformation, such as gateway and netmask into ifcfg-eth0:1 etc.
However, this data center setup my ifcfg-eth0 to use dhcp........ so
the ifcfg-eth0 file contains nothing of value to me.

I can use ifconfig to get the netmask, but how do I determine the
default gateway for this server? I need this to build the new
vistual devices, such as ifcfg-eth0:1 .

Thanks in advance for your suggestions.

Luke



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: determine gateway on remote server?
  2004-05-21 17:39 determine gateway on remote server? luke
@ 2004-05-21 18:57 ` Adam Lang
  2004-05-24  1:57   ` Stephen Samuel
  0 siblings, 1 reply; 3+ messages in thread
From: Adam Lang @ 2004-05-21 18:57 UTC (permalink / raw)
  To: luke, linux-admin

use the "route" utility


----- Original Message ----- 
From: <luke@techfreak.org>
To: <linux-admin@vger.kernel.org>
Sent: Friday, May 21, 2004 1:39 PM
Subject: determine gateway on remote server?


> Hey all,
> 
> I have a new dedicated RH9 server and need to assign three new IPs
> to virtual devices. Normally, I just copy the basic ifcfg-eth0
> iformation, such as gateway and netmask into ifcfg-eth0:1 etc.
> However, this data center setup my ifcfg-eth0 to use dhcp........ so
> the ifcfg-eth0 file contains nothing of value to me.
> 
> I can use ifconfig to get the netmask, but how do I determine the
> default gateway for this server? I need this to build the new
> vistual devices, such as ifcfg-eth0:1 .
> 
> Thanks in advance for your suggestions.
> 
> Luke
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-admin" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: determine gateway on remote server?
  2004-05-21 18:57 ` Adam Lang
@ 2004-05-24  1:57   ` Stephen Samuel
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Samuel @ 2004-05-24  1:57 UTC (permalink / raw)
  To: Adam Lang; +Cc: luke, linux-admin

the command:
	route -n
should do the job. -n says's don't look up the DNS
names for addresses.

the default route will have a 'destination' of 0.0.0.0
and a 'genmask' of 0.0.0.0
In the example below, the gateway would be 192.168.86.254

] % route -n
] Kernel IP routing table
] Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
] 192.168.86.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
] 127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
] 0.0.0.0         192.168.86.254  0.0.0.0         UG    0      0        0 eth0
] %


> ----- Original Message ----- 
> From: <luke@techfreak.org>
> To: <linux-admin@vger.kernel.org>
> Sent: Friday, May 21, 2004 1:39 PM
> Subject: determine gateway on remote server?
> 
> 
> 
>>Hey all,
>>
>>I have a new dedicated RH9 server and need to assign three new IPs
>>to virtual devices. Normally, I just copy the basic ifcfg-eth0
>>iformation, such as gateway and netmask into ifcfg-eth0:1 etc.
>>However, this data center setup my ifcfg-eth0 to use dhcp........ so
>>the ifcfg-eth0 file contains nothing of value to me.
>>
>>I can use ifconfig to get the netmask, but how do I determine the
>>default gateway for this server? I need this to build the new
>>vistual devices, such as ifcfg-eth0:1 .
>>
>>Thanks in advance for your suggestions.
>>
>>Luke


-- 
Stephen Samuel +1(604)876-0426                samuel@bcgreen.com
		   http://www.bcgreen.com/~samuel/
    Powerful committed communication. Transformation touching
      the jewel within each person and bringing it to light.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-05-24  1:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-21 17:39 determine gateway on remote server? luke
2004-05-21 18:57 ` Adam Lang
2004-05-24  1:57   ` Stephen Samuel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).