Articles taggués ‘MAC address’

How to change the MAC address of an Ethernet interface

29/05/2015 Comments off

Change the MAC address of an Ethernet interface temporarily

Check MAC addresses:

$ ifconfig -a | awk '/HWaddr/ {print "Interface: " $1 "\t MAC: " $NF}'
Interface: eth0	 MAC: 08:00:27:2c:a4:69
Interface: eth1	 MAC: 08:00:27:9a:21:24

Shut down desired Ethernet interface (eth0 in this example):

$ sudo ifconfig eth0 down

Specify new MAC address:

$ sudo ifconfig eth0 hw ether 08:00:00:00:00:01

Activate modified Ethernet interface:

# ifconfig eth0 up

Verify changed MAC address:

$ ifconfig -a | awk '/HWaddr/ {print "Interface: " $1 "\t MAC: " $NF}'
Interface: eth0	 MAC: 08:00:00:00:00:01
Interface: eth1	 MAC: 08:00:27:9a:21:24

This change is not permanent as the MAC address on the interface eth0 will revert to the default on next system reboot. Lire la suite…

Categories: Réseau, Système Tags: ,

How to find out Router MAC address

09/01/2014 Comments off

Source: nixCraft

MAC is acronym for for Media Access Control address. It is a unique identifier attached to almost most all networking equipment such as Routers, Ethernet cards and other devices.

If you do not have access to router admin interface (via telnet or webbased), use following method to find out router MAC address.

You need to use arp command (available on both Windows, Linux/Unixish systems).

arp manipulates the kernel’s ARP cache in various ways. The primary options are clearing an address mapping entry and manually setting up one. For debugging purposes, the arp program also allows a complete dump of the ARP cache.

arp shows the entries of the specified hosts. If the hostname parameter is not used, all entries will be displayed.

Task: Find out router Mac Address

To find out your router MAC address, use arp command as follows:

$ /usr/sbin/arp -a
$ arp -a

router ( at 00:08:5C:00:00:01 [ether] on eth0
fbsd6 ( at 00:0F:EA:91:04:07 [ether] on eth0

In above example 00:08:5C:00:00:01 is MAC address of my router. If you cannot find MAC address then just ping to your router once (my router had IP)
$ ping
And then run (type arp -a) above arp command again. If you have telnet access to router then you can just telnet into router and find out MAC address:
$ telnet


Welcome to nixCraft Router!
Login: admin

Once logged in type ifconfig command:

$ ifconfig br0


br0             Link encap:Ethernet  HWaddr 00:08:5C:00:00:01
        inet addr:  Bcast:  Mask:
        RX packets:48574 errors:0 dropped:0 overruns:0 frame:0
        TX packets:61329 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:0
        RX bytes:9146189 (8.7 MiB)  TX bytes:74456679 (71.0 MiB)

Please note that your interface name (br0) could be different. You can also use ifconfig -a command.

Windows XP/NT/2003 find out Router Mac address

If you are using Microsoft Windows XP then you need to open MS-DOS shell prompt first. Click on Start > Run > Type cmd command followed by ENTER key. Then at C:\> prompt, type arp command as follows:

C:\> arp -a