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

Week 3 - Lecture Notes

Uploaded by

siennachang1202
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Week 3 - Lecture Notes

Uploaded by

siennachang1202
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Module Title:

Computer
Networks
Module Code: COM5014M
Level: 5
Credits: 20
Week 3

TCP/IP Model &


Protocols
TCP/IP Model
• TCP/IP stands for Transmission Control Protocol/ Internet Protocol
• TCP/IP was created in the early 1970s, and it knows as the Internet protocol suite,
refers to a collection of protocols.
• TCP/IP is the core of the Internet.
• TCP and IP are two different protocols.
• TCP/IP is an end-to-end data communication, specifying how data should be
packetized, addressed, transmitted, routed, and received.
• The main function of TCP/IP is that it governs how the information is sent and received
in the form of packets between source and destination
• Ability to connect multiple networks in a seamless way was one of the major design
goals which led to development of TCP/IP.
TCP/IP Layers
• The functionality of the TCP/IP model is divided into
four layers, all work collaboratively to transmit the
data from one layer to another. Application
1) Network Interface
2) Internet (Network Layer) Transport
3) Transport Layer
4) Application Layer Internet
• The TCP/IP protocol suite is the set of
communication protocols used to Network Interface
connect hosts on the Internet.
TCP/IP Layers
• The functionality of the TCP/IP model is sometimes divided into five layers.

• We will work on four-


layer model in this Application Application
module.
TCP/UDP Transport
IP Network

MAC Data Link

Physical Layer Physical Network


Network Access/Interface Layer
• It corresponds to the OSI physical and data link layers.
• Network access layer defines the procedures used to interface with the network
hardware and access the transmission medium, includes the LAN and WA.
o LAN network interface:
• Ethernet,
• Token Ring
o WANs
• X.25,
• Frame Relay,
• ATM
• Network access layer protocols also map IP addresses to physical hardware addresses
and encapsulate IP packets into frames.
Internet or Network Layer
• The network layer is where data is addressed, packaged, and routed among networks.
• The purpose of the Internet layer is to select the best path through the network for
packets to travel.
• Several important Internet protocols operate at the network layer:
o Internet protocols (IP)
o Address Resolution Protocol (ARP)
o Internet Control Message Protocol (ICMP)
o Internet Group Management Protocol (IGMP)
Transport Layer
• The transport layer is where sessions are established, and it provides a logical
connection between a source host and a destination host.
• This Layer segment and reassemble data sent by upper-layer applications into the
same data stream, or logical connection, between end points.
• Creates packet from bytes stream received from the application layer.
• Uses port number to create process to process communication.
• Uses a sliding window protocol to achieve flow control.
• Uses acknowledgement packet, timeout and retransmission to achieve error control.
• Transport layer protocols include TCP and UDP.
Application Layer
• Application layer is responsible for end-to-end communication and error-free
delivery of data.
• It shields the upper-layer applications from the complexities of data.
• The three main protocols present in this layer are:
o HTTP (Hypertext Transfer Protocol)
o FTP (File Transfer Protocol)
o SSL (Secure Socket Layer).
TCP/IP Layers Summary

Application • Providing access to network resources.

• Providing reliable Process-to-Process message delivery.


Transport • Segmentation & Reassembly.
• Service point addressing & connection control

• Transmission packets from Source-to-Destination.


Internet • Providing internetworking between independent networks.
• Core functions: Routing, address assignment, multicasting

• Providing interface with the physical media.


Network Access • Sometimes called as network access layer.
• Transmission between two devices on the same network
Packet Encapsulation in TCP/IP

Application User Data Application


TCP
Header
Segment TCP
IP
Header
Packet IP
Network
Header
Datagram Network Interface
OSI v.s. TCP/IP
• TCP/IP and OSI models are significantly different, although they have similar
functionalities on the network and transport layers.
• The OSI model has 7 layers, while TCP/IP
uses 4 layers.
• OSI model gives guidelines on how
communication needs to be done, while
TCP/IP protocols layout standards on
which the Internet was developed.
• TCP/IP is a practical model.
Protocols
• Protocols define the details of how the
message is transmitted and delivered.
Timing
This includes issues of:
o Message format Message
o Message size Encapsulation
Size
o Timing
o Encapsulation Protocols
o Encoding
o Message pattern Message
Encoding
Format

