From owner-freebsd-mobile Sat Aug 25 10:35:39 2001 Delivered-To: freebsd-mobile@freebsd.org Received: from air.linkclub.or.jp (air.linkclub.or.jp [210.250.19.40]) by hub.freebsd.org (Postfix) with ESMTP id 2D16C37B407; Sat, 25 Aug 2001 10:35:34 -0700 (PDT) (envelope-from toshi@jp.FreeBSD.org) Received: from localhost.jp.FreeBSD.org (1Cust148.tnt1.hanno.jp.da.uu.net [63.12.195.148]) by air.linkclub.or.jp (8.11.4/8.11.4) with ESMTP id f7PHZ5W08591; Sun, 26 Aug 2001 02:35:06 +0900 (JST) (envelope-from toshi@jp.FreeBSD.org) Date: Sun, 26 Aug 2001 02:32:54 +0900 (JST) Message-Id: <200108251732.f7PHWst26260.toshi@jp.FreeBSD.org> From: Toshihiko ARAI To: nate@yogotech.com (Nate Williams) Cc: freebsd-mobile@FreeBSD.org, imp@FreeBSD.org Subject: Re: Documentation for rc.conf's removable_interfaces? In-Reply-To: <15237.14941.939157.115769@nomad.yogotech.com> References: <15228.2988.181554.313833@nomad.yogotech.com> <200108200357.f7K3vMn18594.toshi@jp.FreeBSD.org> <15233.22136.524384.459698@nomad.yogotech.com> <200108211348.f7LDmTh30188.toshi@jp.FreeBSD.org> <15234.48176.6699.983659@nomad.yogotech.com> <200108231653.f7NGrO802605.toshi@jp.FreeBSD.org> <15237.14941.939157.115769@nomad.yogotech.com> X-Mailer: VM 5.96 (beta) / Mule 2.3 (SUETSUMUHANA) based on 19.34.1 Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Thank you for my patch commit. + <15237.14941.939157.115769@nomad.yogotech.com>, Nate Williams wrote: >> > ps. The below patch is good, although it may be necessary to do a route >> > flush in certain cases. >> >> When I do hot-plug of PC-card Ethernet and USB Ethernet with >> more than one environment, former route is left and may become >> a problem. > The same problem exists with me. >> Therefore I was able to control it with >> 'removable_route_flush' variable. >> There is a method to add 'removable_route_flush=NO' to >> /etc/defaults/rc.conf, but which is better compared with below patch? >> >> >> - # Clean the routing table >> >> - case ${removable_route_flush} in >> >> - [Nn][Oo]) >> >> - ;; >> >> - *) >> >> - # flush beforehand, just in case.... >> >> - route -n flush -inet >> >> - ;; >> >> - esac > This means we have the potential for two new variables not (yet) in > -stable. > removable_interfaces (which I still don't know what it's supposed to > do), and removable_route_flush, which is still not generic enough to > work in all cases. I think that removable_interfaces is unnecessary really. However, I feel removable_route_flush useful. Of course you may change variable name to a fitter thing. When there is only one network interface to use simultaneously, we have only to add line of 'removable_route_flush=YES' to rc.conf. When a card was removed, all the old route is cleaned. In addition, so far this was action of default. > In particular, in one situation, I have 2 network cards in my computer. > If one type of card is removed (my test network), the routes should not > be touched. However, if I remove/insert one the other cards (wireless > and/or ethernet for connection to the net), I need the route added > and/or removed. In this case you can use static_routes_ for replacement of defaultrouter. This variable is the thing which I added anew, you replace it in real interface name and describe it in rc.conf as follows. static_routes_ed1="net1" route_net1="default 11.22.33.44" removable_route_flush="NO" In this setting, route is not changed for the card which is not equal to interface name (ed1). Of course when a card was removed, it does not do route flush, and deletes route according to setting of variable. I'm sorry. It is description lack till now. I think that manual of /etc/pccard_ether is necessary. > Having the route explicitly removed/added when I insert/remove cards > does not work. However, I suspect this is not a 'common' situation, so > I don't believe the code needs to support it. > The code *does* need to support normal activities for laptops, and for > most people I suspect that means adding/removing the default route when > a network card is inserted/removed. > Do others have an opinion on this? What is the default behavior > 'out-of-the-box' that FreeBSD should support when a network card is > inserted? For 4.4, I don't think we have time to get it working in all > cases, but the current setup doesn't work in the normal case. > Insertion: > 1) DHCP should be supported (of course) > 2) If DHCP is not used, should FreeBSD add a default route > Removal > 1) DHCP leases are lost > 2) Should the default route be flushed (I'm not sure DHCP does this for us)? I think that it is YES for a beginner. -- Toshihiko ARAI To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message