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

Adobe Scan Feb 23, 2023

Bsc computer science note. 3

Uploaded by

forg28826
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)
19 views

Adobe Scan Feb 23, 2023

Bsc computer science note. 3

Uploaded by

forg28826
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/ 19

TCP/IP PROTOCOL SUITE

The layers in the TCP/IP protocol suite do not exactly match those in the OSI model.
The original TCP/IP protocol suite was defined as having four layers: host-to-network,
internet, transport, and application. However. when TCP/LP is compared to OSJ, we can say
that the TCP/LP protocol suite is made of five layers: physical, data link. network. transport,
and application. The internet layer is equivaJent lo the network layer, and the application
layer is roughly doing the job of the session. presentation. and application layers with the
transport layer in TCP/lP taking care of part of the duties of the session layer.

TCP/IP and OSI model


Physical and Data Link Layers

TCP/IP does not define any specific protocol at these layers. It supports all the
standard and proprietary protocols. A network in a TCPllP internetwork can be a local-area
network or a wide-area network.
Network Layer

At the network layer, TCP/l"P supports the following p-otocols:

• Intemetworking Protocol (IP) - IP is the transmission irechanism used by the


TCP/IP p-otocols. It is an unreliable and connectionless protocol-a best-effort
delivery service. The term best effort means that IP provides no error checking or
tracking. IP assumes the unreliability of the underlying layers and does its best to get
a transmission through to its destination. but with no guarantees. IP transports data
in packets called datagram's, each of which is transported separately. Datagram's
can travel along different routes and can arrive out of sequence or be duplicated. IP
does not keep track of the routes and has no facility for reordering datagram's once
they arrive at their destination. IP provides bare-bones transmission functions that
free the user to add only those facilities necessary for a given application and
thereby allows for maximum efficiency.

• Addre~ Resolution Protocol (ARP) - is used to associate a logical address with a


physical address. On a typical physical network. such as a LAN, each device on a
link is identified by a phys ical or station address. usually imprinted on the network
interface card (NIC). ARP is used to find the physical address of the node when its
Internet address is known.

• Reverse Add~ Resolution Protocol (RARP) - It allows a host to discover its


Internet address when it knows only its physical address. It is used when a computer
is connected to a network for the first time or when a diskless oomputer is booted.

• Internet Control Message Protocol (ICMP) - is a mechanism used by hosts and


gateways to send notification of datagram problems back to the sender. ICMP sends
query and error reporting messages.

• Internet Group Message Protocol (IGMP) - is used to facilitate the simultaneous


transmission of a message to a group of recipients.

Transport Layer

At the transport layer, TCP/IP defines three protocols, TCP. UDP and SCTP. UDP
and TCP are transport level protocols responsible for delivery of a message from a process
(running program) to another process. A new transport layer protocol, SCTP, has been
devised to meet the needs of some newer applications.

• User Datagram Protocol (UDP)

The User Datagram Protocol (UDP) is called a connectionless, unreliable

transport protocol It is a process-to-process protocol that adds only port


addresses, checksum error control, and length information to the data from the
upper Jayer.

• Transmission Control Protocol (TCP)

TCP, like UDP, is a process-to-process (program-to-p-ogram) protocol. TCP,


therefore, like UDP, uses port numbers. Unlike UDP. TCP is a connection
oriented protocol; it creates a virtual connection between two TCPs to send
data. ln addition, TCP uses flow and error control mechanisms at the. transport
level.

At the sending end of each transmission. TCP divides a stream of data into
smaller units called segments. Each segment includes a sequence number for
reordering after receipt, together with an acknowledgment number for the
segments received. Segments are carried across the internet inside of IP
datagram's. At the receiving end, TCP collects each datagram as it comes in
and reorders the transmission based on sequence numbers.

• Stream Control Transmission Protocol(SCTP)

The Stream Control Transmission Protocol (SCTP) provides support for newer
applications such as voice over the Internet. It is a transport layer protocol that

rombines the bestfeatures of UDP and TCP.

Application layer

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

