Computer Networking A Top Down Approach 7th Edition © Pearson Education

Notes by Michael Banks, 2023


Chapter 1 Computer Networks and the Internet


Self Assessment Quiz, Companion Website

We are sending a 30 Mbit file from source to dest. All links in the path have a transmission rate of 10 Mbps.

The propagation speed is 2*108 meter/sec.

The distance between source and dest. is 10,000km

1. Initially suppose there is only one link between source and destination. Also suppose that the entire MP3 file is sent as one packet. The transmission delay is:

FORMULA TRANSMISSION DELAY

LR   OR   Length of packet in bitsRate of transmission in bits per sec   = seconds

CONVERSIONS

30 Mbit files is 30,000,000 bits = L

10 Mbps is 10,000,000 bps = R

RUN THE FORMULA

30,000,000 bits10,000,000 bps   =   3 seconds


2. What is the end-to-end delay (transmission delay plus propagation delay)

FORMULA PROPAGATION DELAY

DS   OR   distance of link in meterspropagation speed in meters per sec   = seconds 

CONVERSIONS

distance of 10,000km ---> 10,000,000 meters = D

propagation speed 2*108 meter/sec ---> 200,000,000 meters/sec = S

RUN THE FORMULA

10,000,000 meters200,000,000 meters/sec   =   0.05 sec

add 0.05 sec prop delay to 3.0 sec trans delay for total end-to-end delay 3.05 (ignoring queuing and processing)


3. How many bits will the source have transmitted when the first bit arrives at the destination.

FORMULA BITS PROGPAGATED

Dprop   x   R

OR

Propagation delay in seconds   x   Rate of transmission in bits/sec   =   bits

"how many bits are on the wire(fully transmitted after 3 seconds) at the end of the propagation delay? (0.05 sec)

The first bit would have arrived at the dest at 0.05 sec since that is the prop delay..

The prop delay tells you when the first bit arrives.. not when they have all arrived


CONVERSIONS

10 Mbps is 10,000,000 bps = R


RUN THE FORMULA

0.05 sec   x   10,000,000 bps   =   500,000 bits

Remember.. every single bit of this 30,000,000 bit file will need 0.05 seconds to propagate across the wire. Our clock starts at 0 sec. At 0.05 sec 1 bit has completely propgated across the wire AND there are 500,000 more bits behind it on the wire that have not quite made it to the end. PLUS there are still 25,500,000 bits that have not been transmitted onto the wire yet.


4. Now suppose there are two links between source and destination, with one router connecting the two links. Each link is 5,000 km long. Again suppose the MP3 file is sent as one packet. Suppose there is no congestion, so that the packet is transmitted onto the second link as soon as the router receives the entire packet. The end-to-end delay is

We will use two formulas. First Prop Delay, then Trans delay

FORMULA PROPAGATION DELAY

DS   OR   distance of link in meterspropagation speed in meters per sec   =   seconds

The difference from question one is that, before, we had 'one link between source and destination' - 'host to host'

Here, we have 'host to router to host'. Two links. Our overall distance remains the same at 10,000km since each link is 5,000km

CONVERSIONS

distance of 10,000km ---> 10,000,000 meters = D

propagation speed 2*108 meter/sec ---> 200,000,000 meters/sec = S

RUN THE FORMULA

10,000,000 meters200,000,000 meters/sec   =   0.05 sec

add 0.05 sec prop delay

Dont make the mistake of thinking each link has 0.05. that is the delay for 10,000km. Wheter its across one link or two. Previously 10,000km was across one link. Now it is across two links

We do however need to double the transmission delay since there are two nodes transmitting.

3 sec x 2 = 6 sec, add the prop delay for total 6.05 sec


5. Now suppose that the MP3 file is broken into 3 packets, each of 10 Mbits. Ignore headers that may be added to these packets. Also ignore router processing delays.

Assuming store and forward packet switching at the router, the total delay is ______ ?


FORMULA End to End delay

D end-end   =     N(   D proc   +   D trans   +   D prop   )  

Where N = number of links.... We are ignoring D proc in this example

And we need to add another piece to the formula.. P = packets

D end-end   =     (P-1) * N(   D proc   +   D trans   +   D prop   )  

