- 经验
- 4
- 分贝
- 0
- 家园分
- 18
- 在线时间:
- 5 小时
- 最后登录:
- 2015-12-8
- 帖子:
- 3
- 精华:
- 0
- 注册时间:
- 2015-11-11
- UID:
- 1169231
注册:2015-11-11
|
发表于 2015-11-20 15:18:21
|显示全部楼层
我使用的HUAWEI的E3372,3.10内核,联通sim卡,可虚拟出wwan0,但用udhcpc获取ip失败:
udhcpc -i wwan0
udhcpc (v1.16.1) started
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
Sending discover...
...
抓包:
tcpdump -ni wwan0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wwan0, link-type EN10MB (Ethernet), capture size 262144 bytes
23:06:48.787096 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 32:44:9a:07:db:32, length 548
23:06:48.787688 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 32:44:9a:07:db:32, length 548
23:07:11.828097 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 32:44:9a:07:db:32, length 548
23:07:11.828799 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 32:44:9a:07:db:32, length 548
...
使用AT指令,可获取到ip,gw,dns等值,但把这些值配置到wwan0上,也不能访问外网,
操作如下:
# microcom -t 5000 -s 115200 /dev/ttyUSB1
ATZ
OK
AT^NDISDUP=1,1,"3gnet"
OK
^NDISSTAT:1,,,"IPV4"
# microcom -t 5000 -s 115200 /dev/ttyUSB1
AT^DHCP?
^DHCP: 84771C0A,F8FFFFFF,81771C0A,81771C0A,7B7B7B7B,7C7B7B7B,150000000,150000000
OK
翻译为:
ip: 84771C0A,(10.28.119.132)
mask:F8FFFFFF, (255.255.255.248)
gw : 81771C0A,(10.28.119.129)
dhcpserver: 81771C0A,(10.28.119.129)
dns: 7B7B7B7B,(123.123.123.123)
dns: 7C7B7B7B,(123.123.123.124)
max_tx: 150000000bps
max_rx: 150000000bps
# ifconfig wwan0 10.28.119.132 netmask 255.255.255.248
# route add default gw 10.28.119.129
#
# vi /etc/resolv.conf
nameserver 123.123.123.123
nameserver 123.123.123.124
ping www.baidu.com
一直没有反应
抓包:
tcpdump -ni wwan0
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wwan0, link-type EN10MB (Ethernet), capture size 262144 bytes
23:27:48.868715 ARP, Request who-has 10.28.119.129 tell 10.28.119.132, length 28
23:27:48.869187 ARP, Request who-has 10.28.119.129 tell 10.28.119.132, length 28
23:27:49.870131 ARP, Request who-has 10.28.119.129 tell 10.28.119.132, length 28
23:27:49.870542 ARP, Request who-has 10.28.119.129 tell 10.28.119.132, length 28
23:27:50.872114 ARP, Request who-has 10.28.119.129 tell 10.28.119.132, length 28
谁能帮帮小弟,跪谢!!
|
|