Re: Default gateway - wrong interface. !



On Sun, Feb 19, 2006 at 03:14:35PM +0000, Josef Karthauser wrote:
J> I'm guessing that this is a bug (or feature!).

This is not a bug, nor a feature. This is a feature, that hasn't
been implemented to the end.

Historically, the routes in kernel were static. And they are static
now. Historically, BSD won't permit you to install same IP addresses,
or even addresses in the same subnet, on different interfaces. Now,
FreeBSD permits addresses in the same subnet. But route entries are
still static, and aren't reconfigring when an interface changes its
flags.

J> I've got a machine with a wlan interface (iwi0), with an ipv4 network
J> address and a default gateway. I also have an ethernet card in the same
J> machine (em0) with the same IP address. The idea is that I can bring
J> the wireless down, and the wired interface up to get fast transfers when
J> approriate, and be wireless the rest of the time.
J>
J> That works fine, apart from the default gateway:
J>
J> # ifconfig iwi0 down
J> # ifconfig em0 up
J> # arp -ad
J> # netstat -rn
J> Internet:
J> Destination Gateway Flags Refs Use Netif
J> Expire
J> default 87.74.4.33 UGS 0 123 iwi0
J> 87.74.4.32/27 link#3 UC 0 0 em0
J> 87.74.4.33 00:90:d0:02:3f:16 UHLW 2 1 em0
J> 87.74.4.34 00:d0:b7:88:c8:20 UHLW 1 1191414 em0
J> 127.0.0.1 127.0.0.1 UH 0 2 lo0
J>
J> Notice, the local subnet is off the em0, but the default route is still
J> wired off the iwi0.
J>
J> # route delete default
J> # route add default 87.74.4.33
J> # netstat -rn
J> Internet:
J> Destination Gateway Flags Refs Use Netif
J> Expire
J> default 87.74.4.33 UGS 0 123 iwi0
J> 87.74.4.32/27 link#3 UC 0 0 em0
J> 87.74.4.33 00:90:d0:02:3f:16 UHLW 2 1 em0
J> 87.74.4.34 00:d0:b7:88:c8:20 UHLW 1 1191414 em0
J> 127.0.0.1 127.0.0.1 UH 0 2 lo0
J>
J> The default route is _still_ off iwi0; but should be off em0.
J>
J> There's obviously something dumb doing on here. Why does the default
J> route have to be nailed to an interface? It's clear that 87.74.4.33 is
J> available from em0 as far as the routing table is concerned.
J>
J> Joe



--
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: Default gateway - wrong interface. !
    ... This is a feature, that hasn't ... But route entries are ... | J> I've got a machine with a wlan interface, ... | J> machine (em0) with the same IP address. ...
    (freebsd-net)
  • Jumbo Frames Question
    ... route to: networkservices ... interface: em0 ... recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire ...
    (comp.unix.bsd.openbsd.misc)
  • Default gateway - wrong interface. !
    ... I've got a machine with a wlan interface (iwi0), ... machine (em0) with the same IP address. ... Notice, the local subnet is off the em0, but the default route is still ...
    (freebsd-net)
  • Re: Cant send packets via WiFi (possibly route issue)
    ... I think that this WiFi device should route all ... it should *all* be routed to the eth1 interface. ... Wireless is much like a point-to-point link using ... The connection between the two networks is the "Wifi AP". ...
    (comp.os.linux.networking)
  • Re: Which Units support MDR?
    ... Users can enter a series of destinations, and the StreetPilot 2610 will automatically sort them to provide an efficient route." ... Their use of the words multiple destination probably contributed to my use of the phrase too. ... The original request was for a list of products that had this feature, i.e. for which this features was available, hence a checkbox. ... I agree that the 76CX is a great off road unit but is not the best car unit on the planet. ...
    (sci.geo.satellite-nav)