Re: Ethernet is not started at boot
- Date: Wed, 7 Feb 2018 12:13:10 +0100
- From: <tomas@xxxxxxxxxx>
- Subject: Re: Ethernet is not started at boot
-----BEGIN PGP SIGNED MESSAGE-----
On Wed, Feb 07, 2018 at 09:58:55PM +1100, Erik Christiansen wrote:
> On 07.02.18 09:33, Michelle Konzack wrote:
> > auto eth2
> > iface eth2 inet static
> > address 192.168.4.12
> > netmask 255.255.127.0
> > gateway 192.168.4.1
> > network 192.168.4.0
> > So, it is not so good idea to leafe it out
> Michelle, that netmask is 0b11111111111111111000000100000000 , which is
> the first I have ever seen with a hole in it.
No, that would be 1111 1111 1111 1111 0111 1111 0000 0000 (some spacing
added for legibility). But the "hole" thing still is there. I have no idea
what network equipment will do on that. But at least the Linux networking
stack keeps you from doing that:
tomas@trotzki:~$ sudo ifconfig eth0 192.168.230.5 netmask 255.255.127.0
SIOCSIFNETMASK: Invalid argument
tomas@trotzki:~$ sudo ifconfig eth0 192.168.230.5 netmask 255.255.128.0
does work without complaints.
(to the purists out there: I can't for the life of me remember what 'ip'
wants me to chant to achieve that! I keep using both...)
> For 512 addresses, I'd
> have expected 255.255.254.0, which has contiguous bits:
> 0b11111111111111111111111000000000 (If 10 bits (1024 addresses) were the
> aim, then it would be 252, but never 127, if I have any kind of grip on
> this stuff.)
> Not trusting the software to handle an unusual netmask, I might have
> been tempted to just use a class B netmask, 255.255.0.0 , but then I can
> be a Feigling in such matters.
CIDR should Just Work. But holes, OTOH...
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
-----END PGP SIGNATURE-----