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

Lecture 6 Computer Network

TCP/IP is a set of protocols that allows computers to communicate over a network. It includes protocols at the transport layer (TCP and UDP) and internet layer (IP). TCP/IP was developed early on and became popular as it was discussed freely in RFC documents and supported by UNIX. It has four layers - application, transport, internet, and network access - compared to OSI's seven layers. Key protocols include IP for addressing and routing packets, TCP for reliable connections, and UDP for fast delivery.

Uploaded by

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

Lecture 6 Computer Network

TCP/IP is a set of protocols that allows computers to communicate over a network. It includes protocols at the transport layer (TCP and UDP) and internet layer (IP). TCP/IP was developed early on and became popular as it was discussed freely in RFC documents and supported by UNIX. It has four layers - application, transport, internet, and network access - compared to OSI's seven layers. Key protocols include IP for addressing and routing packets, TCP for reliable connections, and UDP for fast delivery.

Uploaded by

Hamidx Nxt
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 53

Computer Network

LECTURE 6
What is TCP/IP..?
 TCP/IP is a set of protocols developed to
allow cooperating computers to share
resources across a network.
 TCP stands for Transmission Control Protocol
 They are Transport Layer & Network Layer

protocols in OSI(open system interconection)


model.
 The most well known network that adopted

TCP/IP is --> Internet. ( The Biggest WAN)


Why TCP/IP is so popular..?
 TCP/IP was developed very Early!

 Technologies were widely discussed in


documents called “Request For Comments”
(RFC) – free of charge

 Supported by UNIX Operating System


TCP/IP Model
 Because TCP/IP was developed earlier than
the OSI 7 layer model, it doesn’t have 7 layers
but only 4 layers.
Application Layer

Transport Layer

Internet Layer

Network Access Layer


Application Layer…….
 Application layer protocols defined the
rules when implementing specific network
applications.

 Examples :
◦ FTP – (File Transfer Protocol)
◦ Telnet – ( Remote Terminal Protocol)
◦ SMTP – (Simple Mail Transfer Protocol)
◦ HTTP – (Hyper Text Transfer Protocol)
Transport Layer…
 End to End data transfer……

 Examples :
◦ TCP (Transmission Control Protocol)
 Connection oriented (connection established before
data exchanged)
 Reliable delivery of data

◦ UDP (User Datagram Protocol)


 Connectionless service
 Delivery is not guaranteed (unreliable)
Internet Layer……
 Internet layer protocols define the rules of how to
find the routers for a packet to the destination.
 It only gives best effort delivery. (packets can be

delayed, corrupted, lost or out of order)


 Examples :

◦ IP – Internet Protocol (Provide packet delivery)

◦ ARP – Address Resolution Protocol (Defined the procedure


of network address / mac address translation)

◦ ICMP – Internet Control Message Protocol (Defined the


procedure of error message transfer)
Network Access Layer….
 Also known as Network Interface Layer…

 The Network Access Layer is the layer in the TCP/IP


model at which data is transmitted and received
across the physical network.
◦ Mostly in hardware
◦ A well known example is Ethernet

 Examples :
◦ Ethernet
◦ Token Ring
◦ Frame Relay
◦ ATM (Asynchronous Transfer Mode)
How TCP/IP relates to OSI
What is IP……?

 IP stands for Internet Protocol

 IP specifies the format of packets, also called


datagrams, and the addressing scheme. Most
networks combine IP with a higher-level
protocol called Transmission Control Protocol
(TCP), which establishes a virtual connection
between a destination and a source.
What is IP……? (cont.)
 IP by itself is something like the postal
system.
 It allows you to address a package and drop it

in the system, but there's no direct link


between you and the recipient.
Purpose of the IP….
 The Internet Protocol defines the basic unit of
data transfer (IP Datagram)

 IP software performs the routing function

 IP includes a set of rules that process the idea


of unreliable packet delivery.
◦ How hosts and routers should process packets
◦ How & when error messages should be generated
◦ The Conditions under which packets can be
discarded.
IP Service
 Delivery service of IP is minimal.

 IP provides an unreliable connectionless best


effort service
◦ Unreliable : IP doesn’t make an attempt to recover
lost packets
◦ Connectionless : Each packet is handled
independently
◦ Best Effort : IP doesn’t make guarantees on the
service ( No through output , No delay guarantee…)
IP Service (Cont.…)
 IP supports the following services
 One-to-one (unicast)
 One-to-all (broadcast)
 One-to-several (multicast)

