Re: How to bind a route to a network adapter and not IP

2012-06-25 Thread Ian Lepore
On Mon, 2012-06-18 at 23:07 +0200, Hans Petter Selasky wrote:
 On Monday 18 June 2012 23:03:34 H wrote:
  On Monday 18 June 2012 12:54 Hans Petter Selasky wrote:
   On Monday 18 June 2012 00:00:51 H wrote:
sth...@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.
 
 well that is certainly not a reason for changing routes
 
 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
 
 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).
 
 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.

may be you have not understood your own problem yet

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

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

so you need to explain better your problem in order to understand it

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

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

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
   
   Hi,
   
   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.
   
   # For example:
   
   ifconfig wlan0 10.0.0.2 255.255.255.0 up
   
   # 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:
   
   route add 10.22.1.1 10.0.0.1
  
  no no no my friend, wrong again
  
  that is a static route and it goes away same way it was created, manually
  or 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
  
 
 Hi,
 
 Can it be that dhclient which I'm running on this interface with manual 
 routes 
 disrupts stuff then ??
 
 --HPS

I think you can get the effect you want with dhclient.conf.  I just
experimented a bit and it works for me, installing the static route when
it gets an address (and it gets removed if I manually configure the
interface back to 0.0.0.0), using this dhclient.conf:

interface re0 {
supersede static-routes 10.1.1.1 172.22.42.240;
}

It works with either the 'prepend' or 'supersede' verb, depending on
your needs.  You can also specify multiple static routes, see
dhcp-options(5).

-- Ian


___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: How to bind a route to a network adapter and not IP

2012-06-19 Thread H
On Monday 18 June 2012 18:07 Hans Petter Selasky wrote:
 On Monday 18 June 2012 23:03:34 H wrote:
  On Monday 18 June 2012 12:54 Hans Petter Selasky wrote:
   On Monday 18 June 2012 00:00:51 H wrote:
sth...@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.
 
 well that is certainly not a reason for changing routes
 
 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
 
 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).
 
 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.

may be you have not understood your own problem yet

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

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

so you need to explain better your problem in order to understand it

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

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

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
   
   Hi,
   
   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.
   
   # For example:
   
   ifconfig wlan0 10.0.0.2 255.255.255.0 up
   
   # 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:
   
   route add 10.22.1.1 10.0.0.1
  
  no no no my friend, wrong again
  
  that is a static route and it goes away same way it was created, manually
  or 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
 
 Hi,
 
 Can it be that dhclient which I'm running on this interface with manual
 routes disrupts stuff then ??
 


so now we're coming to the point ...

on renewal of the IP address the interface is set do down, old IP removed and 
the new one (even if the same as before) is associated and the IF comes up 
again

means, any route associated get lost, you may get a new one (default) from the 
dhcp server

you could set some options in your /etc/dhclient.conf to match your needs

you could request a longer lease time, eventually reduce the retry time to get 
less down time

check your log what the dhcp server send to you

may be you try something like:

timeout 60;
retry 60;
send dhcp-lease-time 36000; (or more to cover your longest up time)

if the longer lease time does not work, then  I guess then you could use the 
'script name' option to set your special route after renewal

Hans



-- 

HM
+55 17 8111.3300


signature.asc
Description: This is a digitally signed message part.


Re: How to bind a route to a network adapter and not IP

2012-06-18 Thread Hans Petter Selasky
On Monday 18 June 2012 00:00:51 H wrote:
 sth...@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.
  
  well that is certainly not a reason for changing routes
  
  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
  
  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).
  
  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.
 
 may be you have not understood your own problem yet
 
 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
 
 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
 
 so you need to explain better your problem in order to understand it
 
 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
 
 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
 
 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

Hi,

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.

# For example:

ifconfig wlan0 10.0.0.2 255.255.255.0 up

# 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:

route add 10.22.1.1 10.0.0.1

#
# 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.
#

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.

--HPS
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: How to bind a route to a network adapter and not IP

2012-06-18 Thread H
On Monday 18 June 2012 12:54 Hans Petter Selasky wrote:
 On Monday 18 June 2012 00:00:51 H wrote:
  sth...@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.
   
   well that is certainly not a reason for changing routes
   
   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
   
   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).
   
   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.
  
  may be you have not understood your own problem yet
  
  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
  
  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
  
  so you need to explain better your problem in order to understand it
  
  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
  
  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
  
  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
 
 Hi,
 
 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.
 
 # For example:
 
 ifconfig wlan0 10.0.0.2 255.255.255.0 up
 
 # 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:
 
 route add 10.22.1.1 10.0.0.1
 

no no no my friend, wrong again

that is a static route and it goes away same way it was created, manually or 
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.
 #
 
 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.
 
 --HPS
 ___
 freebsd-stable@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-stable
 To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org

-- 

HM
+55 17 8111.3300


signature.asc
Description: This is a digitally signed message part.


Re: How to bind a route to a network adapter and not IP

