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

Week15 IP Protocols

Logical addressing provides a global addressing scheme for communication between hosts on the internet. IP addresses uniquely identify devices and allow them to send and receive information when connected to the internet. IPv4 and IPv6 are the main internet protocols that define IP addressing and differ in address size and format.

Uploaded by

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

Week15 IP Protocols

Logical addressing provides a global addressing scheme for communication between hosts on the internet. IP addresses uniquely identify devices and allow them to send and receive information when connected to the internet. IPv4 and IPv6 are the main internet protocols that define IP addressing and differ in address size and format.

Uploaded by

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

Logical Addressing

• Communication at the network layer is host to host.


• Computers communicate through internet.
• Need for a global addressing scheme.
• Solution: Logical addressing.

1
IP Address

• IP address stands for internet protocol address;

• It is an identifying number that is associated with a specific


computer or computer network.

• When connected to the internet, the IP address allows the


computers to send and receive information.

2
IP address

• Logical address in the network layer of the TCP/IP protocol


suite.
• IP version 4(IPv4).
• An IPv4 address is a 32-bit address that uniquely and
universally defines the connection of a device to the Internet.
• Need for more addresses lead to IPv6(128 bit).

3
IPv4 vs IPv6

• IPv4 and IPv6 are the internet


protocols applied at the network
layer.

• IPv4 is the most widely used


protocol right now whereas IPv6 is
the next generation protocol for
This Photo by Unknown Author is licensed under CC BY-ND

the internet.

4
IPv4
• IPv4 uses 32 binary bits to create a
single unique address on the
network.

• An IPv4 address is expressed by


four numbers separated by dots.

• Each number is the decimal (base-


10) representation for an eight-
digit binary (base-2) number, also
called an octet.

5
IPv6
• IPv6 uses 128 binary bits to create a
single unique address on the network.

• An IPv6 address is expressed by eight


groups of hexadecimal (base-16)
numbers separated by colons.

• Groups of numbers that contain all


zeros are often omitted to save space,
leaving a colon separator to mark the
gap .

6
Notations

Two types of notations.

• Binary Notations.
• Dotted Decimal Notations.

7
Notations

Binary Notation
• IPv4 address is displayed as 32 bits.
• Each octet form a byte.
• 4-byte Address.
• Eg.01001110 11001010 10111010 10001111
Dotted Decimal Notation
• Written in decimal form with decimal dot separating bytes.
• Makes more compact.
• Eg.117.137.38.2

8
Conversion

• Binary notation to dotted-decimal notation.


10000011 00000111 00001011 01101111
Replace each group of 8 bits with its equivalent decimal number
and add dots for separation.
• Dotted decimal to binary notation.
111.56.45.255
Replace each decimal number with its binary equivalent.

9
Static and Dynamic IP address

• Internet Service Provider(ISP) assign an IP address to devices


that connected to network.
• Static IP address
• Do not change.
• Dynamic IP address.
• IP address that can use temporarily.
• Unused ones can be assigned to another device.
• Assigned using Dynamic Host Configuration
Protocol(DHCP) or Point-to-Point Protocol over Ethernet
(PPPoE)
10
Classful Addressing

• IPv4 address space is divided in to 5 classes.


• Classes are A, B, C, D and E.
• In binary notation first few bits identifies the class.
• In dotted decimal notation first byte defines the class.

11
Classful Addressing

• In classful addressing each class is divided into a fixed number


of blocks with each block having a fixed size.
• Problem with classful addressing
• Large part of the available address are wasted.

12
Netid and Hostid

• Applicable to classes A, B and C.


• Class A
• One byte – Netid, Three bytes – Hostid.
• Class B
• Two bytes – Netid, Two bytes – Hostid.
• Class C
• Three bytes – Netid, One byte – Hostid.

13
IP Address Classes
• The class of IP address is used to determine:
▪ the bits used for network ID
▪ the bits used for host ID
▪ and the number of total networks and hosts
• The 32 bit IP address is divided into five sub-classes.
• Each of these classes has a valid range of IP
addresses.

14
Class A Network
• IP address belonging to class A are assigned
to the networks that contain a large number of
hosts.

• The first eight bits is the network part of the


address, with the remaining part of the
address being the host part of the address.

• There are 128 possible Class A networks.

15
Class B Network
• IP address belonging to class B are assigned
to the networks that ranges from medium-
sized to large-sized networks.

• The network ID is 14 bits and host ID is 16 bits.

• The higher order bits of the first octet of IP


