Linux UDPÑÏÖضª°üÎÊÌâµÄ½â¾ö
²âÊÔϵͳÔÚLinuxÉϵÄÐÔÄÜ·¢ÏÖ¶ª°üÂʼ«ÎªÑÏÖØ£¬·¢210000ÌõÊý¾Ý£¬¶ª°ü´ï110000Ö®¾Þ£¬¶ª°üÂʳ¬¹ý50%¡£Í¬µÈÇéÐÎÏÂWindowsÉϲâÊÔ£¬½ö¶ª¼¸ÌõÊý¾Ý¡£ÐÎÊÆÑϾþ£¬±ØÐë½â¾ö¡£¿¼ÂÇ¿ÉÄÜÊÇÒòΪÐÒéÕ»BufferÌ«µÍËùÖ£¬ÓÚÊÇÏÈ¿´¿´Ä¬ÈÏÇé¿ö£º
sysctl -a |grep net.core
·¢ÏÖ
net.core.rmem_max = 131071
net.core.rmem_default = 112640
Ð޸İɣ¬±ä´óÒ»µã£¬±ä³É10M£¬È»ºóreboot£¨Ó¦¸ÃÖØÆôij¸ö·þÎñ¼´¿É£©
È»ºó²éÍø¿¨ÊÕ°üÇé¿ö£º
netstat -su
½á¹ûÈçÏ£º
Udp:
97690 packets received
112310 packets to unknown port received.
0 packet receive errors
20 packets sent
·¢ÏÖÊý¾ÝÔÚÍø¿¨¾Í¶ªÁË£¬ÅжϿÉÄÜÊÇ·À»ðǽÒýÆðµÄ£¬ÓÚÊÇÖ´ÐÐÃüÁ
iptables -L
½á¹ûÈçÏ£º
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Ö¤Ã÷iptablesÆô¶¯£¬ÓÚÊÇÍ£Ö¹·À»ðǽ£º
service iptables stop
Õâ¸öÃüÁʱÉúЧ£¬¿ªÆô·À»ðǽµÄÃüÁ
service iptables start
Èç¹ûÒª³¹µ×¹Ø±Õ·À»ðǽ£¬ÔòÐèÒªÖØÆôºóÉúЧ
¿ªÆô£º chkconfig iptables on
¹Ø±Õ£º chkconfig iptables off
ÔÚ¿ªÆôÁË·À»ðǽʱ£¬×öÈçÏÂÉèÖ㬿ªÆôÏà¹Ø¶Ë¿Ú£¬
ÐÞ¸Ä/etc/sysconfig/iptables Îļþ£¬Ìí¼ÓÒÔÏÂÄÚÈÝ£º
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
ÖØвâÊÔ£¬Ã»¶ªÒ»ÌõÊý¾Ý¡£
linux Äں˲ÎÊýµ÷Õû˵Ã÷
ËùÓеÄTCP/IPµ÷ÓŲÎÊý¶¼Î»ÓÚ/proc/sys/net/Ŀ¼¡£ÀýÈç, ÏÂÃæÊÇ×îÖØÒªµÄһЩµ÷ÓŲÎÊý, ºóÃæÊÇËüÃǵĺ¬Òå:
1. /proc/sys/net/core/rmem_max — ×î´óµÄTCPÊý¾Ý½ÓÊÕ»º³å¡£
2. /proc/sys/net/core/wmem_max — ×î´óµÄTCPÊý¾Ý·¢ËÍ»º³å¡£
3. /proc/sys/net/ipv4/tcp_timestamps — ʱ¼ä´ÁÔÚ(Çë²Î¿¼RFC 1323)TCPµÄ°üÍ·Ôö¼Ó12¸ö×Ö½Ú¡£
4. /proc/sys/net/ipv4/tcp_sack — ÓÐÑ¡ÔñµÄÓ¦´ð¡£
5. /proc/sys/net/ip
Ïà¹ØÎĵµ£º
ÀýÒ»£º·¢ËÍSignaling Packet£º
Signaling CommandÊÇ2¸öBluetoothʵÌåÖ®¼äµÄL2CAP²ãÃüÁî´«Êä¡£ËùÒÔµÃSignaling CommandʹÓÃCID 0x0001.
¶à¸öCommand¿ÉÒÔÔÚÒ»¸öC-frame£¨control frame£©Öз¢ËÍ¡£
Èç¹ûÒªÖ±½Ó·¢ËÍSignaling Command.ÐèÒª½¨Á¢SOCK_RAWÀàÐ͵ÄL2CAPÁ¬½ÓSocket¡£ÕâÑù²ÅÓлú»á×Ô¼ºÌî³äCommand Code£¬Identi ......
1. ÏÂÔØLinuxÏÂDNWµÄPC¶ËUSBÇý¶¯ºÍдÈ빤¾ß
ÏÂÔصØÖ·£ºÒÑÉÏ´«ÖÁCSDN
2. ±àÒëPC¶ËUSBÇý¶¯ºÍдÈ빤¾ß
2.1 ½âѹËõ
$ tar xzvf /path/to/dnw_linux.tgz
dnw_linux/
dnw_linux/secbulk/
dnw_linux/secbulk/Makefile
dnw_linux/secbulk/secbulk.c
dnw_linux/dnw/
dnw_linux/dnw/dnw.c
......
source file :
http://hi.baidu.com/neugraduzyq/blog/item/5602432f6a1a755a4ec22666.html
ÎÒÏëÔÚPATHϼÓÒ»¸ö/tools/binµÄ·¾¶ÓÃexport PATH=$PATH:/tools/binºóÓ¦¸ÃÊǼÓÉÏÈ¥ÁË£¬µ«ÊÇÓà echo $PATH »¹ÊÇÏÔʾµÄÔÀ´µÄ$PATH±äÁ¿µÄÖµ£¬¸Ð¾õÓÃexport PATH=$PATH:/tools/binÖ»ÊÇÔÚÔÀ´µÄ$PATH±äÁ¿ºó¼ÓÁËÒ»¸ö·¾¶µ½µ±Ç°µ ......
ǰһƪ²©¿Í»¹Ð´ÁË×Ô¼ºÐ´µÄ¶Ë¿Úת·¢¹¤¾ß£¬½ñÌìżȻÔÚÍøÉÏ¿´µ½½²ÃüÃû¹ÜµÀºÍnetcatÅäºÏµÄÓ÷¨£¬±»³¹µ×À×µ¹ÁË¡£
ÔÀ´ÒÔΪnetcat×ö²»µ½£¬ÔÀ´ÊÇ×Ô¼ºÏë²»µ½£¬¶ø²»ÊÇnetcat×ö²»µ½……
·½·¨ÈçÏ£º
$ mknod backpipe p
&n ......
²»³£Óõ«·Ç³£ÊµÓõÄÃüÁî
UNIXÃüÁîÊDzâÊԱر¸µÄ֪ʶ£¬³ýÁËһЩ³£ÓõÄÃüÁîÐèÒªÊìϤÒÔÍ⣬Óкܶà·Ç³£ÓÐÓõ«ÊDz»³£ÓõÄÃüÁîÒ²ÐèÒªÁ˽⣬ÕâÑù¶Ô¹¤×÷ÓкܴóµÄ°ïÖú£¬ÕâÀïÌṩһЩÎÒƽ³£¹¤×÷ÖÐÀÛ»ýµÄ֪ʶ£¬Ï£ÍûÄÜ°ïÖúµ½´ó¼Ò ^_^
1¡¢Í³¼ÆËùÓÐÎļþÖеļǼÊý£ºwc -l filename
2¡¢²é¿´¹²ÏíÄڴ棺ipcs -m
3¡¢viÖеÄÅúÁ¿×Ö·ûÆ¥Å䣨a- ......