Professional Documents
Culture Documents
08/08/2022 1
What is NIC address?
Network Interface Card/Controller is in-short called NIC.
NIC is also referred to as an Ethernet card and network adapter.
It is an expansion card or hardware interface that enables a computer to connect
to a network; Like home network or Internet using an Ethernet cable with an RJ-45
connector.
IP address specifies the technical format of the addressing and packets scheme.
IP address is a network layer address and has no dependence on the data link
layer address (such as a MAC address of a network interface card).
08/08/2022 8
IP is in charge of routing TCP’s packets across the Internet.
Each TCP/IP host is identified by a logical address called IP.
A unique IP address is required for each host and network component that
communicates using TCP/IP.
Each IP address includes a network ID and a host ID.
Network ID identifies the systems that are located on the same physical
network bounded by IP routers.
• All systems on the same physical network must have the same network ID.
• The network ID must be unique to the internetwork.
Host ID identifies workstation, server or other TCP/IP host within network.
• The address for each host must be unique to the network ID.
9
08/08/2022
There are two versions of IP: IPv4 and IPv6
1. IPv4 address
IPv4 address is a 32-bit address that uniquely and universally defines the connection
of a device (for example, a computer or a router) to the Internet.
32 binary bits are broken into four octets (1 byte = 1 octet = 8 bits)
How do you write an IPv4 address?
IPv4 addresses are usually represented in dot-decimal notation, consisting of four
decimal numbers, each ranging from 0 to 255, separated by dots, e.g., 172.16.254.1.
Each part represents a group of 8 bits (one octet) of the address.
Where is IPv4 used?
IPv4 is widely used to identify devices on a network using an addressing system.
It was the first version of IP deployed for production in the ARPANET in 1983.
It uses 32-bit address scheme to store 2^32 addresses which is more than 4 billion
08/08/2022 10
2. IPv6 = IPng (Internet Protocol next generation)
IPv6 is the most recent version of the Internet Protocol.
This new IP version is being deployed to fulfil the need for more Internet addresses.
It was aimed to resolve issues that are associated with IPv4 with 128-bit address
space, it allows 340 undecillion unique address space.
MAC
Address
08/08/2022 14
Logical (IP) Vs. Physical (MAC) Address
If every address were unique, all routers on the Internet would need to store the
address of each and every machine on the Internet.
This would make efficient routing impossible, even if only a fraction of the possible
addresses were used.
Rather than all 32 bits being treated as a unique identifier, as in flat addressing, a
part of the address is designated as the network address, and the other part is
designated as either the subnet and host or just the node address.
08/08/2022 17
Network Addressing
Network address uniquely identifies each network.
Every machine on the same network shares that network address as part of its
IP address.
In the IP address 172.16.30.56; for example, 172.16 is the network address.
Node address is assigned to & uniquely identifies each machine on a network.
This part of the address must be unique because it identifies a particular
machine an individual as opposed to a network, which is a group.
This number can also be referred to as a host address.
In the sample IP address 172.16.30.56 .30.56 is the node address.
08/08/2022 18
Subnetting
Creates multiple logical networks, exist within a single Class A, B, or C network
If you do not subnet, you will only be able to use one network from your Class
A, B, or C network, which is unrealistic
Each data link on a network must have a unique network ID, with every node on
that link being a member of the same network
Benefits of Subnetting
1) Reduced network traffic
2) Optimized network performance
3) Simplified management
4) Facilitated spanning of large geographical distances
08/08/2022 19
Classful addressing?
Classful addressing is a concept that divides the available address space of IPv4 into five
classes namely A, B, C, D & E.
Classless addressing uses a two-part view of IP addresses, and classful addressing has a
three-part view.
In classful routing, address is divided into three parts which are: Network, Subnet and Host.
While in classless routing, address is divided into two parts which are: Subnet and Host.
There are several problems with classful addressing; the biggest resulting from not having a
network class that can efficiently support a medium-sized domain.
Generally, a Class C network supporting 254 hosts is too small, while a Class B network
supporting 65,534 hosts is much too large.
=> Dotted decimal notation: first octet is in range of 128-191.
Example: 132.45. ... Note that first octet is 132 that is in range from 128 to 191.
In Class B, first 16 bits are assigned for Network ID and the last 16 bits give Hosts.
08/08/2022 20
The designers of the Internet decided to create classes of networks based on network size.
For the small number of networks possessing a very large number of nodes, they created
the rank Class A network.
At the other extreme is the Class C network, which is reserved for the numerous networks
with a small number of nodes.
The class distinction for networks between very large and very small is predictably called
the Class B network.
Subdividing an IP address into a network and node address is determined by the class
designation of one’s network.
08/08/2022 21
08/08/2022 22
08/08/2022
23
IP A
d dress
Clas
ses
Since, the network ID bits must be always chosen in a contiguous fashion from the high
order bits, a shorthand way of expressing a subnet mask is to denote the number of bits that
define the network ID as a network prefix using the network prefix notation:
Address Bits for Subnet Mask Subnet Mask Network Prefix
Class A 11111111 00000000 00000000 00000000 255.0.0.0 /8
Class B 11111111 11111111 00000000 00000000 255.255.0.0 /16
Class C 11111111 11111111 11111111 00000000 255.255.255.0 /24
For example, class B network address 131.107.0.0 with the subnet mask of
255.255.0.0 would be expressed in network prefix notation as: 131.107.0.0/16.
Network class Prefix bits Maximum number Suffix bits Maximum computers
of networks per network
A 7 128 24 16777216
B 14 16384 16 65536
C 21 2097152 8 256
08/08/2022 24
Class A
Class A addresses are assigned to networks with a very large number of hosts.
The designers of the IP address scheme said that the first bit of the first byte in a
Class A network address must always be off or 0.
This means the first octet of Class A address (which represents Net ID) must be
between 0 and 127. Here is how those numbers are defined:
0xxxxxxx: If we turn the other 7 bits all off and then turn them all on, we will
find your Class A range of network addresses.
00000000=0
01111111=127
The remaining 24 bits (last three octets) represent the host ID.
The Class A format is: Network.Node.Node.Node
08/08/2022
Class B
Class B addresses are assigned to medium-sized to large-sized networks.
In this class the first bit of first byte must always be turned on, but the second
bit must always be turned off. If you turn the other six bits all off and then all
on, you will find the range for a Class B network:
10000000=128
10111111=191
Class B can be defined when first byte (octet) is configured from 128 to 191.
The first two octets in class B network address represent the network ID.
The remaining 16 bits (last two octets) represent the host ID.
This allows for 16,384 networks and 65,534 hosts per network.
The format is: Network.Network.Node.Node
08/08/2022 26
Class C
Class C addresses are used for small networks.
The three high-order bits in a class C address are always set to binary 1 1 0.
Following the same process as the previous classes, convert from binary to
decimal to find the range. Here is the range for a Class C network:
11000000=192
11011111=223
The next 21 bits (completing the first three octets) complete the network ID.
The remaining 8 bits (last octet) represent the host ID.
This allows for 2,097,152 networks and 254 hosts per network.
The format is: Network.Network.Network.Node
08/08/2022 27
Class D
Class D addresses are reserved for IP multicast addresses.
The four high-order bits in a class D address are always set to binary 1 1 1 0.
The remaining bits are for the address that interested hosts will recognize.
08/08/2022 28
Class E
Class E addresses are experimental addresses reserved for future use.
The number 127 in a class A address is reserved for internal loopback functions.
All bits within the host ID cannot be set to 1, because this host ID is reserved as a broadcast
address to send a packet to all hosts on a network.
All bits in the host ID cannot be set to 0, because this host ID is reserved to denote the IP
network ID.
08/08/2022 29
Subnets and Subnet Masks
The Internet Address Classes were designed to accommodate three different
scales of IP internetworks, where the 32 bits of the IP address are apportioned
between network IDs and host IDs depending on how many networks and
hosts per network are needed.
However, consider the class A network ID, which has the possibility of over
16 million hosts on the same network.
All the hosts on the same physical network bounded by IP routers share the
same broadcast traffic; they are in the same broadcast domain.
It is not practical to have 16 million nodes in the same broadcast domain.
The result is that most of the 16 million host addresses are not assignable and
are wasted.
Even a class B network with 65 thousand hosts is impractical.
08/08/2022 30
Subnet Masks
With the advent of subnetting, one can no longer rely on the definition of the IP
address classes to determine the network ID in the IP address.
A new value is needed to define which part of the IP address is the network ID
and which part is the host ID, regardless of whether class-based or subnetted
network IDs are being used.
The use of a subnet mask (address mask) as a 32-bit value that is used to
distinguish the network ID from the host ID in an arbitrary IP address.
The bits of the subnet mask are defined as:
All bits that correspond to the network ID are set to 1.
All bits that correspond to the host ID are set to 0.
08/08/2022
Determining the Network ID
To extract the network ID from an arbitrary IP address using an arbitrary
subnet mask, IP uses a mathematical operation called a logical AND
comparison.
In an AND comparison, the result of two items being compared is true only
when both items being compared are true, otherwise, the result is false.
Applying this principle to bits, the result is 1 when both bits being compared
are 1; otherwise, the result is 0.
IP takes the 32-bit IP address and logically ANDs it with the 32-bit subnet
mask.
This operation is known as a bit-wise logical AND.
The result of the bit-wise logical AND of the IP address and the subnet mask is
the network ID.
08/08/2022 34
Determining the Network ID
example, what is the network ID of the IP node 131.107.189.41 with a subnet mask of
255.255.240.0?
To obtain the result, turn both numbers into their binary equivalents and line them up.
Then, perform the AND operation on each bit and write down the result.
10000011 01101011 10111101 00101001 IP Address
11111111 11111111 11110000 00000000 Subnet Mask
10000011 01101011 10110000 00000000 Network ID
The result of the bit-wise logical AND of the 32 bits of the IP address and the subnet
mask is the network ID 131.107.176.0.
08/08/2022 35
IP addressing: CIDR
CIDR: Classless InterDomain Routing
Improve address space utilization
Routing scalability in the Internet
• For example, if an ISP owns network 172.16.0.0/16, then the ISP can offer 172.16.1.0/24,
172.16.2.0/24,and so on to customers. Yet, when advertising to other providers, the ISP
only needs to advertise 172.16.0.0/16
subnet portion of address of arbitrary length
address format: a.b.c.d/x, where x is # bits in subnet portion of address
host
Subnet part part
11001000 00010111 00010000 00000000
200.23.16.0/23
Network Layer 4-36
Examples:
08/08/2022 37
e s:
pl
x am
e E
o r
r M
f o
e re
k h
l ic
C
08/08/2022 38
What is public IP and Private IP?
Public IP address identifies you to the wider internet, so that all the information you're
searching for can find you.
Public IP address of a system is the IP address which is used to communicate outside the
network. Public IP address is basically assigned by the ISP (Internet Service Provider).
Private IP address is used within a private network to connect securely to other devices
within that same network.
Each device within the same network has a unique private IP address
Private IP address of a system is the IP address which is used to communicate within the
same network.
Using private IP data or information can be sent or received within the same network.
08/08/2022 39
PRIVATE IP ADDRESS PUBLIC IP ADDRESS
Scope is local. Scope is global.
It is used to communicate within the network. It is used to communicate outside the network.
Private IP addresses of the systems connected in a Public IP may differ in uniform or non-uniform
network differ in a uniform manner. manner.
It works only in LAN. It is used to get internet service.
It is used to load network operating system. It is controlled by ISP.
It is available in free of cost. It is not free of cost.
Private IP can be known by entering “ipconfig” Public IP can be known by searching “what is my
on command prompt. ip” on google.
Range:10.0.0.0 – 10.255.255.255, 172.16.0.0 – Range:
172.31.255.255, 192.168.0.0 – 192.168.255.255 Besides private IP addresses, rest are public.
Example: 192.168.1.10 Example: 17.5.7.8
08/08/2022 40
What is NAT and PAT?
NAT stands for Network Address Translation. PAT stands for Port Address Translation.
NAT is used to map public IP addresses to private IP addresses, it could be a one-to-one or
many-to-one relation.
PAT is a type of NAT where the multiple private IP addresses are mapped into a single
public IP (many-to-one) by using ports.
PAT is used to give internal network hosts access to external network hosts. In a local area
network (LAN) environment, many clients are accessing the Internet via the LAN's router.
Each client that demands Internet access is connected with public network hosts via a
single public IP address.
08/08/2022 41
Internet Control Message Protocol (ICMP)
What is ICMP error message?
ICMP (Internet Control Message Protocol) is an error-reporting protocol that network
devices such as routers use to generate error messages to the source IP address when
network problems prevent delivery of IP packets.
ICMP: Used to communicate IP status and error messages between hosts and routers;
Every ICMPv6 message is preceded by an IPv6 header and 0 or more IPv6 extension
headers.
08/08/2022 42
• What is its purpose?
The purpose of control messages is to provide feedback about problems in the
communication environment.
ICMP messages typically report errors in the datagram processing.
Both a gateway or a host can use the ICMP.
A few uses for ICMP messages could be:
when a datagram cannot reach its destination,
when the gateway does not have the buffering capacity to forward a
datagram,
when the gateway can direct the host to send traffic on a shorter route.
ICMP Message Format
• Type: the type of service being provided. There’s a
specific type number for each error or
informational message sent. ICMP Message:
• Code: the error code provides further information
on the message type. It tells what was the possible IPv4 Header
cause to the problem.
Type 8
• Checksum: the 16-bit one's complement of the bytes
one's complement sum of the ICMP message Code 8
starting with the ICMP type. Used to find problems bytes
on the ICMP message ONLY. ICMP Checksum
16
bytes
• Parameters: used in some specific ICMP
messages to exchange other information such as Parameters, if any Var.
pointers, identifiers, and sequence numbers.
• Additional Info: Used on error report messages, Additional Info Var.
includes the header plus additional octets from the
datagram that caused the problem.
ICMP Messages: Summary
Type Message Query/Error Description
0 Echo Reply Query Response given when a sender issues an Echo Request
3 Destination Error The destination host cannot be reached
Unreachable
4 Source Quench Error Source host is sending datagrams too fast
5 Redirect Error Used by a router to notify a host of a better route
8 Echo Request Query Used to check whether communication with a host is possible
11 Time Exceeded Error Time-To-Live (TTL) has reached 0
12 Parameter Problem Error There was a problem with the IP Header
13 Timestamp Request Query Used for sampling the delay characteristics of the network
14 Timestamp Reply Query Used for reporting how long it took for a Timestamp Request
to reach a host
15 Information Query Used by a host to discover the address of the network it is on
Request
16 Information Reply Query Used for replying an Information Request message with the
network address
Internet Group Management Protocol (IGMP)
IGMP is a group management protocol.
It helps a multicast router protocol.
It helps a multicast router create and update a list of loyal create and update a
list of loyal members related to related to each router interface.
Multicasting:
Processes may have to send the same message to a large numbers of receivers
simultaneously
– Example: Video-on-demand
– Informing multiple stockbrokers about changes to a stock price
– IGMP is necessary but not sufficient for multicasting
– IGMP is a companion to the IP protocol
08/08/2022 46
Multicasting and Routing
• To support multicasting there needs to be routers capable of routing multicast packets
• Routing tables must be updated using a multicasting routing protocol
• IGMP is not a multicasting routing protocol
• IGMP manages group membership
• Group membership: hosts and routers and the groups they are “interested” in
(subscribe to)
• IGMP protocol gives the multicast routers info about the membership status of hosts
(routers) connected to the network.
• A multicast router may receive thousands of multicast packets every day for different
groups
• If a router has no knowledge about the membership status of the hosts it must
broadcast all of the multicast packets (excess traffic)
• Better to maintain list of groups in the network for which there is at least one “loyal”
member
• ICMP helps the multicast router create and update group lists related to each interface
08/08/2022 47
08/08/2022 48
IGMP Operation
IGMP operates locally, i.e., within a network
For each group there is only one router connected to the network that has the duty of
distributing the multicast packets destined for that group
A host has “membership” if one of its processes receives multicast packets from some group
A router has “membership” means that there is a network attached to some other interface
that receives multicast packets for the group
• R is distributing router
• R1 & R2 are multicast routers
• Possibly receive packets from R
08/08/2022 49
Joining a Group - Host
A host or router can join a group
A host receives requests from processes to join a group
If no previous request from another process, a membership report message is sent
Otherwise, no membership report need be sent as the host already receives multicast
packets for this group.
Joining a Group - Router
A router also maintains a list of groupids that show membership for the networks
connected to each interface
If a multicasting router receives a membership report from a device attached to an
interface for a network where there was not already interest, the router will issue a
membership report message to a device on the network that supplies the multicast
packets for this group
Router acts like host but group list is much broader (accumulation of all loyal
members that are connected to its interfaces)
08/08/2022 50
Internet Control Message Protocol version 6
Same as ICMP for IPv4, but with a number of changes.
The IPv6 version of ICMP includes a pseudo-header in its checksum
computation.
The reason for the change is to protect ICMP from mis-delivery or corruption of
those fields of the IPv6 header on which it depends, which, unlike IPv4, are not
covered by an internet-layer checksum.
The Next Header field in the pseudo-header for ICMP contains the value 58,
which identifies the IPv6 version of ICMP.
ICMPv6 is an integral part of IPv6 and MUST be fully implemented by every
IPv6 node.
ICMPv6 is used by IPv6 nodes to report errors encountered in processing
packets, and to perform other internet-layer functions, such as diagnostics
(ICMPv6 "ping").
ICMPv6 Message Format
ICMPv6 messages are grouped into two classes:
1. Error Messages IPv6 Header
2. Informational Messages
Type
Error messages are identified as such by having a
zero in the high-order bit of their message Type Code
field values. ICMPv6 Checksum
Thus, error messages have message types ranging Message Body
from 0 to 127, and informational messages ranging
from 128 to 255.
ICMPv6: Message Source Address Determination
A node that sends an ICMPv6 message has to determine both the Source and
Destination IPv6 Addresses in the IPv6 header before calculating the checksum. If the
node has more than one unicast address, it must choose the Source Address of the
message as follows:
1. If the message is a response to a message sent to one of the node's unicast addresses,
the Source Address of the reply must be that same address.
2. If the message is a response to a message sent to a multicast or anycast group in
which the node is a member, the Source Address of the reply must be a unicast address
belonging to the interface on which the multicast or anycast packet was received.
3. If the message is a response to a message sent to an address that does NOT belong to
the node, the Source Address should be that unicast address belonging to the node
that will be most helpful in diagnosing the error.
4. Otherwise, the node's routing table must be examined to determine which interface
will be used to transmit the message to its destination, and a unicast address belonging
to that interface must be used as the Source Address of the message.
ICMPv6: Message Processing Rules
Implementations MUST observe the following rules when processing ICMPv6 messages:
1. If an ICMPv6 error message of unknown type is received, it MUST be passed to the upper layer.
2. If an ICMPv6 informational message of unknown type is received, it MUST be silently discarded.
3. Every ICMPv6 error message includes as much of the IPv6 offending packet (the packet that caused the
error) as will fit without making the error message packet exceed the minimum IPv6 MTU.
4. In those cases where the internet-layer protocol is required to pass an ICMPv6 error message to the
upper-layer process, the upper-layer protocol type is extracted from the original packet (contained in the
body of the ICMPv6 error message) and used to select the appropriate upper-layer process to handle the
error.
5. An ICMPv6 error message MUST NOT be sent as a result of receiving (1) an ICMPv6 error message;
(2) a packet destined to an IPv6 multicast address; (3) a packet sent as a link-layer multicast; (4) a
packet sent as a link-layer broadcast; (5) a packet whose source address does not uniquely identify a
single node.
6. Finally, in order to limit the bandwidth and forwarding costs incurred sending ICMPv6 error messages,
an IPv6 node MUST limit the rate of ICMPv6 error messages it sends.
ICMPv6 Messages: Summary
Type Message Query/Error Description
1 Destination Error The destination host cannot be reached
Unreachable
2 Packet Too Big Error The packet cannot be forwarded because it is larger
than the MTU of the outgoing link
3 Time Exceeded Error Hop Limit Value has reached 0
4 Parameter Error Cannot complete processing the packet because there
Problem is a problem with a field in the IPv6 header or
extension headers such that it cannot complete
processing the packet.
128 Echo Request Query Used for diagnostic purposes
129 Echo Reply Query Message sent in response to an Echo Request Message.
N D ! !
E ou !
nk Y
Th a
08/08/2022 56