0% found this document useful (0 votes)
7 views

Unit2_CND

The document outlines the TCP/IP protocol suite, detailing the functions and responsibilities of each layer: Physical, Data Link, Network, Transport, and Application. It explains how data is transmitted and managed at each layer, including addressing, error control, and flow control mechanisms. Additionally, it describes the structure of IP addresses and the classification of Class A, B, and C addresses, along with the significance of port addresses in network communication.

Uploaded by

chaplevaish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Unit2_CND

The document outlines the TCP/IP protocol suite, detailing the functions and responsibilities of each layer: Physical, Data Link, Network, Transport, and Application. It explains how data is transmitted and managed at each layer, including addressing, error control, and flow control mechanisms. Additionally, it describes the structure of IP addresses and the classification of Class A, B, and C addresses, along with the significance of port addresses in network communication.

Uploaded by

chaplevaish
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Unit– II Network Models.

12 Marks

2.1 TCP/IP protocol suite with define protocols in respective Layers: Physical layer,
Data Link Layer, Network Layer, Transport Layer, Application Layer.

Physical Layer :-
The physical layer coordinates the functions required to carry a bit stream over
a physical medium. It deals with the mechanical and electrical specifications of
the interface and transmission media. It also defines the Procedures and
functions that physical devices and interfaces have to perform for transmission
to occur.
The unit of communication at the physical layer is a bit.

TCP/IP does not define any specific protocol for the physical layer. It supports
all of the standard and proprietary protocols. At this level, the communication is
between two hops or nodes, either a computer or router. The unit of
communication is a single bit. When the connection is established between the
two nodes, a stream of bits is flowing between them. The physical layer,
however, treats each bit individually.

❑ Physical characteristics of interfaces and media. The physical layer


defines the characteristics of the interface between the devices and the
transmission media. It also defines the type of transmission media .

❑ Representation of bits. The physical layer data consists of a stream of bits


(sequence of 0s or 1s) with no interpretation. To be transmitted, bits must be
encoded into signals—electrical or optical. The physical layer defines the type
of encoding (how 0s and 1s are changed to signals).

❑ Data rate. The transmission rate—the number of bits sent each second—is
also defined by the physical layer. In other words, the physical layer defines the
duration of a bit, which is how long it lasts.

❑ Synchronization of bits. The sender and receiver must not only use the same
bit rate but must also be synchronized at the bit level. In other words, the sender
and the receiver clocks must be synchronized.

❑ Line configuration. The physical layer is concerned with the connection of


devices to the media. In a point-to-point configuration, two devices are
connected together through a dedicated link. In a multipoint configuration, a
link is shared between several devices.

❑ Physical topology. The physical topology defines how devices are connected
to make a network. Devices can be connected using a mesh topology (every
device connected to every other device), a star topology (devices are connected
through a central device), a ring topology (each device is connected to the next,
forming a ring), or a bus topology (every device on a common link).

❑ Transmission mode. The physical layer also defines the direction of


transmission between two devices: simplex, half-duplex, or full-duplex. In the
simplex mode, only one device can send; the other can only receive. The
simplex mode is a one way communication. In the half-duplex mode, two
devices can send and receive,
but not at the same time. In a full-duplex (or simply duplex) mode, two devices
can send and receive at the same time.

Data Link Layer

The data link layer transforms the physical layer, a raw transmission facility, to
a reliable link. It makes the physical layer appear error-free to the upper layer
(network layer). Other responsibilities of the data link layer include the
following:

❑ Framing. The data link layer divides the stream of bits received from the
network layer into manageable data units called frames.
❑ Physical addressing. If frames are to be distributed to different systems on
the network, the data link layer adds a header to the frame to define the sender
and/or receiver of the frame. If the frame is intended for a system outside the
sender’s network, the receiver address is the address of the connecting device
that connects
the network to the next one.

❑ Flow control. If the rate at which the data is absorbed by the receiver is less
than the rate produced at the sender, the data link layer imposes a flow control
mechanism to prevent overwhelming the receiver.

❑ Error control. The data link layer adds reliability to the physical layer by
adding mechanisms to detect and retransmit damaged or lost frames. It also uses
a mechanism to recognize duplicate frames. Error control is normally achieved
through a trailer added to the end of the frame.

