Re: Wireless NIC in FreeBSD 6.0 ?
On Wednesday 28 December 2005 21:54, Erik Norgaard wrote: Yuan Jue wrote: It appears you can set some default values: default { [option declaration] [, ... option declaration] } If for some set of options the client should use the value sup- plied by the server, but needs to use some default value if no value was supplied by the server, these values can be defined in the default statement. I would assume that if you set defaults this way, defaults will also take place if no lease is obtained at all - at least that would be very usefull. Something like this I guess: interface bge0 { default { fixed-address your-fixed-ip-here; subnet-mask your-fixed-subnet-mask-here; ... } } sorry, I still don't quite get what you mean. it seems my default setting is this though it is not written in dhclient.conf. how can I configure the wireless interface to use DHCP in dhclient.conf? like as follows? The dhclient.conf does not contain any interface configuration values unless you write it. dhcp automatically reads dhclient.conf on startup, so you just need to enable dhcp for the interfaces you want configured. In rc.conf insert interface_ath0=DHCP interface_bge0=DHCP Create dhclient.conf like this interface ath0 { default { ... the default configuration for your wireless nic ... } } interface bge0 { default { ... the default configuration for your wired nic ... } } No need to mention any scripts in dhclient.conf. In the default configuration you need to specify at least: ip address, netmask, router and nameserver, see dhclient.conf(5) for the names of those variables. You only need to create an interface specific section if you need to configure the nic with values other than those provided by the dhcp server. If your ath0 is always configured with dhcp (as I understood) and you are happy with that, no need to make that section in the dhclient.conf - or keep it empty. Then run # /etc/rc.d/netif restart thanks for your kind suggestions :) it is very useful. but, in my situation, there are two things needed to mention: 1. normally the wireless NIC is not in the kernel when system boots, so no need to if_ath0=DHCP every time 2. usually I use my laptop in dormitory with a static IP address. so no need to if_bge0=DHCP every time finally, I figure out that ifconfig bge0 delete before I wanna use the wireless NIC would sound better for me :) -- Best Regards. Yuan Jue ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Wireless NIC in FreeBSD 6.0 ?
On Monday 26 December 2005 16:56, Erik Norgaard wrote: Yuan Jue wrote: On Sunday 25 December 2005 23:15, Erik Nørgaard wrote: Yuan Jue wrote: 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: what is the right way to do it? or is there any better solution for my situation? Try to take a look at dhclient.conf(5) and dhclient(8) and set all interfaces to be configured with dhcp. I think it should be posible to configure default values so there is something to fall back on if a lease is not obtained. Note that dhclient is new in FBSD 6, this is also why you had to take down the other interface. The old dhclient would reset all dhcp configured interfaces, the new doesn't, which is quite neat because usually you would have the two interfaces connected to /different/ networks. thanks for your explanations about DHCP in FreeBSD 6.0, although I still cannot find a way to config dhclient.conf to solve my problem :) Of course I guess you read the man-page, but maybe you didn't see this: yes, i do The dhclient.conf file can be used to configure the behaviour of the client in a wide variety of ways: protocol timing, information requested from the server, information required of the server, defaults to use if the server does not provide certain information, values with which to override information provided by the server, or values to prepend or append to information provided by the server. The configuration file can also be preinitialized with addresses to use on networks that do not have DHCP servers. It appears you can set some default values: default { [option declaration] [, ... option declaration] } If for some set of options the client should use the value sup- plied by the server, but needs to use some default value if no value was supplied by the server, these values can be defined in the default statement. I would assume that if you set defaults this way, defaults will also take place if no lease is obtained at all - at least that would be very usefull. Something like this I guess: interface bge0 { default { fixed-address your-fixed-ip-here; subnet-mask your-fixed-subnet-mask-here; ... } } sorry, I still don't quite get what you mean. it seems my default setting is this though it is not written in dhclient.conf. You might want to toggle timeout so defaults take effect faster. If both interfaces are configured with dhcp then dhclient will unconfigure the interface if there is no connection be it wired or wireless and the configuration of the working interface should take effect. how can I configure the wireless interface to use DHCP in dhclient.conf? like as follows? interface ath0 { default { script /etc/dhclient-script; } } looking forward more explanations thanks -- Best Regards. Yuan Jue ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Wireless NIC in FreeBSD 6.0 ?
Yuan Jue wrote: It appears you can set some default values: default { [option declaration] [, ... option declaration] } If for some set of options the client should use the value sup- plied by the server, but needs to use some default value if no value was supplied by the server, these values can be defined in the default statement. I would assume that if you set defaults this way, defaults will also take place if no lease is obtained at all - at least that would be very usefull. Something like this I guess: interface bge0 { default { fixed-address your-fixed-ip-here; subnet-mask your-fixed-subnet-mask-here; ... } } sorry, I still don't quite get what you mean. it seems my default setting is this though it is not written in dhclient.conf. how can I configure the wireless interface to use DHCP in dhclient.conf? like as follows? The dhclient.conf does not contain any interface configuration values unless you write it. dhcp automatically reads dhclient.conf on startup, so you just need to enable dhcp for the interfaces you want configured. In rc.conf insert interface_ath0=DHCP interface_bge0=DHCP Create dhclient.conf like this interface ath0 { default { ... the default configuration for your wireless nic ... } } interface bge0 { default { ... the default configuration for your wired nic ... } } No need to mention any scripts in dhclient.conf. In the default configuration you need to specify at least: ip address, netmask, router and nameserver, see dhclient.conf(5) for the names of those variables. You only need to create an interface specific section if you need to configure the nic with values other than those provided by the dhcp server. If your ath0 is always configured with dhcp (as I understood) and you are happy with that, no need to make that section in the dhclient.conf - or keep it empty. Then run # /etc/rc.d/netif restart Cheers, Erik -- Ph: +34.666334818 web: www.locolomo.org S/MIME Certificate: www.daemonsecurity.com/ca/8D03551FFCE04F06.crt Subject ID: 9E:AA:18:E6:94:7A:91:44:0A:E4:DD:87:73:7F:4E:82:E7:08:9C:72 Fingerprint: 5B:D5:1E:3E:47:E7:EC:1C:4C:C8:3A:19:CC:AE:14:F5:DF:18:0F:B9 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Wireless NIC in FreeBSD 6.0 ?
On 2005-12-28 21:32, Yuan Jue [EMAIL PROTECTED] wrote: how can I configure the wireless interface to use DHCP in dhclient.conf? like as follows? interface ath0 { default { script /etc/dhclient-script; } } You don't. An interface is not configured to use DHCP by modifying dhclient.conf. The dhclient.conf file is used by dhclient to find out *options* for interfaces that are configured to use DHCP in the /etc/rc.conf file. The rc.conf file is the one you have to edit make sure that it contains something like: ifconfig_ath0=DHCP Then, when dhclient *is* started for 'ath0' it will read the file /etc/dhclient.conf looking for a matching set of options. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Wireless NIC in FreeBSD 6.0 ?
On Tuesday 27 December 2005 00:12, Giorgos Keramidas wrote: On 2005-12-26 11:07, Yuan Jue [EMAIL PROTECTED] wrote: instead, I figure out another way to work around. 1.ifconfig bge0 delete % this would shut my local NIC down totally 2.kldload if_ath dhclient ath0 then I can enjoy the wireless internet surfing :) antway, thank you again! FWIW, On my laptop, which has to switch between a couple of wireless networks and my local LAN at home, I use custom shell scripts called ``/root/net/*.sh'' to encapsulate the changes I'd have to manually make. I have prepared working sets of files, like: /etc/resolv.conf_home /etc/resolv.conf_work and then run /root/net/home.sh which contains: #!/bin/sh if test -n $1 test -f /root/netstart-home-$1.sh ; then mode=$1 else mode=wlan fi echo ## Stopping local services /etc/rc.d/named stop /etc/rc.d/sendmail stop echo ## Setting up /etc and /usr/local/etc files ( cd /etc; cp resolv.conf_home resolv.conf; cp dhclient.conf_home dhclient.conf; cp namedb/named.conf_home namedb/named.conf; cd /usr/local/etc/postfix; cp main.cf_home main.cf; ) echo ## Bringing up the network connection /root/net/netstart-home-${mode}.sh echo ## Refreshing the firewall rules /etc/rc.d/pf reload echo ## Starting local services again /etc/rc.d/named start /etc/rc.d/sendmail start The real work is done by netstart-home-wlan.sh or netstart-home-wlan.sh. The wlan script is the one that sets up a wireless connection, and contains: #!/bin/sh # Default setup for my bge0 interface. export ifconfig_ath0=DHCP ssid 'gker' \ wepmode on weptxkey 1 wepkey '1:0xXX' export defaultrouter=192.168.1.2 /etc/rc.d/netif stop bge0 /etc/rc.d/netif stop ath0 echo -n Waiting for ath0 to associate _timeout=0 _associated=NO while [ $_timeout -lt 30 ]; do status=$( ifconfig ath0 21 | grep status: |\ awk '{print $2}' ) if [ X${status} = Xassociated ]; then _associated=YES break fi echo -n '.' sleep 1 _timeout=$(( $_timeout + 1 )) done if [ X${_associated} = XYES ]; then echo ok else echo '' echo Failed to bring up ath0. Aborting. /etc/rc.d/netif stop ath0 exit 1 fi # # The default route may be pointing to another interface. Find out # the IP address of the default gateway, delete it and point to the # default gateway of my home network. # if [ -n ${defaultrouter} ]; then _oldrouter=`netstat -rn | grep default | awk '{print $2}'` if [ -n ${_oldrouter} ]; then route delete default ${_oldrouter} unset _oldrouter fi route add default $defaultrouter fi This seems to work remarkably well so far. All I need to do once the laptop boots is to log in as root and run the proper /root/net/*.sh script :) thanks for your shell scripts. it is very appreciated. thanks again :) -- Best Regards. Yuan Jue ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Wireless NIC in FreeBSD 6.0 ?
Yuan Jue wrote: On Sunday 25 December 2005 23:15, Erik Nørgaard wrote: Yuan Jue wrote: 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: what is the right way to do it? or is there any better solution for my situation? Try to take a look at dhclient.conf(5) and dhclient(8) and set all interfaces to be configured with dhcp. I think it should be posible to configure default values so there is something to fall back on if a lease is not obtained. Note that dhclient is new in FBSD 6, this is also why you had to take down the other interface. The old dhclient would reset all dhcp configured interfaces, the new doesn't, which is quite neat because usually you would have the two interfaces connected to /different/ networks. thanks for your explanations about DHCP in FreeBSD 6.0, although I still cannot find a way to config dhclient.conf to solve my problem :) Of course I guess you read the man-page, but maybe you didn't see this: The dhclient.conf file can be used to configure the behaviour of the client in a wide variety of ways: protocol timing, information requested from the server, information required of the server, defaults to use if the server does not provide certain information, values with which to override information provided by the server, or values to prepend or append to information provided by the server. The configuration file can also be preinitialized with addresses to use on networks that do not have DHCP servers. It appears you can set some default values: default { [option declaration] [, ... option declaration] } If for some set of options the client should use the value sup- plied by the server, but needs to use some default value if no value was supplied by the server, these values can be defined in the default statement. I would assume that if you set defaults this way, defaults will also take place if no lease is obtained at all - at least that would be very usefull. Something like this I guess: interface bge0 { default { fixed-address your-fixed-ip-here; subnet-mask your-fixed-subnet-mask-here; ... } } You might want to toggle timeout so defaults take effect faster. If both interfaces are configured with dhcp then dhclient will unconfigure the interface if there is no connection be it wired or wireless and the configuration of the working interface should take effect. However, in any case you should expect wierd things if both interfaces are up, and in particular for the same network. I don't know how dhclient handles that. Let me know if the above works, it's always good to have this kind of examples in the archive. Cheers, Erik -- Ph: +34.666334818 web: www.locolomo.org S/MIME Certificate: www.daemonsecurity.com/ca/8D03551FFCE04F06.crt Subject ID: 9E:AA:18:E6:94:7A:91:44:0A:E4:DD:87:73:7F:4E:82:E7:08:9C:72 Fingerprint: 5B:D5:1E:3E:47:E7:EC:1C:4C:C8:3A:19:CC:AE:14:F5:DF:18:0F:B9 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Wireless NIC in FreeBSD 6.0 ?
On 2005-12-26 11:07, Yuan Jue [EMAIL PROTECTED] wrote: instead, I figure out another way to work around. 1.ifconfig bge0 delete % this would shut my local NIC down totally 2.kldload if_ath dhclient ath0 then I can enjoy the wireless internet surfing :) antway, thank you again! FWIW, On my laptop, which has to switch between a couple of wireless networks and my local LAN at home, I use custom shell scripts called ``/root/net/*.sh'' to encapsulate the changes I'd have to manually make. I have prepared working sets of files, like: /etc/resolv.conf_home /etc/resolv.conf_work and then run /root/net/home.sh which contains: #!/bin/sh if test -n $1 test -f /root/netstart-home-$1.sh ; then mode=$1 else mode=wlan fi echo ## Stopping local services /etc/rc.d/named stop /etc/rc.d/sendmail stop echo ## Setting up /etc and /usr/local/etc files ( cd /etc; cp resolv.conf_home resolv.conf; cp dhclient.conf_home dhclient.conf; cp namedb/named.conf_home namedb/named.conf; cd /usr/local/etc/postfix; cp main.cf_home main.cf; ) echo ## Bringing up the network connection /root/net/netstart-home-${mode}.sh echo ## Refreshing the firewall rules /etc/rc.d/pf reload echo ## Starting local services again /etc/rc.d/named start /etc/rc.d/sendmail start The real work is done by netstart-home-wlan.sh or netstart-home-wlan.sh. The wlan script is the one that sets up a wireless connection, and contains: #!/bin/sh # Default setup for my bge0 interface. export ifconfig_ath0=DHCP ssid 'gker' \ wepmode on weptxkey 1 wepkey '1:0xXX' export defaultrouter=192.168.1.2 /etc/rc.d/netif stop bge0 /etc/rc.d/netif stop ath0 echo -n Waiting for ath0 to associate _timeout=0 _associated=NO while [ $_timeout -lt 30 ]; do status=$( ifconfig ath0 21 | grep status: |\ awk '{print $2}' ) if [ X${status} = Xassociated ]; then _associated=YES break fi echo -n '.' sleep 1 _timeout=$(( $_timeout + 1 )) done if [ X${_associated} = XYES ]; then echo ok else echo '' echo Failed to bring up ath0. Aborting. /etc/rc.d/netif stop ath0 exit 1 fi # # The default route may be pointing to another interface. Find out # the IP address of the default gateway, delete it and point to the # default gateway of my home network. # if [ -n ${defaultrouter} ]; then _oldrouter=`netstat -rn | grep default | awk '{print $2}'` if [ -n ${_oldrouter} ]; then route delete default ${_oldrouter} unset _oldrouter fi route add default $defaultrouter fi This seems to work remarkably well so far. All I need to do once the laptop boots is to log in as root and run the proper /root/net/*.sh script :) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Wireless NIC in FreeBSD 6.0 ?
Yuan Jue [EMAIL PROTECTED] wrote: Does anybody success to use wireless NIC in FreeBSD6.0 in HP NC6000? Back to FreeBSD 5.4, my wireless card just works, but not in FreeBSD 6.0. I use the following steps to try to use my wireless card: 1.change to root, then kldload if_ath after this, I can use kldstat to see this: Id Refs AddressSize Name 19 0xc040 328db0 kernel 21 0xc0729000 bc40 kqemu.ko 3 16 0xc0735000 5683cacpi.ko 61 0xc296a000 e000 if_ath.ko 71 0xc2978000 3000 ath_rate.ko 81 0xc297b000 24000ath_hal.ko and use ifconfig to see this: bge0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 options=1aTXCSUM,VLAN_MTU,VLAN_HWTAGGING inet 166.111.208.143 netmask 0xfe00 broadcast 166.111.209.255 ether 00:0d:9d:90:e0:68 media: Ethernet autoselect (100baseTX full-duplex) status: active lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 16384 inet 127.0.0.1 netmask 0xff00 ath0: flags=8802BROADCAST,SIMPLEX,MULTICAST mtu 1500 ether 00:11:85:1b:21:79 media: IEEE 802.11 Wireless Ethernet autoselect status: no carrier ssid channel 1 authmode OPEN privacy OFF txpowmax 100 protmode CTS 2.I use DHCP to get my IP address. dhclient ath0 the response is this: DHCPREQUEST on ath0 to 255.255.255.255 port 67 DHCPREQUEST on ath0 to 255.255.255.255 port 67 DHCPREQUEST on ath0 to 255.255.255.255 port 67 DHCPACK from 166.111.208.1 bound to 166.111.208.137 -- renewal in 3600 seconds. and use ifconfig can see: ath0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 inet 166.111.208.137 netmask 0xfe00 broadcast 166.111.209.255 ether 00:11:85:1b:21:79 media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/36Mbps) status: associated ssid A314b channel 11 bssid 00:09:5b:d1:fa:c4 authmode OPEN privacy OFF txpowmax 30 protmode CTS bintval 100 it seems that the wireless NIC should be working now, right? but when i try to ping some IP which definitely should be connected from the IP address I have got, like : ping 166.111.8.28 (this is the DNS server) the result is this: PING 166.111.8.28 (166.111.8.28): 56 data bytes ping: send to: No route to host ping: send to: No route to host ping: send to: No route to host ping: send to: No route to host ping: send to: No route to host ping: send to: No route to host ping: send to: No route to host ping: send to: No route to host ^C --- 166.111.8.28 ping statistics --- 17 packets transmitted, 0 packets received, 100% packet loss What does netstat -r say? Fabian -- http://www.fabiankeil.de/ signature.asc Description: PGP signature
Re: Wireless NIC in FreeBSD 6.0 ?
On Sunday 25 December 2005 18:10, you wrote: Yuan Jue [EMAIL PROTECTED] wrote: Does anybody success to use wireless NIC in FreeBSD6.0 in HP NC6000? Back to FreeBSD 5.4, my wireless card just works, but not in FreeBSD 6.0. I use the following steps to try to use my wireless card: 1.change to root, then kldload if_ath after this, I can use kldstat to see this: Id Refs AddressSize Name 19 0xc040 328db0 kernel 21 0xc0729000 bc40 kqemu.ko 3 16 0xc0735000 5683cacpi.ko 61 0xc296a000 e000 if_ath.ko 71 0xc2978000 3000 ath_rate.ko 81 0xc297b000 24000ath_hal.ko and use ifconfig to see this: bge0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 options=1aTXCSUM,VLAN_MTU,VLAN_HWTAGGING inet 166.111.208.143 netmask 0xfe00 broadcast 166.111.209.255 ether 00:0d:9d:90:e0:68 media: Ethernet autoselect (100baseTX full-duplex) status: active lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 16384 inet 127.0.0.1 netmask 0xff00 ath0: flags=8802BROADCAST,SIMPLEX,MULTICAST mtu 1500 ether 00:11:85:1b:21:79 media: IEEE 802.11 Wireless Ethernet autoselect status: no carrier ssid channel 1 authmode OPEN privacy OFF txpowmax 100 protmode CTS 2.I use DHCP to get my IP address. dhclient ath0 the response is this: DHCPREQUEST on ath0 to 255.255.255.255 port 67 DHCPREQUEST on ath0 to 255.255.255.255 port 67 DHCPREQUEST on ath0 to 255.255.255.255 port 67 DHCPACK from 166.111.208.1 bound to 166.111.208.137 -- renewal in 3600 seconds. and use ifconfig can see: ath0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 inet 166.111.208.137 netmask 0xfe00 broadcast 166.111.209.255 ether 00:11:85:1b:21:79 media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/36Mbps) status: associated ssid A314b channel 11 bssid 00:09:5b:d1:fa:c4 authmode OPEN privacy OFF txpowmax 30 protmode CTS bintval 100 it seems that the wireless NIC should be working now, right? but when i try to ping some IP which definitely should be connected from the IP address I have got, like : ping 166.111.8.28 (this is the DNS server) the result is this: PING 166.111.8.28 (166.111.8.28): 56 data bytes ping: send to: No route to host ping: send to: No route to host ping: send to: No route to host ping: send to: No route to host ping: send to: No route to host ping: send to: No route to host ping: send to: No route to host ping: send to: No route to host ^C --- 166.111.8.28 ping statistics --- 17 packets transmitted, 0 packets received, 100% packet loss What does netstat -r say? YuanJue# netstat -r Routing tables Internet: DestinationGatewayFlagsRefs Use Netif Expire ^C YuanJue# thanks for the reply. what should I do now? -- Best Regards. Yuan Jue ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Wireless NIC in FreeBSD 6.0 ?
Yuan Jue wrote: ath0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 inet 166.111.208.137 netmask 0xfe00 broadcast 166.111.209.255 ether 00:11:85:1b:21:79 media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/36Mbps) status: associated ssid A314b channel 11 bssid 00:09:5b:d1:fa:c4 authmode OPEN privacy OFF txpowmax 30 protmode CTS bintval 100 PING 166.111.8.28 (166.111.8.28): 56 data bytes ping: send to: No route to host it means I cannot connect to the internet even when I have got the wireless card an IP address using DHCP. WHY? can anybody help on this? any suggestion would be much appreciated. Take a close look at the ip/broadcast of your nic and the ip of the host you're trying to ping. Your NIC: 166.111.208.137/23 Your DNS: 166.111.8.28 They are not on the same network as far as I can see. Now, check that you have the default route set, # route -n get default Cheers, Erik -- Ph: +34.666334818 web: http://www.locolomo.org S/MIME Certificate: http://www.locolomo.org/crt/2004071206.crt Subject ID: A9:76:7A:ED:06:95:2B:8D:48:97:CE:F2:3F:42:C8:F2:22:DE:4C:B9 Fingerprint: 4A:E8:63:38:46:F6:9A:5D:B4:DC:29:41:3F:62:D3:0A:73:25:67:C2 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Wireless NIC in FreeBSD 6.0 ?
Erik Nørgaard wrote: Your NIC: 166.111.208.137/23 Your DNS: 166.111.8.28 Just now when I think of it, maybe you meant to ping 166.111.208.28? Cheers, Erik -- Ph: +34.666334818 web: http://www.locolomo.org S/MIME Certificate: http://www.locolomo.org/crt/2004071206.crt Subject ID: A9:76:7A:ED:06:95:2B:8D:48:97:CE:F2:3F:42:C8:F2:22:DE:4C:B9 Fingerprint: 4A:E8:63:38:46:F6:9A:5D:B4:DC:29:41:3F:62:D3:0A:73:25:67:C2 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Wireless NIC in FreeBSD 6.0 ?
On Sunday 25 December 2005 19:53, you wrote: Yuan Jue wrote: ath0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 inet 166.111.208.137 netmask 0xfe00 broadcast 166.111.209.255 ether 00:11:85:1b:21:79 media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/36Mbps) status: associated ssid A314b channel 11 bssid 00:09:5b:d1:fa:c4 authmode OPEN privacy OFF txpowmax 30 protmode CTS bintval 100 PING 166.111.8.28 (166.111.8.28): 56 data bytes ping: send to: No route to host it means I cannot connect to the internet even when I have got the wireless card an IP address using DHCP. WHY? can anybody help on this? any suggestion would be much appreciated. Take a close look at the ip/broadcast of your nic and the ip of the host you're trying to ping. Your NIC: 166.111.208.137/23 Your DNS: 166.111.8.28 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: [EMAIL PROTECTED] ifconfig bge0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 options=1aTXCSUM,VLAN_MTU,VLAN_HWTAGGING inet 166.111.208.204 netmask 0xfe00 broadcast 166.111.209.255 ether 00:0d:9d:90:e0:68 media: Ethernet autoselect (100baseTX full-duplex) status: active lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 16384 inet 127.0.0.1 netmask 0xff00 [EMAIL PROTECTED] 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 64 bytes from 166.111.8.28: icmp_seq=1 ttl=251 time=0.665 ms 64 bytes from 166.111.8.28: icmp_seq=2 ttl=251 time=0.521 ms ^C --- 166.111.8.28 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.521/0.570/0.665/0.067 ms [EMAIL PROTECTED] why does this work? it has the same netmask and broadcast address as the wireless NIC. Any more explanations? They are not on the same network as far as I can see. Now, check that you have the default route set, # route -n get default thanks for your reply. -- Best Regards. Yuan Jue ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Wireless NIC in FreeBSD 6.0 ?
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: [EMAIL PROTECTED] ifconfig bge0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 options=1aTXCSUM,VLAN_MTU,VLAN_HWTAGGING inet 166.111.208.204 netmask 0xfe00 broadcast 166.111.209.255 ether 00:0d:9d:90:e0:68 media: Ethernet autoselect (100baseTX full-duplex) status: active lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 16384 inet 127.0.0.1 netmask 0xff00 [EMAIL PROTECTED] 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. Cheers, Erik -- Ph: +34.666334818 web: http://www.locolomo.org S/MIME Certificate: http://www.locolomo.org/crt/2004071206.crt Subject ID: A9:76:7A:ED:06:95:2B:8D:48:97:CE:F2:3F:42:C8:F2:22:DE:4C:B9 Fingerprint: 4A:E8:63:38:46:F6:9A:5D:B4:DC:29:41:3F:62:D3:0A:73:25:67:C2 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Wireless NIC in FreeBSD 6.0 ?
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: [EMAIL PROTECTED] ifconfig bge0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 options=1aTXCSUM,VLAN_MTU,VLAN_HWTAGGING inet 166.111.208.204 netmask 0xfe00 broadcast 166.111.209.255 ether 00:0d:9d:90:e0:68 media: Ethernet autoselect (100baseTX full-duplex) status: active lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 16384 inet 127.0.0.1 netmask 0xff00 [EMAIL PROTECTED] 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. thank you very much. it does work now. :) you know, back to FreeBSD 5.4, things like this never happened. so I even never think about close the local NIC down to get the wireless one works. Maybe this is the FreeBSD 6.0's improvement on wireless access, right? 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. thanks for your explanations. It is very appreciated. To check this kind of problems, use snort to sniff what's actually leaving your interface. Cheers, Erik -- Best Regards. Yuan Jue ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Wireless NIC in FreeBSD 6.0 ?
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: [EMAIL PROTECTED] ifconfig bge0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 options=1aTXCSUM,VLAN_MTU,VLAN_HWTAGGING inet 166.111.208.204 netmask 0xfe00 broadcast 166.111.209.255 ether 00:0d:9d:90:e0:68 media: Ethernet autoselect (100baseTX full-duplex) status: active lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 16384 inet 127.0.0.1 netmask 0xff00 [EMAIL PROTECTED] 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: [EMAIL PROTECTED] ifconfig bge0: flags=8802BROADCAST,SIMPLEX,MULTICAST mtu 1500 options=1aTXCSUM,VLAN_MTU,VLAN_HWTAGGING inet 59.66.138.109 netmask 0xff00 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: [EMAIL PROTECTED] 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,msecrttvar hopcount mtu expire 0 0 0 0 0 0 1500 0 [EMAIL PROTECTED] 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 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Wireless NIC in FreeBSD 6.0 ?
Yuan Jue wrote: 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: what is the right way to do it? or is there any better solution for my situation? Try to take a look at dhclient.conf(5) and dhclient(8) and set all interfaces to be configured with dhcp. I think it should be posible to configure default values so there is something to fall back on if a lease is not obtained. Note that dhclient is new in FBSD 6, this is also why you had to take down the other interface. The old dhclient would reset all dhcp configured interfaces, the new doesn't, which is quite neat because usually you would have the two interfaces connected to /different/ networks. Cheers, Erik -- Ph: +34.666334818 web: http://www.locolomo.org S/MIME Certificate: http://www.locolomo.org/crt/2004071206.crt Subject ID: A9:76:7A:ED:06:95:2B:8D:48:97:CE:F2:3F:42:C8:F2:22:DE:4C:B9 Fingerprint: 4A:E8:63:38:46:F6:9A:5D:B4:DC:29:41:3F:62:D3:0A:73:25:67:C2 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Wireless NIC in FreeBSD 6.0 ?
On Sunday 25 December 2005 23:15, Erik Nørgaard wrote: Yuan Jue wrote: 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: what is the right way to do it? or is there any better solution for my situation? Try to take a look at dhclient.conf(5) and dhclient(8) and set all interfaces to be configured with dhcp. I think it should be posible to configure default values so there is something to fall back on if a lease is not obtained. Note that dhclient is new in FBSD 6, this is also why you had to take down the other interface. The old dhclient would reset all dhcp configured interfaces, the new doesn't, which is quite neat because usually you would have the two interfaces connected to /different/ networks. thanks for your explanations about DHCP in FreeBSD 6.0, although I still cannot find a way to config dhclient.conf to solve my problem :) instead, I figure out another way to work around. 1.ifconfig bge0 delete % this would shut my local NIC down totally 2.kldload if_ath dhclient ath0 then I can enjoy the wireless internet surfing :) antway, thank you again! -- Best Regards. Yuan Jue ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Wireless NIC in FreeBSD 6.0 ?
Hello, all Does anybody success to use wireless NIC in FreeBSD6.0 in HP NC6000? Back to FreeBSD 5.4, my wireless card just works, but not in FreeBSD 6.0. I use the following steps to try to use my wireless card: 1.change to root, then kldload if_ath after this, I can use kldstat to see this: Id Refs AddressSize Name 19 0xc040 328db0 kernel 21 0xc0729000 bc40 kqemu.ko 3 16 0xc0735000 5683cacpi.ko 61 0xc296a000 e000 if_ath.ko 71 0xc2978000 3000 ath_rate.ko 81 0xc297b000 24000ath_hal.ko and use ifconfig to see this: bge0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 options=1aTXCSUM,VLAN_MTU,VLAN_HWTAGGING inet 166.111.208.143 netmask 0xfe00 broadcast 166.111.209.255 ether 00:0d:9d:90:e0:68 media: Ethernet autoselect (100baseTX full-duplex) status: active lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST mtu 16384 inet 127.0.0.1 netmask 0xff00 ath0: flags=8802BROADCAST,SIMPLEX,MULTICAST mtu 1500 ether 00:11:85:1b:21:79 media: IEEE 802.11 Wireless Ethernet autoselect status: no carrier ssid channel 1 authmode OPEN privacy OFF txpowmax 100 protmode CTS 2.I use DHCP to get my IP address. dhclient ath0 the response is this: DHCPREQUEST on ath0 to 255.255.255.255 port 67 DHCPREQUEST on ath0 to 255.255.255.255 port 67 DHCPREQUEST on ath0 to 255.255.255.255 port 67 DHCPACK from 166.111.208.1 bound to 166.111.208.137 -- renewal in 3600 seconds. and use ifconfig can see: ath0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST mtu 1500 inet 166.111.208.137 netmask 0xfe00 broadcast 166.111.209.255 ether 00:11:85:1b:21:79 media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/36Mbps) status: associated ssid A314b channel 11 bssid 00:09:5b:d1:fa:c4 authmode OPEN privacy OFF txpowmax 30 protmode CTS bintval 100 it seems that the wireless NIC should be working now, right? but when i try to ping some IP which definitely should be connected from the IP address I have got, like : ping 166.111.8.28 (this is the DNS server) the result is this: PING 166.111.8.28 (166.111.8.28): 56 data bytes ping: send to: No route to host ping: send to: No route to host ping: send to: No route to host ping: send to: No route to host ping: send to: No route to host ping: send to: No route to host ping: send to: No route to host ping: send to: No route to host ^C --- 166.111.8.28 ping statistics --- 17 packets transmitted, 0 packets received, 100% packet loss it means I cannot connect to the internet even when I have got the wireless card an IP address using DHCP. WHY? can anybody help on this? any suggestion would be much appreciated. -- Best Regards. Yuan Jue ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]