Andrew McMillan wrote: > The problem will most likely be that "testping" is written to be very > fast by using options which are suited to pinging machines on a 10Mb or > better LAN.
OK, I will try that, but I am not sure, whether I have described well the problem. whereami testing proceeds well (and /etc/whereami/im correctly contains lines ppp,surfbest), but THEN when using fping/ping/dig/host on command line it is not able to find anything. What is even more strange is that even now, when I am on the university LAN the things doesn't work. When I do things manually, i.e.: cardctl insert ifconfig eth0 up dhclient eth0 I get working network connection (ping works like a charm -- although DNS resolution is still slow). However, when I use whereami (see attached .conf files) it agains detect things correctly (lan,dhcp,neu in iam file), but DNS resolution again doesn't work at all (see attached copy of stderr when running whereami). /sbin/dhclient is a link to /sbin/dhclient3 and otherwise everything is plain woody (setmailrelay script is from testing distribution -- I have exim here). Output from host -v neu.edu and /var/lib/dhcp3/dhclient.leases are also attached. Any thoughts? Matej -- Matej Cepl, Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC 138 Highland Ave. #10, Somerville, Ma 02143, (617) 623-1488 I know of no country in which there is so little independence of mind and real freedom of discussion as in America. -- Alexis de Tocqueville
eth0
# The (planned) detection configuration file for 'whereami' # $Id: detect.conf,v 1.3 2003/02/21 19:09:15 root Exp $ # # This file describes unique features of various environments you connect # to and associates them with those locations. # When a test is successful, no further tests will be conducted # until a subsequent 'if' or 'fi' statement, or if the line is preceded # by the word 'always' # # You may also set environment variables for the scripts (test and action) # subsequently called by whereami using "set <varname> <value>". # # See man 5 detect.conf for more information. # The entries below are examples only - you will need to add your own set DEBUGWHEREAMI 1 default unknown testmii eth0 lan # always testpci Lucent bogus1 # always testpci CMD docked,office if lan set INTERFACE eth0 testdhcp '*.*.*.*' dhcp testping 192.168.0.3 home else #testmodule ppp_deflate ppp fi if dhcp #testdhcp 192.10.*.* neu testping 192.10.244.11 neu #testdhcp 192.* mit fi if ppp set INTERFACE ppp0 # testing DNS server testping 198.6.1.6 surfbest #testping 198.6.1.6 volny fi
# Configuration file for setmailrelay of whereami # # # The DEFAULT_RELAY sets the fallback for the mailserver to relay through # DEFAULT_RELAY=smtp.surfbest.net # # The MAIL_SERVER chooses between sendmail, postfix and exim. If you omit # this the system will choose the one it first finds a configuration file # for, which is normally a safe approach. # MAIL_SERVER=exim
# Configuration for whereami during suspend and resume # # On suspend/resume, whereami will change to the location specified in # the config file for SUSPEND_LOCATION and RESUME_LOCATION. # If the location is 'auto', whereami performs location detection. A blank # location disables whereami for that event # # Uncomment to enable whereami detection on resume. # Note: the current apmd may send multiple resume events on wakeup for # Thinkpads, which results in whereami running twice. RESUME_LOCATION=auto # Use SUSPEND_LOCATION if you want to set a location on suspend. # Note: Your network card may already be suspended at this point, so # don't be too surprised if trying to unmount something does not work... #SUSPEND_LOCATION=undocked
+ /sbin/mii-tool eth0 + grep 'link ok' + exit 0 + IFACE=*.*.*.* + IP_ADDRESS=*.*.*.* + '[' '*.*.*.*' = '*.*.*.*' ']' + INTERFACE=eth0 + BASEDIR=/etc/whereami + PUMPFILE=/sbin/pump + DHCLIENT=/sbin/dhclient + '[' -x /sbin/pump ']' + '[' -x /sbin/dhclient ']' + /sbin/ifconfig eth0 + grep -q 'inet addr' ++ ps ax ++ grep dhclient ++ grep eth0 ++ cut -c-5 + dhcli_pid= 1126 1353 + '[' -n ' 1126 1353' ']' + kill 1126 1353 + ps ax + grep dhclient + grep -q eth0 + /sbin/dhclient -e eth0 Internet Software Consortium DHCP Client V3.0.1rc9 Copyright 1995-2001 Internet Software Consortium. All rights reserved. For info, please visit http://www.isc.org/products/DHCP Listening on LPF/lo/ Sending on LPF/lo/ Listening on LPF/eth0/00:e0:98:8a:e6:ca Sending on LPF/eth0/00:e0:98:8a:e6:ca Sending on Socket/fallback DHCPDISCOVER on lo to 255.255.255.255 port 67 interval 3 DHCPREQUEST on eth0 to 255.255.255.255 port 67 DHCPACK from 129.10.244.11 bound to 129.10.246.229 -- renewal in 1405 seconds. + ps ax + grep dhclient + grep -q eth0 ++ /sbin/ifconfig eth0 ++ head -2 ++ tail -1 ++ cut -d: -f2 ++ cut '-d ' -f1 + DHCP_ADDRESS=129.10.246.229 + '[' FOUND = FOUND ']' + exit 0 + IFACE=192.10.244.11 + IPTOUSE=192.10.244.11 + IPTOFIND=192.10.244.11 + '[' 192.10.244.11 = 192.10.244.11 ']' + INTERFACE=eth0 + ifconfig eth0 192.10.244.11 ++ fping -a -B2 -i5 -r5 -t30 192.10.244.11 + '[' 192.10.244.11 = 192.10.244.11 ']' + RESULT=0 + exit 0 Moving from eth0 to dhcp,neu,lan ++ LASTLOCN=eth0 ++ LOCATION=dhcp,neu,lan ++ setmailrelay smtp.neu.edu Setting mail relay host (smtp.neu.edu)
# # # # Sample configuration file for 'whereami' copyright Andrew McMillan, 1999 # # # Surfbest =surfbest setmailrelay smtp.surfbest.net #+surfbest setresolver search surfbest.net # tohle je nastavení, které doporu?uje www.surfbest.net pro MAC OS7 #=surfbest setresolver search surfbest.net nameserver 209.63.0.2 nameserver 207.173.86.2 # Volný.cz =volny setmailrelay smtp.volny.cz =volny setresolver search volny.cz nameserver 212.20.96.34 nameserver 212.20.96.38 # NEU =neu setmailrelay smtp.neu.edu #=neu setresolver search neu.edu nameserver 129.10.1.49 nameserver 155.33.33.62 #=neu route add -host 127.0.0.1 lo # Doma +home setresolver +home setmailrelay queue smtp.surfbest.net +home /etc/init.d/nfs-kernel-server start -home /etc/init.d/nfs-kernel-server stop =unknown setmailrelay queue
lease { interface "eth0"; fixed-address 129.10.246.229; option subnet-mask 255.255.252.0; option dhcp-lease-time 3000; option routers 129.10.244.11; option dhcp-message-type 5; option dhcp-server-identifier 155.33.37.33; option domain-name-servers 129.10.1.49,129.10.1.13,155.33.37.33,155.33.33.62; option dhcp-renewal-time 1500; option dhcp-rebinding-time 2625; option netbios-name-servers 155.33.32.31,155.33.32.32; option domain-name "neu.edu"; option netbios-node-type 8; renew 1 2003/2/24 17:50:00; rebind 1 2003/2/24 18:10:20; expire 1 2003/2/24 18:16:35; } lease { interface "eth0"; fixed-address 129.10.246.229; option subnet-mask 255.255.252.0; option routers 129.10.244.11; option dhcp-lease-time 3000; option dhcp-message-type 5; option domain-name-servers 129.10.1.49,129.10.1.13,155.33.37.33,155.33.33.62; option dhcp-server-identifier 155.33.37.33; option dhcp-renewal-time 1500; option dhcp-rebinding-time 2625; option netbios-name-servers 155.33.32.31,155.33.32.32; option netbios-node-type 8; option domain-name "neu.edu"; renew 1 2003/2/24 17:49:38; rebind 1 2003/2/24 18:14:02; expire 1 2003/2/24 18:20:17; }
Trying "neu.edu" ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 40193 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 6, ADDITIONAL: 6 ;; QUESTION SECTION: ;neu.edu. IN A ;; ANSWER SECTION: neu.edu. 28800 IN A 155.33.227.140 ;; AUTHORITY SECTION: neu.edu. 28800 IN NS chaos.dac.neu.edu. neu.edu. 28800 IN NS order.neu.edu. neu.edu. 28800 IN NS amber.ccs.neu.edu. neu.edu. 28800 IN NS dnsauth1.sys.gtei.net. neu.edu. 28800 IN NS dnsauth2.sys.gtei.net. neu.edu. 28800 IN NS dnsauth3.sys.gtei.net. ;; ADDITIONAL SECTION: chaos.dac.neu.edu. 28800 IN A 129.10.1.13 order.neu.edu. 28800 IN A 155.33.37.31 amber.ccs.neu.edu. 28800 IN A 129.10.116.51 dnsauth1.sys.gtei.net. 1661 IN A 4.2.49.2 dnsauth2.sys.gtei.net. 108434 IN A 4.2.49.3 dnsauth3.sys.gtei.net. 150306 IN A 4.2.49.4 Received 286 bytes from 129.10.1.13#53 in 6 ms
search neu.edu nameserver 129.10.1.49 nameserver 129.10.1.13 nameserver 155.33.37.33 nameserver 155.33.33.62
order hosts,bind multi on