❑ Access control. When two or more devices are connected to the same link,
data link layer protocols are necessary to determine which device has control
over the link at any given time.

The unit of communication at the data link layer is a frame.

Network Layer :-

The network layer is responsible for the source-to-destination delivery of a


packet, possibly across multiple networks (links). Whereas the data link layer
oversees the delivery of the packet between two systems on the same network
(link), the network layer ensures that each packet gets from its point of origin to
its final destination. If two systems are connected to the same link, there is
usually no need for a network layer. However, if the two systems are attached to
different networks (links) with connecting devices between the networks (links),
there is often a need for the network layer to accomplish source-to-destination
delivery. Other responsibilities of the network layer include the following:

❑ Logical addressing. The physical addressing implemented by the data link


layer handles the addressing problem locally. If a packet passes the network
boundary, we need another addressing system to help distinguish the source and
destination systems. The network layer adds a header to the packet coming from
the upper layer that, among other things, includes the logical addresses of the
sender and receiver.
❑ Routing. When independent networks or links are connected together to
create internetworks (network of networks) or a large network, the connecting
devices (called routers or switches) route or switch the packets to their final
destination. One of the functions of the network layer is to provide this
mechanism.

The unit of communication at the network layer is a datagram.

Transport Layer :-

The transport layer is responsible for process-to-process delivery of the entire


message. A process is an application program running on the host. Whereas the
network layer oversees source-to-destination delivery of individual packets, it
does not recognize any relationship between those packets. It treats each one
independently, as though each piece belonged to a separate message, whether or
not it does. The transport layer,
on the other hand, ensures that the whole message arrives intact and in order,
overseeing both error control and flow control at the source-to-destination level.
Other responsibilities of the transport layer include the following:

❑ Service-point addressing. Computers often run several programs at the same


time. For this reason, source-to-destination delivery means delivery not only
from one computer to the next but also from a specific process (running
program) on one computer to a specific process (running program) on the other.
The transport
layer header must therefore include a type of address called a service-point
address (or port address). The network layer gets each packet to the correct
computer the transport layer gets the entire message to the correct process on
that computer.

❑ Segmentation and reassembly. A message is divided into transmittable


segments, with each segment containing a sequence number. These numbers
enable the transport layer to reassemble the message correctly upon arriving at
the destination and to identify and replace packets that were lost in
transmission.

❑ Connection control. The transport layer can be either connectionless or


connection oriented. A connectionless transport layer treats each segment as an
independent packet and delivers it to the transport layer at the destination
machine. A connection oriented transport layer makes a connection with the
transport layer at the destination machine first before delivering the packets.
After all the data are transferred, the connection is terminated.
❑ Flow control. Like the data link layer, the transport layer is responsible for
flow control. However, flow control at this layer is performed end to end rather
than across a single link.

❑ Error control. Like the data link layer, the transport layer is responsible for
error control. However, error control at this layer is performed process-to-
process rather than across a single link. The sending transport layer makes sure
that the entire message arrives at the receiving transport layer without error
(damage, loss, or
duplication). Error correction is usually achieved through retransmission.

The unit of communication at the transport layer is a segment, user datagram, or a


packet, depending on the specific protocol used in this layer.

Application Layer

The application layer in TCP/IP is equivalent to the combined session,


presentation, and application layers in the OSI model. The application layer
allows a user to access the services of our private internet or the global Internet.
Many protocols are defined at this layer to provide services such as electronic
mail, file transfer, accessing the World Wide Web, and so on.
The application layer enables the user, whether human or software, to access
the network. It provides user interfaces and support for services such as
electronic mail, remote file access and transfer, shared database management,
and other types of distributed information services. Specific services provided
by the application layer include the following.

ADDRESSING
Four levels of addresses are used in an internet employing the TCP/IP protocols:
physical address, logical address, port address, and application-specific
address. Each address is related to a one layer in the TCP/IP architecture, as
shown in Figure shown.

Addresses in TCP/IP Protocol suit.