2012-06-18 Thread Hans Petter Selasky
On Monday 18 June 2012 23:03:34 H wrote:
 On Monday 18 June 2012 12:54 Hans Petter Selasky wrote:
  On Monday 18 June 2012 00:00:51 H wrote:
   sth...@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.

well that is certainly not a reason for changing routes

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

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).

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.
   
   may be you have not understood your own problem yet
   
   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
   
   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
   
   so you need to explain better your problem in order to understand it
   
   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
   
   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
   
   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
  
  Hi,
  
  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.
  
  # For example:
  
  ifconfig wlan0 10.0.0.2 255.255.255.0 up
  
  # 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:
  
  route add 10.22.1.1 10.0.0.1
 
 no no no my friend, wrong again
 
 that is a static route and it goes away same way it was created, manually
 or 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
 

Hi,

Can it be that dhclient which I'm running on this interface with manual routes 
disrupts stuff then ??

--HPS
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: How to bind a route to a network adapter and not IP

2012-06-17 Thread Hans Petter Selasky
On Friday 15 June 2012 19:02:27 animelo...@gmail.com wrote:
 Perhaps you can ask the very same question in another way so its easier
 to understand why you losing packets? All in all I always thought TCP/IP
 was the basic unit in Internet based networking but feel free to correct
 me if you have any news I might have missed... :)
 
 Also do you have any idea why AMD based CPUs could be vulnerable to this
 alternative networking scheme and cause a remote denial service in fbsd
 stable but not in CURRENT?
 
 Thanks,
 
 Etienne

Hi,

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.

--HPS
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: How to bind a route to a network adapter and not IP

2012-06-17 Thread H
Hans Petter Selasky wrote:
 On Friday 15 June 2012 19:02:27 animelo...@gmail.com wrote:
 Perhaps you can ask the very same question in another way so its easier
 to understand why you losing packets? All in all I always thought TCP/IP
 was the basic unit in Internet based networking but feel free to correct
 me if you have any news I might have missed... :)

 Also do you have any idea why AMD based CPUs could be vulnerable to this
 alternative networking scheme and cause a remote denial service in fbsd
 stable but not in CURRENT?

 Thanks,

 Etienne
 
 Hi,
 
 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.
 


well that is certainly not a reason for changing routes

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


Hans



-- 
H
+55 11 4249.





signature.asc
Description: OpenPGP digital signature


Re: How to bind a route to a network adapter and not IP

2012-06-17 Thread sthaug
  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.
 
 well that is certainly not a reason for changing routes
 
 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

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).

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.

My claim is that this behavior is reasonable *but* I'd like the route
restored when the link comes back up again. This is standard Cisco /
Juniper behavior - but *not* standard FreeBSD behavior.

Steinar Haug, Nethelp consulting, sth...@nethelp.no
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: How to bind a route to a network adapter and not IP

2012-06-17 Thread H
sth...@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.

 well that is certainly not a reason for changing routes

 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
 
 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).
 
 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.


may be you have not understood your own problem yet

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

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

so you need to explain better your problem in order to understand it

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

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

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




-- 
H
+55 11 4249.





signature.asc
Description: OpenPGP digital signature


Re: How to bind a route to a network adapter and not IP

2012-06-17 Thread Etienne Robillard

On 06/17/2012 03:52 PM, Hans Petter Selasky wrote:

On Friday 15 June 2012 19:02:27 animelo...@gmail.com wrote:

Perhaps you can ask the very same question in another way so its easier
to understand why you losing packets? All in all I always thought TCP/IP
was the basic unit in Internet based networking but feel free to correct
me if you have any news I might have missed... :)

Also do you have any idea why AMD based CPUs could be vulnerable to this
alternative networking scheme and cause a remote denial service in fbsd
stable but not in CURRENT?

Thanks,

Etienne


Hi,

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.

--HPS


Hi Hans,

As per the usual PR triage workflow, I recommend you fill a bug report 
and add me to the CC list. :-)


And based on your comment I figure I'm not the only one to complain with 
recent FreeBSD TCP/IP based networking issues...


*** TEMPORARY SOLUTION *** WORKAROUND ***

As a workaround, or until FreeBSD has approved a WITHOUT_OFDM option,
I recommend you consider one of the following options:

1. Change your network adapter to Ethernet-class carrier for TCP/IP 
dynamic routing.


2. Switch to CCK modulation (if you really MUST stick with wireless IP 
encapsulation .)


% ifconfig netdev mode 11b
% man ifconfig(8) for more info.

In case you really want to stick with wireless based carrier (HIGHLY NOT 
RECOMMENDED for *ALL* FreeBSD users until it has been demonstrated that 
there is no privacy disclosure or potential health issues with any 
wireless frequency modulation scheme), consider using CCK modulation 
(802.11b) which should be point-to-point modulation scheme.


Btw I believe this is a separate issue than the previous OpenSSL/libpng 
remote vulnerability (sysret) discussed a few days ago but as you 
comment suggest this bug should only imply wireless-based devices

