Linux2009. 6. 9. 20:50
ip 변경하기
$ ifconfig <interface> [[<AF>] <address>]
<AF>=Address family. Default: inet
  List of possible address families:
    unix (UNIX Domain) inet (DARPA Internet) inet6 (IPv6)
    ax25 (AMPR AX.25) netrom (AMPR NET/ROM) rose (AMPR ROSE)
    ipx (Novell IPX) ddp (Appletalk DDP) ec (Econet)
    ash (Ash) x25 (CCITT X.25)


mac 변경하기
$ ifconfig <interface> [hw <HW> <address>]
<HW>=Hardware Type.
  List of possible hardware types:
    loop (Local Loopback) slip (Serial Line IP) cslip (VJ Serial Line IP)
    slip6 (6-bit Serial Line IP) cslip6 (VJ 6-bit Serial Line IP) adaptive (Adaptive Serial Line IP)
    strip (Metricom Starmode IP) ash (Ash) ether (Ethernet)
    tr (16/4 Mbps Token Ring) tr (16/4 Mbps Token Ring (New)) ax25 (AMPR AX.25)
    netrom (AMPR NET/ROM) rose (AMPR ROSE) tunnel (IPIP Tunnel)
    ppp (Point-to-Point Protocol) hdlc ((Cisco)-HDLC) lapb (LAPB)
    arcnet (ARCnet) dlci (Frame Relay DLCI) frad (Frame Relay Access Device)
    sit (IPv6-in-IPv4) fddi (Fiber Distributed Data Interface) hippi (HIPPI)
    irda (IrLAP) ec (Econet) x25 (generic X.25)
    eui64 (Generic EUI-64)

※ MAC을 변경하기 위해서는 nic device가 down 되어 있어야 하며, root권한이어야 함.

$ ifconfig eth0 hw ether 00:00:00:00:00:00
SIOCSIFHWADDR: Operation not permitted
$ sudo ifconfig eth0 hw ether 00:00:00:00:00:00
[sudo] password for user:
SIOCSIFHWADDR: Device or resource busy - you may need to down the interface



Posted by 구차니