Message Application Application specific
addresses
Segment Transport Port address
Datagram Network Logical address
Frame DataLink Physical address
Bits Physical ----------------------

Physical Address :
The physical address, also known as the link address, is the address of a node as
defined by its LAN or WAN. It is included in the frame used by the data link
layer. It is the lowest-level address. The physical addresses have authority over
the link (LAN or WAN). The size and format of these addresses vary depending
on the network. For example, Ethernet uses a 6-byte (48-bit) physical address
that is imprinted on the network interface card (NIC). LocalTalk (Apple),
however, has a 1-byte dynamic address that changes each time the station
comes up. most local area networks use a 48-bit (6-byte) physical address
written as 12 hexadecimal digits; every byte (2 hexadecimal digits) is separated
by a colon, as shown below:

07:01:02:01:2C:4B
A 6-byte (12 hexadecimal digits) physical address
Unicast, Multicast, and Broadcast Physical Addresses Physical addresses can be
either unicast (one single recipient), multicast (a group of recipients), or
broadcast (to be received by all systems in the network). Some networks
support all three addresses. For example, Ethernet supports the unicast physical
addresses (6 bytes), the multicast addresses, and the broadcast addresses.
Some networks do not support the multicast or broadcast physical addresses. If
a frame must be sent to a group of recipients or to all systems, the multicast or
broadcast address must be simulated using unicast addresses. This means that
multiple packets are sent out using unicast addresses.

Logical Addresses :
Logical addresses are necessary for universal communications that are
independent of underlying physical networks. Physical addresses are not
adequate in an internetwork environment where different networks can have
different address formats. A universal addressing system is needed in which
each host can be identified uniquely, regardless of the underlying physical
network. The logical addresses are designed for this purpose.
A logical address in the Internet is currently a 32-bit address that can uniquely
define a host connected to the Internet. No two publicly addressed and visible
hosts on the Internet can have the same IP address.

The physical addresses will change from hop to hop,


but the logical addresses remain the same.
IPv4 Address : it is 32 bit or 4 Byte address each byte is denoted by a decimal
number separated by dot such as
192. 168. 3. 45
The IP addresses are broadly divided into 5 classes namely class A, class B,
class C , D and E.
Octat1 Octat2 Octat3 Octat4 Binary notation
Class A 0....
Class B 10.....
Class C 110
Class D 1110
Class E 1111

Byte 1 Byte 2 Byte 3 Byte 4 Decimal notation


Class A 0-127
Class B 128-191
Class C 192-223
Class D 224-239
Class E 240-255
Netid and Hostid in IP address
Byte1 Byte 2 Byte3 Byte4
Class A <- Netid --→ ----------------HOST ID---------------------→
Class B --------------Netid----------→ -------------HOST ID-----→
Class C -------------------Netid------------------------→ HOSTID->
Class D Multicast Address
Class E Reserve for future use

Class A Addresses
In a Class A network address, the first byte is assigned to the network address
and the three remaining bytes are used for the node addresses.
The Class A format is as follows:

network.node.node.node

For example, in the IP address 49.22.102.70, the 49 is the network address and
22.102.70 is the node address. Every machine on this particular network would
have the distinctive network address of 49. Class A network addresses are 1
byte long, with the first bit of that byte reserved and the 7 remaining bits
available for manipulation (addressing). As a result, the maximum number of
Class A networks that can be created is 128. Why? Because each of the 7 bit
positions can be either a 0 or a 1, thus 27, or 128.
To complicate matters further, the network address of all 0s (0000 0000) is
reserved to designate the default route .

Each Class A address has 3 bytes (24-bit positions) for the node address of a
machine. This means there are 2 24—or 16,777,216—unique combinations and,
therefore, precisely that many possible unique node addresses for each Class A
network. Because node addresses with the two patterns of all 0s and all 1s are
reserved, the actual maximum usable number of nodes for a Class A network is
2 24 minus 2, which equals 16,777,214. Either way, that’s a huge number of
hosts on a network segment!

Class B Addresses:
In a Class B network address, the first 2 bytes are assigned to the network
address and the remaining 2 bytes are used for node addresses. The
format is as follows:

network.network.node.node