using the iEEE 802.11 stack for high-speed frequency modulation.

Regards,

Etienne

References
--

1. http://lists.freebsd.org/pipermail/freebsd-chat/2011-March/006577.html
2. https://gthc.org/wiki/Advisories/OFDM_20110315

--
Etienne Robillard
Occupation: Software Developer
Company:Green Tea Hackers Club
Email:  e...@gthcfoundation.org
Website:gthcfoundation.org
Skype ID:   incidah

Socialism is a philosophy of failure, the creed of ignorance, and the 
gospel of envy, its inherent virtue is the equal sharing of misery.

-- Winston Churchill
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: How to bind a route to a network adapter and not IP

2012-06-15 Thread animelovin

Perhaps you can ask the very same question in another way so its easier
to understand why you losing packets? All in all I always thought TCP/IP 
was the basic unit in Internet based networking but feel free to correct 
me if you have any news I might have missed... :)


Also do you have any idea why AMD based CPUs could be vulnerable to this 
alternative networking scheme and cause a remote denial service in fbsd 
stable but not in CURRENT?


Thanks,

Etienne



On 06/15/2012 12:19 PM, Hans Petter Selasky wrote:

Hi,

Maybe there is a simple answer, but how do I bind a route to a network
interface in 8-stable? Is that possible at all? I'm asking because the routes
I add in my network setup are lost because of ARP packet drops. I.E. they
exist for a while, but not forever like I want to.

--HPS
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org



___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: How to bind a route to a network adapter and not IP

2012-06-15 Thread Adam McDougall

On 06/15/12 12:19, Hans Petter Selasky wrote:

Hi,

Maybe there is a simple answer, but how do I bind a route to a network
interface in 8-stable? Is that possible at all? I'm asking because the routes
I add in my network setup are lost because of ARP packet drops. I.E. they
exist for a while, but not forever like I want to.

--HPS


Is route add x.x.x.x -iface em0   what you want?
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: How to bind a route to a network adapter and not IP

2012-06-15 Thread sthaug
 Perhaps you can ask the very same question in another way so its easier
 to understand why you losing packets? All in all I always thought TCP/IP 
 was the basic unit in Internet based networking but feel free to correct 
 me if you have any news I might have missed... :)

This is an old and well known problem, with no solution as of today
(unless you want to run quagga/zebra or similar).

With Cisco and Juniper (and probably lots of other big name) routers,
if I create a static route pointing to a next hop on one interface,
and the interface goes down (e.g. Ethernet cable is unplugged),

1. the static route is removed from the routing table.

But then, when the interface later comes back up

2. the static route is reinstalled in the routing table.

With FreeBSD point 1 above happens, but not point 2.

I would love to have the functionality where FreeBSD would reinstall
the route as in point 2 above. I think this is definitely the least
surprising behavior (POLA), and should happen even without running an
explicit routing system like quagga.

Steinar Haug, Nethelp consulting, sth...@nethelp.no

 
 On 06/15/2012 12:19 PM, Hans Petter Selasky wrote:
  Hi,
 
  Maybe there is a simple answer, but how do I bind a route to a network
  interface in 8-stable? Is that possible at all? I'm asking because the 
  routes
  I add in my network setup are lost because of ARP packet drops. I.E. they
  exist for a while, but not forever like I want to.
 
  --HPS
  ___
  freebsd-stable@freebsd.org mailing list
  http://lists.freebsd.org/mailman/listinfo/freebsd-stable
  To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
 
 
 ___
 freebsd-stable@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-stable
 To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org
 
___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org


Re: How to bind a route to a network adapter and not IP

2012-06-15 Thread Ruben de Groot
On Fri, Jun 15, 2012 at 07:54:52PM +0200, sth...@nethelp.no typed:
  Perhaps you can ask the very same question in another way so its easier
  to understand why you losing packets? All in all I always thought TCP/IP 
  was the basic unit in Internet based networking but feel free to correct 
  me if you have any news I might have missed... :)
 
 This is an old and well known problem, with no solution as of today
 (unless you want to run quagga/zebra or similar).
 
 With Cisco and Juniper (and probably lots of other big name) routers,
 if I create a static route pointing to a next hop on one interface,
 and the interface goes down (e.g. Ethernet cable is unplugged),
 
 1. the static route is removed from the routing table.
 
 But then, when the interface later comes back up
 
 2. the static route is reinstalled in the routing table.
 
 With FreeBSD point 1 above happens, but not point 2.
 
 I would love to have the functionality where FreeBSD would reinstall
 the route as in point 2 above. I think this is definitely the least
 surprising behavior (POLA), and should happen even without running an
 explicit routing system like quagga.

This can be quite easily programmed with kqueue, use EVFILT_NETDEV for
notices of interface up/down events and adjust the routing table
accordingly. Big chance Cisco and Juniper are doing something similar.

--
Ruben

___
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to freebsd-stable-unsubscr...@freebsd.org