addresses of class B are set to 10 and ranges
from 128-191. Class B has a total of:
2^14 = 16384 network ID
• There are 16,384 possible Class B networks. 2^16 – 2 = 65534 host ID

16
Class C Network
• IP address belonging to class C are assigned to small-
sized networks.
• The network ID is 24 bits long and host ID is 8 bits long.
• The higher order bits of the first octet of IP addresses of
class C are always set to 110 so it range is from 192-223.
• There are over 2 million possible Class C networks.

Class C has a total of:


2^21 = 2097152 network ID
2^8 – 2 = 254 host ID

17
Class D Network
• Class D addresses are used for multicasting applications.

• Unlike the previous classes, the Class D is not used for


"normal" networking operations.

• Class D addresses have their first three bits set to “1” and
their fourth bit set to “0”.

• Class D addresses are 32-bit network addresses, meaning


that all the values within the range of 224.0.0.0 – There are no host addresses
239.255.255.255 are used to uniquely identify multicast within the Class D address
space, since all the hosts
groups. within a group share the
group’s IP address for
receiver purposes.

18
Class E Network
• IP addresses belonging to class E are reserved for
experimental and research purposes.
• Class E networks are defined by having the first
four network address bits as 1.
• IP addresses of class E ranges from 240.0.0.0 –
255.255.255.254.
• While this class is reserved, its usage was never
defined. As a result, most network
implementations discard these addresses as
illegal or undefined.
• The exception is 255.255.255.255, which is used
as a broadcast address.
19
IP Address Classes – An overview

20
Classless Addressing

• No classes.
• Address are granted in blocks.
• Address in a block are contiguous.

21
Protocol
• A protocol is a standard used to define a method of exchanging data
over a computer network.
• Each protocol has its own method of how to handle data in the following
situations.
▪ How data is formatted when sent.
▪ What to do with data once received.
▪ How data is compressed.
▪ How to check for errors in the data.

22
Application Layer
Protocol
• An application layer protocol defines how application
processes running on different end systems pass messages
to each other.

• Various Application Protocols are:


▪ Simple Mail Transfer Protocol
▪ File Transfer Protocol
▪ Post Office Protocol
▪ Hyper Text Transfer Protocol
▪ Domain Name System
23
Simple Mail Transfer
Protocol

• The Simple Mail Transfer Protocol


(SMTP) is an internet standard
communication protocol for
electronic mail transmission.
This Photo by Unknown Author is licensed under CC BY-SA

24
File Transfer Protocol

• The File Transfer Protocol (FTP) is a


standard communication protocol
used for the transfer of computer
files from a server to a client on a
computer network.
This Photo by Unknown Author is licensed under CC BY-SA

25
Post Office Protocol

• In computing, the Post Office Protocol


(POP) is an application-layer Internet
standard protocol used by e-mail clients to
retrieve e-mail from a mail server.

• POP version 3 (POP3) is the version in


common use.
This Photo by Unknown Author is licensed under CC BY-ND

26
Hyper Text Transfer
Protocol
• The Hypertext Transfer Protocol (HTTP) is an
application layer protocol for distributed,
collaborative, hypermedia information systems.
• HTTP is the foundation of data communication
for the World Wide Web, where hypertext
documents include hyperlinks to other resources
that the user can easily access.

This Photo by Unknown Author is licensed under CC BY-SA

27
Domain Name System

• The Domain Name System (DNS) is a hierarchical and decentralized


naming system for computers, services, or other resources
connected to the Internet or a private network.

• It associates various information with domain names assigned to


each of the participating entities.

• It translates more readily memorized domain names to the


numerical IP addresses needed for locating and identifying
computer services and devices with the underlying network
protocols.

This Photo by Unknown Author is licensed under CC BY-SA

28
DNS in the internet

• DNS is a protocol that can be used in different platforms.


• In the Internet, the domain name space is divided into three
different sections:
• Generic domains
• Country domains
• Inverse domain.

29
Generic Name

• The generic domains define registered hosts according to


their generic behavior.
• Each node in the tree defines a domain, which is an index to
the domain name space database.
• Labels describe the organization type.
• Eg., com – commercial organizations.
• edu – educational institutions.

30
Country Domain
• The country domains section uses two-character country abbreviations.
• Eg. us,in
• Labels can be organizational, or they can be more specific, national
designations.