and application layers in the OSI model Many protocols are defined at this Jayer. SMTP,
FfP, TELNET, HTTP, DNS etc.
CYCLIC CODES
Cyclic codes are special linear block codes with one extra property. In a cyclic code, if a
codeword is cyclically shifted (rotated). the result is another codeword.For example. if 1011000
are a codeword and we cyclically left-shift, then 0 110001 is also a codeword.
In this case, if we call the bits in the first word ao to a6' and the bits in the second word bo to
b61, we can shift the bits by using the following:

111 lht: 1i~hlmusl t:\fUaliuu. lltt: lasl lJil uflht: fosl wu1ll is WlilfJfJt:ll illuuull c111ll~u,ut:s llat:
first bit of the second word.
Cyclic Redundancy Check

CRC is a block code invented by W. Wesley Peterson in 1961 .


It is commonly used to detect accidental changes to data transmission.
CRC involves binary division of the data bits being sent by a predetennined divisor
agreed upon by the communicating s ystem.
The divisor is generated using polynomials. So, CRC is also called polynomial code
checksum.
Encoding using CRC
• The corruronicating parties agree upon the size of message block and the
CRC divisor. For example, the bloc k chosen may be CRC (7, 4 ), where 7is
the total length of the block and 4 is the number of bits in the d ata segment.
The divisor chosen may be 1011.

• The sender performs binary division oftbe data segment by the divisor.

• lt then appends the remainder called CRC bits to the end of data segment.
This makes the resulting data unit exactly divisible by the divisor.

Decoding

• The receiver di vi des the incoming data unit by the divisor.


• If there is no remainder, the data unit is assumed to be correct and is
accepted.

• Otherwise, it is understood that the data is corrupted and is therefore


rejected. The receiver may then send an erroneous
acknowledgement back to the sender for retransmission.
Cyclic codes Advantages

• Cyclic codes have a very good performance in detecting single bit errors,
two bit errors and odd number of errors.
• They can easily be implemented in hardware and software
• They are especially fast when implemented in hardware.
• They are easy to encode.

Checksums
This is a block code method where a checksum is created based on the data
values in the data blocks to be transmitted using some algorithm and
appended to the data.

When the receiver gets this data, a new checksum is calculated and
compared with the existing checksum. A non-match indicates an error.
1Pv4 ADDRESSES
An 1Pv4 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 .

They are unique so that each address defines only one connection to the Internet. Two
devices on the Internet can never have the same IPV4 address at the same time.

On the other hand. if a device operating at the network layer has m connections to the
Internet. it needs to have m addresses, for example. a router.

The 1Pv4 addresses are universal in the sense that the addressing system must be
accepted by any host that wants to be coMected to the Internet.

1Pv4 addresses are unique and universal.

Address Space
A protocol such as 1Pv4 that defines addresses has an address space. An address space
is the total number of addresses used by the protocol. If a protocol uses N bits to define an
address, the address space is 2N, because each bit can have two different values (0 or I) and N
bits can have 2N values.

1Pv4 uses 32-bit addresses. which means that the address space is 232 or 4,294,967,296 (more
than 4 billion).

Notations
There are two notations to show an 1Pv4 address:

I. Binary notation
2. Dolled decimal notation.
1. Binary Notation

ln binary notation, the 1Pv4 address is displayed as 32 bits. Each octet is often
referred to as a byte. So it is common to hear an lPv4 address referred to as a 32-bit address
or a 4-byte address. The following is an example of an 1Pv4 address in binary notation:

01110101 10010101 00011101 00000010

2. Dotted-Decimal Notation

To make the 1Pv4 address more compact and easier to read, Internet addresses are
usually written in decimal form with a decimal point (dot) separating the bytes. The
following is the dotted decimal notation of the above address:

117.149.29.2

The following figure shows an 1Pv4 address in both binary and dotted-decimal
notation. Note that because each byte (octet) is 8 bits. each number in dotted-decimal notation
is a value ranging from 0 to 255

~"/~
llXmm (XXX) 1011 WXXX)l l OOH 1111

128.11.3.31
All the outgoing packets go through the NAT router. whic h replaces the source
address in the packet with the global NAT address. All incoming packets also pass through
the NAT router. which replaces the destination address in the packet (the NAT router global
address) with the appropriate private address.