unicast
broadcast multicast
Construction of Datagrams….
 Each #datagram has two components
◦ Header
◦ Payload

Header + Data (Payload)

Packet
IP Datagram Format
bit # 0 7 8 15 16 23 24 31
header
version DS ECN total length (in bytes)
length
D M
Identification 0 Fragment offset
F F
time-to-live (TTL) protocol header checksum

source IP address

destination IP address

options (0 to 40 bytes)

payload

4 bytes

 20 bytes ≤ Header Size < 24 x 4 bytes = 60 bytes


 20 bytes ≤ Total Length < 216 bytes = 65536 bytes

16
IP Datagram Format
Fields of the IP Header
 Version (4 bits): current version is 4, next version will be
6.
 Header length (4 bits): length of IP header, in multiples

of 4 bytes
 DS/ECN field (1 byte)

◦ This field was previously called as Type-of-Service (TOS) field.


The role of this field has been re-defined, but is “backwards
compatible” to TOS interpretation
◦ Differentiated Service (DS) (6 bits):
 Used to specify service level (currently not supported in the
Internet)
◦ Explicit Congestion Notification (ECN) (2 bits):
 New feedback mechanism used by TCP
 Total Length—Specifies the length, in bytes, of the
entire IP packet, including the data and
 header 18
Fields of the IP Header
 Identification (16 bits): Unique identification of a
datagram from a host. Incremented whenever a
datagram is transmitted (piece together datagram)

 Flags (3 bits):
◦ First bit always set to 0
◦ DF bit (Do not fragment)
◦ MF bit (More fragments)
 Fragment Offset—Indicates the position of the
fragment’s data relative to the beginning of the data
in the original datagram, which allows the destination
IP process to properly reconstruct the original
datagram
19
Fields of the IP Header
 Time To Live (TTL) (1 byte):
◦ Specifies longest paths before datagram is
dropped
◦ Role of TTL field: Ensure that packet is eventually
dropped when a routing loop occurs
Used as follows:
◦ Sender sets the value (e.g., 64)
◦ Each router decrements the value by 1
◦ When the value reaches 0, the datagram is dropped

20
Fields of the IP Header
 Protocol (1 byte):
 Specifies the higher-layer protocol.
4 = IP-in-IP
 Used for demultiplexing to higher layers. encapsulation

6 = TCP 17 = UDP

1 = ICMP 2 = IGMP

IP

 Header checksum (2 bytes): A simple 16-bit long


checksum which is computed for the header of the
datagram.

21
Fields of the IP Header
 Options:
 Security restrictions
 Record Route: each router that processes the packet
adds its IP address to the header.
 Timestamp: each router that processes the packet
adds its IP address and time to the header.
 (loose) Source Routing: specifies a list of routers that
must be traversed.
 (strict) Source Routing: specifies a list of the only
routers that can be traversed.
 Padding: Padding bytes are added to ensure
that header ends on a 4-byte boundary

22
IPV4 Address
 What is an IP address…?
◦ An IP address is a unique global logical adress for a
network interface

- is a 32 bit long identifier


- encodes a network number (network prefix)
and a host number
10000000 10001111 10001001 10010000
1st Byte 2nd Byte 3rd Byte 4th Byte
= 128 = 143 = 137 = 144

128.143.137.144
Class Ranges of Internet Addresses
Class A
 Class A addresses are assigned to networks
with a very large number of hosts
 The high-order bit in a class A address is

always set to zero. 


 The next seven bits (completing the first

octet) complete the network ID.


 The remaining 24 bits represent the host ID. 
Class B
 Class B addresses are assigned to medium-
sized to large-sized networks.
 The two high-order bits in a class B address

are always set to binary 1 0.


 The next 14 bits complete the network ID.
 The remaining 16 bits represent the host ID.
Class C
 Class C addresses are used for small
networks.
 The three high-order bits in a class C address

are always set to binary 1 1 0. 


 The next 21 bits complete the network ID.
 The remaining 8 bits represent the host ID. 
Class D & E
 Class D addresses are reserved for IP
multicast addresses.
 The four high-order bits in a class D address are
always set to binary 1 1 1 0.
 The remaining bits are for the address that interested
hosts recognize. 

 Class E is an experimental address that is


reserved for future use
 The high-order bits in a class E address are set to
1111.
Class Ranges of Network IDs…
Address Class First Network ID Last Network ID

Class A 1.0.0.0 126.0.0.0

Class B 128.0.0.0 191.255.0.0