We have 3 packets.

The Dtrans is 1 sec/packet (using L/R).

The number of links is 2, both totaling a distance of 10,000km

And we know that the D prop across that distance is .05 seconds (using D/S)   OR   distance of link in meterspropagation speed in meters per sec = seconds

RUN THE FORMULA

D end-end   =     (P-1) * N(   D proc   +   D trans   +   D prop   )  

D end-end   =     (2) * 2(   D proc (ignore)   +   1   +   0.025   )  

wrong.. we get 4.1 seconds when the answer should be 4.05 seconds

to make this work, the formula has to look like this:

D end-end   =    [ ( P-1)    *     N(  D trans   )]     +   D prop

D end-end   =    [ ( 2 packets)    *     2 links(  1 second trans delay   )]     +   .05 second prop delay end to end

D end-end   =   4.05 seconds

to make it work, we dont multiply the number of links * the prop delay..

ALTERNATIVE - instead of tacking on the dprop, lets tack on the number of bits

D end-end   =    ( P-1)    +     [ N (  D trans   +   D prop   ) ]  

THIS IS CORRECT..

adding (p-1) into the equation, instead of multiplying it, keeps the relationship between # of links and dprop intact.

this section applies delay times to the number of links (assumes they all use the same delays)

  [ N (  D trans   +   D prop   ) ]  

ONLY THEN do we add number of packets

 ( P - 1 )    +     [ N (  D trans   +   D prop   ) ]  

qty packets + qty of links with a delay time

NOTE that we are not muliplying here. We add in the number of packets to a qty of TIME, and we keep the TIME unit.


6. Now suppose there is only one link between source and destination, and there are 10 TDM channels in the link. The MP3 file is sent over one of the channels. The end-to-end delay is

Divide trans rate of 10Mbps by 10 = 1Mbps for each of the 10 channels

FORMULA TRANSMISSION DELAY

LR   OR   Length of packet in bitsRate of transmission in bits per sec   =   seconds

CONVERSIONS

30 Mbit files is 30,000,000 bits = L

1 Mbps is 1,000,000 bps = R

RUN THE FORMULA

30,000,000 bits1,000,000 bps   =   30 seconds


FORMULA End to End delay

 ( P - 1 )    +     [ N (  D trans   +   D prop   ) ]  

RUN THE FORMULA

Packets (P) = 1

Links (N) = 1

 ( 1 - 1 )    +     [ 1 (  30sec   +   0.05sec   ) ]  

ANS = 30.05 sec end-end delay



7. Now suppose there is only one link between source and destination, and there are 10 FDM channels in the link. The MP3 file is sent over one of the channels. The end-to-end delay is

ANS = 30.05 sec end-end delay.. no difference in formula between FDM and TDM


New problem criteria

8. Review the car-caravan example (page 38)

Again assume a propagation speed of 100 km/hour.

Suppose the caravan travels 200 km, beginning in front of one tollbooth, passing through a second tollbooth, and finishing just before a third tollbooth. (each link is 100km)

The transmission rate at each tollboth is 5cars/min

The caravan contains 10 cars

What is the end-to-end delay?


VARIABLES
CAR = BIT
CARAVAN = PACKET

FORMULA TRANSMISSION DELAY
LR   OR   Length of packet in bitsRate of transmission in bits per sec   = seconds

RUN
10 cars5 cars/minute   =   2 minutes per car per link


FORMULA PROPAGATION DELAY
DS   OR   distance of link propagation speed in distance unit per sec   = seconds to cover distance 

RUN
100 km100 km/hr   =   1 hour "per caravan" per link


FORMULA End to End delay
 ( P - 1 )    +     [ N (  D trans   +   D prop   ) ]  

RUN
P = # of packets (caravans)
N = # of links

 ( 0 )    +     [ 2 (  2min   +   60min   ) ]     =     124 min   for carvan of 10 cars start to finish



9. Referring to the above problem, suppose now that when a car arrives at the second tollbooth, it proceeds through the tollbooth without waiting for the cars behind it. What is the end-to-end delay?



10. Suppose there are two links between a source and a destination. The first link has transmission rate 100 Mbps and the second link has transmission rate 10 Mbps. Assuming that the only traffic in the network comes from the source, what is the throughput for a large file transfer?



