Wednesday 26 October 2011

MAC Address


MAC Address

     This article will try to cover the basics of MAC addresses as an important aspect in communications on the physical network. What is a MAC address? How is it unique? How does it control the flow of communication? How can you find/alter a MAC address? Are the MAC and the IP address related somehow? These are some of the questions (along with others) which will be covered.
    Imagine you are a postman and you have to deliver mail all day long, what makes one house different from the other? It could be the appearance, but more importantly, its address. Analogously, every Network Adapter (or Internet Enabled Device) needs to be unique in order to be identified on a network. Like your mailing address at home, your computer's NIC has a unique address. This MAC (or Media Access Control) address must be unique in the world; otherwise, network traffic would be unable to find the right computer just like a postman who has a dozen envelopes with no addresses on them. The question that comes next is: ‘If there is a MAC address, then, what’s the use of an ip address?’ Just like a MAC address gives a specific, exact address of a house, the ip address gives you the street number. The Ip address tells you what computers are nearby and which ones aren’t. Another feature of a MAC address is that it is static and cannot be altered (unless by MAC spoofing) whereas the ip address is something assigned to your machine on the network and it is not a set of rid numbers like the MAC address. IP address has a proper sense to it and it can be altered (Static and Dynamic ip Addressing).
00 : B0 : D1 : 32 : C2 : 88
MM : MM : MM : SS : SS : SS   (The colons can be replaced by ‘-‘ )
     Mentioned above is a MAC address. It is a 12-digit Hexadecimal number. The convention followed in MAC addressing is something like: Identification number of the adapter manufacture is contained in the first half of the Address. Second half represents the serial number. This serial number is stamped on the adapter and is assigned by the manufacturer. MAC address is a 48-bit address hence there are 248 or 281,474,976,710,656 possibilities of a distinct MAC addresses (compared to 6,881,400,000 people in the world). MAC addresses are also known as physical addresses or hardware addresses. Manufacturers program a chip on each NIC (Network Identification Card) carrying its exclusive MAC addresses. This NIC is a part of your network adapter (or Ethernet Card if you’re using LAN for internet connectivity). Device recognition on a network is an important matter but how is it achieved? A network pairs an ip and a MAC using Address Resolution Protocol (ARP).
     To understand ARP, MAC and IP linking, one has to get a brief and oversimplified description of the OSI model (Open Systems Interconnection model). This model operates by sub-division of a communication system into layers. One can think of it as different workers accomplishing different tasks on different floors of the same building. Each layer contains execution of similar functions. Typically, the OSI model contains 7 layers and each layer works and provides for the layer above it. In layer 3 we find ip addressing functions but the MAC addressing is found at the data link layer of the OSI. The ARP protocol helps to identify the hardware address once the IP is known. This function is critical in LAN and for routing internet traffic. It is also used to translate IP addresses contained in 3rd layer of OSI into Ethernet MAC addresses which are contained in the 2nd layer of the OSI. In short, this was the actual meaning of the phrase A network pairs an ip and a MAC using Address Resolution Protocol (ARP)’ mentioned in the last line of previous paragraph.
There are different methods for finding your MAC address in different operating systems.
  •  For Windows 98, ME, XP, 2000, NT and windows 7, do the following: Open the MSDOS prompt command window and type ipconfig and then enter.
  •  For MAC OS X users: Open 'System Preferences' (usually found in the Dock) then select Network. Specify location to view your MAC address.
  •  For Linux users: On Linux, Ethernet device is named as eth0. Firstly, become the root and then type ipconfig – a. The MAC address will be listed in the first line as HWaddr.
  •  For iPhones (Let’s not offend our smart-phone fans): Settings > General >About. The MAC address is contained in the 8th line.
     There are many ways to change the MAC address of a device. Some device drivers have an option to change the MAC address from the device properties. But not all have the luxury of changing it from the device properties, in which case the Windows platform comes into play (which is actually the hardest way to MAC alteration). Windows registry can be edited to change your MAC. In Linux, a two sentence command is sufficient to change the MAC address.
--ifconfig  ethO  down  hw  ether  00 : 00 : 00 : 00 : 00 : 01
 --ifconfig  eth0  up
     Concluding, for a MAC OS X, one probably needs to download a patch and apply a few commands to change the MAC. However, changing the MAC address of your device is not recommended since most of the people do it to get past MAC address filtering on a router, using other connections on the internet and hide their actual identity on the internet; most of these activities fall into a morally grey area and should be avoided

No comments:

Post a Comment