Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Oct 2001 15:57:44 -0300 (BRT)
From:      Thiago Damas <thiago_vet@vetnet5.vetorialnet.com.br>
To:        Matthew <mgt@hytekblue.com>
Cc:        <freebsd-net@FreeBSD.ORG>
Subject:   Re: ifconfig quirks
Message-ID:  <20011005155404.F57457-100000@vetnet5.vetorialnet.com.br>
In-Reply-To: <005601c14dc8$1c19dee0$8f64a8c0@jimsfw.com>

next in thread | previous in thread | raw e-mail | index | archive | help
	When you use numbers with a zero (0) as the first caracter, the C
language think that is in octal.
	007 in octal = 7 in decimal
	034 in octal = 24 in decimal
	...
	...

	Then, use the ifconfig without the zero (0) in the first caracter

On Fri, 5 Oct 2001, Matthew wrote:

> I just wanted to point out something strange I ran into on my test
> network with release 4.4.
>
> if I use "ifconfig xl1 inet 10.0.0.007 netmask 255.255.255.0"
> I get upon looking at the adapter
> inet 10.0.0.7 netmask 0xffffff00 broadcast 10.0.0.255
>
> however when I use "ifconfig xl1 inet 10.0.0.034 netmask 255.255.255.0"
> I get
> inet 10.0.0.28 netmask 0xffffff00 broadcast 10.0.0.255
>
> and yet again if I use " ifconfig xl1 inet 10.0.0.52 netmask 255.255.255.0 "
> I get
> inet 10.0.0.42 netmask 0xffffff00 broadcast 10.0.0.255
>
> and a third time I use "ifconfig xl1 inet 10.0.0.61 netmask 255.255.255.0"
> and I get
> inet 10.0.0.49 netmask 0xffffff00 broadcast 10.0.0.255
>
> I have done this on three different freebsd 4.4 release machines with the
> exact same results on each. if I do not use the leading zero's in the last
> octet it works correctly. However I have at least three nics in each machine
> with multiple ip's on
> most interfaces to simulate my existing network so it would be nice to be
> able to use them as place holders to make the files look a bit cleaner.
> Cheers,
> Matthew
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-net" in the body of the message
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011005155404.F57457-100000>