Unit2_CND
Unit2_CND
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.
❑ 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.
❑ 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).
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.
Network Layer :-
Transport Layer :-
❑ 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.
Application Layer
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.
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.
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
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.
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
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.
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.
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.
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.
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.
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.
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.
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:
• 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 :
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.
Decimal
Octet Binary
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