31
Inverse Domain
• The inverse domain is used to map an address to a name.
• Query is called an inverse or pointer (PTR) query.
• To handle a pointer query, the inverse domain is added to
the domain name space with the first-level node called arpa.
• The second level is also one single node named in-addr.
• The rest of the domain defines IP addresses.

32
Resolution

• Mapping a name to an address or an address to a name is


called name-address resolution.
• A host that needs to map an address to a name or a name to
an address calls a DNS client called a resolver.
• Mapping names to addresses.
• Mapping addresses to names.

33
Hypertext Transfer
Protocol(HTTP)
• Protocol used to access data on the world wide web.
• Transfers file and uses the services of TCP.
• Only data are transferred between server and the client, no
control information.
• Messages can read and interpreted by HTTP server and HTTP
client.
• HTTP messages are delivered immediately.
• HTTP uses the services of TCP on well-known port 80.

34
HTTP Transaction

• HTTP is a stateless protocol.


• The client initializes the transaction by sending a request
message.
• The server replies by sending a response.
• Two types of messages
• Request message
• Response message

35
HTTP Transaction
• Request message
• A request message consists of a request line(first line), a header, and
sometimes a body.
• Response message
• A response message consists of a status line(first line), a header, and
sometimes a body.

36
HTTP Messages
• Request types: This field is used in the request message.
• The request type is categorized into methods
• Eg. GET : Requests a document from the server.
• PUT : Sends a document from the server to the client.
• Version: The most current version of HTTP is 1.1
• Status code : Seen in response messages only. It consists of three
digits. Whereas the codes in the 100 range are only informational, the
codes in the 200 range indicate a successful request. The codes in the
300 range redirect the client to another URL, and the codes in the 400
range indicate an error at the client site. Finally, the codes in the 500
range indicate an error at the server site.

37
HTTP Messages

• Status phrase : Seen in response messages only. It explains the status


code in text form.
• Header
• 404 Not found The document is not found.
• Header : The header exchanges additional information between the
client and the server. The header can consist of one or more header
lines. Each header line has a header name, a colon, a space, and a
header value.

38
HTTP Messages
Four categories of header
• General header, request header, response header, and entity
header.
• A request message can contain only general, request, and
entity headers.
• A response message, on the other hand, can contain only
general, response, and entity headers.

39
HTTP Messages
• General header: The general header gives general
information about the message and can be present in both a request
and a response.
• Request header: The request header can be present only in a request
message. It specifies the client's configuration and the client's preferred
document format.
• Response header: The response header can be present only in a
response message. It specifies the server's configuration and special
information about the request.
• Entity header: The entity header gives infonnation about the body of the
document. Although it is mostly present in response messages, some
request message.
40
Persistent vs non persistent
connection

• In a nonpersistent connection, one TCP connection is made for each


request/response.
Steps :
1. The client opens a TCP connection and sends a request.
2. The server sends the response and closes the connection.
3. The client reads the data until it encounters an end-of-file marker; it then
closes the connection.

41
Persistent vs non persistent
connection

• HTTP version 1.1 specifies a persistent connection by default.


• In a persistent connection, the server leaves the connection open for
more requests after sending a response.
• The server can close the connection at the request of a client or if a time-
out has been reached.
• The sender usually sends the length of the data with each response.
• HTTP supports proxy servers.
• A proxy server is a computer that keeps copies of responses to recent
requests.

42
Hypertext Transfer Protocol
Secure(HTTPS)

• Secure version of HTTP.


• Primary protocol used to send data between web browser and
a web client.
• Encryption is used for the security of the transferred data.
• Any website that require login credentials should use HTTPS.

43
Working

• Uses encryption protocol Transport Layer


Security(TLS)(Previously known as Secure Socket Layer(SSL)).
• Asymmetric encryption is used.
• Use of two keys.
• Public key: Encrypting the message and is available to
every one who wants to interact with everyone.
• Private key: Controlled by the owner of the website and is
used to decrypt the message encrypted by the public key.

44
HTTP vs HTTPS

HTTP HTTPS
Encryption not used. Information is encrypted
using TSL/SSL protocol
Default port is 80 Default port is 443
Unreliable Reliable
URL begin with http:// URL begin with https://

45
References and Image Courtesy

[1] J. Glenn Brookshear,”Computer Science: An Overview”, Addision-


Wesley, Twelth Edition, 2014.

[2] Behrouz A Forouzan, “Data Communication and Networking,


McGraw-Hill Forouzan networking series.

[3] https://www.cloudflare.com/en-in/learning/ssl/what-is-https/

46

You might also like