Message
Pattern
TCP/IP
ICMP FTP
Protocols
HTTP SMTP
Application
POP3 SSL

IPAM

Transport TCP UDP

Network IP
Internet Protocol (IP)
• At the network layer the TCP/IP model supports IP.
• IP is a transmission mechanism that uses IP addresses to deliver packets to network
devices through best effort service.
• The best effort service means, IP does its best to deliver a packet to destination, but
no error checking or tracking (no guarantee).
• IP is unreliable protocol, has no guarantee for delivery, meaning that a packet might
be lost, corrupted, delivered late or out of order.
• IP transports data in individual packers called datagrams, each of which is
transported separately.
• Core Functionalities: Routing, address assignment, multicasting
Routed Protocols
• A routed protocol is used to deliver application traffic.
• It provides appropriate addressing information in Network Layer to allow a packet to
be forwarded from one network to another.
• Examples of routed protocols are the IP and Internetwork Packet Exchange (IPX).
• In a network all devices should know where a packet should be sent.
• All devices need to know what IP addresses are on directly attached networks
o If the destination is on a local network, send it directly there
o If the destination address isn’t local, there should be a router device to send it
to the corresponding network, according to IP address.
IP Address
• An IP address is a unique logical address
that identifies a device on a network,
either in a local network or the Internet.
• An IP address is a string of numbers
separated by periods.
• IP address for a device in a network is
like a postal code in a mailing address.
• IP addresses are how computers on the
internet recognise one another.
• It is basically developed to supports
networks consisting of multiple
networks or sub-networks.
IPv4
• Internet Protocol version 4 is the original
and most common deployed internet
protocol used to connect devices to the
internet.
• IPv4 uses 32-bit address scheme, divided
into four 8-bit fields, called octets,
separated by a period or dot.

Binary Format Decimal Notation

11000000.10101000.00000001.00001010 192.168.1.10
IPv4
• Each of the 4 Octets has 8 Bits.
• Each Bit can only be a One or a Zero.
128+64+32+16+8+4+2+1=255
• In addressing each octet is converted
to a decimal number, ranging from 0 to
255 and separated by a by a period.
• Example of IPv4 address:
163.1.125.98
• IPv4 with this format allows only
around 4 billion IP addresses, that is
not enough for supporting addressing
of all devices in the future.
IPv4 Addressing
• IP addresses are made up of
two main components.
5 Classes of IP Addresses: • Net ID (Network ID)
o A: 1 byte for NetID, 3 for HostID • Host ID
o B: 2 byte for NetID, 2 for HostID
o C: 3 byte for NetID, 1 for HostID
o D: Multicast addresses
o E: Reserved for future use
IPv4
Addressing
Octet Octet Octet Octet

Class A Net Host Host Host

Class B Net Net Host Host

Class C Net Net Net Host


IPv4
Class Address Supports
Addressing Range

Class A 1 – 127 16 million host on each of 127 network

Class B 127 – 191 65,000 hosts on each of 16,000 networks

Class C 192 – 223 254 hosts on each of 2 million networks

Class D 224 – 239 Reserved for multicast groups

Class E 240 - 254 Reserved for future use


Data could be transported over a network by three simple
methods: Unicast, Broadcast, and Multicast.

Unicast, Types of IPv4 Address


Broadcast, Unicast from one source to one destination i.e.,
and Multicast One-to-One
Multicast from one source to multiple destinations,
stating an interest in receiving the traffic
i.e., One-to-Many
Broadcast from one source to all possible
destinations i.e., One-to-All
Unicast, Broadcast, and Multicast

Unicast Broadcast Multicast


