X-Account-Key: account1 X-UIDL: 37120 X-Mozilla-Keys: Return-Path: os2-wireless_users-owner@2rosenthals.com Received: from 192.168.100.5 (hawking [192.168.100.5]) by 2rosenthals.com (Hethmon Brothers Smtpd) id 20041210162804-10267-10 ; Fri, 10 Dec 2004 16:28:04 -0500 (Hethmon Brothers Smtpd) id 20041210162803-62998-10 ; Fri, 10 Dec 2004 16:28:03 -0500 Received: from mx1.mailhop.org ([63.208.196.170]) by mxout4.mailhop.org with esmtp (Exim 4.43) id 1CcsJS-000Hd1-4A for os2-wireless_users@2rosenthals.com; Fri, 10 Dec 2004 16:28:31 -0500 Received: from waldorf.webpack.hosteurope.de ([217.115.142.71]) by mx1.mailhop.org with esmtp (Exim 4.42) id 1CcsJR-000FVF-Sn for os2-wireless_users@2rosenthals.com; Fri, 10 Dec 2004 16:28:30 -0500 Received: by waldorf.webpack.hosteurope.de running Exim 4.34 using asmtp (TLSv1:RC4-MD5:128) from p5084a2ed.dip0.t-ipconnect.de ([80.132.162.237] helo=clanganke.de) id 1CcsJL-0004O6-WA; Fri, 10 Dec 2004 22:28:24 +0100 Message-ID: <41BA14A6.6030407@clanganke.de> User-Agent: Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.4a) Gecko/20030401 X-Accept-Language: en MIME-Version: 1.0 References: <200412101711.iBAHBFi24319@ruby.fltg.net> In-Reply-To: <200412101711.iBAHBFi24319@ruby.fltg.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mail-Handler: MailHop by DynDNS.org X-Spam-Score: -2.6 (--) Date: Fri, 10 Dec 2004 22:27:02 +0100 Sender: os2-wireless_users-owner X-Listname: os2-wireless_users@2rosenthals.com Reply-To: os2-wireless_users@2rosenthals.com From: Christian Langanke To: os2-wireless_users@2rosenthals.com Subject: [OS2Wireless] How to switch between wired and wireless interface by XWLAN (was Re: thanks to all) X-List-Unsubscribe: Send email to mailusers-request@2rosenthals.com X-List-Owner: mailusers-owner@2rosenthals.com Julian Thomas wrote: >Better yet, I'll paste them in here. wireless.cmd and wired.cmd do the >obvious things. wired is lan0; cisco is lan1. > > Please somebody tell me why it should be necessary to switch between wireless and wired configurations like shown in the scripts of the mail I am quoting here. XWLAN does 95% of the "obvious" things already, once you only configure it to do so. Just configure the connection profile to be used to DHCP configuration by XWLAN, and configure the proper interface in the widget properties (!!). Also better don't configure the wireless IP interface in the TCP/IP configuration. The only thing that is currently missing for a true (half-)automated switch between wired and wireless interface/connection is that no DHCP request for the wired interface is automatically fired off when switching away from wireless. Here the script feature of XWLAN can (as a workaround) be (mis)used to execute such a call when the connection and TCP/IP configuration over WLAN has been interrupted. Once this is set up (see below), you can (half-)automatically switch between wired and wireless connection by just pulling or pluggin the wireless PCMCIA card or enable/disable radio for a built-in device. To make things clearer, here is the configuration scheme of XWLAN in detail. Taken that you choose XWLAN to perform DHCP configuration for the wireless IP interface, the XWLAN script, once being activated and provided (that is, copy one of the examples into the script directory [I recommend the REXX script !] and edit according to your needs, see the online help), this script is called for disconnect and connect events. ---------> WLAN disconnect event when this is called, XWLAN has already done the following (where lanx is the wireless interface): dhcpmon /l dhcpmon /t ifconfig lanx delete arp -f A "route -fh" is not necessary, here as the "dhcpmon /l" will release the DHCP lease for the wireless interface, this will already reset all routes pointing to/over that interface. In order to automatically launch DHCP for the wired interface here, you would have to execute "dhcpstrt lany -d 0" within the connect event part of your XWLAN script, where lany is the wired IP interface. Do not specify a delaywith -d here, otherwise the GUI of the widget will be blocked unnecessarily. ---------> WLAN connect event when this is called, XWLAN has already done the following (where lanx is the wireless interface. Don't mind that the unconfiguration sequence from above [first four commands here] is completely executed here as well for safety): dhcpmon /l dhcpmon /t ifconfig lanx delete arp -f dhcpstrt -i lanx -d 0 For this case the dhcpmon /l and /t will already completely unconfigure the wired IP interface, so there is no need to add commands for it here. ----- I think it may make more sense switching to that kind of automated setup instead of using own scripts, as once the XWLAN solution fits everybodys needs, nobody is required anymore to fiddle around with IP configuration commands anymore. I would like to see XWLAN be a bullet as well as a fool-proof solution, and only the experienced users, like you are, can help me to achieve this. Please try out the XWLAN way, and if it does not fit your needs, tell me and we discuss whatever solution is required. BTW, I intend to also make that above stated dhcpstrt command for the wired interface in an XWLAN script obsolete as well in a forthcoming release. If that succeeds, I think at least then really no script for any IP configuration is required anymore to switch between cabled and wireless interfaces. In fact the XWLAN script engine was intended to start/end user applications only.... Moreover, I just started to code cleanup routines for the routing and arp table to not any longer rely on dhcpmon /l (or route -fh) or the "arp -f" command. Instead the cleanup routines I now work on will kick out exactly only these entries being related to the IP interface to be disabled, leaving everything else alone. bye, Christian ------------------------------------------------- Christian Langanke COS2E & CWSE Team OS/2 Ruhr e.V. cla@clanganke.de =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= To unsubscribe from this list, send a message to steward@2rosenthals.com with the command "unsubscribe os2-wireless_users" in the body (omit the quotes). For help with other commands, send a message to steward@2rosenthals.com with the command "help" in the body (omit the quotes). This list is hosted by Rosenthal & Rosenthal P.O. Box 281, Deer Park, NY 11729-0281. Non- electronic communications related to content contained in these messages should be directed to the above address. (CAN-SPAM Act of 2003) =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=