0% found this document useful (0 votes)
56 views55 pages

4 Aa

Uploaded by

ericcostermboya
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)
56 views55 pages

4 Aa

Uploaded by

ericcostermboya
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/ 55

CN 211: COMPUTER

NETWORKING PROTOCOLS

TCP/IP Model
TCP/IP Model
• 4/5 layers.
— Application.
— Host-to-Host.
— Internet.
— Network Access.
• TCP/IP Data Encapsulation.
• OSI vs. TCP/IP.
• Addressing – MAC addressing, IP addressing,
port addressing.
TCP/IP Model
• The Transmission Control Protocol/Internet
Protocol (TCP/IP) suite was created by the
Department of Defense (DoD) to ensure and preserve
data integrity, as well as maintain communications in
the event of catastrophic war.

• The TCP/IP model is basically a condensed version of


the OSI model—it’s composed of four/five, instead of
seven, layers:-
— Process/Application layer
— Host-to-Host/Transportation layer
— Internet layer
— Network Access layer
TCP/IP Model
• Figure below shows a comparison of the TCP/IP model
and the OSI reference model. As you can see, the two
are similar in concept, but each has a different number
of layers with different names.
TCP/IP Model

The TCP/IP and OSI models


TCP/IP Model
• Other authors outlines that TCP/IP stack is characterized
into five layers :-
— Application/process layer. Provides communication between
processes or applications on separate hosts.
— Host-to-host, or transport layer. Provides end-to-end, data-
transfer service. This layer may include reliability mechanisms.
It hides the details of the underlying network or networks from
the application layer.
— Internet layer. Concerned with routing data from source to
destination host through one or more networks connected by
routers.
— Network access layer. Concerned with the logical interface
between an end system and a subnetwork.
— Physical layer. Defines characteristics of the transmission
medium, signaling rate, and signal encoding scheme.
The Process/Application Layer
• The Application Layer in TCP/IP groups the functions of
OSI Application, Presentation Layer and Session Layer.

• Therefore any process above the transport layer is


called an Application in the TCP/IP architecture.

• In TCP/IP socket and port are used to describe the path


over which applications communicate.

• Most application level protocols are associated with one


or more port number.
The Process/Application Layer
• The different protocols and applications covered in this
layer include the following:-

−Telnet −LPD
−FTP −X. Window
−TFTP −SNMP
−NFS −DNS
−SMTP −DHCP/BootP
The Host-to-Host/Transport Layer
• The main purpose of the Host-to-Host layer is to shield
the upper-layer applications from the complexities of the
network.

• This layer says to the upper layer, “Just give me your


data stream, with any instructions, and I’ll begin the
process of getting your information ready to send.”
The Host-to-Host/Transport Layer
• There are two Transport Layer protocols:-
— The Transmission Control Protocol (TCP) guarantees
information transmission.

— The User Datagram Protocol (UDP) transports datagram


swithout end-to-end reliability checking.

• Both protocols are useful for different applications.


The Internet Layer
• In the TCP/IP model, there are two main reasons for the
Internet layer’s existence: routing, and providing a
single network interface to the upper layers.

• None of the other upper- or lower-layer protocols have


any functions relating to routing— that complex and
important task belongs entirely to the Internet layer.

• In addition, there are many supporting protocols in the


Network Layer, such as Internet Control Message Protocol
ICMP, Address Resolution Protocol (ARP), Reverse Address
Resolution Protocol (RARP) and Proxy ARP apart from
Internet Protocol (IP) that can facilitate and manage the
routing process.
The Internet Layer
• The Internet layer’s second duty is to provide a single
network interface to the upper-layer protocols.

• Without this layer, application programmers would need


to write “hooks” into every one of their applications for
each different Network Access protocol.

• This would not only be a pain in the neck, but it would


lead to different versions of each application—one for
Ethernet, another one for Token Ring, and so on.

• To prevent this, IP provides one single network interface


for the upper-layer protocols.
The Internet Layer
• Then it’s the job of IP and the various Network Access
protocols to get along and work together.
Network Access Layer
• In the TCP/IP architecture, the Data Link Layer and
Physical Layer are normally grouped together to become
the Network Access layer.

• TCP/IP makes use of existing Data Link and Physical


Layer standards rather than defining its own.

• Many RFCs describe how IP utilizes and interfaces with


the existing data link protocols such as Ethernet, Token
Ring, FDDI, HSSI, and ATM.
Network Access Layer
• The physical layer, which defines the hardware
communication properties, is not often directly
interfaced with the TCP/IP protocols in the network
layer and above.
Summary of TCP/IP Model
• A vast array of protocols combine at the TCP/IP model’s
Process/Application layer to integrate the various
activities and duties spanning the focus of the OSI’s
corresponding top three layers (Application,
Presentation, and Session).

