public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Etaoin Shrdlu <shrdlu@unlimitedmail.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user]  Re: static IP, gateway and netmask setting
Date: Wed, 28 Nov 2007 10:18:05 +0100	[thread overview]
Message-ID: <200711281018.05519.shrdlu@unlimitedmail.org> (raw)
In-Reply-To: <20071126121018.308515d0@pascal.spore.ath.cx>

On Monday 26 November 2007, Dan Farrell wrote:

> you don't have to list the broadcast or netmask, if they can be
> guessed from context.  In the case of using a 192.168.x/24 network
> they can generally both be guessed properly, because that's a Class C
> private address .
>
> However, in the case of 10.0.0/24, this may not be true.  that is
> defined as class A private address space, and the networking utilities
> would probably assume it was 10.0.0/8, a netmask of 255.0.0.0 and a
> broadcast of 10.255.255.255.  That is what ifconfig does at least:
>
> pascal ~ # ifconfig eth0:1 10.0.0.1
> pascal ~ # ifconfig eth0:1
> eth0:1    Link encap:Ethernet  HWaddr 00:50:70:56:2E:CA
>           inet addr:10.0.0.1  Bcast:10.255.255.255  Mask:255.0.0.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           Interrupt:225 Base address:0xc000

That is what ifconfig does, if you don't specify a netmask:

[root@mozart /x]# ifconfig eth0:1 10.0.0.1 netmask 255.255.255.0
[root@mozart /x]# ifconfig eth0:1
eth0:1    Link encap:Ethernet  HWaddr 00:11:2F:BB:F6:0D
          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:17


I don't know exactly how initscripts work, but I suppose that if the /24 
is given in /etc/conf.d/net, then both the resulting iproute2 and 
ifconfig command that bring the interface up will include the netmask 
specification.
-- 
gentoo-user@gentoo.org mailing list



  reply	other threads:[~2007-11-28  9:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-23 15:20 [gentoo-user] static IP, gateway and netmask setting Rafael Barrera Oro
2007-11-23 16:02 ` Alberto Avi
2007-11-23 16:18   ` Rafael Barrera Oro
2007-11-23 23:55 ` [gentoo-user] " reader
2007-11-26 18:10   ` Dan Farrell
2007-11-28  9:18     ` Etaoin Shrdlu [this message]
2007-11-28 18:58       ` Dan Farrell
2007-11-28 19:11         ` Rafael Barrera Oro
2007-11-28 20:56         ` Etaoin Shrdlu
2007-11-29 18:55           ` Dan Farrell

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=200711281018.05519.shrdlu@unlimitedmail.org \
    --to=shrdlu@unlimitedmail.org \
    --cc=gentoo-user@lists.gentoo.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