Networking Fundaas

IP ADDRESS

there are two types of ip address

1)ipv4

2)ipv6

The IPv4 Address.

It is a 32 bit binary address

The common type of IP address (is known as IPv4, for “version 4”). Here’s an example of what an IP address might look like:

192.168.1.10

An IPv4 address consists of four numbers, each of which contains one to three digits, with a single dot (.) separating each number or set of digits. Each of the four numbers can range from 0 to 255.

Thanks to our IP addresses, we’re pretty much guaranteed that our emails will come and go as expected, and that all our Google searches and website visits will work to perfection.

What would happen if we ran out of IP addresses?

Guess what—we did!

Suddenly, major companies (even Microsoft!) were scrambling to buy unused IP addresses from other companies…for millions of dollars.

What went wrong?

The past decade has seen explosive growth in mobile devices including mobile phones, notebook computers, and wireless handheld devices. The format for IPv4 wasn’t designed to handle the sheer number of IP addresses.

Fortunately, there was a backup IP address type waiting in the wings

The  IPv6.

it is a 128 bit hexadecimal address

It’s called IPv6 and it offers a maximum number of IP address for today and for the future.

Whereas IPv4 supports a maximum of approximately 4.3 billion unique IP addresses, IPv6 supports, in theory, a maximum number that will never run out.

A theoretical maximum of 340,282,366,920,938,463,463,374,607,431,768,211,456. To be exact. In other words, we will never run out of IP addresses again.

An IPv6 address consists of eight octets or groups of four hexadecimal digits. If a group consists of four zeros, the notation can be shortened using a colon to replace the zeros. Here’s an example IPv6 address:

2001:0db8:85a3:0000:0000:8a2e:0370:6455

MAC ADDRESS (media access control)

it is 48 bit hexadecimal address 

Hey Nick. Meet Mac.

Every NIC(network interface card) has a hardware address that’s known as a MAC, for Media Access Control. Where IP addresses are associated with TCP/IP (networking software), MAC addresses are linked to the hardware of network adapters.

A MAC address is given to a network adapter when it is manufactured. It is hardwired or hard-coded onto your computer’s network interface card (NIC) and is unique to it. Something called the ARP (Address Resolution Protocol) translates an IP address into a MAC address. The ARP is like a passport that takes data from an IP address through an actual piece of computer hardware.

Once again, that’s hardware and software working together, IP addresses and MAC addresses working together.

For this reason, the MAC address is sometimes referred to as a networking hardware address, the burned-in address (BIA), or the physical address. Here’s an example of a MAC address for an Ethernet NIC: 00:0a:95:9d:68:16.

As you’ve probably noticed, the MAC address itself doesn’t look anything like an IP address (see yours here). The MAC address is a string of usually six sets of two-digits or characters, separated by colons.

Some well-known manufacturers of network adapters or NICs are Dell, Belkin, Nortel and Cisco. These manufacturers all place a special number sequence (called the Organizationally Unique Identifier or OUI) in the MAC address that identifies them as the manufacturer. The OUI is typically right at the front of the address.

For example, consider a network adapter with the MAC address “00-14-22-01-23-45.” The OUI for the manufacture of this router is the first three octets—”00-14-22.” Here are the OUI for other some well-known manufacturers.

Dell: 00-14-22
Nortel: 00-04-DC
Cisco: 00-40-96
Belkin: 00-30-BD

It’s common for the larger manufacturers of networking equipment to have more than one set of OUIs.

ARP (Address Resolution Protocol)
Already we know that importance of IP addressing. In simple terms, it makes addressing
on the Internet uniform. However, having only the IP address of a node is not good enough.
There must be a process for obtaining the physical address of a computer based on its IP
address, in order to be able to finally actually transmit the frame/datagram over the network
to which the node belongs. This process is called address resolution. This is required
because at the hardware level, computers identify each other based on the physical addresses
hard-coded on their Network Interface Cards (NICs). They neither know the relationship
between the IP address prefix and a physical network, nor the relationship between on IP
address suffix and a particular computer.
Networking hardware demands that a datagram contain the physical address of the
intended recipient. It has no clue to the IP addresses. To solve the problem, the Address
Resolution Protocol (ARP) was developed. ARP takes the IP address of a host as input and
gives its corresponding physical address as the output which is shown in Figure 10.13

arp

Any time a host, or a router, needs to find the MAC address of another host or router
on its network, it sends an ARP query packet. The packet includes the physical and IP
addresses of the sender and the IP address of the receiver. Because the sender does not
know the physical address of the receiver, the query is broadcast over the network as shown
in Figure 10.14.
Every host or router on the network receives and processes the ARP query packet, but
only the intended recipient recognizes its IP address and sends back on ARP response
packet. The response packet contains the recipient’s IP and physical addresses.
The packet is unicast directly to the inquirer using the physical address received in the
query packet.
In the Figure 10.14 (a), the System on the left (A) has a packet that needs to be
delivered to another System (B) with IP address 141.23.56.23. System A needs to pass the
packet to its data link layer for the actual delivery, but it does not know the physical address
of the recipient. It uses the services of ARP to send a broadcast request packet to ask for
the physical address of a system with an IP address of 141.23.56.23.

arp 2

This packet is received by every system on the physical network, but only System B will
answer it, as shown in Figure 10.14 (b). System B sends on ARP reply packet that includes
its physical address. Now System A can send all the packets it has for this destination,usingthe physical address it received.

rarp 2.PNG

RARP (Reverse Address Resolution Protocol)
There is one more protocol in the ARP suite of protocols. The Reverse Address
Resolution Protocol (RARP) is used to obtain the IP address of a host based on its
physical address. That is, it performs a job that is exactly opposite to that of the ARP. An
obvious question would be : is this really needed? After all, a host should have the IP address
stored on its hard disk! However, there are situations when this is not the case. Firstly,
a host may not have a hard disk at all (e.g., a diskless workstation). Secondly, when a new host is being connected to a network for the very first time, it does not know its IP address.
Finally, a computer may be discarded and replaced by another computer, but the same
network card could be reused. In all these situations, the computer does not know it own IP address.

rarp.PNG

RARP works in very similar way to ARP, but in the exactly opposite direction as shown
in Figure 10.15.
In RARP, the host interested in knowing its IP address broadcasts on RARP query
datagram. This datagram contains its physical address. Every other computer on the network
receives the datagram. All the computers except a centralized computer (the server computer)
ignore this datagram. However, the server recognizes this special kind of datagram and
sends the broadcasting computer its IP address. The server contains a list of the physical
addresses and their corresponding IP addresses for all diskless workstations which is shown in Figure 10.16.

In the Figure 10.16 (a), the system on the left (A) has a packet that needs to be
delivered to another System (B) with physical address A46EF45983AB. System A needs to
pass the packet to its data link layer for the actual delivery, but it does not know the IP
address of the recipient. It uses the services of RARP to send a broadcast request packet to
ask for the IP address of a system with the physical address 0FA46EF45983AB.
This packet is received by every system on the physical network, but only System B will
answer it, as shown in Figure 10.16 (b). System B sends an RARP reply packet that include
its IP address. Now System A can send all the packets it has for this destination using the
IP address it received.

woooh what a theory need a burger for a break……