[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: /etc/network/interfaces & point-to-point ethernet & broadcast address



> -----Original Message-----
> From: Noah L. Meyerhans [mailto:frodo@morgul.net] On Behalf 
> 
> > Having to allocate a /31 or /30 subnet in this case, in order
> > to have distinct network and broadcast addresses seems very
> > wasteful, as they simply are not required.

Here's an example from a PtP connection here, with IPs changed to protect
the innocent:

iface eth0 inet static
        address 10.0.0.25
        broadcast 10.0.0.25
        netmask 255.255.255.255
        up ip route add 10.0.0.1/32 dev eth0
        up route add default gw 10.0.0.1

A nasty combination of ifconfig, ip, and route.  I leave it as an exercise
to the reader to change that "route" call into another "ip" call.  I was
tired when I did this, I think, and I've been copy and pasting it since.

This assumes that 10.0.0.25 and 10.0.0.1 are on the same wire, of course,
but you're using point-to-point to conserve address space (in my case, I
have a /30 that is 4 non-broadcast hosts, due to some poorly thought out
carving up of address space a while ago)

... Adam



Reply to: