CCNA – ICND1-003

March 22, 2016 | Views: 2823

Begin Learning Cyber Security for FREE Now!

FREE REGISTRATIONAlready a Member Login Here

Alright, alright. Let’s dive into IP addressing.

An IP address is a number assigned to a device that participates in a network communication. It’s used for two purposes:

  • Host (device identification)
  • Location (network identification)

An example of an IP address:

172.30.201.93

What you should see in the above example is that it’s divided into four parts. Each of those four parts can be assigned a value from 0 to 255. “Why is that?” you may ask. Well, an IP address is 4 bytes long, that’s why it’s divided into four parts, for the sake of convenience. Each byte can have a maximum value of 255, simply because that’s how much a byte can have at most.

As I wrote earlier, an IP address serves two functions: device identification and network identification. Looking at 172.30.201.93, we have to see which part of the address represents the network, and which part represents the host. How do we see though? This is where something called a subnet mask comes in.

001

A Subnet mask is 4 bytes long as well. 255 indicates that the part of the IP address represents the network, and 0 indicates that it’s a host. In other words, if we combine 172.30.201.93 with a subnet mask of 255.255.255.0, we get the host 93, which belongs to 172.30.201 network. Actually, networks are not written this way. If you want to refer to a whole network, you should write 172.30.201.0.

Scenario

In a local area network (LAN) environment, your computer has to know the MAC address of a computer it wants to communicate with. Imagine you already know the IP address of the computer and want to connect to it. In our example, we’ll try to ping our friend’s computer (test the reachability).

002

Note: One thing about switches: they learn MAC addresses (which MAC is on which port).

So, you open up your command prompt or terminal if you are using Linux and type

ping 192.168.0.102

Once you hit enter, your computer will look in its cache to see if the IP address you are trying to ping has a mapped hardware address (i.e. MAC address). If the MAC address is not found, it will send a broadcast message using Address Resolution Protocol (ARP).

A broadcast is a type of message that gets to all computers within one network. ARP is a protocol that is used to map MAC addresses to IP addresses and store them in ARP-cache inside your computer.

003

When you send ARP broadcast to resolve the MAC address of 192.168.0.102, this message gets to all the PCs, but disregarded by the ones who don’t have the 192.168.0.102 IP address. When .102 gets your message, it replies to you via unicast message (a message that gets to only one intended addressee).

004

When your computer gets the reply, it stores the new mapping in its ARP-cache. Now, two computers can start communicating using unicast messages.

To see ARP-cache using your Windows machine, open the Command Prompt via Start > Run > cmd and type in the following command and hit enter:

arp -a

Output should be something similar as the following:

005

Don’t pay attention to the rest of the results; we’ll cover them in our next lesson.


This lesson we covered how two computers communicate within one network. What if you want to access a computer on other network? Other country? These questions are to be answered in our next lesson.

Share with Friends
FacebookTwitterLinkedInEmail
Use Cybytes and
Tip the Author!
Join
Share with Friends
FacebookTwitterLinkedInEmail
Ready to share your knowledge and expertise?
3 Comments
  1. Very informative and to the point.

  2. I enjoyed the lesson

  3. Great explanation!

Comment on This

You must be logged in to post a comment.

Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

Support Cybrary

Donate Here to Get This Month's Donor Badge

 

Cybrary|0P3N

Is Linux Worth Learning in 2020?
Views: 335 / December 14, 2019
How do I Get MTA Certified?
Views: 927 / December 12, 2019
How much does your PAM software really cost?
Views: 1380 / December 10, 2019
How Do I Get into Android Development?
Views: 1758 / December 8, 2019

We recommend always using caution when following any link

Are you sure you want to continue?

Continue
Cancel