Thursday, November 12, 2015

Week 10: Day 029 - TCP/IP Basics #2


Last time I went over the protocols of TCP/IP and how it fits in with the theory. Today, I'm gonna go more in-depth with the Internet layer and IP addressing. This will lead me head on in the the important parts of this chapter, goodie!

Firstly, at LAN level, all computer use Ethernet, which makes an obstacle for WAN (wide-area network) communication. As we know, a computer sending a frame to another, must know the MAC address of the computer it is sending to. But how does it get it? Well it's actually quite simple, in a network, the sending computer broadcasts its MAC address by sending a frame to the universal MAC address which is, FF-FF-FF-FF-FF-FF as if there couldn't be anymore Fs. This however, takes up some bandwidth, so if the entire Internet started broadcasting, well the Internet would DIE! So to overcome this, TCP/IP networks use IP addressing, as we all know. Every device on the network has an IP address that is provided by the TCP/IP network. This is, like the MAC Address, used as an identifier.  Then the IP addresses starting grouping up into sets to create a logical network that can tell the difference between one LAN and another. Because the TCP/IP network equipment is so great, it can communicate between LANs within a WAN without the need to broadcast MAC Addresses.

Now it's time to gain a greater understanding of IP addressing. The most common type of IP address is IPv4 which has a 32-bit value.

Guys, here it is:
1100000010101000000001000000000010

U WOT M8? What even is that?! Well apparently this is the long version of an IP Address, it's actually shortened into what we see. All IPs are, is 32 binary digit, which are broken down into groups of eight., and seperated by dots.

It looks more like this:

11000000.10101000.00000100.00000010

Still not the IP I know. Each of the 8-bit values are converted into a decimal number between 0 and 2055. So after that conversion, it looks like this:

192.168.4.2

That's more like the IP I know! That's in IPv4 dotted decimal notation. Unfortunately for me, people that work on TCP/IP networks must know how to convert binary to dotted decimals. However, it's easily done through the operating system's calculator (Linux has a bunch.) To convert decimal to binary, go to decimal view, type in the value, switch to binary value, and you get the result. You can do this vice versa to get the opposite. Similar to the MAC Address, on every network, as I've said, the IP needs to be unique as well. You will never find two computers on the network with the same IP address. Every operating system has a way of seeing the system's IP and MAC Address. For example, on Windows, you would obviously put in ipconfig, and get them for the system. On Linux/Mac OSX it's practically the same, ifconfig. That ends this entry, thanks for reading, and goodbye.

1 comment: