• December 19th, 2004, 05:04 PM
ch4r
Feedback welcome:
-----------------------------------------
By Niels | nielsosky@gmail.com | www.binaryuniverse.no-ip.com
=================================================================================
This tutorial may be redistributed and hosted on other servers as long as full credit is given to me, Niels, and it is left completely intact.
=================================================================================

IP addresses are addresses to identify host uniquely over the internet. Think about it, if you are communicating with a web server, or any other kind of computer via a network or the internet, that machine needs to know how to reply to you, just as if you are writing a letter to a person, that person needs an address to send a reply to. IP addresses in IPv4, which is currently the most version of Internet Protocol, consist of 32-bit numbers, such as:

11010011 01110100 11101001 00101110

However, this form of writing IP addresses is hardly easily read. To make IP addresses more readable by humans, they are usually written in what is referred to as dotted decimal notation. To translate this to dotted decimal notation, each octet (byte/8 bits) is converted to a decimal number and each octet is seperated by a dot, hence the name dotted decimal notation. Thus, the previous example is the following in dotted decimal notation:

211.116.233.46

IP addresses are divided into 5 classes, Class A, Class B, Class C, Class D, and Class E. Classes D and E are reserved for special use, while classes A, B, and C are used by the public, so to speak. Class A addresses always begin with a 0 when in binary form, and can start with any octet from 1 to 126. In a class A address, the first octet represents which network the IP belongs to, while the last three octets are used to represent the host on the network. This leaves a possibility for a large number of different hosts, and thus class A addresses are reserved for large organizations.

Class B addresses will always begin with 10 in binary notation, meaning the first octet in dotted decimal notation will be a number from 128 to 191. In class A addresses, we saw that the first octet identified the network, and the last three the host. In class B addresses, the frist two octets identify the network of the IP, and the last two identify the host. If you're wondering what happenned to an IP starting with 127.x.x.x, the answer is that it is reserved for local loopback, meaning that 127.x.x.x is always the machine you are on, so if you ping 127.0.0.1, you are actually pinging your own computer.

Class C addresses always begin with 110 in binary form, which also means that the first octet as a decimal will be a number in the range from 192 to 223. We saw earlier that the first octet of class A networks represents the network, the first two octets for class B, and to stick with the pattern, the first three octets of a class C represent the network portion of the address, and the last octet represents the host portion of the address. You'll notice that this leaves room for many class C networks, but not so many hosts per network, wheras class A is exactly the opposite.

Now that we've discussed the basics of IP addresses, we can move on to level two: MAC addresses. A MAC (Media Access Control) address is a unique 12-bit hex number used to identify a network adapter, and are used for identifying hosts on a LAN (Local Area Network). They are displayed in the following form:

AA:AA:AA:BB:BB:BB

The first half, in this case AA:AA:AA is used to identify the manufacturer of the networking hardware, and the second half, in this case BB:BB:BB is used to identify the serial number of the network adapter. If everyone left their networking hardware as it was, no two adapters would have the same MAC address, but many users, for many different reasons, will spoof a different MAC address, or even outright change it on occasion.

And that, ladies and gentlemen, is how ARP ties MAC addresses and IP addresses together. I hope you learned something from this, or at least found it mildly entertaining. El fin.

-Niels
------------------------------------------------

-ch4r
• December 19th, 2004, 07:39 PM
el-half
Niels! Remember me?
• December 19th, 2004, 11:55 PM
chsh
Decently written tutorial. I just have a couple of corrections/notes.

Quote:

Originally posted here by ch4r
Now that we've discussed the basics of IP addresses, we can move on to level two: MAC addresses. A MAC (Media Access Control) address is a unique 12-bit hex number used to identify a network adapter, and are used for identifying hosts on a LAN (Local Area Network).
For clarification: MAC Addresses are 48 bits/6 Bytes/12 nibbles.

Quote:

The first half, in this case AA:AA:AA is used to identify the manufacturer of the networking hardware, and the second half, in this case BB:BB:BB is used to identify the serial number of the network adapter. If everyone left their networking hardware as it was, no two adapters would have the same MAC address, but many users, for many different reasons, will spoof a different MAC address, or even outright change it on occasion.
Theoretically it's true, however with only 2^24 (16,777,216) possible combinations for each manufacturer, and depending on how the manufacturer allocates the addresses, it is possible (as in, it does occur) to have two genuine hardware MAC addresses that are the same. I had one such conflict on two Dell OptiPlex desktops (GX-1xx lines) which used Intel 100Mbps onboard NICs, and that was in one group of 100 machines. It does happen, though it does so very rarely.
• January 30th, 2006, 12:40 PM
jackandjill
hi
Why dont you give credit to mr. D. Comer for the IP address portion as written in his book on TCP/IP.

Never mind.
• January 30th, 2006, 05:17 PM
Nokia
Why dont you look at the date that is flashing on the thread and not post usless crap into a thread that is over a year old.
• January 30th, 2006, 10:18 PM
Relyt
jackandjill,

No doubt the good Mr. D. Comer is distingish in his profession and has spent years teaching and writing about the protocols. However he did not create TCP/IP. It was developed by Robert E. Kahn and Vinton Cerf of the Defense Advance Research Projects Agency.

cheers