From owner-freebsd-questions@FreeBSD.ORG Sun Dec 25 14:02:59 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E875216A41F for ; Sun, 25 Dec 2005 14:02:58 +0000 (GMT) (envelope-from yuanjue02@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 93C3843D79 for ; Sun, 25 Dec 2005 14:02:55 +0000 (GMT) (envelope-from yuanjue02@gmail.com) Received: by zproxy.gmail.com with SMTP id q3so335061nzb for ; Sun, 25 Dec 2005 06:02:54 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:organization:to:subject:date:user-agent:references:in-reply-to:cc:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=Oaf/fw/Txnyk45WgZ8ZRxwky2J1b5zuv6qj62JoVcClyOvKZ2zkWJA5hvaGD7MRj1QmDCh5YVL+jRe3iZtamzcizJB9BAg5+6zfD/5pwMBJJYMFBwoE+axFwmFSxkdHvYv4Vc3Okl9EhHL1PR0Bh4hAud8RQznUczFzIJuL5XmM= Received: by 10.37.18.66 with SMTP id v66mr2135545nzi; Sun, 25 Dec 2005 06:02:54 -0800 (PST) Received: from tu208241.ip.tsinghua.edu.cn ( [166.111.208.241]) by mx.gmail.com with ESMTP id 15sm3517298nzo.2005.12.25.06.02.52; Sun, 25 Dec 2005 06:02:54 -0800 (PST) From: Yuan Jue Organization: Tsinghua UNIV. To: Erik =?iso-8859-1?q?N=F8rgaard?= Date: Sun, 25 Dec 2005 22:05:33 +0800 User-Agent: KMail/1.8.3 References: <200512251530.21898.yuanjue02@gmail.com> <200512252047.35934.yuanjue02@gmail.com> <43AE95ED.9040407@locolomo.org> In-Reply-To: <43AE95ED.9040407@locolomo.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512252205.33644.yuanjue02@gmail.com> Cc: freebsd-questions@freebsd.org Subject: Re: Wireless NIC in FreeBSD 6.0 ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Dec 2005 14:02:59 -0000 On Sunday 25 December 2005 20:51, you wrote: > Yuan Jue wrote: > > On Sunday 25 December 2005 19:53, you wrote: > > yes. they are not on the same LAN. > > but when I use my local NIC to connect the internet, everything is fine. > > the following is how my local NIC works: > > > > YuanJue@~$ ifconfig > > bge0: flags=8843 mtu 1500 > > options=1a > > inet 166.111.208.204 netmask 0xfffffe00 broadcast 166.111.209.255 > > ether 00:0d:9d:90:e0:68 > > media: Ethernet autoselect (100baseTX ) > > status: active > > lo0: flags=8049 mtu 16384 > > inet 127.0.0.1 netmask 0xff000000 > > YuanJue@~$ ping 166.111.8.28 > > PING 166.111.8.28 (166.111.8.28): 56 data bytes > > 64 bytes from 166.111.8.28: icmp_seq=0 ttl=251 time=0.525 ms > > > > why does this work? it has the same netmask and broadcast address > > as the wireless NIC. Any more explanations? > > OK, now, if you have two nic's configured for the same lan things get > wierd. Try > > # ifconfig bge0 down > > And, check that default route is set correctly. > > I think the default route binds not only to an ip but also to the > interface that connects to that network, so maybe you have configured > both bge0 and ath0 and default route set to go out bge0. Now, when you > disconnect bge0 and try to ping, your ping is not sent on ath0 as you > might think but on bge0. > > To check this kind of problems, use snort to sniff what's actually > leaving your interface. one more question since I use a fixed IP address in my dormitory and a dynamic IP address in the classroom or library, i need to change my local NIC configure from time to time. In fact, I use the fixed IP address as my default setting, which is as follows: YuanJue@~$ ifconfig bge0: flags=8802 mtu 1500 options=1a inet 59.66.138.109 netmask 0xffffff00 broadcast 59.66.138.255 ether 00:0d:9d:90:e0:68 media: Ethernet autoselect (none) status: no carrier as you can see, it is totally different from the dynamic IP address I can get. and when I go to a classroom, I use DHCP to change my bge0 settings. now the question is: since I wanna use my wireless NIC, it seems that it is not enough that just close bge0 down at this time. using command "route -n get default" i get: YuanJue@~$ route -n get default route to: default destination: default mask: default gateway: 59.66.138.1 interface: bge0 flags: recvpipe sendpipe ssthresh rtt,msec rttvar hopcount mtu expire 0 0 0 0 0 0 1500 0 YuanJue@~$ so even I have shutted bge0 down, the ping still cannot work correctly. how can I get things right here? I think maybe i can change the interface using by route but "route -q change interface ath0" doesn't work. it says: YuanJue# route -q change interface ath0 route: bad address: interface YuanJue# what is the right way to do it? or is there any better solution for my situation? thanks. -- Best Regards. Yuan Jue