Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linuxÍøÇÅÉèÖÃMACµØÖ·Ê±µÄÐÐΪ

brctl addbr br0
ifconfig br0
br0 MAC is 00:00:00:00:00:00
brctl addif br0 eth1  (eth1 is xx:xx:xx:xx:xx:33)
ifconfig br0
br0 MAC is xx:xx:xx:xx:xx:33  same as eth1, auto change
brctl addif br0 eth2  (eth2 is xx:xx:xx:xx:xx:30)
ifconfig br0
br0 MAC is xx:xx:xx:xx:xx:30  same as eth2, For eth2 less than eth1, auto change
ifconfig eth2 hw ether xx:xx:xx:xx:xx:50
ifconfig br0
br0 MAC is xx:xx:xx:xx:xx:33  same as eth1, auto change
ifconfig br0 hw ether xx:xx:xx:xx:xx:99
ifconfig br0
br0 MAC is xx:xx:xx:xx:xx:33  same as eth1, NOT change
ifconfig br0 hw ether xx:xx:xx:xx:xx:33  ;same as eth1
ifconfig eth2 hw ether xx:xx:xx:xx:xx:20  ;less than eth1
ifconfig br0
br0 MAC is xx:xx:xx:xx:xx:33  same as eth1, `ifconfig br0 hw` NOT effective
ifconfig eth1 hw ether xx:xx:xx:xx:xx:50  ;upper op,we set br0 = eth1's MAC,now we change eth1 MAC
ifconfig br0
br0 MAC is xx:xx:xx:xx:xx:20  same as eth2, auto change
½áÂÛ£º
  br0Èç¹ûûÓÐÖ¸¶¨hw MAC, br0µÄMACµØÖ·»á¸ù¾ÝbridgeÖÐportµÄ±ä»¯£¬×Ô¶¯Ñ¡ÔñportÖÐ×îСµÄÒ»¸öMACµØÖ·×÷Ϊbr0µÄMACµØÖ·¡£
  br0Ö»ÄÜÖ¸¶¨portÖÐÓеÄinterfaceµÄMAC×÷Ϊbr0µÄMACµØÖ·¡£
 
Ô´´úÂë·ÖÎö£º
  source code dir is: linux-2.4.x/net/bridge
 
  - br_device.c
      br_dev_setup() ×¢²áÁËһЩº¯Êý£¬ÆäÖР dev->set_mac_address = br_set_mac_address;  //Õâ¸ö¾ÍÊÇifconfig br0 hw etherµ÷Óõĺ¯ÊýÁË
     
      static int  br_set_mac_address(struct net_device *dev, void *addr)
          {
            struct net_bridge *br = dev->priv;
            struct sockaddr *sa = (struct sockaddr *) addr;
           
          ¡£¡£¡£¡£


Ïà¹ØÎĵµ£º

LinuxʹÓõĻº´æ


6.7.1 LinuxʹÓõĻº´æ
²»¹ÜÔÚÓ²¼þÉè¼Æ»¹ÊÇÈí¼þÉè¼ÆÖУ¬¸ßËÙ»º´æÊÇ»ñµÃ¸ßÐÔÄܵij£ÓÃÊֶΡ£Linux ʹÓÃÁ˶àÖÖºÍÄÚ´æ¹ÜÀíÏà¹ØµÄ¸ßËÙ»º´æ¡£
1£® »º³åÇø¸ßËÙ»º´æ£º
»º³åÇø¸ßËÙ»º´æÖаüº¬ÁËÓÉ¿éÉ豸ʹÓõÄÊý¾Ý»º³åÇø¡£ÕâЩ»º³åÇøÖаüº¬ÁË´ÓÉ豸ÖжÁÈ¡µÄÊý¾Ý¿é»òдÈëÉ豸µÄÊý¾Ý¿é¡£»º³åÇø¸ßËÙ»º´æÓÉÉ豸±êʶºÅºÍ¿é±êºÅË÷Òý£¬Ò ......

linux»·¾³±äÁ¿ÉèÖÃ×ܽá(×ªÔØ)

1¡¢×ܽᱳ¾°
ÔÚlinuxϵͳÏ£¬Èç¹ûÄãÏÂÔØ²¢°²×°ÁËÓ¦ÓóÌÐò£¬ºÜÓпÉÄÜÔÚ¼üÈëËüµÄÃû³ÆÊ±³öÏÖ“command not
found”µÄÌáʾÄÚÈÝ¡£Èç¹ûÿ´Î¶¼µ½°²×°Ä¿±êÎļþ¼ÐÄÚ£¬ÕÒµ½¿ÉÖ´ÐÐÎļþÀ´½øÐвÙ×÷¾ÍÌ«·±ËöÁË¡£ÕâÉæ¼°µ½»·¾³±äÁ¿PATHµÄÉèÖÃÎÊÌ⣬¶øPATHµÄÉèÖÃÒ²
ÊÇÔÚlinux϶¨ÖÆ»·¾³±äÁ¿µÄÒ»¸ö×é³É²¿·Ö¡£±¾°¸Àý»ùÓÚRedHat ......

Amlogic open linux ±àÒë»·¾³°²×° ѧϰ±Ê¼Ç

     ÓÉÓÚ¹¤×÷ÐèÒªÏÖÔÚ¿ªÊ¼´Óͷѧϰlinux£¬ÏÂÃæÏȼǼamlogic openlinux°²×°²½Öè¡££¨Ç°ÌáÊǰ²×°ÁËÐéÄâ»ú£©
Amlogic open linux ±àÒë»·¾³°²×°
Ò»¡¢gcc¹¤¾ßµÄ°²×°
1¡¢´ÓAmlogicÍøÕ¾ÉÏÏÂÔØgcc¹¤¾ß
  ÔÚÏÂÃæÏÂÔØIndex of /download/linux/gnutools
 gnutools-arc2.2-p4-ubuntu-9.04-2010- ......

ǶÈëʽLinuxϳ£ÓõĽ»²æ±àÒë·½·¨


ÒªÔÚǶÈëʽLinuxÏÂʹÓö¯Ì¬ÓïÑÔ£¬Ê×ÏÈÒª½â¾öµÄÊÇÓïÑÔ½âÊÍÆ÷»òÖ´ÐÐÒýÇæµÄ½»²æ±àÒëÎÊÌâ¡£
½»²æ±àÒëͨ³£ÓÐÒÔϼ¸ÖÖ;¾¶£º
1. Ö±½Óͨ¹ý½»²æ±àÒ빤¾ß£¬ÊÖ¹¤ÅäÖý»²æ±àÒë¡£½»²æ±àÒ빤¾ß¿ÉÒÔÀûÓÃÕâ¸ö½Å±¾À´×Ô¶¯Éú³É£º
http://kegel.com/crosstool/
´Ë·½·¨µÄºÃ´¦ÊǼò±ã¿ì½Ý£¬Ò»µ©crosstool×öºÃÒÔºó£¬ÐèҪʲô°üÖ±½Ó±àÒë¼´¿É£¬ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