For example, in the IP address 172.16.30.56, the network address is 172.16 and
the node address is 30.56. With a network address being 2 bytes (8 bits each),
there would be 216 unique combinations. But the Internet designers decided that
all Class B network addresses should start with the binary digit 1, then 0. This
leaves 14 bit positions to manipulate, therefore 16,384 (that is, 214) unique
Class B network addresses. A Class B address uses 2 bytes for node addresses.
This is 216 minus the two reserved patterns (all 0s and all 1s), for a total of
65,534 possible node addresses for each Class B network.

Class C Addresses :-
The first 3 bytes of a Class C network address are dedicated to the network
portion of the address, with only 1 measly byte remaining for the node
address. Here’s the format:

network.network.network.node

Using the example IP address 192.168.100.102, the network address is


192.168.100 and the node address is 102.In a Class C network address, the first
three bit positions are always the binary 110. The calculation is as follows: 3
bytes, or 24 bits, minus 3 reserved positions leaves 21 positions. Hence, there
are 221, or 2,097,152, possible Class C networks. Each unique Class C network
has 1 byte to use for node addresses. This leads to 28, or 256, minus the two
reserved patterns of all 0s and all 1s, for a total of 254 node addresses for each
Class C network.

Class C Valid Host IDs


Here’s an example of how to find a valid host ID in a Class C network:
All host bits turned off is the network ID: 192.168.100.0.
All host bits turned on is the broadcast address: 192.168.100.255.
The valid hosts would be the numbers in between the network address and the
broadcast address: 192.168.100.1 through 192.168.100.254.

Port Address:

There are many application running on the computer. Each application run with
a port no.(logically) on the computer.

A port number is part of the addressing information used to identify the senders
and receivers of messages.

Port numbers are most commonly used with TCP/IP connections.


These port numbers allow different applications on the same computer to share
network resources simultaneously.

The physical addresses change from hop to hop, but the logical and port
addresses usually remain the same.
Example: a port address is a 16-bit address represented by one decimal
number 753

The main objective of the internet is the process to process communications.


For this purpose it is necessary to label or name the specific process.
Thus the process need addresses. The label that is allocated to a process is
known as the port address. It is a 16 bit address field .
The physical addresses change for each and every hop a packet takes, but the
logical and port addresses basically will remain as it is.
In computer networking, port numbers are part of the addressing information
used to identify the senders and receivers of messages. They are associated
with TCP/IP network connections and might be described as an add-on to the IP
address.

Networking ports are software-based and unrelated to physical ports that


network devices have for plugging in cables.
How Port Numbers Work
Port numbers relate to network addressing. In TCP/IP networking, both TCP
and UDP use a set of ports that work together with IP addresses.

These port numbers work like telephone extensions. Just as a business telephone
switchboard can use the main phone number and assign each employee an
extension number, a computer can have a main address and a set of port
numbers to handle incoming and outgoing connections.

In the same way that one phone number can be used for all the employees
within that building, one IP address can be used to communicate with various
applications behind one router. The IP address identifies the destination
computer and the port number identifies the specific destination application.

This is true whether it's a mail application, file transfer program, or web
browser. When you request a website from a web browser, the browser
communicates over port 80 for HTTP. Then, the data is sent back over the same
port and displays in the program that supports that port (the web browser).

In both TCP and UDP, port numbers start at 0 and go up to 65535. Numbers in
the lower ranges are dedicated to common internet protocols such as port 25 for
SMTP and port 21 for FTP.
Application Specific Addresses :
Some applications have user-friendly addresses that are designed for that
specific application.

Examples include the e-mail address (for example, [email protected])


and the Universal Resource Locator (URL) (for example,
www.mbte.org). The first defines the recipient of an e-mail; the second is
used to find a document on the World Wide Web.

Every document on the Web has a unique address. This address is


known as Uniform Resource Locator (URL).
Several HTML/XHTML tags include a URL attribute value, including
hyperlinks, inline images, and forms. All of them use the same syntax to
specify the location of a web resource, regardless of the type or content
of that resource. That's why it is known a Uniform Resource Locator.