1Pv6 ADDRESSES
lPv6 (lntemetworking Protocol. version 6), also known as lPng (lntemetworking
Protocol. next generation). An 1Pv6 address consists of 16 bytes (octets): it is 128 bits long.

Hexadecimal Colon Notation

To make addresses more readable, 1Pv6 specifies ~xadecimal colon notation. In this
notation. 128 bits is divided into eight sections. each 2 bytes in length. Two bytes in
hexadecimal notation requires four hexadecimal digits. The refore. the address consists of 32
hexadecimal digits, with every four digits separated by a colon.
Abbreviation Although the IP address, even in hexadecimaJ format, is very long,
many of the digits are zeros. In this case. we can abbreviate the address. The leading zeros of
a section (four digits between two colons) can be omitted. Only the leading zeros can be
dropped, not the trailing zeros.
Address Space

1Pv6 has a much larger address space; 2 128 addresses are available. The designers of
lPv6 divided the address into several categories.
Unicast address - A unicast address defines a single computer. The packet sent to a unicast
address must be de livered to that specific computer.

Multicast addresses - Multicast addresses are used to define a gro up of hosts instead of just
one. A packet sent to a rrulticast address must be delivered to each membe r of the gro up.

Anycast addresses - 1Pv6 also defines anycast addresses. An anycast address, like a multicast
address, a lso defines a group of nodes. Ho weve r. a packet destined for an anycast address is
delivered to only one of the me mbers of the anyc ast group. the nearest one (the one with the
shortest route).

Reserved address - Another category in the address space is the reser ved address. These
addresses start with e ight Os (type prefi x is 00000000).

Local Addresses - These addresses are used whe n an organization wants to use 1Pv6 protocol
without being connected to the global Interne t. In other words. they provide addressing for
private networks. Nobody o utside the organization can send a message to the nodes using
these addresses.

Advantages of 1Pv6
I. Larger addre~ space.1Pv6 address is 128 bits long. Compared with the 32-bit
address of 1Pv4. this is a huge (296) increase in the address space.

II. Better header format. 1Pv6 uses a new header format in whic h o ptions are separated
from the base header and inserted. when needed. between the base header and the
upper-layer data. This simplifies and speeds up the ro uting process.

Ill. New options. LPv6 has new o ptio ns to allow for additional functionalities.

IV. Allowance for extension. 1Pv6 is designed to allow the extension of the protocol if
required by new technologies or applications.

V. Support for resource allocation. A mechanism called flow label can be used to
support traffic such as real-time audio and video.

VI. Support for more security. The encryption and authe ntication o ptions in 1Pv6 provide
confidentia lity and integrity o f the packe t.
Forwarding
Forwarding means to place the packet in its route to its destination. Forwarding requires a
oost or a router to have a routing table. When a host has a packet to send or when a router has
received a packet to be forwarded . it looks at this table to find the route to the final
destination. However, this simple solution is impossible today in an internetwork such as the
Internet because the number of entries needed in the routing table would make table lookups
inefficient.

Forwarding Techniques

Several techniques can make the size of the routing table manageable and also handle issues
such as security.

a. Next-Hop Method versus Route Method


One technique to reduce the contents of a routing table is called the next-mp method. ln this
technique. the routing table holds only the address of the next hop instead of information
about the complete route (route method). The entries of a routing table must be consistent
with one another.
b. Network-Specific Method versus Host-Specific Method

A second technique to reduce the routing table and simplify the searching process is called
the network-specific method. Here. instead of having an e ntry for every destination host
connected to the same physical ne twork (host-specific method ). we have only one entry that
defines the address o f the destinatio n netwo rk itselt:

Host-specific routing is used for purposes such as checking the route o r providing security
measures
c. Default Method
Another technique to simplify routing is called the default method. Host A is connected to a
network with two routers. Router Rl routes the packets to hosts connected to network N2.
However, for the rest of the Internet, router R2 is used. So instead of listing all networks in
the entire Internet, host A can just have one entry called the default (normally defined as
network address 0.0.0.0).

You might also like