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

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



Hello,

I have been looking at the "ip address" command.

It appears to be the new (and cleaner) way to add addresses to network
devices (previously known as aliases).

Unlike ifconfig (at least for Ethernet), you can also add addresses to a
network device without a broadcast address. If I understand this
correctly, this is good for point-to-point connections which don't have
a broadcast address (yes, even Ethernet can be used like this)[1].

Is it possible to configure/create an Ethernet device using
/etc/network/interfaces, but not set the broadcast address?
I suspect that ifupdown is based on ifconfig, so the answer is NO.

In ifupdown version 0.6.4-4[2] I tried setting the netmask to
255.255.255.255, to indicate that it is a point to point link (ie. there
is only one IP address available at the remote end). This helps with the
routing (Linux no longer tries to route the entire class C network out
this Ethernet), but the interface is given a "nonsense" broadcast address
of x.255.255.255.

So I then tried the pointopoint option. This appears to simplify routing
somewhat, but the broadcast address is still required.

Other things I tried:
root@tsv:~# ifconfig eth0 -broadcast
Warning: Interface eth0 still in BROADCAST mode.
(didn't work)

root@tsv:~# ip address delete dev eth0 x.x.x.x/32
root@tsv:~# ip address add dev eth0 x.x.x.x/32 peer y.y.y.y/32
(apart from deleting my routes ;-), this did exactly what I wanted)

root@tsv:~# ip address show dev  eth0
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
    link/ether 00:40:f4:4d:5e:a1 brd ff:ff:ff:ff:ff:ff
    inet x.x.x.x peer y.y.y.y/32 scope global eth0
(note: no broadcast address)

One potential work around is to set the broadcast address to be
the address of the remote host, is this likely to have unwanted
side effects?

Any comments?

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.

If there is anything I need to clarify, please let me know.

Thanks in advance.

Notes:
[1] In this case I have an ADSL router directly connected to a
    Linux router... Perhaps this is wasteful, but the ADSL provider
    won't give us access to config the ADSL router. It also gives
    us access to advanced routing features on Linux which are most
    likely not supported by the ADSL router. The two routers
    are connected with cross-over CAT5 cable.

[2] I realize that version 0.6.4-4.4 is now available, please let me
    know if it has any improvements in this area.
--
Brian May <bam@debian.org>



Reply to: