0% found this document useful (0 votes)
75 views108 pages

Unit 1

The document discusses the Internet Protocol (IP) and Internet Control Message Protocol (ICMP). It provides details on the IP header format, including fields like version, header length, service type, time to live, protocol number, and source/destination addresses. It also describes ICMP, its role in reporting errors and network issues, common message types like echo request/reply, and error messages like destination unreachable.

Uploaded by

HARD DISK 3
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)
75 views108 pages

Unit 1

The document discusses the Internet Protocol (IP) and Internet Control Message Protocol (ICMP). It provides details on the IP header format, including fields like version, header length, service type, time to live, protocol number, and source/destination addresses. It also describes ICMP, its role in reporting errors and network issues, common message types like echo request/reply, and error messages like destination unreachable.

Uploaded by

HARD DISK 3
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/ 108

UNIT-1

Shikha Sharma RCET,Bhilai 1


TCP/IP PROTOCOL SUITE

Shikha Sharma RCET,Bhilai 2


Internet Protocol
(IP)
Shikha Sharma RCET,Bhilai 3
• The unit of transfer in an IP network is
called an IP datagram. It consists of an IP
header and data relevant to higher level
protocols.
• It is an unreliable, best-effort, and
connectionless packet delivery protocol.

Shikha Sharma RCET,Bhilai 4


Figure 7-1

Shikha Sharma RCET,Bhilai 5


• VER is the field that contains the IP
protocol version. The current version is 4.
6 is the version for IPv6.

• HLEN is the length of the IP header in


multiples of 32 bits, without the data field.

Shikha Sharma RCET,Bhilai 6


Shikha Sharma RCET,Bhilai 7
• Service Type The service type is an indication of the quality
of service requested for this IP datagram. It contains the
following information.
• Precedence specifies the nature/priority:
• 000: Routine
• 001: Priority
• 010: Immediate
• 011: Flash
• 100: Flash override
• 101: Critical
• 110: Internetwork control
• 111: Network control

Shikha Sharma RCET,Bhilai 8


• TOS specifies the type of service value:
1000: Minimize delay
0100: Maximize throughput
0010: Maximize reliability
0001: Minimize cost
0000: Normal service
The last bit is reserved for future use.

Shikha Sharma RCET,Bhilai 9


• Total Length specifies the total length of the
datagram, header and data, in octets.
• Identification is a unique number assigned by
the sender used with fragmentation.
• Flags contains control flags:
• – the first bit is reserved and must be zero;
• – the 2nd bit is DF (Do not Fragment), 0 means
allow fragmentation;
• – the third is MF (More Fragments), 0 means
that this is the last fragment.
Shikha Sharma RCET,Bhilai 10
Shikha Sharma RCET,Bhilai 11
• Fragment Offset is used to reassemble the full
datagram. It is a pointer that shows the offset of
the data. If this is the first (or only) fragment, this
field contains a value of zero.
• TTL (Time to Live) specifies the time (in
seconds) the datagram is allowed to travel. In
practice, this is used as a hop counter to detect
routing loops.

Shikha Sharma RCET,Bhilai 12


• Protocol Number indicates the higher
level protocol to which IP should deliver
the data in this datagram. E.g., ICMP = 1;
TCP = 6; UDP = 17.
• Header Checksum is a checksum for the
information contained in the header. If the
header checksum does not match the
contents, the datagram is discarded.

Shikha Sharma RCET,Bhilai 13


• Source/Destination IP Addresses are
the 32-bit source/destination IP addresses.
• IP Options is a variable-length field (there
may be zero or more options) used for
control or debugging and measurement.
Padding is used to ensure that the IP
header ends on a 32 bit boundary.

Shikha Sharma RCET,Bhilai 14


Figure 7-4

Shikha Sharma RCET,Bhilai 15


Figure 7-8

Shikha Sharma RCET,Bhilai 16