11. In this book we refer to a layer-4 PDU as a

Segment





1.1 What is the Internet?







1.1 What is the Internet? - Review


1. What is the difference between a host and an end System? List several different types of end systems. Is a web server an end system?

No difference - the book uses the terms interchangebly. A 'Host' or 'End System' could be anything - a web server, mail server, pc, or game console

2. The word protocol is often used to describe diplomatic relations How does Wikipedia describe dipomatic protocol?

Etiquette or an agreement between parties. A rule describing how activies whould be performed.

3. Why are standards important for protocols?

Protocols need standards to define format, sequence, and actions. People need this structure to create interoperable systems





1.2 The Network Edge







1.2 The Network Edge - Review




4. List six access technologies. Classify each one as home access, enterprise access, or wide-area wireless access

1. dial up over phone line - home

2. dsl over phone line - home or small office

3. cable to HFC (hybrid fiber coax) - home
With HFC the fiber runs from master headend to reginal headed, then converts to coax to serve up to 2000 homes

4. 100 Mbps switched ethernet - enterprise

5. Wifi - home and enterprise

6. 3G / 4G - wide area wireless


5. Is HFC transmission rate dedicated or shared among users? Are collisions possible in a downstream HFC Channel? Why or why not?

HFC bandwidth is shared. On the 'downstream channel', all packets originate from the provider headend, so there are no collisions.. Does this imply that data sent upstream from the homes to the provider can have collisions?


6. List the available residential access technologies in your city. For each type of access, provide the advertised downstream reate, upstream rate, and monthly price

commonly: dial-up, DSL, cable, fiber


7. What is the transmission rate of ethernet LANs?

4 options:

10 Mbps "ethernet" 802.3

100 Mbps "fast ethernet" 802.3u

1 Gbps "gigabit ethernet" 802.3z

10 Gbps "10 gig ethernet" 802.3ae


8. What are some of the physical media that Ethernet can run over?

twisted pair copper or fiber


9. Dial-up modems, HFC, DSL and FTTH are all used for residential access. For each of these, provide a range of transmission rates and comment on whether the transmission rate is shared or dedicated

Dial-up - up to 56kbps - dedicated bandwidth

ADSL - up to 24Mbps down and 2.5Mbps up - dedicated bandwidth

HFC - up to 42.8 Mbps and 30.7 up - shared bandwidth

FTTH - 10 to 20 Mbps down and 2 to 10 Mbps up - dedicated bandwidth


10. Describe the most popular wireless Interent access technologies today, compare and contrast them

802.11 Wifi - users transmit/receive via WAP wthin a few tens of meters. The WAP connects via wired.

3g/4g packets are transmitted over the same wireless insfrastructure used for phone data. Range is tens of KMs to base station (tower)





1.3 The Network Core







1.3 The Network Core - Review




11. Suppose there is exactly one packet switch between a sending host and a receiving host.

The transmission rate in Mbps between the sending host and the switch is R1

The transmission rate in Mbps between the switch and the receiving host is R2

Assuming that the switch uses store-and-forward packet switching, what is the total end-to-end delay to send a packet of length L bits? (ignore queuing, propagation delay, and processing delay)

Transmission begins at "T0" seconds

We will call "T1" the time of the first node's transmission delay = L/R1

for example, say node 1's "R" or rate of transmission is 10 bps

our packet's length, "L" is 100 bits

We have the information required to calculate node 1's transmission delay, dtrans

L/R --> 100bits/10bps = 10 seconds

since we have two nodes, we need to distinguish them from eachother in the notation,
so instead of calling this "node 1 dtrans", we call it L/R1 or simply "T1 seconds"

at "T1 seconds" the sending host completes transmission and since we are not counting dprop the entire packet is completely received at router at this instant.

The router begins to transmit to next hop..

We'll call "T2 seconds" the amount of time passed in T1, PLUS the required for the router to fully transmit. For example, the router's "R" is 20bps. The packet is the same as before, L=100bits. L/R = 5 seconds

T2 = T1 + L/R2

The end-end delay is L/R1 + L/R2

AKA

dtrans1 + dtrans2


12. What advantage does a circuit-switched network have over a packet-switched network?

Circuit-switched gives a dedicated channel . The resources needed along a path(buffers, transmission rate) are reserved for the duration of the session. There is no waiting in a buffer.

Circuit-switched can guarantee bandwidth for the call's duration.

The packet-switched internet cannot guarantee bandwitdth.


What advantage does TDM have over FDM in a circuit-switched network?

TDM = all of the bandwitdh for brief intervals

FDM = fraction of the bandwith for the entire time

FDM requires sophisticated analog hardware to shift signals into appropriate frequency bands - more complex than TDM


13. Suppose users share a 2Mbps link. And each user transmits continuously at 1 Mbps when transmitting, but each user transmits only 20% of the time.

a. When circuit switching is used, how many users can be supported?
2 users can be supported because each user needs 1Mbps and the link's bandwidth is 2Mbps

b. For the remainder of this problem, suppose packet switching is used. Why will there be essentially no queuing delay before the link if two or fewer users transmit at the same time? Why will there be a queuing delay if three users trasnsmit at the same time?
With two users on the line, bandwidth is full. A third user attempting to use the bandwidth would be queued

c. Find the probability that a given user is transmitting.
The probablitiy is 0.2 or 20%. We know this because the question states "each user is only transmitting 20% of the time"

d. Suppose now there are three users. Find the probability that at any given time, all three users are transmitting simultaneously. Find the fraction of time during which the queue grows.
0.23 = 0.008

The formula is PN(1 - P)Total - N
P = 0.2 (given)
N = 3 (same as total number of users in this case)
0.23(1 - 0.2)3 - 3

The answer 0.008 applies to both the probabliity that 3 of 3 users are transmitting AND the fraction of time during which the queue grows




14. Why will two ISP's at the same level of the hierarchy often peer with each other?

They avoid having to send traffic though their provider ISPs to reach eachother, saving money.


How does an IXP earn money?

IXP Internet Exchange Point is typically a standalone building with its own switches where multiple ISP's can connect and/or peer together for a fee.


15. Some contenet providers have created their own networks. Describe Google's network.

What motivates content providers to create these networks?

The private Content Provider network allows Google's data to avoid the public interent. And allows Google to deliver content to a user and bypass higher tier ISPs, saving money.





1.4 Delay, Loss, and Throughput in Packet-Switched Networks







1.4 Delay, Loss, and Throughput in Packet-Switched Networks - Review



16. Consider sending a packet from a source host to a destination host over a fixed router. List the delay components in the end-to-end delay. Which of these delays are constant and which are variable?

VARIABLE
dqueue - Queueing delay- bits wait before being processed within the router

CONSTANT
dproc - Processing delay- time within the router
dtrans - Transmission delay- time to put bits on the wire
dprop - Propagation delay- time for bits to travel on the wire


17. Using the Trans vs Prop Delap animation find combos that result in the packet reaching the destination after the sender finishes transmitting, and before the sender finishes transmitting

Ex1:

d = 1000 km
R = 512 kbps
L = 100 byte packet length
S = 2.8 x 108 meters/sec


FORMULA TRANSMISSION DELAY
LR   OR   Length of packet in bitsRate of transmission in bits per sec   = seconds

RUN
800 bits512,000 bps   =   .0015 sec or 1.5 msec = dtrans

Confirmed in animation above- transmission is complete at approx 1.5msec and first bit has NOT reached target

FORMULA PROPAGATION DELAY

DS   OR   distance of link in meterspropagation speed in meters per sec   = seconds 

CONVERSIONS

distance of 1,000km ---> 1,000,000 meters = D

propagation speed 2.8*108 meter/sec ---> 280,000,000 meters/sec = S

RUN THE FORMULA

1,000,000 meters280,000,000 meters/sec   =   0.0035 sec or 3.5 millisec = dprop

1.5ms dtrans < 3.5ms dprop
takes less time to put the bits on the wire than it does for them to travel across the wire..


----------------------------------------------------------------------------------------------------------
Ex2:

d = 1000 km
R = 512 kbps
L = 100 kilobyte packet length (longer than before)
S = 2.8 x 108 meters/sec


FORMULA TRANSMISSION DELAY
LR   OR   Length of packet in bitsRate of transmission in bits per sec   = seconds

RUN
8000 bits512,000 bps   =   .015 sec or 15 msec = dtrans

Confirmed in animation above- transmission is complete at approx 15 msec, and first bit has already reached target

RUN dprop FORMULA

1,000,000 meters280,000,000 meters/sec   =   0.0035 sec or 3.5 millisec = dprop

15ms dtrans > 3.5ms dprop
takes MORE time to put the bits on the wire than it does for them to travel across the wire


18. How long does it take a packet of length 1,000 bytes to progpagate over a link of distance 2,500km, propagation speed 2.5 x 108ms and transmission rate 2Mbps?

d = 2500 km
R = 2Mbps
L = 1000 byte packet length
S = 2.5 x 108 meters/sec

FORMULA PROPAGATION DELAY

DS   OR   distance of link in meterspropagation speed in meters per sec   = seconds 

CONVERSIONS

distance of 2500km ---> 2,500,000 meters = D

propagation speed 2.5*108 meter/sec ---> 250,000,000 meters/sec = S

RUN THE FORMULA

2,500,000 meters250,000,000 meters/sec   =   0.01 sec or 10 milisec = dprop



More generally, how long does it take a packet of length L to propagate over a link of distance d, propagation speed s, and transmission rate R bps?
Does this delay depend on packet length?
Does this delay depend on transmission rate?

dprop and dtrans are two seperate measures of time that dont depend on eachother

The question of "how long it takes a packet of length L to propagate over a link of distance D" doesnt really apply, because the length of the packet is irrelevant in terms of the propgation time. We think of propagtion time on a per bit basis, as well as a per packet. For a packet to progpagte, all of its bits must propagate. If we imagine a packet containing one single bit, that bit would move across the wire at whatever speed indicated by dprop.

dtrans comes into play because a very long packet of say 1,000,000 bits, must be put onto the wire one bit at a time. The propagation time of the first bit on the wire will be the same propgation time as the last bit on the wire. But they will reach the target at different times since they are seperated by the transmission delay time.

you could have a slow dprop and a fast dtrans, or vice versa

looking back at the original question-


More generally, how long does it take a packet of length L to propagate over a link of distance d, propagation speed s, and transmission rate R bps?
Does this delay depend on packet length?
Does this delay depend on transmission rate?

The packet length doesnt matter. If the question is how long it will take a packet to propagate, then the two variables are distance and speed. This is a measure of speed across the wire for a bit or bits, regardless of a packet's quanitity of bits. But remember that the actual arrival of the packet will depend on how far behind the last bits are from the first bits.. This is where transmission delay matters, and transmission delay varies depending on the length of the packet.

For example- 100 cars need to travel across the state. The distance 1s 5000 miles, and the cars can travel 50 mph. A car will need to drive 100 hours to cover the distance. However, all 100 cars arent necesarilly going to arrive at the same time- some will leave sooner than others.

So if you ask 'how long does it take for a car to travel 5000 miles at 50mph'? Then that is 100 hours. You could even say that is true for every car in a carvan of 100 or 1000. But practically it will take longer for multiple cars to cover that distance, depending on how long it takes for each one to initiate the trip.


19. Throughout questions.. these ignore delay.

Suppose HostA wants to send a large file to HostB.

The path has 3 links of rates
R1 = 500Kbps
R2 = 2Mbps
R3 = 1Mbps

A. Assuming no other traffic, what is the throughput for the file transfer?
500kbps since that is the slowest link

The "throughput" for a file transfer is min{Link1, Link2.... Link10}

B. Suppose the file is 4 million bytes. Dividing the file size by the throughput, roughly how long will it take to transfer the file?

file size = 32,000,000 bits

rate (slowest link) = 500,000 bps

32,000,000 / 500,000 = 64 seconds

Page 44..

If a file consists of F bits and the transfer takes T seconds for HostB to receive all bits,
then the "average throughput" of the transfer is F/T bits/sec

32,0000,000 bits / 64 sec = 7800 bits per second "average thoughput"




C. Repeat A. and B. but now with
R2 = 100Kbps
Throughput for the transfer is 100Kbps since that is the slowest link

Again dividing number of bits by thoughput rate of slowest link:
32,000,000 bits / 100,000 bps = 320 seconds



20. Suppose end system A wants to send a large file to end system B. At a very high level, describe how end system A creates packets from the file.

When one of these packets arrives to a router, what information in he packet does the router use to determine the link onto which the packet is fowrwarded?

Why is packet switching in the Internet analagous to driving from one city to another and asking for directions along the way?

End system A breaks the file into chunks, adding a header to each chunk which makes them "packets". Each header includes the IP address of the target. Packet switches use that IP to select outgoing links. In a sense the packet is 'asking' which direction to go, and the router points it to the right outbound interface based on the IP in the header.


21.

A. Queueing and Loss Animation- What is the max emission rate and the max transmission rate?

Max emission rate for this simulator is 500 packets/second
Max transmission rate for this simulator is 1000 packets/second


B. With those rates, what is the traffic intensity?
Traffic Intensity ratio is La/R

L = length of packet in bits

a = arriving number of packets per second

R = rate of transmission in bits per seccond


L bits per packet X a packets per second = a RATE of bits per second arriving at the queue

Ex: L=20 bits, a=10 packets/second.. La = 200 bits/second

Then divide that by R which is the transmission rate leaving the queue in bit/sec.
NOTE dont confuse this R with the previous R which we were divinding L by.

Dividing L/R gives a measure of seconds because we're dividing
quanitity of bits/bits per sec.. 100 bits/10bps = 10 seconds D transa measure of delay in seconds

Dividing La/R gives a RATIO because we're dividing a rate of bits per sec/another rate of bits per sec..

200bps inbound / 100bps oubound = ratio of 2. "For every 2 packets in, I can send 1 packet out." Resulting in queueing delays

Circling back..

B. With those rates, what is the traffic intensity?
Traffic Intensity ratio is La/R

But the question gives alternate terms of "emission rate" and "transmission rate"

La = emission rate of 500 packets/sec (inbound)

R = transmission rate of 1000 packets/sec (outbound)

500/1000 = traffic intensity ratio of 0.5
"For every half packet received, I can send one packet out"


C. Run the animation with these rates and determine how long it takes for packet loss to occur.
ans


D. Repeat the experiment a second time and determine again how long it takes for packet loss to occur. Are the values different?

ans





1.5 Protocol Layers and Their Service Models







1.5 Protocol Layers and Their Service Models - Review



22. List five tasks that a layer can perform.

error control

flow control

segmentation/reassembly

multiplexing

connection setup


Is it possible that one or more of these tasks could be performed by two or more layers?

Yes. For example error control can occur in different layers


23. What are the five layers of the IP stack and the principal responsibilites of each layer?

Application

Transport

Network

Link

Physical


24. What is an application-layer message?
the original payload- data generated by the sending app

A transport-layer segment?
encap the payload by adding transport header = new payload

A network-layer datagram?
encap the payload by adding network header = new payload

A link-layer frame?
encap the payload by adding link layer header = new payload


25. Which layers in the IP stack does a router process?
network layer + link + physical

Which layers does a link-layer switch process?
link layer + physical

Which layers does a host process?
all layers





1.6 Networks Under Attack







1.6 Networks Under Attack - Review



26. Difference between virus and worm?

ans


27. Describe how a botnet can be created and how it can be used for a DDoS attack

ans


28. Alice and Bob are exchanging packets. Trudy positions herself to capture all the packets end by Alice and send whatever she wants to Bob; she can also capture all the packets sent by Bob and send whatever she wants to Alice. What malicious things can Trudy do from this position?

ans





1.7 History of Comptuer Networking and the Internet







Chapter 2







Chapter 3





WORKSHEET TEMPLATE






CHAPTER / SECTION TITLE

1.

ans


2.

ans


3.

ans


4.

ans


5.

ans


6.

ans


7.

ans


8.

ans


9.

ans


10.

ans


11.

ans


12.

ans


13.

ans


14.

ans


15.

ans


16.

ans


17.

ans


18.

ans


19.

ans


20.

ans


21.

ans


22.

ans


23.

ans


24.

ans


25.

ans


26.

ans


27.

ans


28.

ans

HOME