tech-net archive

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

Re: route command cannot set up route through point-to-point interface

Technically, it is sufficient to create a route.

I think freebsd-route is more convenient to use routing protocols
such as quagga, xorp, etc.

For example,
- a. netbsd-route
  # ifconfig gif0 tunnel
  # ifconfig gif0
  # netstat -nrfinet
    Destination        Gateway        Flags ... Interface          UH        gif0
  # route add -net -iface -interface gif0
    route: bad value: gif0
  # route add -net -iface -interface
  add net gateway
  # netstat -nrfinet
    Destination        Gateway        Flags ... Interface
    1.1.1/30         US        gif0          UH        gif0

- b. patched-route
  # ifconfig gif0 tunnel
  # ifconfig gif0

  (in quagga)
  # telnet localhost 2601
  > show ip route longer-prefixes
    C>* is directly connected, gif0

  # route add -net -iface -interface gif0
  add net gateway gif0
  # netstat -nrfinet
    Destination        Gateway        Flags ... Interface
    1.1.1/30                          US        gif0

In quagga-RIB, nexthop of points to gif0, not
Both route works well, but I think b. is more natural to describe.

Netbsd's route command seems to reject route through point-to-point

That's odd; it's always worked fine for me.  Could you give a specific
example, showing the configuraitno, the route command attempted, and
the failure message?

I checked out difference of the source code between netbsd and
freebsd, and maked following patch.

I'm guessing here, trying to reverse-engineer the behaviour you don't
like from the patch, but it looks almost as though you're expecting to
specify the _local_, not _remote_, address of the .2. interface on the
route command.  If so, I'd say the bug is in your expectations; in
other cases, the gateway given to route(8) is the (non-local) address
of the next-hop machine, not an address on the local machine.

Takashi Sogabe (

Home | Main Index | Thread Index | Old Index