URL Elements
A URL is made of up several parts, each of which offers information to
the web browser to help find the page. It is easier to learn the parts of a
URL, if you look at the example URL given below, there are three key
parts: the 1) scheme, the 2) host address, and the 3) file path.
https://www.cisco.com/index.htm

1. The Scheme
The scheme identifies the type of protocol and URL you are linking to
and therefore, how the resource should be retrieved. For example, most
web browsers use Hypertext Transfer Protocol (HTTP) to pass
information to communicate with the web servers and this is the reason
a URL starts with http://.
There are other schemes available and you can use either of them
based on your requirement:
Sr.No Scheme & Description

1 http://
Hypertext Transfer Protocol (HTTP) is used to request pages from
Web servers and send them back from Web servers to browsers.

2
https://
Secure Hypertext Transfer Protocol (HTTPS) encrypts the data sent
between the browser and the Web server using a digital certificate.

3
ftp://
File Transfer Protocol is another method for transferring files on the
Web. While HTTP is a lot more popular for viewing Web sites
because of its integration with browsers, FTP is still commonly used
protocol to transfer large files across the Web and to upload source
files to your Web server.

4 file://
Used to indicate that a file is on the local hard disk or a shared
directory on a LAN.
2. The Host Address
The host address is where a website can be found, either the IP
address (four sets of numbers between 0 and 255, for example
68.178.157.132 ) or more commonly the domain name for a site such
as www.ibm.com. Note that "www" is not actually part of the domain
name although it is often used in the host address.

3. The File Path


The file path always begins with a forward slash character, and may
consist of one or more directory or folder names. Each directory name
is separated by forward slash characters and the file path may end with
a filename at the end. Here index.htm is the filename which is available
in html directory:

ISO –OSI Model

Session , presentation , application Layer.

Session Layer
The services provided by the first four layers (physical, data link, network and
transport) are not sufficient for some processes. The session layer is the
network dialog controller.
It establishes, maintains, and synchronizes the interaction between
communicating systems. Specific responsibilities of the session layer include
the following:

❑ Dialog control. The session layer allows two systems to enter into a dialog. It
allows the communication between two processes to take place in either half
duplex (one way at a time) or full-duplex (two ways at a time) mode.

❑ Synchronization. The session layer allows a process to add checkpoints


(synchronization points) into a stream of data. For example, if a system is
sending a file of 2,000 pages, it is advisable to insert checkpoints after every
100 pages to ensure that each 100-page unit is received and acknowledged
independently. In this case, if a crash happens during the transmission of page
523, the only pages that need to be resent after system recovery are pages 501 to
523. Pages previous to 501 need not be resent.
Presentation Layer

The presentation layer is concerned with the syntax and semantics of the
information exchanged between two systems. Specific responsibilities of the
presentation layer include the following:
❑ Translation. The processes (running programs) in two systems are usually
exchanging information in the form of character strings, numbers, and so on.
The information should be changed to bit streams before being transmitted.
Because different computers use different encoding systems, the presentation
layer is responsible for interoperability between these different encoding
methods. The presentation layer at the sender changes the information from its
sender-dependent format into a common format. The presentation layer at the
receiving machine changes the commonformat into its receiver-dependent
format.
❑ Encryption. To carry sensitive information a system must be able to assure
privacy.
Encryption means that the sender transforms the original information to
another form and sends the resulting message out over the network. Decryption
reverses the original process to transform the message back to its original form.
❑ Compression. Data compression reduces the number of bits contained in the
information. Data compression becomes particularly important in the
transmission of multimedia such as text, audio, and video.

ISO – OSI Model summery

layers Name Services

Layer 7 Application To allow access to network resources


Layer 6 Presentation To translate, encrypt, and compress data
Layer 5 Session To establish, manage, and terminate sessions
Layer 4 Transport To provide reliable process-to-process
message delivery and error recovery
Layer 3 Network To move packets from source to destination;
to provide internetworking
Layer 2 Data link To organize bits into frames; to provide
hop-to-hop delivery
Layer 1 Physical To transmit bits over a medium; to provide
mechanical and electrical specifications
TCP/IP Addressing Scheme:

The success of TCP/IP as the network protocol of the Internet is largely because of
its ability to connect together networks of different sizes and systems of different
types. These networks are arbitrarily defined into three main classes (along with a
few others) that have predefined sizes, each of which can be divided into smaller
subnetworks by system administrators. A subnet mask is used to divide an IP
address into two parts. One part identifies the host (computer), the other part
identifies the network to which it belongs. To better understand how IP addresses
and subnet masks work, look at an IP (Internet Protocol) address and see how it is
organized.

IP addresses: Networks and hosts:-

An IP address is a number identifying of a computer or another device on the


Internet. It is similar to a mailing address, which identifies where postal mail comes
from and where it should be delivered. IP addresses uniquely identify the source and
destination of data transmitted with the Internet Protocol.

IPv4 addresses are 32 bits long (four bytes). An example of an IPv4 address
is 216.58.216.164, which is the front page of Google.com.

The maximum value of a 32-bit number is 232, or 4,294,967,296. So the maximum


number of IPv4 addresses, which is called its address space, is about 4.3 billion. In
the 1980s, this was sufficient to address every networked device, but scientists knew
that this space would quickly become exhausted. Technologies such as NAT have
delayed the problem by allowing many devices to use a single IP address, but a
larger address space is needed to serve the modern Internet.

A major advantage of IPv6 is that it uses 128 bits of data to store an address,
permitting 2128 unique addresses, or
340,282,366,920,938,463,463,374,607,431,768,211,456. The size of IPv6's address
space — 340 duodecillion — is much, much larger than IPv4.

IP address classes

With an IPv4 IP address, there are five classes of available IP ranges: Class A,
Class B, Class C, Class D and Class E, while only A, B, and C are commonly used.
Each class allows for a range of valid IP addresses, shown in the following table.

Class Address range Supports

Class A 1.0.0.1 to Supports 16 million hosts on each of 127 networks.


126.255.255.254
Class B 128.1.0.1 to Supports 65,000 hosts on each of 16,000 networks.
191.255.255.254
Class C 192.0.1.1 to Supports 254 hosts on each of 2 million networks.
223.255.254.254
Class D 224.0.0.0 to Reserved for multicast groups.
239.255.255.255
Class E 240.0.0.0 to Reserved for future use, or research and
254.255.255.254 development purposes.

An IP address is a 32-bit number that uniquely identifies a host (computer or other


device, such as a printer or router) on a TCP/IP network.

IP addresses are normally expressed in dotted-decimal format, with four numbers


separated by periods, such as 192.168.123.132. To understand how subnet masks
are used to distinguish between hosts, networks, and subnetworks, examine an IP
address in binary notation.

An IP address has two parts. The first part of an IP address is used as a network
address, the last part as a host address. If you take the example 192.168.123.132
and divide it into these two parts you get the following:
192.168.123.0 - network address. And 0.0.0.132 - host address.

Subnet mask : The second item, which is required for TCP/IP to work, is the
subnet mask. The subnet mask is used by the TCP/IP protocol to determine whether
a host is on the local subnet or on a remote network.

In TCP/IP, the parts of the IP address that are used as the network and host
addresses are not fixed, so the network and host addresses above cannot be
determined unless you have more information. This information is supplied in
another 32-bit number called a subnet mask. In this example, the subnet mask is
255.255.255.0. It is not obvious what this number means unless you know that 255
in binary notation equals 11111111; so, the subnet mask is:

11111111.11111111.11111111.0000000

Lining up the IP address and the subnet mask together, the network and host
portions of the address can be separated:
11000000.10101000.01111011.10000100 -- IP address (192.168.123.132)
11111111.11111111.11111111.00000000 -- Subnet mask (255.255.255.0)

The first 24 bits (the number of ones in the subnet mask) are identified as the
network address, with the last 8 bits (the number of remaining zeros in the subnet

mask) identified as the host address. This gives you the following:

11000000.10101000.01111011.00000000 -- Network address (192.168.123.0)


00000000.00000000.00000000.10000100 -- Host address (000.000.000.132)

Internet RFC 1878 (available from InterNIC—Public Information Regarding Internet


Domain Name Registration Services) describes the valid subnets and subnet masks
that can be used on TCP/IP networks.