Class C 192.0.0.0 223.255.255.0

 The network ID cannot begin with the number 127. The


number 127 in a class A address is reserved for
internal loopback functions.

 All bits within the network ID cannot be set to 1. All 1's


in the network ID are reserved for use as an IP
broadcast address.
Journey to IP Versions…
 IPV(1-3) : were not formally assigned.

 IPV4 : TCP/IP , 32bit IP address currently used.

 IPV5 : Internet Stream Protocol (SP)


 Experimental Protocol
 Never Introduced for public use.

 IPV6 : Designed to replace IPV4 , 128bit IP


address
Features of IPV4…
 Connectionless protocol and best effort
based.

 Simplicity
 It is simpler and easy to remember
 Require less memory

 Familiarity
 Millions of devices are already knowing it
 Existing infrastructure already support it
Benefits of IPV4….
 Widely support

 Shorter & Sweeter (header)

 Support of all Operating Systems

 All commonly used protocols are supported


Shortcoming of IPV4….
 IPV4 specification didn’t identify any security
mechanism.
 Millions of class A addresses are wasted.
 Many class B addresses also wasted.
 Not so many organizations are so small to

have a class C block.


 Class E addresses were reserved for future

purposes.
IPV4 Supporting Devices..
 PCs
 Servers
 Modems
 Routers
 Printers
 Cameras
 Smart Phones
 Tablets & Gaming Systems
 Just about anything else connecting to the

Internet
Why IPV6…..?
IPV6 provides a platform on new internet
functionality that will be needed in the
immediate future and provide
flexibility for future
growth and
expansion.
Benefits of IPV6…..

Large address space


New header format

Extensibility
IPV6

Built in Security Better support for QoS

Efficient & hierarchical addressing and


routing infrastructure
TRANSITION FROM IPv4 TO IPv6

Because of the huge number of systems on the Internet,


the transition from IPv4 to IPv6 cannot happen
suddenly. It takes a considerable amount of time before
every system in the Internet can move from IPv4 to
IPv6. The transition must be smooth to prevent any
problems between IPv4 and IPv6 systems.
Transition strategies include:
Dual Stack
Tunneling
Header Translation
Three transition strategies
Dual stack
It is recommended that all hosts, before migrating completely to version 6,
have a dual stack of protocols. In other words, a station must run IPv4 and
IPv6 simultaneously until all the Internet uses IPv6.
To determine which version to use when sending a packet to a destination,
the source host queries the DNS. If the DNS returns an IPv4 address, the
source host sends an IPv4 packet. If the DNS returns an IPv6 address, the
source host sends an IPv6 packet.
Tunneling strategy
Tunneling is a strategy used when two computers using IPv6 want to
communicate with each other and the packet must pass through a region that
uses IPv4. To pass through this region, the packet must have an IPv4 address.
So the IPv6 packet is encapsulated in an IPv4 packet when it enters the region,
and it leaves its capsule when it exits the region. It seems as if the IPv6 packet
goes through a tunnel at one end and emerges at the other end. To make it
clear that the IPv4 packet is carrying an IPv6 packet as data, the protocol value
is set to 41.
Header translation strategy

Header translation is necessary when the majority of the Internet has moved
to IPv6 but some systems still use IPv4. The sender wants to use IPv6, but the
receiver does not understand IPv6. Tunneling does not work in this situation
because the packet must be in the IPv4 format to be understood by the
receiver. In this case, the header format must be totally changed through
header translation. The header of the IPv6 packet is converted to an IPv4
header
IP Based Technologies..
 Internet
 VoIP
 IP – TV
 IP-VPN
 Wireless Mobile Technology
 Internet Broadcasting
 Multihoming
Challenges of IPv4
 Address Depletion
Subnetting….
 Prerequisite
◦ Knowledge on binary number
◦ Understand of IP version four
Subnetting….
 Subnetting enables the network administrator
to further divide the host part of the address
into two or more subnets.
 In this case, a part of the host address is

reserved to identify the particular subnet.


 This is easier to see if we show the IP

address in binary format.


Subnet Mask….
 Subnet masks are frequently expressed in dotted
decimal notation.
 Subnet mask is not an IP address.
 Each host on a TCP/IP network requires a subnet mask
even on a single segment network.

Address Class Bits for Subnet Mask Subnet Mask

Class A 11111111 00000000 00000000 00000000 255.0.0.0

Class B 11111111 11111111 00000000 00000000 255.255.0.0

Class C 11111111 11111111 11111111 00000000 255.255.255.0

You might also like