Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jun 2012 18:03:34 -0300
From:      H <hm@hm.net.br>
To:        freebsd-stable@freebsd.org
Cc:        sthaug@nethelp.no, Hans Petter Selasky <hselasky@c2i.net>
Subject:   Re: How to bind a route to a network adapter and not IP
Message-ID:  <201206181803.41211.hm@hm.net.br>
In-Reply-To: <201206181754.15680.hselasky@c2i.net>
References:  <4FDB6AA3.3040606@gmail.com> <4FDE5393.5050808@hm.net.br> <201206181754.15680.hselasky@c2i.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart1938882.UGr3QkiMLM
Content-Type: Text/Plain;
  charset="iso-8859-15"
Content-Transfer-Encoding: quoted-printable

On Monday 18 June 2012 12:54 Hans Petter Selasky wrote:
> On Monday 18 June 2012 00:00:51 H wrote:
> > sthaug@nethelp.no wrote:
> > >>> I loose packets because I use a WLAN adapter. Sometimes the link is
> > >>> down for various reasons, and then the routes start changing for
> > >>> manually created routes, and I want to prevent that.
> > >>=20
> > >> well that is certainly not a reason for changing routes
> > >>=20
> > >> I have the feeling you are not explaining good enough what really is
> > >> going on and it may help sending your configurations and an example =
of
> > >> routes and IP addresses before and after this route change
> > >=20
> > > Why is this so hard to understand? "Link down" leads to "static route
> > > is deleted". This is standard FreeBSD behavior, and has been this way
> > > for as long as I can remember (btw, I believe this behavior is from
> > > the original BSD, not FreeBSD specific).
> > >=20
> > > You can show this by having a static default route pointing to an
> > > address on an Ethernet interface which has link. And then pulling the
> > > TP cable from the Ethernet interface. Observe that the default route
> > > is automatically removed.
> >=20
> > may be you have not understood your own problem yet
> >=20
> > because so far is nothing to be understood because none of your
> > statements is correct, it is also not FreeBSD's standard behavior and
> > never has been
> >=20
> > as long as there is the valid IP address on the related interface, no
> > static route will be deleted, you can even boot without cable and the
> > [default] static route is there
> >=20
> > so you need to explain better your problem in order to understand it
> >=20
> > probably you have some other stuff running, thirdparty network manager
> > or something, incorrect or incomplete ppoe or dhc configuration or
> > whatever leads to the problem
> >=20
> > FYI static routes usually are the manually configured routes, so what
> > you say is redundant and not correct, I guess you're loosing some kind
> > of dynamic route
> >=20
> > since WL networks usually do not run RIP/OSPF/BGP I guess the route you
> > apparently loose is coming from some dhcp server and may be your
> > dhclient configuration is incomplete or none existent, but here now it
> > would be useful to see your config
>=20
> Hi,
>=20
> I think we need to distinguish between two matters. One is where the route
> is directly reachable on the local-net of the network adapter, and ARP is
> valid/responding. The second case is when the route is not directly
> reachable. The second case is where the problem happens, like Stian kindly
> explained.
>=20
> # For example:
>=20
> ifconfig wlan0 10.0.0.2 255.255.255.0 up
>=20
> # Assume the router is at 10.0.0.1
> # And we want to reach a certain destination through 10.0.0.1
> # Then we do:
>=20
> route add 10.22.1.1 10.0.0.1
>=20

no no no my friend, wrong again

that is a static route and it goes away same way it was created, manually o=
r=20
by deleting the IP address 10.0.0.2 from the related interface

wether there is or not an active link on that interface does not matter

Hans

> #
> # First the FreeBSD network stack will resolve the ethernet address for
> # 10.0.0.1, and all 10.22.1.1 IP packets will get sent to 10.0.0.1.
> #
>=20
> However, if the wlan0 link goes down, which sometimes happen, then the
> route for 10.22.1.1 is deleted. This is sometimes very annoying, and also,
> if it happens that the 10.22.1.1 is reachable from another network
> adapter, then traffic sometimes can end up mis-routed.
>=20
> --HPS
> _______________________________________________
> freebsd-stable@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"

=2D-=20

HM
+55 17 8111.3300

--nextPart1938882.UGr3QkiMLM
Content-Type: application/pgp-signature; name=signature.asc 
Content-Description: This is a digitally signed message part.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEABECAAYFAk/fl60ACgkQvKVfg5xjCDzK5gCglEFRfc7RqFVXk4SBDEeipJds
DqsAn2oNl2zn9XG78Cn5LkMOkv0UTb5I
=WuSW
-----END PGP SIGNATURE-----

--nextPart1938882.UGr3QkiMLM--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206181803.41211.hm>