Network classes :- Internet addresses are allocated by the InterNIC, the


organization that administers the Internet. These IP addresses are divided into
classes. The most common of these are classes A, B, and C. Classes D and E exist,
but are not generally used by end users. Each of the address classes has a different
default subnet mask. You can identify the class of an IP address by looking at its first
octet. Following are the ranges of Class A, B, and C Internet addresses, each with
an example address:

• Class A networks use a default subnet mask of 255.0.0.0 and have 0-127 as
their first octet. The address 10.52.36.11 is a class A address. Its first octet is 10,
which is between 1 and 126, inclusive.
• Class B networks use a default subnet mask of 255.255.0.0 and have 128-
191 as their first octet. The address 172.16.52.63 is a class B address. Its first
octet is 172, which is between 128 and 191, inclusive.
• Class C networks use a default subnet mask of 255.255.255.0 and have 192-
223 as their first octet. The address 192.168.123.132 is a class C address. Its first
octet is 192, which is between 192 and 223, inclusive.
In some scenarios, the default subnet mask values do not fit the needs of the
organization, because of the physical topology of the network, or because the
numbers of networks (or hosts) do not fit within the default subnet mask
restrictions. The next section explains how networks can be divided using subnet
masks.

IP address :

1. Class A: large number of hosts, few networks


– 0nnnnnnn hhhhhhhh hhhhhhhh hhhhhhhh
• 7 network bits (0 and 127 reserved, so 126 networks), 24 host
bits (> 16M hosts/net)
• Initial byte 1-127 (decimal)
2. Class B: medium number of hosts and networks
– 10nnnnnn nnnnnnnn hhhhhhhh hhhhhhhh
• 16,384 class B networks, 65,534 hosts/network
• Initial byte 128-191 (decimal)
3. Class C: large number of small networks
– 110nnnnn nnnnnnnn nnnnnnnn hhhhhhhh
• 2,097,152 networks, 254 hosts/network
• Initial byte 192-223 (decimal)
4. Class D: 224-239 (decimal) Multicast [RFC1112]
5. Class E: 240-255 (decimal) Reserved

Sub netting :

• A subnet mask is applied to the host bits to determine how the network is
subnetted, e.g. if the host is: 137.138.28.228, and the subnet mask is
255.255.255.0 then the right hand 8 bits are for the host (255 is decimal for all
bits set in an octet)
• Host addresses of all bits set or no bits set, indicate a broadcast, i.e. the
packet is sent to all hosts.

Subnet Mask Conversions


Pre fix Sub netting
Length Masking
1 128.0.0.0
/2 192.0.0.0
/3 224.0.0.0
/4 240.0.0.0
/5 248.0.0.0
/6 252.0.0.0
/7 254.0.0.0
/8 255.0.0.0
/9 255.128.0.0
/10 255.192.0.0
/11 255.224.0.0
/12 255.240.0.0
/13 255.248.0.0
/14 255.252.0.0
/15 255.254.0.0
/16 255.255.0.0
/17 255.255.128.0
/18 255.255.192.0
/19 255.255.224.0
/20 255.255.240.0
/21 255.255.248.0
/22 255.255.252.0
/23 255.255.254.0
/24 255.255.255.0
/25 255.255.255.128
/26 255.255.255.192
/27 255.255.255.224
/28 255.255.255.240
/29 255.255.255.248
/30 255.255.255.252
/31 255.255.255.254
/32 255.255.255.255

Decimal
Octet Binary

128 1000 0000


192 1100 0000
224 1110 0000
240 1111 0000
248 1111 1000
252 1111 1100
254 1111 1110
255 1111 1111

Private IP Address
• IP addresses that are not globally unique, but used exclusively in an
organization
• Three ranges:
– 10.0.0.0 - 10.255.255.255 a single class A net
– 172.16.0.0 - 172.31.255.255 16 contiguous class Bs
– 192.168.0.0 – 192.168.255.255 256 contiguous class Cs
• Connectivity provided by Network Address Translator (NAT)
– translates outgoing private IP address to Internet IP address, and a
return Internet IP address to a private address
– Only for TCP/UDP packets

You might also like