one to one communication. one to all. one to a select group.
Use the address of the destination Message sent to everyone in Message to a group of targets in
device as the destination address. the LAN. the LAN.
IPv6
• It stands for Internet Protocol version 6 and is the successor version of IP.
• IPv6 developed by the IETF to replace IP4, to supply IP addressing for a
greater number of connected devices, as predicted growth of connected
devices in the future.
• IPv6 uses a 128-bit address, divided into eight 16 bits blocks, each block is
converted into 4 digits Hexadecimal numbers separated by colon.
• Example: 8145 : 010C : 0000 : 0000 : 1100 : 1A06 : 8800 : 0001
• IPv6 can support addressing for around 340 trillion devices.
• IPv6 support more new features: Auto-configuration, better Multicast, better
quality of service (QoS), built-in authentication and privacy support, and more
efficient routing.
• IPv6 address is split into 2 segments:
o Network segment: 64 bits
o Host segment: 64 bits

o Network segment is used for routing, splits into 2


IPv6 blocks:
o 48 bits for site prefix (public topology), and
Addressing o 16 bits for subnet ID (private topology).

• Host segment identifies the interface ID which is:


• Automatically configured from the interface's
MAC address, or
• Manually configured in Extended Unique
Identifier (EUI-64) format.
IPv6
Addressing
IPv6 Addressing

Unicast Multicast Anycast

Assigned Solicited-Node

Global Unique Embedded


Link-local Loopback Unspecified
Unicast Local IPv4
IPv6
Addressing • Anycast is not supported by IPv4, IPv6 introduced this
mode for packet routing.
• In anycast, a group of potential receivers (topologically
nearest nodes) are assigned the same Anycast IP
address.

• Once the group is created, any interface from the group


can receive packets on the behalf of group.
• Note that packets sent to an anycast address are
received by only one interface of the group, not by all
interfaces.
Internet Control Message Protocol (ICMP)
• ICMP is an error-reporting protocol at the network layer in TCP/IP.
• It can only report an error to the original source to deal with it, but ICMP has no
error-correcting mechanism.
• ICMP is used to generate and send error message indicating weather a particular
service is available, or a router or host cannot be found.
• ICMP has no knowledge about the message routes (managed with routers).
• The best-known ICMP protocol is PING & Traceroute command.
• ICMP has two types of messages:
o Error-reporting: Used to check reachability of a device on the network. Example: A
client wants to know if the server is available or not?
o Query messages: Helps to diagnose some network problem.
Transmission Control Protocol (TCP)
• TCP is a connection-oriented protocol, meaning that one program is connected
to another program.
• TCP establishes a session between source and destination, before exchanging
the data between them.
• The established session is used to ensures delivery of packets between source
and destination hence it is called a reliable protocol.
• TCP includes several mechanisms to ensure reliable communication.
• TCP asks for acknowledgement (ACK) from the receiver for every segment, so
it can detect if a packet is lost. [Timing for ACK]
Transmission Control Protocol (TCP)
• TCP can detect The
o Lost packets,
o Out of order packets,
o Duplicate packets, and
o Corrupted packets.

• The main downsides of TCP is that it is the latency, as the connection need to
be established before sending the packet out.
User Datagram Protocol (UDP)
• UDP is a connectionless protocol.
• UDP is simple but fast protocol, as it doesn’t need to establish a connection before
sending data, and there is no mechanism for congestion control.
• UDP is unreliable protocol and there is no guarantee that the packet arrives to its
destination.
• This protocol is suitable for low-latency are loss-tolerating applications.
• Time-sensitive and real-time applications like online games often use UDP.
TCP v.s. UDP
TCP UDP

Reliability Higher Lower

Establishes a connection Yes No

Speed Slower Faster

Order of data delivery Guaranteed No guarantee

Data transfer type Delivers data in a sequence Delivers data in a stream

Error detection & correction Yes No


Application Layer Protocols
• The application layer in TCP/IP is equivalent to the combined session, presentation
and application layers in the OSI model

SMTP POP3

HTTP IPAM

