ifconfig wlan0 status:associated inet IP acquired, but still can not ping through

FreeBSD Wireless Networking iwn0 can not work, Check wireless Router side RX have big traffic, TX have few traffic
It is a internal Intel WiFi link 5300 inside ThinkPad T400 When I ping www.bing.com
send_packet: Host is down,
Host name lookup failure

I have done the same thing followed by the video
View: https://www.youtube.com/watch?v=9sDBh-thPBQ

sysctl net.wlan.devices------> net.wlan.devices:iwn0

put below in rc.conf
wlans_iwn0="wlan0"
ifconfig_wlan0="WPA SYNCDHCP"
and also put password in etc/WPA_supplicant.conf
 

Attachments

  • ifconfig_wlan0.jpg
    ifconfig_wlan0.jpg
    172.2 KB · Views: 160
try pinging yahoo.com

Code:
userx@slackplusefi.ed.org:~
$ ping www.bing.com
PING dual-a-0001.a-msedge.net (204.79.197.200) 56(84) bytes of data.
^C
--- dual-a-0001.a-msedge.net ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4104ms

I cannot ping bing either on slack even. (Linux)
 
The video you show is for an Atheros wireless module.
For Intel Wifi you need these additional settings to load firmware:
/boot/loader.conf
Code:
if_iwn_load="YES"
iwn4965fw_load="YES"
iwn1000fw_load="YES"
iwn5000fw_load="YES"
iwn5150fw_load="YES"
iwn6000fw_load="YES"
iwn6000g2afw_load="YES"
iwn6000g2bfw_load="YES"
iwn6050fw_load="YES"
The manual has all the details.
 
Thanks Phishfry, I tried to add, but still not work.
Code:
iwn0: iwn_read_firmware: ucode rev=0x12a80601
Is that an error message?
 
"Host name lookup failure" in the picture in the original post is a more likely a DNS configuration error.

Can you ping an IP, like ping 8.8.8.8?
What does /etc/resolv.conf have in it?
What does netstat -rn show?
 
Before I edit resolv.conf: (almost empty conf file ) If I ping 8.8.8.8 will show this -----> "92 bytes from 192.168.41.1 destination Port Unreachable"
after I add two lines below then ping through 8.8.8.8 successfully,but still can't reach bing or yahoo
nameserver 61.177.7.1
nameserver 114.114.114.114

192.168.125.1 is the WLAN router Gateway , 192.168.125.117 is the acquired IP.
 

Attachments

  • resolv_conf (Medium).jpg
    resolv_conf (Medium).jpg
    116.4 KB · Views: 122
  • ping1 (Medium).jpg
    ping1 (Medium).jpg
    253.8 KB · Views: 146
  • netsat_rn (Medium).jpg
    netsat_rn (Medium).jpg
    167.1 KB · Views: 161
"man resolv.conf" find the configuration options are : nameserver, domain,search,sortlist
add a line "search 192.168.125.1 " finally solved problem. Thanks ljboiler and Phishfry.
But when I move from one hotel to another, the wireless router gateway would be different.
I need edit "/etc/resolv.conf"every time when connected to different router?
 
Unplug em0 when you're testing your wireless. Both interfaces appear to use DHCP and are on different networks. Your default gateway probably keeps bouncing between a gateway on em0 and the gateway for wlan0 due to DHCP. Same with your DNS settings. Which is why it sometimes works and sometimes doesn't.

add a line "search 192.168.125.1 " finally solved problem.
That's actually an error, I'm fairly certain adding errors doesn't solve anything.

I would suggest to stop editing /etc/resolv.conf, if DHCP is set up correctly there is no need to edit it manually. Fix your connection issues first, if there's no good network connection DNS resolving is never going to work, so focus on plain IP connectivity first.

Steps you should test, in order:
  1. unplug your wired interface!
  2. Get a correct IP address on the wireless interface (DHCP; ifconfig wlan0)
  3. Check routing for a good default gateway ( netstat -rn)
  4. Make sure you can ping the gateway
  5. Ping beyond the gateway, like 8.8.8.8
  6. Now you can check and/or fix name resolving
 
This is a ThinkPad T420s worked,no problem.

I did the same thing on another T400 but /etc/resolv.conf file always reset (overwrite) by system. I can not save it.
 
I have a feeling that your dhcp settings in your upstream wireless router are not correct.
/etc/resolv.conf file is populated by resolvconf (the service)
These settings are extracted from your upstream dhcp server.
The line "search 192.168.125.1" should be sent as an 'option' from your dhcp server. Which the resolveconf service handles.

Option 119 is domain search. With dnsmasq as my DNS/DHCP server I use localdomain as the search provider.
 
Back
Top