• The Process/Application layer defines protocols for


node-to-node application communication and also
controls user-interface specifications.
Summary of TCP/IP Model
• The Host-to-Host layer parallels the functions of the
OSI’s Transport layer, defining protocols for setting up
the level of transmission service for applications.

• It tackles issues such as creating reliable end-to-end


communication and ensuring the error-free delivery of
data. It handles packet sequencing and maintains data
integrity.
Summary of TCP/IP Model
• The Internet layer corresponds to the OSI’s Network
layer, designating the protocols relating to the logical
transmission of packets over the entire network.

• It takes care of the addressing of hosts by giving them


an IP (Internet Protocol) address, and it handles the
routing of packets among multiple networks.
Summary of TCP/IP Model
• At the bottom of the TCP/IP model, the Network Access
layer monitors the data exchange between the host and
the network.

• The equivalent of the Data Link and Physical layers of


the OSI model, the Network Access layer oversees
hardware addressing and defines protocols for the
physical transmission of data.
Summary of TCP/IP Model
• The TCP/IP and OSI models are alike in design and
concept and have similar functions in similar layers.
Figure below shows the TCP/IP protocol suite and how
its protocols relate to the TCP/IP model layers.

The TCP/IP protocol suite


TCP/IP Data Encapsulation

Data encapsulation
TCP/IP Data Encapsulation

Data encapsulation
TCP/IP Data Encapsulation

PDU and layer addressing


OSI vs. TCP/IP

The OSI Vs TCP/IP


OSI - The Model
• Open Systems Interconnection

• Developed by the International Organization for


Standardization (ISO)

• Seven layers

• A theoretical system delivered too late!


OSI Layers
The OSI Environment
TCP/IP Protocol Architecture
• Developed by the US Defense Advanced Research
Project Agency (DARPA) for its packet switched network
(ARPANET)

• Used by the global Internet.

• No official model but a working one.


— Application layer
— Host to host or transport layer
— Internet layer
— Network access layer
— Physical layer
MAC Addressing
• The MAC layer receives a block of data from the LLC
layer and is responsible for performing functions related
to medium access and for transmitting the data.

• As with other protocol layers, MAC implements these


functions, making use of a protocol data unit at its layer;
in this case, the PDU is referred to as a MAC frame.

• The exact format of the MAC frame differs somewhat for


the various MAC protocols in use.
MAC Addressing
• The fields of this frame are:-

— MAC control. This field contains any protocol control


information needed for the functioning of the MAC protocol. For
example, a priority level could be indicated here.

— Destination MAC address. The destination physical


attachment point on the LAN for this frame.

— Source MAC address. The source physical attachment point


on the LAN for this frame.
MAC Addressing
• In general, all of the MAC frames have a format similar
to that of figure below.

MAC frame format


MAC Addressing
• Destination Address (DA) This transmits a 48-bit
value using the least significant bit (LSB) first.

• The DA is used by receiving stations to determine


whether an incoming packet is addressed to a particular
node.

• The destination address can be an individual address, or


a broadcast or multicast MAC address.

• Remember that a broadcast is all 1s (or Fs in hex) and is


sent to all devices, but a multicast is sent only to a
similar subset of nodes on a network.
MAC Addressing
• Source Address (SA) The SA is a 48-bit MAC address
used to identify the transmitting device, and it uses the
LSB first.

• Broadcast and multicast address formats are illegal


within the SA field.
MAC Addressing
• Data Link layer is responsible for physical addressing,
commonly referred to as hardware addressing or MAC
addressing.

• It uses the Media Access Control (MAC) address burned


into each and every Network Interface Card (NIC).

• The MAC, or hardware address, is a 48-bit (6-byte)


address written in a hexadecimal format.

Data Link Layer addressing using MAC


MAC Addressing
• The organizationally unique identifier (OUI) is assigned
by the IEEE to an organization.

• It’s composed of 24 bits, or 3 bytes.

• The organization, in turn, assigns a globally


administered address (24 bits, or 3 bytes) that is unique
to each and every adapter they manufacture.

• The high-order bit is the Individual/Group (I/G) bit.


MAC Addressing
• When it has a value of 0, we can assume that the
address is the MAC address of a device and may well
appear in the source portion of the MAC header.

• When it is a 1, we can assume that the address


represents either a broadcast or multicast address in
MAC.

• The next bit is the G/L bit (also known as U/L, where U
means universal), when set to 0, this bit represents a
globally administered address (as by the IEEE), when
the bit is a 1, it represents a locally governed and
administered address.
MAC Addressing
• The low-order 24 bits of an Ethernet address represent
a locally administered or manufacturer-assigned code.

• This portion commonly starts with 24 0’s for the first