FTP SSL
Hypertext Transfer Protocol (HTTP)
• HTTP is the core protocol for the World Wide Web (WWW) and the foundation of any
data exchange on the Web.
• HTTP is a protocol for fetching resources such as HTML documents. It was designed
for communication between web browsers and web servers.
• It is based on client-server architecture model, which define:
o the data that a client should send to a Web server to request services,
o the meaning of received data,
o the data that a Web server should send to the client, such that it can understand.
• The client uses Uniform Resource Identifier (URL).
File Transfer Protocol (FTP)
• FTP is a standard protocol on TCP/IP, used to transfer files over the Internet.
• It is the most common, simplest and most secure protocol for file exchange over the
Internet.
• FTP is a client-server architecture, uses TCP between client and server.
• FTP Client: Software that connects a computer to FTP server to access files.
• FTP Server: Stores all the files and databases for FTP clients.
• FTP Clients software: FileZilla, Fire FTP,
Winscp
Simple Mail Transfer Protocol (SMTP)
• SMTP is the standard e-mail protocol on the Internet and part of the TCP/IP protocol
suite.
• It defines the message format which stores and forward the mail.
• It is a relatively simple, text-based protocol, where one or more recipients of a
message are specified and then the message text is transferred.
• SMTP does not require authentication. This allows anyone on the Internet to send
email to anyone else.
• The primary purpose of SMTP is to transfer email between mail servers. In order to
send email, the client sends the message to an outgoing mail server, which in turn
contact the destination mail server for delivery. To be able to do this, it is necessary to
specify an SMTP server when configuring an email client.
Post Office Protocol (POP3)
• POP3 is a protocol used by clients to retrieve emails from an email server over a
TCP/IP connection. It is 3rd version of POP.
• Email servers, hosted by Internet service providers, also use POP3 to receive and to
receives and holds email for each individual client until they pick it up.
• Clients use an email application to download their mailbox from email server.
• Once a client downloaded its own emails, they will be usually deleted from the server.
However, some clients allow email server to keep a copy of them.
• Microsoft Outlook is one of the popular email application who work with POP3.
• Advantages: 1- As emails are downloaded to the client’s computer, all messages can
be read when user is offline. 2- Easy to configure and use.
• Disadvantages: Email are stored on client’s computer, in case of crush, all emails may
be lost.
Secure Sockets Layer (SSL)
• SSL is a method for providing security for web-based applications and between a
client and a server.
• Example: a web browser and a web server (website), a client and a mail server.
• Integration of HTTP and SSL provides security for websites. The SSL-secured websites
begin with HTTPS (with S at HTTP).
• SSL use encryption and authentication mechanisms to ensures reliable
(confidentiality & integrity,) link between a client and a web server.
• SSL authenticate both sides of communication using SSL certificate.
• A browsers and a Web Server both needs the SSL Certificate to establish the
connection.
• SSL Certificate has a pair cryptographic key, called Public Key, which use for encrypted
connection establishment.
Internet Protocol Address Management
• IP Address Management (IPAM) is a network service for planning, tracking, and
managing the IP addresses in a network.
• Managing IP addresses means: Assigning IP addresses to devices, changing IP
addresses, deleting IP addresses when devices leave the network, dealing with
conflict IP addresses, setting up subnets and designating addresses for use by certain
applications or clouds.
• Why IPAM is needed?
o In a large network with hundreds or thousands of devices, keeping track of each
of IP address becomes very difficult.
• IPAM can be used to determine: the device and host name associated with each IP
address, allocated and free IP addresses, allocated and free subnets, and who uses
the subnets and how large they are.
Thank You
Hamidreza Bagheri
[email protected]
References
1. Forouzan, B. A., & Fegan, S. C. (2007). Data communications and networking (4th. ed.). New York:
McGraw-Hill.
2. Burgess, M. (2003) Principles of Network and System Administration. 2nd Ed. John Wiley and Sons Ltd.
3. Limoncelli, T. and Hogan, C. (2001) The Practice of System and Network Administration. Addison-
Wesley.
4. Olifer, N. and Olifer, V. (2005) Computer Networks: Principles, Technologies and Protocols for Network
Design. John Wiley and Sons Ltd.
5. Stallings, W. (2003) Data and Computer Communications. 7th Ed. Prentice Hall
6. Tanenbaum, A. (2002) Computer Networks. Prentice Hall PTR.

You might also like