linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Samuel <samuel@bcgreen.com>
To: Adam Lang <aalang@rutgersinsurance.com>
Cc: luke@techfreak.org, linux-admin@vger.kernel.org
Subject: Re: determine gateway on remote server?
Date: Sun, 23 May 2004 18:57:49 -0700	[thread overview]
Message-ID: <40B1569D.3010300@bcgreen.com> (raw)
In-Reply-To: <01d001c43f65$87af0ea0$530a0a0a@rutgersinsurance.com>

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.

      reply	other threads:[~2004-05-24  1:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40B1569D.3010300@bcgreen.com \
    --to=samuel@bcgreen.com \
    --cc=aalang@rutgersinsurance.com \
    --cc=linux-admin@vger.kernel.org \
    --cc=luke@techfreak.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).