File:  [NetBSD Developer Wiki] / wikisrc / tutorials / faking_a_mac_address.mdwn
Revision 1.2: download - view: text, annotated - select for diffs
Sun Feb 5 07:14:36 2012 UTC (8 years, 5 months ago) by schmonz
Branches: MAIN
CVS tags: HEAD
dos2unix

    1: Since 5.0 NetBSD supports changing the MAC address. 
    2: 
    3: Add a link-layer address to an Ethernet: 
    4:     
    5:     # ifconfig sip0 link 00:11:22:33:44:55
    6:     
    7: 
    8: Add and activate a link-layer address: 
    9:     
   10:     # ifconfig sip0 link 00:11:22:33:44:55 active
   11:     
   12: 
   13:   
   14: This should give some idea: 
   15:     
   16:     
   17:     ifconfig bridge0 create
   18:     ifconfig bridge0 up
   19:     ifconfig vr0 up
   20:     brconfig bridge0 add vr0
   21:     ifconfig tap0 create
   22:     sysctl -w net.link.tap.tap0=00:00:de:ad:be:ef
   23:     ifconfig tap0 up
   24:     brconfig bridge0 add tap0
   25:     
   26: 
   27: Now you can get an ip if from dhcp with the fake MAC: 
   28:     
   29:     dhclient tap0
   30:     
   31: 
   32: ##  See also 
   33: 
   34:   * [ifconfig(8)](http://netbsd.gw.com/cgi-bin/man-cgi?ifconfig+8+NetBSD-current)

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb