Professional Documents
Culture Documents
Introduction
Objectives
Upon completion you will be able to:
Layered Architecture
Peer--to-
Peer to-Peer Processes
Encapsulation
Physical Layer
Data Link Layer
Network Layer
Transport Layer
Session Layer
Presentation Layer
Application Layer
Summary of Layers
07:01:02:01:2C:4B
A 6-byte (12 hexadecimal digits) physical address.
132.24.75.9
An internet address in IPv4 in decimal numbers
753
A 16-bit port address represented as one single number.
Underlying Technology
Objectives
Upon completion you will be able to:
• Understand the different versions of wired Ethernet
• Understand wireless Ethernet
• Understand the types of point-to-point WANs
• Understand the types of switched WANs, especially ATM
• Differentiate between repeaters, bridges, routers, and hubs
Physical Layer
Data Link Layer
X.25
Frame Relay
ATM
Repeaters
Hubs
Bridges
Router
A router is a three-layer
(physical, data link, and network)
device.
Address Space
Notation
Solution
We replace each decimal number with its binary equivalent:
a. 01101111 00111000 00101101 01001110
b. 11011101 00100010 00000111 01010010
c. 11110001 00001000 00111000 00001100
d. 01001011 00101101 00100010 01001110
TCP/IP Protocol Suite 115
EXAMPLE 3
Solution
a. There are no leading zeroes in dotted-decimal notation (045).
b. We may not have more than four numbers in an IP address.
c. In dotted-decimal notation, each number is less than or equal
to 255; 301 is outside this range.
d. A mixture of binary notation and dotted-decimal notation is not
allowed.
TCP/IP Protocol Suite 116
EXAMPLE 4
Solution
In class A, only 1 bit defines the class. The remaining 31 bits
are available for the address. With 31 bits, we can have 231
or 2,147,483,648 addresses.
Solution
See the procedure in Figure 4.4.
a. The first bit is 0. This is a class A address.
b. The first 2 bits are 1; the third bit is 0. This is a class C address.
c. The first bit is 0; the second bit is 1. This is a class B address.
d. The first 4 bits are 1s. This is a class E address..
TCP/IP Protocol Suite 124
Figure 4.5 Finding the class in decimal notation
Solution
a. The first byte is 227 (between 224 and 239); the class is D.
b. The first byte is 193 (between 192 and 223); the class is C.
c. The first byte is 14 (between 0 and 127); the class is A.
d. The first byte is 252 (between 240 and 255); the class is E.
e. The first byte is 134 (between 128 and 191); the class is B.
Given the network address 17.0.0.0, find the class, the block,
and the range of the addresses.
Solution
The class is A because the first byte is between 0 and 127. The
block has a netid of 17. The addresses range from 17.0.0.0 to
17.255.255.255.
Given the network address 132.21.0.0, find the class, the block,
and the range of the addresses.
Solution
The class is B because the first byte is between 128 and 191.
The block has a netid of 132.21. The addresses range from
132.21.0.0 to 132.21.255.255.
Solution
The class is C because the first byte is between 192
and 223. The block has a netid of 220.34.76. The
addresses range from 220.34.76.0 to 220.34.76.255.
Solution
The default mask is 255.0.0.0, which means that only the first
byte is preserved and the other 3 bytes are set to 0s. The
network address is 23.0.0.0.
Solution
The default mask is 255.255.0.0, which means that the first 2
bytes are preserved and the other 2 bytes are set to 0s. The
network address is 132.6.0.0.
Solution
The default mask is 255.255.255.0, which means that the first 3
bytes are preserved and the last byte is set to 0. The network
address is 201.180.56.0.
Solution
We apply the AND operation on the address and the subnet
mask.
Address ➡ 11001000 00101101 00100010 00111000
Subnet Mask ➡ 11111111 11111111 11110000 00000000
Subnetwork Address ➡ 11001000 00101101 00100000 00000000.
Restrictions
Finding the Block
Granted Block
Solution
Only two are eligible (a and c). The address
205.16.37.32 is eligible because 32 is divisible by 16.
The address 17.17.33.80 is eligible because 80 is
divisible by 16.
TCP/IP Protocol Suite 180
EXAMPLE 2
Solution
In this case, we need to check two bytes because
1024 = 4 × 256. The right-most byte must be divisible
by 256. The second byte (from the right) must be
divisible by 4. Only one address is eligible (c).
Solution
The prefix length is 27, which means that we must
keep the first 27 bits as is and change the remaining
bits (5) to 0s. The following shows the process:
Address in binary: 10100111 11000111 10101010 01010010
Keep the left 27 bits: 10100111 11000111 10101010 01000000
Result in CIDR notation: 167.199.170.64/27
TCP/IP Protocol Suite 186
EXAMPLE 5
Solution
Figure 5.3 shows the solution. The first, second, and
fourth bytes are easy; for the third byte we keep the
bits corresponding to the number of 1s in that group.
The first address is 140.120.80.0/20.
Solution
The prefix length is 20. The number of addresses in
the block is 232−20 or 212 or 4096. Note that
this is a large block with 4096 addresses.
Solution
We found in the previous examples that the first
address is 140.120.80.0/20 and the number of
addresses is 4096. To find the last address, we need to
add 4095 (4096 − 1) to the first address.
140 . 120 . 80 . 0
0 . 0 . 15 . 255
----------------------------
140 . 120 . 95 . 255
202 ➡ 128 + 64 + 0 + 0 + 8 + 0 + 2 + 0
The leftmost 5 numbers are ➡ 128 + 64 + 0 + 0 + 8
The first address is 190.87.140.200/29
Solution
The organization that is granted the block in the previous
example can assign the addresses in the block to the hosts in its
network. However, the first address needs to be used as the
network address and the last address is kept as a special
address (limited broadcast address). Figure 5.5 shows how the
block can be used by an organization. Note that the last
address ends with 207, which is different from the 255 seen in
classful addressing.
Solution
We need 4 subnets, which means we need to add two
more 1s (log2 4 = 2) to the site prefix. The subnet
prefix is then /28.
Solution
Figure 5.6 shows one configuration.
Solution
Figure 5.9 shows the situation.
Group 1
For this group, each customer needs 256 addresses.
This means the suffix length is 8 (28 =256). The prefix
length is then 32 − 8 = 24. The addresses are:
Group 2
For this group, each customer needs 128 addresses.
This means the suffix length is 7 (27 =128). The prefix
length is then 32 − 7 = 25. The addresses are:
Group 3
For this group, each customer needs 64 addresses.
This means the suffix length is 6 (26 = 64). The prefix
length is then 32 − 6 = 26. The addresses are:
Delivery, Forwarding,
and Routing of IP Packets
Objectives
Upon completion you will be able to:
Connection Types
Direct Versus Indirect Delivery
IP is a connectionless protocol.
Solution
Figure 6.9 shows the three tables used by router R1.
Note that some entries in the next-hop address
column are empty because in these cases, the
destination is in the same network to which the router
is connected (direct delivery). In these cases, the next-
hop address used by ARP is simply the destination
address of the packet as we will see in Chapter 7.
Solution
The mask is /18. After applying the mask, the subnet
address is 145.14.0.0. The packet is delivered to ARP
with the next-hop address 145.14.32.78 and the
outgoing interface m0.
Solution
The router receives the packet and applies the mask
(/18). The network address is 7.22.64.0. The table is
searched and the address is not found. The router
uses the address of the default router (not shown in
figure) and sends the packet to that router.
Solution
Table 6.1 shows the corresponding table.
Solution
The router performs the following steps:
Solution
We know some facts but we don’t have all for a
definite topology. We know that router R1 has three
interfaces: m0, m1, and m2. We know that there are
three networks directly connected to router R1. We
know that there are two networks indirectly connected
to R1. There must be at least three other routers
involved (see next-hop column). We know to which
networks these routers are connected by looking at
their IP addresses. So we can put them at their
appropriate place.
See Next Slide
TCP/IP Protocol Suite 261
EXAMPLE 11 (CONTINUED)
The first local ISP has divided its assigned subblock into 8
smaller blocks and assigned each to a small ISP. Each small
ISP provides services to 128 households (H001 to H128), each
using four addresses. Note that the mask for each small ISP is
now /23 because the block is further divided into 8 blocks.
Each household has a mask of /30, because a household has
only 4 addresses (232−30 is 4).
The second local ISP has divided its block into 4 blocks and
has assigned the addresses to 4 large organizations (LOrg01 to
LOrg04). Note that each large organization has 1024 addresses
and the mask is /22.
See Next Slide
TCP/IP Protocol Suite 268
EXAMPLE 12 (CONTINUED)
The third local ISP has divided its block into 16 blocks and
assigned each block to a small organization (SOrg01 to
SOrg15). Each small organization has 256 addresses and the
mask is /24.
There is a sense of hierarchy in this configuration. All routers
in the Internet send a packet with destination address
120.14.64.0 to 120.14.127.255 to the regional ISP. The regional
ISP sends every packet with destination address 120.14.64.0 to
120.14.79.255 to Local ISP1. Local ISP1 sends every packet
with destination address 120.14.64.0 to 120.14.64.3 to H001.
$ netstat -rn
Kernel IP routing table
Destination Gateway Mask Flags Iface
153.18.16.0 0.0.0.0 255.255.240.0 U eth0
127.0.0.0 0.0.0.0 255.0.0.0 U lo
0.0.0.0 153.18.31. 254 0.0.0.0 UG eth0.
$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:B0:D0:DF:09:5D
inet addr:153.18.17.11 Bcast:153.18.31.255 Mask:255.255.240.0
....
Components
Objectives
Upon completion you will be able to:
Solution
Figure 7.7 shows the ARP request and reply packets.
Note that the ARP data field in this case is 28 bytes,
and that the individual addresses do not fit in the 4-
byte boundary. That is why we do not show the
regular 4-byte boundaries for these addresses. Also
note that the IP addresses are shown in hexadecimal.
For information on binary or hexadecimal notation
see Appendix B.
Internet Protocol
Objectives
Upon completion you will be able to:
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 325
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?
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 328
8.2 FRAGMENTATION
The format and size of a frame depend on the protocol used by the
physical network
network.. A datagram may have to be fragmented to fit the
protocol regulations.
regulations.
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 nonfragmented packet is
considered the last fragment.
Solution
If the M bit is 1, it means that there is at least one more
fragment. This fragment can be the first one or a middle one,
but not the last one. We don’t know if it is the first one or a
middle one; we need more information (the value of the
fragmentation offset). See also the next example.
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?
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.
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?
Solution
We look at the second and third (left-most) bits of the code.
$ ping fhda.edu
PING fhda.edu (153.18.8.1) 56(84) bytes of data.
64 bytes from tiptoe.fhda.edu (153.18.8.1): ....
The result shows the IP address of the host and the number of
bytes used.
We can also use the ping utility with the -R option to implement
the record route option.
$ 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
Header-Adding Module
Header-
Processing Module
Queues
Routing Table
Forwarding Module
MTU Table
Fragmentation Module
Reassembly Table
Reassembly Module
Destination Unreachable
Source Quench
Time Exceeded
Parameter Problem
Redirection
Destination-unreachable messages
with codes 2 or 3 can be created only
by the destination host.
Other destination-unreachable
messages can be created only by
routers.
We use the ping program to test the server fhda.edu. The result
is shown below:
$ ping fhda.edu
PING fhda.edu (153.18.8.1) 56 (84) bytes of data.
64 bytes from tiptoe.fhda.edu (153.18.8.1): icmp_seq=0 ttl=62 time=1.91 ms
64 bytes from tiptoe.fhda.edu (153.18.8.1): icmp_seq=1 ttl=62 time=2.04 ms
64 bytes from tiptoe.fhda.edu (153.18.8.1): icmp_seq=2 ttl=62 time=1.90 ms
64 bytes from tiptoe.fhda.edu (153.18.8.1): icmp_seq=3 ttl=62 time=1.97 ms
64 bytes from tiptoe.fhda.edu (153.18.8.1): icmp_seq=4 ttl=62 time=1.93 ms
$ ping mail.adelphia.net
PING mail.adelphia.net (68.168.78.100) 56(84) bytes of data.
64 bytes from mail.adelphia.net (68.168.78.100): icmp_seq=0 ttl=48 time=85.4 ms
64 bytes from mail.adelphia.net (68.168.78.100): icmp_seq=1 ttl=48 time=84.6 ms
64 bytes from mail.adelphia.net (68.168.78.100): icmp_seq=2 ttl=48 time=84.9 ms
64 bytes from mail.adelphia.net (68.168.78.100): icmp_seq=3 ttl=48 time=84.3 ms
64 bytes from mail.adelphia.net (68.168.78.100): icmp_seq=4 ttl=48 time=84.5 ms
$ traceroute fhda.edu
traceroute to fhda.edu (153.18.8.1), 30 hops max, 38 byte packets
1 Dcore.fhda.edu (153.18.31.254) 0.995 ms 0.899 ms 0.878 ms
2 Dbackup.fhda.edu (153.18.251.4) 1.039 ms 1.064 ms 1.083 ms
3 tiptoe.fhda.edu (153.18.8.1) 1.797 ms 1.642 ms 1.757 ms
The un-numbered line after the command shows that the destination is
153.18.8.1. The TTL value is 30 hops. The packet contains 38 bytes: 20
bytes of IP header, 8 bytes of UDP header, and 10 bytes of application data.
The application data is used by traceroute to keep track of the packets.
The first line shows the first router visited. The router is named
Dcore.fhda.edu with IP address 153.18.31.254. The first round trip time was
0.995 milliseconds, the second was 0.899 milliseconds, and the third was
0.878 milliseconds.
The second line shows the second router visited. The router is named
Dbackup.fhda.edu with IP address 153.18.251.4. The three round trip times
are also shown.
The third line shows the destination host. We know that this is the
destination host because there are no more lines. The destination host is the
server fhda.edu, but it is named tiptoe. fhda.edu with the IP address
153.18.8.1. The three round trip times are also shown.
TCP/IP Protocol Suite 425
EXAMPLE 5
$ traceroute xerox.com
traceroute to xerox.com (13.1.64.93), 30 hops max, 38 byte packets
1 Dcore.fhda.edu (153.18.31.254) 0.622 ms 0.891 ms 0.875 ms
2 Ddmz.fhda.edu (153.18.251.40) 2.132 ms 2.266 ms 2.094 ms
...
18 alpha.Xerox.COM (13.1.64.93) 11.172 ms 11.048 ms 10.922 ms
Here there are 17 hops between source and destination. Note that some
round trip times look unusual. It could be that a router is too busy to
process the packet immediately.
$ traceroute voyager.deanza.edu
traceroute to voyager.deanza.edu (127.0.0.1), 30 hops max, 38 byte packets
1 voyager (127.0.0.1) 0.178 ms 0.086 ms 0.055 ms
Internet Group
Management Protocol
Objectives
Upon completion you will be able to:
Message Format
Joining a Group
Leaving a Group
Monitoring Membership
Solution
The events occur in this sequence:
a. Time 12: The timer for 228.42.0.0 in host A expires and a
membership report is sent, which is received by the router and every
host including host B which cancels its timer for 228.42.0.0.
Note that if each host had sent a report for every group in its
list, there would have been seven reports; with this strategy
only four reports are sent.
IP Layer
Data Link Layer
Netstat Utility
Solution
We can do this in two steps:
a. We write the rightmost 23 bits of the IP address in hexadecimal.
This can be done by changing the rightmost 3 bytes to hexadecimal
and then subtracting 8 from the leftmost digit if it is greater than or
equal to 8. In our example, the result is 2B:0E:07.
Solution
a. The right-most three bytes in hexadecimal are D4:18:09. We need
to subtract 8 from the leftmost digit, resulting in 54:18:09..
01:00:5Ε:54:18:09
We use netstat with three options, -n, -r, and -a. The -n option gives the
numeric versions of IP addresses, the -r option gives the routing table, and
the -a option gives all addresses (unicast and multicast). Note that we show
only the fields relative to our discussion.
$ netstat -nra
Kernel IP routing table
Destination Gateway Mask Flags Iface
153.18.16.0 0.0.0.0 255.255.240.0 U eth0
169.254.0.0 0.0.0.0 255.255.0.0 U eth0
127.0.0.0 0.0.0.0 255.0.0.0 U lo
224.0.0.0 0.0.0.0 224.0.0.0 U eth0
0.0.0.0 153.18.31.254 0.0.0.0 UG eth0
We can show how IGMP can handle the sending and receiving of IGMP
packets through our simplified version of an IGMP package
package.. In our
design an IGMP package involves a group table, a set of timers, and four
software modules
modules..
Group Table
Timers
Group--Joining Module
Group
Group--Leaving Module
Group
Input Module
Output Module
User Datagram
Protocol
Objectives
Upon completion you will be able to:
Port Numbers
Socket Addresses
SNMP uses two port numbers (161 and 162), each for a
different purpose, as we will see in Chapter 21.
UDP length =
IP length − IP header’s length
Connectionless Services
Flow and Error Control
Encapsulation and Decapsulation
Queuing
Multiplexing and Demultiplexing
A user datagram now arrives for port 52,011. The input module
checks the table and finds that no queue has been allocated for
this destination since this is the first time a user datagram has
arrived for this destination. The module creates a queue and
gives it a number (43). See Table 11.4.
Transmission
Control Protocol
Objectives
Upon completion you will be able to:
• Be able to name and understand the services offered by TCP
• Understand TCP’s flow and error control and congestion control
• Be familiar with the fields in a TCP segment
• Understand the phases in a connection-oriented connection
• Understand the TCP transition state diagram
• Be able to name and understand the timers used in TCP
• Be familiar with the TCP options
TCP/IP Protocol Suite 496
Figure 12.1 TCP/IP protocol suite
Process-to-
Process- to-Process Communication
Stream Delivery Service
Full--Duplex Communication
Full
Connection--Oriented Service
Connection
Reliable Service
Numbering System
Flow Control
Error Control
Congestion Control
Format
Encapsulation
Connection Establishment
Data Transfer
Connection Termination
Connection Reset
Scenarios
Solution
The value of rwnd = 5,000 − 1,000 = 4,000. Host B can receive
only 4,000 bytes of data before overflowing its buffer. Host B
advertises this value in its next segment to A.
What is the size of the window for host A if the value of rwnd is
3,000 bytes and the value of cwnd is 3,500 bytes?
Solution
The size of the window is the smaller of rwnd and cwnd, which
is 3,000 bytes.
Solution
Figure 12.22 shows the new window. Note that this is a case in
which the window closes from the left and opens from the right
by an equal number of bytes; the size of the window has not
been changed. The acknowledgment value, 202, declares that
bytes 200 and 201 have been received and the sender needs not
worry about them; the window can slide over them.
Solution
The value of rwnd is less than cwnd, so the size of the window
is 12. Figure 12.23 shows the new window. Note that the
window has been opened from the right by 7 and closed from
the left by 4; the size of the window has increased.
Solution
The value of rwnd is less than cwnd, so the size of the window
is 5. Figure 12.24 shows the situation. Note that this is a case
not allowed by most implementations. Although the sender has
not sent bytes 215 to 217, the receiver does not know this.
Solution
The receiver needs to keep track of the last acknowledgment
number and the last rwnd. If we add the acknowledgment
number to rwnd we get the byte number following the right
wall. If we want to prevent the right wall from moving to the
left (shrinking), we must always have the following
relationship.
new ack + new rwnd ≥ last ack + last rwnd
or
new rwnd ≥ (last ack + last rwnd) − new ack
TCP/IP Protocol Suite 549
Note:
In modern implementations, a
retransmission occurs if the
retransmission timer expires or three
duplicate ACK segments have arrived.
Network Performance
Congestion Control Mechanisms
Congestion Control in TCP
Retransmission Timer
Persistence Timer
Keepalive Timer
TIME--WAIT Timer
TIME
RTTM = 2.5
RTTS = 7/8 (1.5) + 1/8 (2.5) = 1.625
RTTD = 3/4 (7.5) + 1/4 |1.625 − 2.5| = 0.78
RTO = 1.625 + 4 (0.78) = 4.74
The sender simply inserts the value of the clock (for example,
the number of seconds past from midnight) in the timestamp
field for the first and second segment. When an
acknowledgment comes (the third segment), the value of the
clock is checked and the value of the echo reply field is
subtracted from the current time. RTT is 12 s in this scenario.
Note that as the example shows, the RTT calculated is the time
difference between sending the first segment and receiving the
third segment. This is actually the meaning of RTT: the time
difference between a packet sent and the acknowledgment
received. The third segment carries the acknowledgment for
the first and second segments.
Let us see how the SACK option is used to list out-of-order blocks. In
Figure 12.48 an end has received five segments of data.
Stream Control
Transmission Protocol
Objectives
Upon completion you will be able to:
Process-to-
Process- to-Process Communication
Multiple Streams
Multihoming
Full--Duplex Communication
Full
Connection--Oriented Service
Connection
Reliable Service
General Header
Chunks
Scenarios
Simultaneous Close
Receiver Site
Sender Site
A Scenario
Receiver Site
Sender Site
Sending Data Chunks
Generating SACK Chunks
Initialization
Sharing
Updating
When to Share
Two--Node Loop Instability
Two
Three--Node Instability
Three
Solution
The 21 timers are listed below:
Periodic timer: 1
Expiration timer: 20 − 5 = 15
Garbage collection timer: 5
Solution
This router has three links: two of type 1 (point-to-
point) and one of type 3 (stub network). Figure 14.32
shows the router link LSA.
See Figure 14.32
Solution.
Solution
All routers advertise router link LSAs.
a. R1 has two links, N1 and N2.
b. R2 has one link, N1.
c. R3 has two links, N2 and N3.
Solution
All three network must advertise network links:
a. Advertisement for N1 is done by R1 because it is the only
attached router and therefore the designated router.
b. Advertisement for N2 can be done by either R1, R2, or R3,
depending on which one is chosen as the designated router.
c. Advertisement for N3 is done by R3 because it is the only
attached router and therefore the designated router.
Initialization
Sharing
Updating
Multicasting and
Multicast Routing Protocols
Objectives
Upon completion you will be able to:
• Differentiate between a unicast, multicast, and broadcast message
• Know the many applications of multicasting
• Understand multicast link state routing and MOSPF
• Understand multicast link state routing and DVMRP
• Understand the Core-Based Tree Protocol
• Understand the Protocol Independent Multicast Protocols
• Understand the MBONE concept
TCP/IP Protocol Suite 754
15.1 UNICAST, MULTICAST,
AND BROADCAST
A message can be unicast, multicast, or broadcast.
broadcast. Let us clarify these
terms as they relate to the Internet
Internet..
Unicasting
Multicasting
Broadcasting
Multicasting versus Multiple Unicasting
PIM-DM
PIM-
PIM--SM
PIM
Host Configuration:
BOOTP and DHCP
Objectives
Upon completion you will be able to:
Operation
Packet Format
Domain Name
System: DNS
Objectives
Upon completion you will be able to:
Label
Domain Name
Domain
Generic Domains
Country Domains
Inverse Domain
Registrar
Resolver
Mapping Names to Addresses
Mapping Addresses to Names
Recursive Resolution
Iterative Resolution
Caching
Header
Question Record
Resource Record
The QR bit defines the message as a query. The OpCode is 0000, which
defines a standard query. The recursion desired (RD) bit is set. (Refer back
to Figure 17.16 for the flags field descriptions.) The message contains only
one question record. The domain name is 4chal4fhda3edu0. The next 2
bytes define the query type as an IP address; the last 2 bytes define the class
as the Internet.
Figure 17.22 shows the response of the server. The response is similar to the
query except that the flags are different and the number of answer records
is one. The flags value is 0x8180 in hexadecimal. In binary it is
1000000110000000, but again we divide it into fields as shown below:
The QR bit defines the message as a response. The OpCode is 0000, which
defines a standard response. The recursion available (RA) and RD bits are
set. The message contains one question record and one answer record. The
question record is repeated from the query message. The answer record has
a value of 0xC00C (split in two lines), which points to the question record
instead of repeating the domain name. The next field defines the domain
type (address). The field after that defines the class (Internet). The field with
the value 12,000 is the TTL (12,000 s). The next field is the length of the
resource data, which is an IP address (153.18.8.105).
Figure 17.23 shows the query message sent from the resolver to the server.
The first 2 bytes show the identifier (0x1200). The flags value is 0x0900 in
hexadecimal. In binary it is 0000100100000000, and we divide it into fields
as shown below:
The OpCode is 0001, which defines an inverse query. The message contains
only one question record. The domain name is 19171231537in-addr4arpa.
The next 2 bytes define the query type as PTR, and the last 2 bytes define
the class as the Internet.
$ nslookup fhda.edu
Name: fhda.edu
Address: 153.18.8.1
Remote Login:
Telnet
Objectives
Upon completion you will be able to:
TELNET is a general-purpose
client-server application program.
Time-Sharing Environment
Time-
Login
Data Characters
Control Characters
Enabling an Option
Disabling an Option
Symmetry
Default Mode
Character Mode
Line Mode
File Transfer:
FTP and TFTP
Objectives
Upon completion you will be able to:
Connections
Communication
Command Processing
File Transfer
Anonymous FTP
10. The server then sends the list of the files or directories (as a
file) on the data connection. When the whole list (file) is
sent, the server responds with 226 (closing data connection)
over the control connection.
11. The client now has two choices. It can use the QUIT
command to request the closing of the
control connection or it can send another command to
start another activity (and eventually open another data
connection). In our example, the client sends a QUIT
command.
12. After receiving the QUIT command, the server responds
with 221 (service closing) and then closes the control
connection.
See Next Slide
TCP/IP Protocol Suite 923
Figure 19.8 Example 1
$ ftp voyager.deanza.fhda.edu
Connected to voyager.deanza.fhda.edu.
220 (vsFTPd 1.2.1)
530 Please login with USER and PASS.
Name (voyager.deanza.fhda.edu:forouzan): forouzan
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls reports
227 Entering Passive Mode (153,18,17,11,238,169)
150 Here comes the directory listing.
7. The server does not open the connection at this time, but
prepares itself for issuing an active
open on the data connection between port 20 (server side)
and the ephemeral port received
from the client. It sends the response 150 (data connection
will open shortly).
8. The client sends the TYPE command.
9. The server responds with the response 200 (command OK).
10. The client sends the STRU command.
11. The server responds with 200 (command OK).
12. The client sends the STOR command.
13. The server opens the data connection and sends the
response 250.
See Next Slide
TCP/IP Protocol Suite 928
EXAMPLE 3 (CONTINUED)
14. The client sends the file on the data connection. After the
entire file is sent, the data connection is closed. Closing the
data connection means end-of-file.
15. The server sends the response 226 on the control
connection.
16. The client sends the QUIT command or uses other
commands to open another data connection
for transferring another file. In our example, the QUIT
command is sent.
17. The server responds with 221 (service closing) and it closes
the control connection.
$ ftp internic.net
Connected to internic.net
220 Server ready
Name: anonymous
331 Guest login OK, send “guest” as password
Password: guest
ftp > pwd
257 ’/’ is current directory
bin
...
...
...
ftp > close
221 Goodbye
ftp > quit
Electronic Mail:
SMTP, POP, and IMAP
Objectives
Upon completion you will be able to:
First Scenario
Second Scenario
Third Scenario
Fourth Scenario
Let us see how we can directly use SMTP to send an email and simulate the
commands and responses we described in this section. We use TELNET to
log into port 25 (the well-known port for SMTP). We then use the
commands directly to send an email. In this example,
forouzanb@adelphia.net is sending an email to himself. The first few lines
show TELNET trying to connect to the adelphia mail server.
$ telnet mail.adelphia.net 25
Trying 68.168.78.100...
Connected to mail.adelphia.net (68.168.78.100).
After connection, we can type the SMTP commands and then receive the
responses as shown below. We have shown the commands in black and the
responses in color. Note that we have added for clarification some comment
lines, designated by the “=” sign. These lines are not part of the email
procedure.
TCP/IP Protocol Suite 982
EXAMPLE 1 (CONTINUED)
POP3
IMAP4
Network Management:
SNMP
Objectives
Upon completion you will be able to:
Name
Type
Encoding Method
PDUs
Format
The VarBind list has only one VarBind. The variable is of type
06 and length 09. The value is of type 05 and length 00. The
whole is a sequence of length 0D (13). The VarBind list is also
a sequence of length 0F (15). The GetRequest PDU is of length
1D (29). Now we have three OCTET STRINGs related to
security parameter, security model, and flags. Then we have
two integers defining maximum size (1024) and message ID
(64). The header is a sequence of length 12, which we left
blank for simplicity. There is one integer, version (version 3).
The whole message is a sequence of 52 bytes. Figure 21.23
shows the actual message sent by the manager station (client)
to the agent (server).
Client (Browser)
Server
Uniform Resource Locator (URL)
Cookies
Static Documents
Dynamic Documents
Active Documents
HTTP Transaction
Persistent versus Nonpersistent Connection
Proxy Server
$ telnet www.mhhe.com 80
Trying 198.45.24.104...
Connected to www.mhhe.com (198.45.24.104).
Escape character is '^]'.
GET /engcs/compsci/forouzan HTTP/1.1
From: forouzanbehrouz@fhda.edu
HTTP/1.1 200 OK
Date: Thu, 28 Oct 2004 16:27:46 GMT
Server: Apache/1.3.9 (Unix) ApacheJServ/1.1.2 PHP/4.1.2 PHP/3.0.18
MIME-version:1.0
Content-Type: text/html
Last-modified: Friday, 15-Oct-04 02:11:31 GMT
Content-length: 14230
Connection closed by foreign host.
TCP/IP Protocol Suite 1071
Note:
IP Over ATM
Objectives
Upon completion you will be able to:
Layers
Addresses
Address Binding
Packet Format
ATMARP Operation
Mobile IP
Objectives
Upon completion you will be able to:
Stationary Hosts
Mobile Hosts
Home Agent
Foreign Agent
Agent Discovery
Registration
Data Transfer
Double Crossing
Triangle Routing
Solution
Multimedia
Objectives
Upon completion you will be able to:
Digitizing Audio
Digitizing Video
Audio Compression
Video Compression
Characteristics
SIP
H.323
Intranet
Extranet
Addressing
Achieving Privacy
VPN Technology
Address Translation
Translation Table
NAT and ISP
Next Generation:
IPv6 and ICMPv6
Objectives
Upon completion you will be able to:
Error Reporting
Query
Dual Stack
Tunneling
Header Translation
Security
Objectives
Upon completion you will be able to:
Symmetric-Key Cryptography
Symmetric-
Asymmetric--Key Cryptography
Asymmetric
Comparison
In cryptography, the
encryption/decryption algorithms are
public; the keys are secret.
Symmetric-Key Distribution
Symmetric-
Public--Key Certification
Public
Kerberos
Let us give an example to make the procedure clear. Our example uses small
numbers, but note that in a real situation, the numbers are very large. Assume G
= 7 and N = 23. The steps are as follows:
1. Alice chooses x = 3 and calculates R1 = 73 mod 23 = 21.
2. Alice sends the number 21 to Bob.
3. Bob chooses y = 6 and calculates R2 = 76 mod 23 = 4.
4. Bob sends the number 4 to Alice.
5. Alice calculates the symmetric key K = 43 mod 23 = 18.
6. Bob calculates the symmetric key K = 216 mod 23 = 18.
The value of K is the same for both Alice and Bob; G xy mod N = 718 mod 23
= 18.
Packet-Filter Firewall
Packet-
Proxy Firewall