Shikha Sharma RCET,Bhilai 17
Shikha Sharma RCET,Bhilai 18
Overview
• The IP (Internet Protocol) relies on several
other protocols to perform necessary
control and routing functions:
• Control functions (ICMP)
• Multicast signaling (IGMP)

• Setting up routing tables (RIP, OSPF, BGP, PIM, …)

Shikha Sharma RCET,Bhilai 19


Internet Control Message Protocol (ICMP)

• The Internet Control Message Protocol


(ICMP) is a helper protocol that supports IP
with facility for
– Error reporting
– Simple queries
• ICMP is a mechanism used by the host and router to
send notification of datagram problems back to the
sender.
• If delivery of DG is not possible, ICMP allows it to
inform the original source.
• ICMP reports onlyShikha
to the original source.
Sharma RCET,Bhilai 20
Shikha Sharma RCET,Bhilai 21
• ICMP Only Report problem, not correct
them.
• it is an integral part of IP.
• it is typically not used to send and receive
data between end systems like TCP/UDP.
• ICMP for Internet Protocol version 4 (IPv4)
is also known as ICMPv4.
• IPv6 has a similar protocol, ICMPv6.
Shikha Sharma RCET,Bhilai 22
• ICMP messages are constructed at the IP
layer.
• IP encapsulates the appropriate ICMP
message with IP header.
• For example--time to live (TTL).

Shikha Sharma RCET,Bhilai 23


ICMP HEADER FORMAT

Type ( 8 bits) Code ( 8 bits) Checksum ( 16 bits)

ADDITIONAL INFORMATION

Shikha Sharma RCET,Bhilai 24


Each ICMP message contains three fields

1. TYPEÆ field identifies the ICMP message.

2.CODEÆ field provides further information about the


associated TYPE field OR subtype of message.

3. CHECKSUMÆ provides a method for determining the


integrity of the message. similar to IP header
checksum.

If there is no additional data, 4 bytes set to zero.

Shikha Sharma RCET,Bhilai 25


The TYPES defined are:

TYPE Description
0 Echo Reply
1 & 2 IS RESERVED.
3 Destination Unreachable
4 Source Quench
5 Redirect Message
6
7 RESERVED.
8 Echo Request
11 Time Exceeded
12 Parameter Problem
13 Timestamp Request
14 Timestamp Reply
15 Information Request (No Longer Used)
16 Information Reply (No Longer Used)
1725 August 2010Address MaskShikha
Request
Sharma RCET,Bhilai 26

18 dd k l
Frequent ICMP Error message
Type Code Description

3 0–15 Destination Notification that an IP datagram could not be


unreachable forwarded and was dropped. The code field
contains an explanation.
5 0–3 Redirect Informs about an alternative route for the
datagram and should result in a routing table
update. The code field explains the reason for
the route change.
11 0, 1 Time Sent when the TTL field has reached zero
exceeded (Code 0) or when there is a timeout for the
reassembly of segments (Code 1)
12 0, 1 Parameter Sent when the IP header is invalid (Code 0) or
problem when an IP header option is missing (Code 1)
Shikha Sharma RCET,Bhilai 27
Example of ICMP Queries
Type/Code: Description

The ping command


8/0 Echo Request uses Echo Request/
0/0 Echo Reply Echo Reply

13/0 Timestamp Request


14/0 Timestamp Reply

10/0 Router Solicitation


9/0 Router Advertisement
Shikha Sharma
28 RCET,Bhilai 28
ICMP Query message
ICMP Request

ICMP Reply

Host Host or router

ICMP query:
• Request sent by host to a router or host
• Reply sent back to querying host

Shikha Sharma RCET,Bhilai 29


ICMP Error message

IP datagram IP datagram
is discarded
ICMP Error
Message

Host Host or router

• ICMP error messages report error conditions


• Typically sent when a datagram is discarded
• Error message is often passed from ICMP to the application program

Shikha Sharma RCET,Bhilai 30


• Destination UnreachableÆ When a
packet is undeliverable, a Destination
Unreachable, Type 3, ICMP is generated.
Type 3 ICMPs can have a Code value of 0
to 15:

