Foundational Concepts in Networking

Collision Domain

A collision domain is basically state that how many devices
can send the data at same time and so it can collide to each
other which leads to data less. So we always prefer to have
less number of collision domains. Like in a Hub, only one
device can send the data at one time instead in a switch every
device connected can send data at same time. So we can simply
say that the number of switch is equal to number of ports. Same
is with Router.
Broadcast Domain

Broadcasting means it can send traffic to all nodes in a
network. This can be within a LAN. So if we take an example of
switch then a device connected to a port can send traffic to
all connected devices. When we will talk about router then
it’s different as each port in a router works as Layer3
switch. So number of broadcast domain is equal to number of
ports in a router. So if a device connected to a port so it
can only send the broadcast to that single port. So hub and
switch are single broadcast domain while router is equal to
number of ports.

So here is the issue when there is a broadcast in a switch and
which is actually not needed by the other devices. So it just
consumes resources of the device. To avoid this we have a
solution called VLAN.
VLAN (Virtual LAN)

VLAN is the process of separating on logical basis on same LAN.
Each VLAN has different network. We can work on broadcast issue
which comes above. Each VLAN is different Layer 3 addressing.
We can divide a switch logical on the basis of VLAN and can
have different networks. So if we have two VLANs configured on
switch then we will have two broadcast domain now.

Each VLAN works as a Layer 3 switch and by default each VLAN
can’t communicate with each other. If you want to communicate
them you need router.
Network Devices

Repeater is simply a device which receives a signal and just
retransmit it. The common example of this is a Wifi Repeater.

Hub is a half-duplex device which can send or receive data at
one time. It has multiple input and output ports. If you will
receive data at one port then it will be forwarded to all. It
can’t learn mac address.

Bridge is a device which works on Layer 2 which can learn MAC
address and save it in CAM table.

How CAM table actually saves?

When a device is connected to a port in a switch and it sends a
data from that port. So first entry in CAM table will be mac
address of the first device and port 1. Now the data will be
populated to all ports and the one which will receives data and
send response. Then second entry will be populated in it.  And
how it will be completed. Now next time, it will be remembered
and saves to that.

Switch is similar to bridge but it is more intelligent than
Bridge. It has specialized hardware to perform the tasks. It
also supports VLAN.

Router is Layer 3 devices. It can routes packets to different
networks. It does it with Routing Table.
Device Addressing

Each device on the network have two important addresses. One is
MAC address while other is IP Address.
MAC Address Works on Layer 2 of OSI model and it is used to 
identify devices on the local network

MAC stands for Media Access Control and it is 48- bit address.
This is assigned to on network interface and known as physical
address.

Example: 6 groups of 2 hexadecimal Numbers (0-9, A-F).

00:CC:34:F3:C4:45

Or 48 – Bit MAC Address

First three groups are called as OUI “Organization Unit
Identifies”. OUI identifies the manufacturer of network
devices.
IP (Internet Protocol) address works on Layer 3 and it helps 
identifying the devices outside the network. This is sometimes
called Logical Address. This is assigned via Administrator and
can be changed. This can be either Static or Dynamic.

Example:

Broadcast MAC Address is a unique identifier assigned to a
Network to send data to all devices on a local network.

It has all FF’s – FF:FF:FF:FF:FF:FF
IPv4 Address

It is 32-bit logical address assigned to a network devices.
Like 192.168.10.2 (Every number can be represented by 8 binary
bits).

Class A  -              0.0.0.0 to 127.255.255.255

Class B  -              128.0.0.0 to 192.255.255.255

Class C  -              192.0.0.0 to 223.255.255.255

Class D  -              224.0.0.0 to 239.255.255.255

                       Reserved for multicast purposes

Class E   -             240.0.0.0 to 255.255.255.255

                       Reserved for experimental purposes

If you want to assign any IP addresses then you can use from
Class A, B or C.

We have 32-bit address so minimum can be 0.0.0.0 and maximum
can be 255.255.255.255.

RFC 1918 Addresses

There are a block of IP Addresses in each class which has been
reserved for Private IP Addresses. You can’t route them to
internet. This can be used by anyone. Organization use these
IP’s addresses for internal networking.

Class A – 10.0.0.0 to 10.255.255.255       (10.0.0.0/8)

Class B  - 172.16.0.0 to 172.31.255.255    (172.16.0.0/12)

Class C  - 192.168.0.0 to 192.168.255.255  (192.168.0.0/16)

Loopback Address

The entire 127.0.0.0/8 address is reserved for loopback
address. The most common loopback address is 127.0.0.1 and it
represents the system itself. When you send any packets, it
will be received by itself.
Subnet Mask

A Subnet mask consists of two parts. A host portion and a
network portion. It is a 32-bit value which has 0s and 1s. 0s
are for host bits while 1s are for network bits. And an IP
address is divide in such a way that 0 is always a network
address while 255 is a broadcast address. Every IP is always
accompanied by a subnet mask.

192.168.1.0/24 is an example where /24 is subnet mask
accompanied by Network “192.168.1.0”. The function of subnet
mask is to differ the host address and network address. It
tells you which part belongs to hosts and networks.

192.168.1.0/24

So here 24 stands for 255.255.255.0 in decimal form and in
binary it is 11111111.11111111.11111111.00000000

So here, first 24 bits are made up of 1s and is the network
portion and last 8 bits are 0s shows us the host parts.

There are default subnet mask of IP address classes.

Class A has a default subnet mask of /8.
An example – 122.0.0.0/8

Class B has a default subnet mask of /16.
An example – 172.16.0.0/16

Class C has a default subnet mask of /24.
An example – 192.168.10.0/24

Let’s find the number of hosts in a network. There is a simple
command to find that. The command is = 2H  where H is number
of host bits. It will give you possible number of hosts. Now
the first address is network address and last is broadcast
host. And we can’t use that. So total number of usable IP
address will be “2H- 2”.

 Let’s take an example of Class C. We have a network
“192.168.10.0/24”.

Here the value of H is “8” as it has 8 zeroes.

Total number of usable IP addresses are = 28 – 2

                                       = 254
Keep exploring. Continue reading on our blog.

OSI Model

One thought on “Foundational Concepts in Networking

  • Leave a Reply

    Your email address will not be published. Required fields are marked *