ºÜÓÐÓõĶ«¶«£¬platinumÐÖµÄ×÷Æ·£¬½ñÌìÎÒÓÐÐèÒª¾ÍÌûÉÏblog·½±ã²éÕÒ.¹þ¹þ....
ÓÉÓÚ DHCP ÐÒéÊǶþ²ãµÄ£¬ÎÞ·¨ÕÒµ½ÍøÂçÖÐÄÇ̨·Ç·¨ DHCP ·þÎñÆ÷µÄÔ´¡¢Ä¿µÄ IP µØÖ·
Èç¹ûÍøÂçÀïÃæͬʱÓжą̀ DHCP ·þÎñÆ÷£¬¶øÄãµÄ½»»»»úûÓÐ×èÖ¹ DHCP ÐÒéµÄ·¢²¼£¬ÄÇôÕâ¸öÍøÊǺÜΣÏյģ¨ÎÒËùÔÚµÄСÇøÀïÒ²ÓÐÕâÑùµÄÇé¿ö£¬Èç¹ûÎÒ¼ÜÉèÁË DHCP£¬Îһῴµ½ /var/lib/dhcp/dhcpd.leases ¿´µ½ºÜ¶à±»·ÖÅäµÄ IP£©
ÎÒÃÇ¿ÉÒÔ²ÉÈ¡Óà tcpdump ×¥°üµÄ·½·¨£¬À´Åж϶Է½µÄ MAC£¬Èç¹ûÓÐÁË MAC ¾ÍºÃ°ìÁË
ÆÕͨÇé¿öÏ£¬tcpdump ×¥µ½µÄ°ü¶¼ÊÇ 3 ²ãµÄ£¬Ö»ÄÜ¿´µ½ IP Í·ºÍÆäËû 4 ²ãÍ·£¨±ÈÈç TCP/UDP£©
tcpdump ÏÂÃæÓиö -e ²ÎÊý
-e Print the link-level header on each dump line.
Õâ¸öÊǹؼü£¬»¹ÓÐÒ»¸ö¹Ø¼ü²¿·Ö¾ÍÊÇ port£¬ÒòΪ dhcp ÐÒé»áÓõ½ UDP/67£¬ÖªµÀÕâÁ½µã¾ÍºÃ°ìÁË£¬×¥°ü£¬×¥ÍêÒÔºó¿´¿´ MAC ¾Í¿ÉÒÔÁË
ÓÐÁË MAC ¾ÍºÃ°ìÁË£¬ÔÙÓà arp -n ¾ÍÄÜ¿´µ½Æä IP£¬½ÓÏÂÀ´¾ÍÊÇÔÚÍø¹ØÉÏ·âµôËûµÄ MAC£¬ÈÃËû¡°Í¶°¸×ÔÊס±°É ^_^
[root@platinum root]# tcpdump -e -i eth1 -nn port 67 -c 3 2>&1|awk '/bootp/{print $2" --> "$3}'
0:0c:85:ad:e5:af --> ff:ff:ff:ff:ff:ff
e7:0a:19:80:03:09 --> 0:0c:85:ad:e5:af
0:0c:85:ad:e5:af --> e7:0a:19:80:03:09
[root@platinum root]#
blue_eagle ÓÚ 2010-10-18 23:31:23·¢±í:
ºÜÇ¿´ó£¡
shyboy8688 ÓÚ 2006-09-01 23:50:11·¢±í:
È¥ÊÔÊÔ~~