2017年4月18日 星期二

[Openwrt] how to reload, not restart lighttpd


According to:
https://hiwbb.com/2017/04/lighttpd-angel-reload-config/

you need lighttpd-angel (already in the recent lighttpd version),
so lighttpd can reload the config without restart.

usage

kill -HUP [PID of lighttpd-angel]


2016年11月27日 星期日

Openwrt pppoe MTU issue


OpenWrt will get pppoe mtu from wan interface mtu option in the uci,
but if you set mtu in the wan interface, the physical interface's mtu will change, too.

And the pppoe header's length is 8 bytes, if you set mtu to 1500, will get 1500-8=1492 pppoe mtu.

 This is wrong, so you need to change the mtu parameter that ppp daemon parsing in the uci.
You may add a new option in uci something like pppoe_mtu, and modified the ppp script that parsing uci.

2016年8月9日 星期二

How windows WPS function work?

According to this:
https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/c3d25ade-10c9-4404-92c4-a16ba202ae7b/wifi-proteceted-setupwps-implementation-in-native-wifi-driver-usb?forum=wdk
 discusstion

Windows 7 will display WPS notification if
1. AP broadcast the beacon with WPS capability
2. if AP have WPS capability in the beacon, Windows 7 will start a WPS action, try to get M1 message from AP
3. Windows 7 will look at the M1 message, if config methods have Push Button support Windows 7 will show the WPS notification.

Troubleshooting:
if you have WPS informtaion in the beacon & push button support in the M1 message, but Windows 7 doesn't show up the WPS notification, there most be something wrong with the wireless driver, the wireless driver may not get the packet format correctly.

2015年7月16日 星期四

Slow ubuntu ssh/telnet login prompt



in this discussion:

http://ubuntuforums.org/showthread.php?t=1842371

vi /etc/nsswitch.conf
find line “hosts: files mdns4_minimal [NOTFOUND=return] dns mdns 4 mdns”
change to
"hosts: files dns"

the login prompt will show up instantly

also, you can  move /etc/motd  away to disable the welcome message of telent

2015年3月29日 星期日

Windows XP windows size default is too small



The default vaule is 64K, it will impact the throughput test.

You need to modify the value if you want to get good throughput test result.

2015年3月8日 星期日

pptpd debug


start pptpd in debug mode:
pptpd -d

read the debug log in syslog:
cat /var/log/syslog

[problem]
connection failed, and debug message show "mppe required but peer refused" :
you need to force the client to use mppe encryption or close the mppe encryption option on server.

pptp client can't get dns server ip:
set the ms-dns option on the server side, let the client can get ip.


2015年1月4日 星期日

Packet out of order problem


The IP header is 32 bytes in normal situation.
If it is not, the packet ID's address we read may be wrong, we will got wrong ID and cause out of order.

This will cause serious speed impact because the client will ask host to transfer the right packet again.

It can be solved by enable the IP header realigned to 4 byte features on you wireless driver. (It should be enable by default)