Shikha Sharma RCET,Bhilai 31


Type 3
Code Value Description
0 Network Unreachable
1 Host Unreachable
2 Protocol Unreachable
3 Port Unreachable
4 Fragmentation needed and DF (Don't Fragment) set
5 ---
6 ---
7 ----
8 -----
15 Source route failed

Shikha Sharma RCET,Bhilai 32


Some subtypes of the “Destination Unreachable”

Code Description Reason for Sending


0 Network No routing table entry is available for the destination
Unreachable network.
1 Host Destination host should be directly reachable, but
Unreachable does not respond to ARP Requests.
2 Protocol The protocol in the protocol field of the IP header is
Unreachable not supported at the destination.
3 Port The transport protocol at the destination host cannot
Unreachable pass the datagram to an application.
4 Fragmentation IP datagram must be fragmented, but the DF bit in the
Needed IP header is set.
and DF Bit Set

Shikha Sharma RCET,Bhilai 33


• Echo Request & Echo ReplyÆ This is
the ICMP most used to test IP connectivity
commonly known as PING.
• The Echo Request ICMP will have a Type
field of 8 and a Code field of 0.
• Echo Replies have a Type field of 0 and a
Code field of 0.
• Ask a machine if it is alive.

Shikha Sharma RCET,Bhilai 34


• Source QuenchÆ An ICMP Source
Quench message has a Type field of 4
and Code 0.
• Source Quench messages are sent when
the destination is unable to process traffic
as fast as the source is sending it.
• The Source Quench ICMP tells the
source to cut back the rate at which it is
sending data.
• continue generate Source Quench ICMPs
speed. Shikha Sharma RCET,Bhilai 35
• Redirect MessageÆ An intermediary
device will generate an ICMP Redirect
Message when it determines that a route
being requested can be reached either
locally or through a better path.
• Redirect Message ICMPs are Type 5 and
are further defined by the following Code
field values.
• Teach a router about geography.

Shikha Sharma RCET,Bhilai 36


Type 5
Code Value Description
0 Redirect datagrams for the Network
1 Redirect datagrams for the Host
2 Redirect datagrams for the Type of
Service and Network
3 Redirect datagrams for the Type of Service
and Host.

Shikha Sharma RCET,Bhilai 37


• Time ExceededÆ If a router or host discards
a packet due to a time-out, it will generate a
Time Exceeded Type 11 ICMP.
• The Time Exceeded ICMP will have a Code
value of either 0 or 1.
• A Code 0 is generated when the hop count
of a datagram is exceeded and the packet is
discarded.
• A Code 1 is generated when the reassemble
of a fragmented packet exceeds the time-out
value.
Shikha Sharma RCET,Bhilai 38
• Parameter Problem
• Invalid header field, an ICMP 12 is
generated.
• For missing option, the ICMP will have a
Code value 1.
• For invalid field, code value is 0.

Shikha Sharma RCET,Bhilai 39


Timestamp Request & Timestamp Reply
• Like as Echo request and reply, but with
timestamp.
• synchronizing the time maintained on
different devices.
• Network performance.
• The Request has a Type field of 13 and the
Reply is Type 14.
• This method for time synchronization is crude
and unreliable. Therefore, it is not heavily
used.
Shikha Sharma RCET,Bhilai 40
Internet Group
Management
Protocol
(IGMP)
Shikha Sharma RCET,Bhilai 41
Position of IGMP in the network layer

Shikha Sharma RCET,Bhilai 42


• The Internet Group Management Protocol
(IGMP) is a communication protocol used
to manage the membership of Internet
Protocol multicast groups.
• Multicasting allows a host to transmit an IP
datagram to a set of hosts that form a
multicast group.
• Used in mapping of class D network.

Shikha Sharma RCET,Bhilai 43


• IGMP is used by IP host and adjacent
multicast routers .
• It is an integral part of the IP multicast
specification, operating above the network
layer.
• Not like TCP/UDP.
• only needed for IPv4 networks.

Shikha Sharma RCET,Bhilai 44


• The IGMP message is encapsulated in an IP
datagram, which is itself encapsulated in a
frame.
• The IP packet that carries an IGMP packet has
a value of 2 in its protocol field.

Shikha Sharma RCET,Bhilai 45


Encapsulation of IGMP packet

Shikha Sharma RCET,Bhilai 46


• Membership in a multicast group is
dynamic.
• IGMP can be used for online streaming
video and gaming, and allows more
efficient use of resources.
• IGMP does allow some attacks, and
firewalls.

Shikha Sharma RCET,Bhilai 47


IGMP message types

Shikha Sharma RCET,Bhilai 48


IGMP message format

Shikha Sharma RCET,Bhilai 49


• Max Resp Time Æ specifies the time limit for
the corresponding report.
• Used only in query messages.
• In all other messages, it is set to 0 by the
sender and ignored by the receiver.
• Checksum ÆThis is the 16-bit one's
complement of the sum of the entire IGMP
message.
• Group Address Æ The field is zeroed when
sending a General Query.
Shikha Sharma RCET,Bhilai 50
IGMP type field

Type value
General Or Special 11 OR 00010001
Query
Membership Report 16 OR 00010110
Leave Report 17 OR 00010111

Shikha Sharma RCET,Bhilai 51


ARP
and
RARP
Shikha Sharma RCET,Bhilai 52
Address Resolution Protocol
(ARP)

53 Shikha Sharma RCET,Bhilai 53


Overview

54 Shikha Sharma RCET,Bhilai 54


• Note:
– The Internet is based on IP addresses
– Data link protocols (Ethernet, FDDI, ATM)
may have different (MAC) addresses
• The ARP and RARP protocols perform the
translation between IP addresses and
MAC(medium access control) layer
addresses.

Shikha Sharma RCET,Bhilai 55


• MACÆ The address of a device used at the
DLL.(MAC)
• Ethernet Æ a LAN using CSMA/CD access
method.

Shikha Sharma RCET,Bhilai 56


ARP Ethernet MAC
IP address
address
(32 bit)
(48 bit)
RARP

Shikha Sharma RCET,Bhilai 57


Shikha Sharma RCET,Bhilai 58
ARP Protocol

• Machine A wants to send a packet to B, but A


only knows B’s IP address
• Machine A broadcasts ARP request with B’s
IP address
• All machines on the local network receive
the broadcast
• Machine B replies with its physical address
• Machine A adds B’s address information to
its table
• Machine A delivers packet directly to B

Shikha Sharma RCET,Bhilai 59


Shikha Sharma RCET,Bhilai 60
Shikha Sharma RCET,Bhilai 61
• Hardware type (HTYPE) ÆEach data link
layer protocol is assigned a number used
in this field. For example, Ethernet is 1.
• Protocol type (PTYPE) ÆEach protocol is
assigned a number used in this field. For
example, IPv4.
• Hardware length (HLEN) ÆLength in
bytes of a hardware address. Ethernet
addresses are 6 bytes long.

Shikha Sharma RCET,Bhilai 62


• Protocol length (PLEN) ÆLength in bytes
of a logical address. IPv4 address are 4
bytes long.
• Operation ÆSpecifies the operation the
sender is performing: 1 for request, 2 for
reply, 3 for RARP request, and 4 for RARP
reply.

Shikha Sharma RCET,Bhilai 63


• Sender hardware address
(SHA) ÆHardware address of the sender.
(first 32 bit)
• Sender protocol address (SPA) ÆProtocol
address of the sender.
• Target hardware address
(THA) ÆHardware address of the
intended receiver. This field is ignored in
requests. (last 32 bit)
• Target protocol address (TPA) Æ Protocol
address of the intended receiver.
Shikha Sharma RCET,Bhilai 64
ARP Caching
• To reduce communication cost, computers
that use ARP maintain a cache of recently
acquired IP-to-physical address bindings.
• Each entry has a timer (usual timeout
period is 20 minutes)
• The sender’s IP-to-address binding is
included in every ARP broadcast;
receivers update the IP-to-physical
address binding information in their cache
before processing an ARP packet.
Shikha Sharma RCET,Bhilai 65
Introduction to LAN with its
cables, connectors, Switches,
Hubs and
topologies

Shikha Sharma RCET,Bhilai 66


LAN
• Small interconnected computers or workstations within a
building or small area up to 10 Kms.

• Small group of workers that share common application


programs and communication needs.

• LANs are capable of very high transmission rates (100s Mb/s


to G b/s).

• LAN is interconnected with other networks via switches and


router/gateways.

• In general, a given LAN will use only one type of transmission


medium. Shikha Sharma RCET,Bhilai 67
Basic transmission medium
concepts
• Medium is the physical path between
transmitter and receiver in a data
transmission system.
• Guided Medium: waves are guided along
a solid medium path.
• Unguided medium: waves are propagated
through the atmosphere and inner/outer
space.

Shikha Sharma RCET,Bhilai 68


Transmission medium

Shikha Sharma RCET,Bhilai 69


Twisted-pair cable

Shikha Sharma RCET,Bhilai 70


Effect of Noise on Parallel Lines

Shikha Sharma RCET,Bhilai 71


Noise on Twisted-Pair Lines

Shikha Sharma RCET,Bhilai 72


Twisted-pair cable
• A twisted pair consists of two conductors (normally copper),
each with its own plastic insulation, twisted together.
• One of the wires is used to carry signals to the receiver, and
the other is used only as a ground reference.
• If the two wires are parallel, the effect of these unwanted
signals is not the same in both wires because they are at
different locations relative to the noise or crosstalk sources
(e.g., one is closer and the other is farther).
• By twisting the pairs, a balance is maintained. For example,
suppose in one twist, one wire is closer to the noise source
and the other is farther; in the next twist, the reverse is true.
• Twisting makes it probable that both wires are equally
affected by external influences (noise or crosstalk).
• This means that the receiver, which calculates the difference
between the two, receives no unwanted signals.

Shikha Sharma RCET,Bhilai 73


Types of Twisted-pair cable

Shikha Sharma RCET,Bhilai 74


Frequency range
• 100Hz-5MHz

Shikha Sharma RCET,Bhilai 75


Applications

– Common in building for digital signaling used at


speed of 10’s Mb/s (CAT3) and 100Mb/s (CAT5)
over 100s meters.
– Common for telephone interconnection at home
and office buildings
– Less expensive medium; limited in distance,
bandwidth, and data rate.

Shikha Sharma RCET,Bhilai 76


Connector
• The most common UTP connector is RJ45 (RJ stands
for registered jack)
• It is a keyed connector, meaning the connector can be
inserted in only one way.
• It has 8 wires.

Shikha Sharma RCET,Bhilai 77


Coaxial Cable
• Coaxial cable (or coax) carries signals of
higher frequency ranges than those in
twisted pair cable.

Shikha Sharma RCET,Bhilai 78


Frequency range
• 100 KHz-500MHz

Shikha Sharma RCET,Bhilai 79


Categories of coaxial cables

Shikha Sharma RCET,Bhilai 80


A section of RG-59 cable with its end stripped.
A: outer plastic sheath
B: copper braid shield
C: inner dielectric insulator
D: copper core

Shikha Sharma RCET,Bhilai 81


Coaxial Cable Connectors
• Bayone-Neill-Concelman (BNC)
• BNC T connector,
• BNC terminator

Shikha Sharma RCET,Bhilai 82


Shikha Sharma RCET,Bhilai 83
BNC( British Naval Connector)

Shikha Sharma RCET,Bhilai 84


Fiber-optics
• A fiber-optic cable is made of glass or
plastic and transmits signals in the form of
light.

Shikha Sharma RCET,Bhilai 85


Fiber-optics

Shikha Sharma RCET,Bhilai 86


Fiber-optics
• Optical fibers use reflection to guide light
through a channel. A glass or plastic Core
is surrounded by a cladding of less dense
glass or plastic.
• The difference in density of the two
materials must be such that a beam of
light moving through the core is reflected
off the cladding instead of being refracted
into it.
Shikha Sharma RCET,Bhilai 87
Fiber optics cable connector

Shikha Sharma RCET,Bhilai 88


Connectors
• The subscriber channel (SC) connector
is used for cable TV. It uses a push/pull
locking system.
• The straight-tip (ST) connector is used
for connecting cable to networking
devices. It uses a bayonet locking system
and is more reliable than SC.
• MT-RJ is a connector that is the same size
as RJ45.

Shikha Sharma RCET,Bhilai 89


Applications
• Fiber-optic cable is often found in
backbone networks because its wide
bandwidth is cost-effective.

Shikha Sharma RCET,Bhilai 90


Advantages
• SPEED: Fiber optic networks operate at high speeds - up into the
gigabits.

• BANDWIDTH: large carrying capacity.

• DISTANCE: Signals can be transmitted further without needing to


be "refreshed" or strengthened.

• RESISTANCE: Greater resistance to electromagnetic noise such as


radios, motors or other nearby cables.

• MAINTENANCE: Fiber optic cables costs much less to maintain.

Shikha Sharma RCET,Bhilai 91


Disadvantages
Installation and maintenance.
• Fiber-optic cable is a relatively new technology. Its installation
and maintenance require expertise that is not yet available
everywhere.

Unidirectional light propagation.


• Propagation of light is unidirectional. If we need bidirectional
communication, two fibers are needed.

Cost.
• The cable and the interfaces are relatively more expensive
than those of other guided media. If the demand for
bandwidth is not high, often the use of optical fiber cannot be
justified.

Shikha Sharma RCET,Bhilai 92


connectivity
Connection can be made between
• Computer-computer
• Computer-hub
• Hub-hub
• Hub-switch
• Switch-switch

Shikha Sharma RCET,Bhilai 93


Straight-through cable
• Straight-through cable is a type of twisted pair
copper wire cable for local area network (LAN) use
for which the RJ-45 connectors at each end have the
same pinout (i.e., arrangement of conductors).
• Straight-through cable is also commonly referred to
as patch cable.
• Straight-through cable is used to connect computers
and other end-user devices (e.g., printers) to
networking devices such as hubs and switches

Shikha Sharma RCET,Bhilai 94


Cross over cable

Shikha Sharma RCET,Bhilai 95


Cross over cable
• It is generally used to connect similar
devices.
• Such as hub-hub, switch-switch.

Shikha Sharma RCET,Bhilai 96


Roll over cable
• You can identify a roll-over cable by
comparing the two modular ends of the
cable.
• Holding the cables side-by-side, with the
tab at the back, the wire connected to the
pin on the outside of the left plug should
be the same color as the wire connected
to the pin on the outside of the right plug.

Shikha Sharma RCET,Bhilai 97


Roll over cable
Conn 1 conn2
1 8
2 7
3 6
4 5
5 4
6 3
7 2
8 1

Shikha Sharma RCET,Bhilai 98


Shikha Sharma RCET,Bhilai 99
Shikha Sharma RCET,Bhilai 100
Shikha Sharma RCET,Bhilai 101
Switches
• A network switch is a computer
networking device that connects network
segments.
• The term commonly refers to a Network
bridge that processes and routes data at
the Data link layer (layer 2) of the OSI
model.

Shikha Sharma RCET,Bhilai 102


Rack mounted 24 port switches

Shikha Sharma RCET,Bhilai 103


HUB
• A hub is a device that lets a single network
cable to split into multiple cables leading to
nodes.

Shikha Sharma RCET,Bhilai 104


4-port Ethernet hub

Shikha Sharma RCET,Bhilai 105


Shikha Sharma RCET,Bhilai 106
Shikha Sharma RCET,Bhilai 107
Shikha Sharma RCET,Bhilai 108

You might also like