On 19/10/15(Mon) 13:37, Gregory Edigarov wrote:
> On 10/19/2015 01:24 PM, Stuart Henderson wrote:
> >On 2015-10-19, Gregory Edigarov <[email protected]> wrote:
> >>In order to conserve address space I am trying to confugure 'ip
> >>unnumbred' in cisco terminology, that is have an interface borrow the ip
> >>of a different interface, I am experimenting with vether0 and vlans the
> >>thing is to have one 'main' address on some 'real' interface and then
> >>just add routes pointing to the right interfaces.
> >>
> >># ifconfig vether0 192.168.100.1/24 up
> >># ifconfig vlan2 vlandev vether0 up
> >># ifconfig vlan3 vlandev vether0 up
> >># route add 192.168.100.2/32 192.168.100.1 -cloning -ifp vlan2
> >>route: writing to routing socket: Network is unreachable
> >>add host 192.168.100.2/32: gateway 192.168.100.1: Network is unreachable
> >>
> >>the same result I have if I am trying to configure this on a real
> >>interface connected  to my network:
> >>
> >># ifconfig vlan2 vlandev re0
> >># ifconfig vlan3 vlandev re0
> >># ifconfig re0 alias 192.168.100.1
> >># route add 192.168.100.2/32 192.168.100.1 -cloning -ifp vlan2
> >>route: writing to routing socket: Network is unreachable
> >>add host 192.168.100.2/32: gateway 192.168.100.1: Network is unreachable
> >>
> >># uname -a
> >>OpenBSD lbld12.duckdns.org 5.8 GENERIC.MP#1507 amd64
> >>
> >>I thoght OpenBSD supports such thing.
> >>
> >>am I missing something?
> >I don't *think* this is expected to work at the moment unless possibly
> >you specify a destination MAC address with -link.
> >
> >It does work with point-to-point interfaces, e.g. you can have
> >192.0.2.1/28 on em0 and 192.0.2.1/32 on pppoe0 and things will work
> >as expected, but in that case you don't have a problem of picking a
> >particular link-layer address, just "the pppoe0 interface" is enough
> >information for the system to know where to send the packet.
> >
> >The best I've done so far for address conservation on ethernet-like
> >interfaces is to use /31's (which works well).
> >
> Yes, I know /31 would work correctly, but I wanted further space
> conservation.

Does it?

> Is that a correct explanation that this does not work because  our routing
> table still wants a link layer address, errrmmm,  arp table is  included in
> routing table?

I believe it's simpler than that.  You cannot attach a route to an
interface without address, so I'm quite sure it will work if you add
an address to vlan2.

Reply via email to