The IP addresses used to identify systems on a TCP/IP network. The IP address is an absolute identifier of both the individual machine and the network on which it resides.
Every IP datagram packet transmitted over a TCP/IP network contains the IP addresses of the source system that generated it and the destination system for which it’s intended in its IP header.
2. IP Addresses: -
The IP addresses used to identify systems on a TCP/IP
network. The IP address is an absolute identifier of both
the individual machine and the network on which it
resides.
Every IP datagram packet transmitted over a TCP/IP
network contains the IP addresses of the source system
that generated it and the destination system for which
it’s intended in its IP header.
3. To send a packet across an internet, the sender places
the destination’s protocol address in the packet and
passes the packet to protocol software for delivery.
To provide uniform addressing in an internet, protocol
software defines an abstract addressing scheme that
assigns each host a unique protocol address. Users,
application programs, and higher layers of protocol
software use the abstract protocol addresses to
communicate.
IP Addresses
4. IP Addresses
In the TCP/IP protocol stack, addressing is specified by the
Internet Protocol (IP).
The IP standard specifies that each host is assigned a
unique 32-bit number known as the host’s Internet
Protocol address, which is often abbreviated IP address,
or Internet address.
Each packet sent across an internet contains the 32-bit IP
address of the sender (source) as well as the intended
recipient ( destination). Thus to transmit information across
a TCP/IP internet, a computer must know the IP address of
the remote computer to which the information is being sent.
5. Every 32-bit address is divided into to two parts
: a prefix and suffix.
The address prefix identifies the physical network to
which the computer is attached, while the suffix identifies
an individual computer on that network. That is, each
physical network in an internet is assigned a unique value
known as a network number. The network number
appears as a prefix in the address of each computer
attached to the network
No two networks can be assigned the same network
number and no two computers on the same network can
be assigned the same suffix.
IP Addresses
6. Classes of IP Addresses
0
0 Prefix SuffixClass A
0 8 16 24 31
1 0 Prefix SuffixClass B
1 1 0 Prefix SuffixClass C
1 1 1 0 Multicast addressClass D
1 1 1 1 Reserved for future useClass E
7. The prefix needs sufficient bits to allow a unique network
number to be assigned to each physical network in an
internet. The suffix needs sufficient bits to permit each
computer attached to a network to be assigned a unique
suffix.
Classful IP addressing divides the IP address space into
three primary classes, where each class has a different size
of prefix and suffix.
The first four bits of an address determine the class to
which the address belongs, and specify how the remainder
of the address is divided into prefix and suffix.
Above Fig. illustrates the five address classes, the leading
bits used to identify each class and the division into prefix
& suffix.
8. First Four
Bits of Address
Table Index
(in
decimal)
Classes of
Address
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
A
A
A
A
A
A
A
A
B
B
B
B
C
C
D
E
9. Above fig. shows the eight combinations that begin with
a 0 bit correspond to class A. The four combinations that
begins with 10 corresponds to class B, and the two
combinations that begins with 110 corresponds to class
C. An address that begins with 111 belongs to class D.
Finally an address that begins with 1111 belongs to a
reserved class that is not currently used.
10. Dotted Decimal Notation
Software uses a notation that is more convenient for humans
to understand called Dotted Decimal Notation, the form
expresses each 8-bit section of a 32-bit number as a decimal
value and uses periods to separate the sections.
32-bit Binary
Number
Equivalent Dotted
Decimal
10000001 00110100 00000110 00000000 129.52.6.0
11000000 00000101 00110000 00000011 192.5.48.3
00001010 00000010 00000000 00100101 10.2.0.370
10000000 00001010 00000010 00000011 128.10.2.3
11. Dotted Decimal treats each other as an unsigned binary
integer. As the final example in the fig. shows the smallest
possible value 0, occurs when all bits of an octet are zero,
and the largest possible value,255, occurs when all bits of
an octet are one.
Thus dotted decimal addresses range from 0.0.0.0 through
255.255.255.255
Dotted Decimal worked well with classful IP addresses
because IP uses octet boundaries to separate an address
into a prefix and suffix.
In a class A address, the last three octets corresponds to
host suffix. Similarly, class B addresses have two octets
of host suffix, and class C address have one octet.
12. Following fig shows decimal range of values for each
class –
Class Range of Values
A
B
C
D
E
O through 127
128 through 191
192 through 223
224 through 239
240 through 255
13. Division of the Address Space
Following fig shows the maximum number of networks
available in each class and the maximum number of hosts per
network. –
Address Class Max. no of network Max. no of hosts per
network
A
B
C
128
16384
2097152 256
65536
16777216
14. Authority for Address
Throughout an internet, each network prefix must be unique.
For networks connected to the global Internet, an
organization obtains network numbers from the
communication company that supplies Internet connections.
Such companies are called Internet Service Providers
(ISPs).
ISPs coordinate with a central organization, the Internet
Assigned Number Authority, to ensure that each network
prefix is unique throughout the entire Internet.
For a private network, the choice of network prefix can be
made by the organization. To ensure that each prefix is
unique, a group that builds a private internet must decide
how to coordinate network number assignments.
15. Subnet Masking
IP addresses always dedicate some of their bits to the network
identifier and some to the host identifier, but the number of
bits used for each purpose is not always the same. Many
common addresses use 24-bits for the network and eight for
the host, but the split between the network and host bits can be
anywhere in the address.
To identify which bits are used for each purpose, every
TCP/IP system has a subnet mask along with its IP
address.
A subnet mask is 32-bit binary number in which the bits
corresponds to those of the IP address.
16. As with an IP address, the subnet mask is expressed in
dotted decimal notation, so although it may look
something like an IP address, the mask has a completely
different function.
IP address : 192.168.2.45
Subnet mask : 255.255.255.0
Its binary equivalent is –
IP address : 11000000 10101000 00000010 00101101
Subnet mask : 11111111 11111111 11111111 00000000
17. Class A Class B Class C Class
D
Class
E
Network address
bits
8 16 24 N/A N/A
Host address bits 24 16 8 N/A N/A
Subnet Mask 255.0.0.0 255.255.0.0 255.255.
255.0
N/A N/A
Address Begin
with: (Binary)
0 10 110 1110 1111
First Byte
Values
(Decimal)
0-127 128-191 192-223 224-
239
240-
255
Number of
Networks
127 16,384 2,097,151 N/A N/A
Number of hosts 16,777214 65,534 254 N/A N/A
18. A company building a relatively small network can register a
class C address which , because the addresses have only eight
host bits, supports up to 254 systems, while large organizations
can use class B or A address with 16 or 24 host bits and create
subnets out of them.
Class D addresses are not intended for allocation in blocks like
the other classes. This part of the address space is allocated for
multicast address. Multicast addresses represent groups of
systems that have a common attribute, but that are not
necessarily located in the same place or even administered by
the same organization.
For example packets sent to the multicast address 224.0.0.1 are
processed by all of the routers on the local subnet.
Class E is reserved for future use.
19. Special IP Address
Network Address: -
IP reserves host address zero, and uses it to denote a
network. Thus, the address 128.211.0.0 denotes a network
that has been assigned the prefix 128.211.
The network address refers to the network itself and not to
the host computers attached to the network. Thus, the
network address should never appear as the destination
address in a packet.
IP address with hostid portion equal to zero is used to
refer to the network itself.
20. Directed Broadcast Address: -
According to the standard, any address with the hostid
consisting of all 1s is reserved for directed broadcast.
Sometimes, it is convenient to send a copy of a packet to all
hosts on a physical network. To make broadcasting easy, IP
defines a directed broadcast address for each physical
network.
When a packet is sent to network’s directed broadcast
address, a single copy of the packet travels across the
internet until it reaches the specified network. The packet is
delivered to all hosts on the network.
21. Limited Broadcast Address: -
The term Limited Broadcast address refers to a broadcast on
a local physical network.
Limited broadcast is used during system startup by a
computer that does not yet know the network number.
IP reserves the address consisting of all 1 bits to refer to
limited broadcast. Thus IP will broadcast any packet sent to
the all-ones address across the local network.
22. Loopback Address: -
The network prefix 127.0.0.0 a value from the class A
range is reserved for loopback, and is intended for use in
testing TCP/IP and for inter-process communication on the
local computer.
When any program uses the loopback address as a
destination, the protocol software in the computer processes
the data without sending traffic across any network.
The packet sent to a network 127 address should never
appear on any network.
IP defines a loopback address used to test network
applications. Programmers often used loopback for
preliminary debugging after a network application has been
created.
23. Summary of Special IP addresses -
Prefix
Suffix Type of
Address
Purpose
All – 0s All - 0s This computer
Used during
bootstrap
Network All- 0s Network Identifies a network
Network All – 1s
Directed
broadcast
Broadcast on
specified net
all – 1s All – 1s
Limited
broadcast
Broadcast
127 Any Loopback testing
24. ‘Routing’ refers to the process of choosing a path over
which to send packets and router refers to a computer
making the choice.
The goal of IP is to provide a virtual network that
encompasses multiple physical networks and offers a
connectionless datagram delivery service. Thus, we will
focus on IP forwarding, which is also called Internet
routing or IP routing.
25. A router forwards each packet from one network to
another. A source host creates a packet, places the
destination address in the packet header, and then sends
packet to near to router.
When a router receive a packet, the router uses the
destination address to select the next router on the path to
the destination, and then transmit the packet. Eventually,
the packet reaches a router that can deliver the packet to its
final destination.
26. The IP Datagram –
TCP/IP Protocol use the name IP datagram to refer to an
internet packet.
The datagram begins with a header followed by a data area.
Header Data Area
A Packet sent across a TCP/IP internet is called an IP
datagram. Each datagram consists of a header followed
by data. Source and destination address in the datagram
header are IP address.
27. Datagram traverse an internet by following a path from their
initial source through routers to the final destination.
Each router along the path receives the datagram, extracts
the destination address from the header, and uses the
destination address to determine a next hop to which the
datagram should be sent.
The router then forwards the datagram to the next hop (hop
- A measure of distance between two points in an internet. A
hop count of n means that n routers separate the source and
destination), either the final destination or another router.
28. To make the selection of a next hop efficient and to make it
possible for humans to understand the computation, each IP
router keeps information in a ‘routing table.’
The router forwards packets by maintaining a list of networks
and hosts, called ‘routing table.’
Routing table stores information about possible destinations
and how to reach them. Because both hosts and routers route
datagrams, both have IP routing tables. Whenever the IP
routing software in a host or router needs to transmit a
datagram, it consults the routing table to decide where to send
the datagram.
29. The routing table contains a set of entries that each specify a
destination and next hop used to reach that destination.
Following fig. shows the contents of a routing table in one
of three routers that are used to interconnect four networks
in a small internet.
Net 1 Net 2
Net 3 Net 4
R1
R2
R3
30. Destination Next Hop
Net 1 R1
Net 2 Deliver direct
Net 3 Deliver direct
Net 4 R3
The Conceptual Routing Table found
in R2
31. As the above fig. shows, router R2 connects directly to the
networks labeled Net 2 and Net 3. Therefore R2 can deliver
a datagram to any destination attached to those networks.
When a datagram is destined for network 4, R2 sends the
datagram to router R3.
Each destination listed in a routing table is a network, not an
individual host. The distinction is important because an
internet can contain over 1000 times as many hosts as
networks. Thus using networks as destinations keeps routing
table small.
Because each destination in a routing table corresponds
to a network, the number of entries in a routing table is
proportional to the network of networks in an internet.
32. In practice, An IP routing table is slightly more complex
then shows previously.
First, The destination field in each entry contains the
network prefix of the destination network.
Second, an additional field in each entry contains an
address mask that specifies which bits of the destination
corresponds to the network prefix.
Third, an IP address is used when the Next hop field
denotes a router.
34. Destination Mask Next Hop
30.0.0.0 255.0.0.0 40.0.0.7
40.0.0.0 255.0.0.0 Deliver direct
128.1.0.0. 255.255.0.0 Deliver direct
192.4.10.0 255.255.255.0 128.1.0.9
Fig – Routing table found in the center router. Each
entry in the table lists a destination, a mask, and the next
hop used to reach the destination.
35. The most reliable protocols use a single fundamental
technique known as ‘Positive acknowledgement with
retransmission’
The technique requires a recipient to communicate with
the source, sending back an acknowledgement (ACK)
message as it receives data.
The sender keeps a record of each packet it sends and
waits for an acknowledgement before sending the next
packet.
The sender also starts a timer when it sends a packet and
retransmits a packet if the timer expires before an
acknowledgement arrives.
36. Events at sender site Events at Receiver siteNetwork Message
Send packet 1
Receive Packet 1
Send ACK 1
Receive ACK 1
Send Packet 2
Receive ACK 2
Receive Packet 2
Send ACK 2
Fig. – A protocol with positive acknowledgement with
retransmission in which the sender awaits an ack. For each
packet sent.
37. Following fig shows what happens when a packet is lost or
corrupted. The sender starts a timer after transmitting a
packet. When the timer expires, the sender assumes the
packet was lost and retransmits it.
Events at sender site Events at Receiver siteNetwork Message
Send packet 1
Packet should arrive
ACK should be sent
ACK would normally
arrive at this time
Retransmit Packet 1
Receive ACK 2
Receive Packet 1
Send ACK 1
Timer Expires
Start Timer
Packet loss
Start Timer
38. A simple positive acknowledgement protocol wastes a
substantial amount of network bandwidth because it must delay
sending a new packet until it receive an acknowledgement for
the previous packet.
Sliding Window protocol use network bandwidth better
because they allow the sender to transmit multiple packets
before waiting for an acknowledgement.
1 2 3 4 5 6 7 8 9 10
Initial Window
Fig. - a
39. 1 2 3 4 5 6 7 8 9 10
Window Slides
Fig. - b
The easiest way to envision sliding window operation is to
think of a sequence of packets to be transmitted as fig a shows.
The protocol place a small, fixed-size window on the sequence
and transmits all packets that lie inside the window.
Above fig shows once the sender receives an acknowledgement
for the first packet inside the window, it “slides” the window
along and sends the next packet. The window continues to slide
as long as acknowledgement are received.
40. The performance of sliding window protocols depends on
the window size and the speed at which the network accepts
packets. Fig. b shows an example of the operation of a
sliding window protocol when sending three packets. Note
that the sender transmits all three packets before receiving
any acknowledgements.
Sliding window obtains substantially higher throughput
than a simple positive acknowledgement protocol.
A sliding window protocol always remembers which
packets have been acknowledged and keeps a separate timer
for each unacknowledged packet. If a packet is lost, the
timer expires and the sender retransmits that packet.
42. The system which guarantees that data will not be lost,
duplicated, or delivered out of order, called as reliable
system (service).
The data must be delivered in exactly the same order that the
data was sent & there must be no loss or duplication.
Transport protocol provide reliability, which is fundamental
for many applications. The transmission control protocol
(TCP) is the transport level protocol that provides reliability
in the TCP/IP protocol suit.
43. The TCP protocol specifies the format of the data and acks.
that two computers exchange to achieve a reliable transfer, as
well as the procedures the computers use to ensure that the
data arrives correctly.
It specifies how TCP s/w distinguishes among multiple
destinations on a given machine, & how communicating
machines recover from errors like lost & duplicated packets.
The protocol also specifies how two computers initiate a
TCP stream transfer & how they agree when it is complete.
TCP can be implemented to use dialup telephone lines, a
local area network, a high speed fiber optic network, or a
lower speed long haul network. In fact, the large variety of
delivery systems TCP can use is one of its strengths.
44. “TCP provides a completely reliable (no data duplication or
loss), connection-oriented, full-duplex stream transport
service that allows two application programs to form a
connection, send data in either direction & then terminate the
connection.”
Each TCP connection is started reliably & terminated
gracefully with all data being delivered before termination
occurs.
45. Port Numbers –
The IP address makes it possible to route network traffic to a
particular system, but once packet arrive at the computer
and begin traveling up the protocol stack, they still must be
directed to the appropriate application. This is the job of the
transport – layer protocol , either TCP or UDP.
To identify specific processes running on the computer,
TCP and UDP use port no. that are included in every TCP &
UDP header.
Typically the port no. identifies the application –layer
protocol that generated the data carried in the packet.
46. The port numbers permanently assigned to specific services,
which are called ‘well – known ports’, are standardized by
the Internet Assigned Numbers Authority (IANA).
Every TCP/IP system has a file called services that contains
a list of the most common well-known port numbers and
services to which they are assigned.
For e.g. - the IP header of a DNS Query message contains
the IP address of a DNS server in its destination address
field. Once the packet has arrived at the destination, the
receiving computer sees that the UDP header’s destination
port field contains the well-known port value 53. The
system then knows to pass the message to the service using
port no. 53, which is the DNS service.
47. Some examples of port numbers –
SMTP – 25 FTP - 21
DNS – 53 Telnet - 27
POP3 – 110 HTTP - 80
Multiple Connection from many hosts and one host –
TCP connections are identifies by a pair of endpoints.
TCP defines an ‘endpoints’ to be a pair of integers (host, port),
where ‘host’ is the IP address for a host & ‘port’ is a TCP port
on that host.
For e.g. – the endpoint (128.10.2.3, 25) specifies TCP port 25
on the machine with IP address 128.10.2.3
48. Because TCP identifies a connection by a pair of
endpoints, a given TCP port number can be shared by
multiple connections on the same machine.
Most systems provide concurrent access to their electronic
mail service, allowing multiple computers to send them
electronic mail concurrently. Because the program that
accepts incoming mail uses TCP to communicate, it only
needs to use one local TCP port even though it allow multiple
connections to proceed concurrently.
49. “IPV6 is the official name of next version of IP”
The current IP version no is 4
When IP was defined, only a few computer networks existed.
The designer decided to use 32 bits for an IP address because
doing so allowed the Internet to include over a million
networks.
However, the global Internet is growing exponentially, with
the size doubling is less than a year. At the current growth
rate, each of the possible network prefixes will soon be
assigned & no further growth will be possible.
50. Thus the primary motivation for defining a new version of IP
arose from the address – space limitation larger addresses are
necessary to accommodate continues growth of the Internet.
IPV6 Features –
IPV6 is connectionless- each datagram contains a destination
address, and each datagram is routed independently.
IPV6 uses larger address and an entirely new datagram
header format. Finally IPV6 uses a series of fixed-length
headers to handle header information. Thus unlike IPv4
which places key information in fixed fields of the header
and only appends variable-length options for less important
information, IPV6 is header is always variable size.
51. The new features in IPV6 can be grouped into five broad
categories –
1) Address size – Instead 32 bits, each IPV6 address contains
128 bits. The resulting address space is large enough to
accommodate continued growth of the world-wide Internet
for many decades.
2) Header format – The IPv6 datagram header is completely
different than the IPv4 header. Almost every field in the
header has been changed; some have been replaced.
3) Extension header – Unlike IPV4 which uses a single header
format for all datagram's, IPV6 encodes information into
separate headers. A datagram consists of the base IPV6
header followed by zero or more extension headers,
followed by data.
52. 4) Support For Audio and Video – IPV6 includes a
mechanism that allows a sender and receiver to establish a
high-quality path through the underlying network and to
associate datagrams with the path.
5) Extension protocol – The extension scheme makes IPV6
more flexible than IPV4 and means that new features cab be
added to the design as needed.
IPV6 Datagram Format –
Following fig shows an IPV6 datagram begins with a base
header, which is followed by zero or more extension headers
followed by data.
Base Header Extension Header Data Area
Optional
53. IPV6 Base Header Format –
0 4 12 16 24 31
VERS TRAFFIC CLASS FLOW LABLE
PAYLOAD LENGTH NEXT HEADER HOP LIMIT
SOURCE ADDRESS
DESTINATION ADDRESS
54. 1) Version – 4 bits are used to indicate the version of IP
2) Traffic Class – Indicate the class or priority of the IPV6
packet (8-bits)
3) Flow label – Indicate that this packet belongs to a specific
sequence of packets between source and destination (20-bits)
4) Payload Length – Indicate the length of IPV6 payload.
Payload includes the extension headers and upper layer
protocol data unit i.e. data area. (16-bits)
5) Next header – Specify the type of information that follows
the current header. (8-bits)
6) Hop Limit – Indicates the maximum no of links over which
the IPV6 packet can travel before being discarded. (8- bits)
55. 7) Source address – Store the IPV6 address of the originating
host (128-bits)
8) Destination address – Store the IPV6 address of the current
destination host (128-bits)
56. IPV6 Addressing –
Like IPV4, IPV6 separates each such address into a prefix
that identifies the network and a suffix that identifies a
particular computer on the network.
Each IPv6 address is one of the three basic types :
Unicast – The address corresponds to a single computer. A
datagram sent to the address is routed along a shortest path to
the computer
Multicast – The address corresponds to a set of computers,
possibly at many locations. When a datagram is sent to the
address, IPV6 delivers one copy of the datagram to each
member of the set.
57. Anycast – The address corresponds to a set of computers
that share a common address prefix. A datagram sent to the
address is routed along a shortest path and then delivered to
exactly one of the computers
IPV6 Colon Hexadecimal Notation –
Although an address that occupies 128 bits can accommodate
Internet growth, writing such numbers cab be unwieldy. For
e.g. consider a 128 bit number written in dotted decimal
notation :
105.220.136.100.255.255.255.255.0.0.18.128.140.10.255.255
When the above address is written in colon hexadecimal
notation it becomes :-
69DC:8864:FFFF:FFFF:0:1280:8C0A:FFFF
58. Zero compression replaces sequences of zeroes with two
colons. For example the address : -
FF0C:0:0:0:0:0:0:B1
Cab be written as –
FF0C::B1
59. Difference between IPV4 & IPV6 : -
IPV4 IPV6
Source & Destination addresses
are 32 bits
Source and Destination
Addresses are 128 bits
IPsec support is optional IPsec support is required.
No identification of packet flow for
QoS handling by routers is
present within the IPV4 header
Packet flow identification for QoS
handling by routers is included in
the IPV6 header using the flow
label field.
Fragmentation is done by both
routers and the sending host.
Fragmentation is not done by
routers, only by the sending host.
Header includes a checksum. Header does not include a
checksum.
Header includes options All optional data is moved to IPV6
extension headers.
60. IPV4 IPV6
Address Resolution Protocol (ARP)
uses broadcast ARP Request
frames to resolve an IPV4 address
to a link layer address.
ARP Request frames are replaced
with multicast Neighbor Solicitation
messages.
Internet Group Management
Protocol (IGMP) is used to manage
local subnet group membership.
IGMP is replaced with Multicast
Listener Discovery (MLD)
messages.
ICMP Router Discovery is used to
determine the IPV4 address of the
best default gateway and is
optional.
ICMP Router Discovery is rep.
Router Solicitation and Router
messages.
Broadcast address are used to
send traffic to all nodes on a
subnet.
There are no IPV6 broadcast
addresses. Instead, a link-local
scope all-nodes multicast address
is used. For more information, see
“Multicast IVP6 address.”
61. IPV4 IPV6
Must be configured either
manually or through DHCP.
Does not require manual
configuration or DHCP.
Uses host address (A) resource
records in the Domain Name
System (DNS) to map host
names to IPV4 addresses.
Uses host address (AAAA)
resource records in the Domain
Name System (DNS) to map host
names to IPV6 addresses.
Uses pointer (PTR) resource
records in the IN-ADDR. ARPA
DNS domain to map IPV4
addresses to host names.
Uses Pointer (PTR) resource
records in the IPV6. INT DNS
domain to map IPV6 addresses
to host names.
Must support a 576-byte packet
size (possibly fragmented)
Must support a 1280-byte packet
size (without fragmentation)