card made and continues in order until there are 24 1’s
for the last (16,777,216th) card made.

• You’ll find that many manufacturers use these same six


hex digits as the last six characters of their serial
number on the same card.
MAC Addressing
• Here are examples of MAC address format for the
Source and destination Addresses.

For specific Host LAN

For All Host on LAN


IP Addressing
• The Internet Protocol (IP) is part of the TCP/IP protocol
suite, and is the most widely-used internetworking
protocol.

IP Header
IP Addressing
• The source and destination address fields in the IP
header each contain a 32-bit global internet address,
generally consisting of a network identifier and a host
identifier.

• IP address is a numeric identifier assigned to each


machine on an IP network.

• It designates the specific location of a device on the


network.
IP Addressing
• An IP address is a software/logical address, not a
hardware/phisical address—the latter is hard-coded on a
Network Interface Card (NIC) and used for finding hosts
on a local network.

• IP addressing was designed to allow a host on one


network to communicate with a host on a different
network, regardless of the type of LANs the hosts are
participating in.
IP Addressing
• The 32-bits are divided into four sections, referred to as
octets or bytes, each containing 1 byte (8 bits). You can
depict an IP address using one of three methods:
— Dotted-decimal, as in 172.16.30.56
— Binary, as in 10101100.00010000.00011110.00111000
— Hexadecimal, as in AC.10.1E.38

• Also the 32-bit IP address is a structured or


hierarchical address, as opposed to a flat or
nonhierarchical address.
IP Addressing
• Although either type of addressing scheme could have
been used, hierarchical addressing was chosen for a
good reason.

• The advantage of this scheme is that it can handle a


large number of addresses, namely 4.3 billion (a 32-bit
address space with two possible values for each
position—either 0 or 1—gives you 232, or
4,294,967,296).

• The disadvantage of the flat addressing scheme, and


the reason it’s not used for IP addressing, relates to
routing.
IP Addressing
• 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.

• The solution to this problem is to use a two- or three-


level, hierarchical addressing scheme that is structured
by network and host, or network, subnet, and host.
IP Addressing
• This two- or three-level scheme is comparable to a
telephone number.

• The first section, the area code, designates a very large


area.

• The second section, the prefix, narrows the scope to a


local calling area.

• The final segment, the customer number, zooms in on


the specific connection.
IP Addressing
• IP addresses use the same type of layered structure.

• 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.

• The network address (which can also be called the


network number) uniquely identifies each network.

• Every machine on the same network shares that


network address as part of its IP address.
IP Addressing
• In the IP address 172.16.30.56, for example, 172.16 is
the network address.

• The node address is assigned to, and 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, the 30.56 is the
node address.
IP Addressing
• Some IP addresses are reserved for special purposes, so
network administrators can’t ever assign these
addresses to nodes.

• Table on the next slide lists the members of this


exclusive little addresses and the reasons why they’re
reserved for special purposes.
IP Addressing

Reserved IP Addresses for special purposes


Port addressing
• TCP and UDP must use port numbers to communicate
with the upper layers, because they’re what keeps track
of different conversations crossing the network
simultaneously.

• TCP and UDP identify applications using 16-bit port


numbers.

• A client usually doesn't care what port number it uses on


its end.

• All it needs to be certain of is that whatever port number


it uses be unique on its host.
Port addressing
• Client port numbers are called ephemeral ports (i.e.,
short lived).

• This is because a client typically exists only as long as


the user running the client needs its service, while
servers typically run as long as the host is up.

• Most TCP/IP implementations allocate ephemeral port


numbers between 1024 and 5000.

• The port numbers above 5000 are intended for other


servers (those that aren't well known across the
Internet).
Port addressing
• Servers are normally known by their well-known port
number.

• For example, every TCP/IP implementation that provides


an FTP server provides that service on TCP port 21,
every Telnet server is on TCP port 23, every
implementation of TFTP (the Trivial File Transfer
Protocol) is on UDP port 69.

• Those services that can be provided by any


implementation of TCP/IP have well-known port
numbers between 1 and 1023.
Port addressing
• The well-known ports are managed by the Internet
Assigned Numbers Authority (IANA) - RFC 3232 (or just
see www.iana.org).

• Virtual circuits that don’t use an application with a well-


known port number are assigned port numbers
randomly from a specific range instead.

• These port numbers identify the source and destination


application or process in the TCP segment.
Port addressing

Source and Destination Port Number


Port addressing
• The Summary of different port numbers that can be
used are:

— Numbers below 1024 are considered well-known port numbers


and are defined in RFC 3232.

— Numbers 1024 and above are used by the upper layers to set
up sessions with other hosts, and by TCP to use as source and
destination addresses in the TCP segment.
Port addressing

Port numbers for TCP and UDP

You might also like