Wireless NIC in FreeBSD 6.0 ?
Yuan Jue
yuanjue02 at gmail.com
Sun Dec 25 06:02:59 PST 2005
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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> > options=1a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
> > inet 166.111.208.204 netmask 0xfffffe00 broadcast 166.111.209.255
> > ether 00:0d:9d:90:e0:68
> > media: Ethernet autoselect (100baseTX <full-duplex>)
> > status: active
> > lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> 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<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
options=1a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
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: <UP,GATEWAY,DONE,STATIC>
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
More information about the freebsd-questions
mailing list