Internet Protocol: Objectives
Internet Protocol: Objectives
Internet Protocol
Objectives
Upon completion you will be able to:
Some apps
have default
service types.
When the 3 right-most bits are 0, the 3 left-most bits are the same
as the precedence bits from the previous slides.
When the 3 right-most bits are not all 0s, the 6 bits define 64
Services based on the priority assignment by the Internet or
local authorities. Assignments have not yet been finalized.
The total length field defines the total length of the datagram
including the header.
These are some common values that are used in the Protocol field.
01000010
01000010
Solution
There is an error in this packet. The 4 left-most bits (0100)
show the version, which is correct. The next 4 bits (0010) show
the header length; which means (2 × 4 = 8), which is wrong.
The minimum number of bytes in the header must be 20. The
packet has been corrupted in transmission.
TCP/IP Protocol Suite 14
Example 2
Solution
The HLEN value is 8, which means the total number of bytes
in the header is 8 × 4 or 32 bytes. The first 20 bytes are the base
header, the next 12 bytes are the options.
Solution
The HLEN value is 5, which means the total number of bytes
in the header is 5 × 4 or 20 bytes (no options). The total length
is 40 bytes, which means the packet is carrying 20 bytes of data
(40 − 20).
45000028000100000102 . . .
How many hops can this packet travel before being dropped?
The data belong to what upper layer protocol?
45000028000100000102 . . .
How many hops can this packet travel before being dropped?
The data belong to what upper layer protocol?
Solution
To find the time-to-live field, we skip 8 bytes (16 hexadecimal
digits). The time-to-live field is the ninth byte, which is 01. This
means the packet can travel only one hop. The protocol field is
the next byte (02), which means that the upper layer protocol is
IGMP (see Table 8.4).
TCP/IP Protocol Suite 20
8.2 FRAGMENTATION
The format and size of a frame depend on the protocol used by the
physical network. A datagram may have to be fragmented to fit the
protocol regulations.
Most fields are copied from one fragment to the next. The 3
fields that are not copied are the flags, fragmentation offset,
and the total length.
(And the checksum of course is recalculated.)
Solution
If the M bit is 0, it means that there are no more fragments; the
fragment is the last one. However, we cannot say if the original
packet was fragmented or not. A non-fragmented packet is
considered the last fragment.
Solution
Because the M bit is 1, it is either the first fragment or a middle
one. Because the offset value is 0, it is the first fragment.
Solution
To find the number of the first byte, we multiply the offset value
by 8. This means that the first byte number is 800. We cannot
determine the number of the last byte unless we know the
length of the data.
A packet has arrived in which the offset value is 100, the value
of HLEN is 5 and the value of the total length field is 100.
What is the number of the first byte and the last byte?
A packet has arrived in which the offset value is 100, the value
of HLEN is 5 and the value of the total length field is 100.
What is the number of the first byte and the last byte?
Solution
The first byte number is 100 × 8 = 800. The total length is 100
bytes and the header length is 20 bytes (5 × 4), which means
that there are 80 bytes in this datagram. If the first byte
number is 800, the last byte number must be 879.
Denotes the end of the options and that the data is next.
Records the route a datagram takes thru routers. Can only record
9 routers, since max size of the header is 60 bytes, 20 bytes for
base header, leaving only 40 bytes for options.
The Pointer field (4, then 8, then 12, then 16) is the byte
number of the first available space.
O-Flow bits (overflow bits) record the number of routers that could not
add their timestamp because no more fields were available.
TCP/IP Protocol Suite 45
Figure 8.20 Use of flag in timestamp
Solution
We look at the first (left-most) bit of the code for each option.
Which of the six options are used for datagram control and
which are used for debugging and management?
Which of the six options are used for datagram control and
which are used for debugging and management?
Solution
We look at the second and third (left-most) bits of the code.
The result shows the IP address of the host and the number of
bytes used.
TCP/IP Protocol Suite 52
Example 13
We can also use the ping utility with the -R option to implement
the record route option. (in Microsoft: ping –r count URL)
$ ping -R fhda.edu
PING fhda.edu (153.18.8.1) 56(124) bytes of data.
64 bytes from tiptoe.fhda.edu (153.18.8.1): icmp_seq=0 ttl=62 time=2.70 ms
RR: voyager.deanza.fhda.edu (153.18.17.11)
Dcore_G0_3-69.fhda.edu (153.18.251.3)
Dbackup_V13.fhda.edu (153.18.191.249) tiptoe.fhda.edu (153.18.8.1)
Dbackup_V62.fhda.edu (153.18.251.34)
Dcore_G0_1-6.fhda.edu (153.18.31.254)
voyager.deanza.fhda.edu (153.18.17.11)
$ traceroute fhda.edu
traceroute to fhda.edu (153.18.8.1), 30 hops max, 38 byte packets
1 Dcore_G0_1-6.fhda.edu (153.18.31.254) 0.972 ms 0.902 ms 0.881 ms
2 Dbackup_V69.fhda.edu (153.18.251.4) 2.113 ms 1.996 ms 2.059 ms
3 tiptoe.fhda.edu (153.18.8.1) 1.791 ms 1.741 ms 1.751 ms
In Microsoft: tracert -j
Header-Adding Module
Processing Module
Queues
Routing Table
Forwarding Module
MTU Table
Fragmentation Module
Reassembly Table
Reassembly Module