Networks Flashcards
Consider a 1 Gbps LAN “a.com”, with a local HTTP cache and a local DNS server, connected to the Internet through an access (bottleneck) link of 1 Mbps. Suppose that there are two user machines, m1.a.com and m2.a.com, in the network a.com. Suppose the user at m1.a.com types in the URL www.b.com/bigfile.htm into a browser to retrieve a large file of 1 G bits (1000 M bits) from another 1 Gbps LAN “b.com” on the Internet (via a 1 Mbps router).
(a) List the sequence of DNS and HTTP messages sent/received from/by m1.a.com, and any that leave/enter the a.com network.
(b) how long would it take assuming the propagation time from a.com to anywhere on the internet is 500 msec?
(a) 1. m1.a.com -> Local HTTP Cache 2. Cache is empty, therefore go to DNS server: Local HTTP Cache -> Local DNS Server 3. Local DNS Server -> Root DNS Server 4. Root DNS Server -> Local DNS Server 5. Local DNS Server -> .com DNS Server 6. .com DNS Server -> Local DNS Server 7. Local DNS Server -> b.com DNS Server 8. b.com DNS Server -> Local DNS Server 9. Local DNS Server -> Local HTTP Cache 10. Cache attempt to obtain information: Local HTTP Cache -> b.com 11. b.com -> Local HTTP Cache 12. Local HTTP Cache -> m1.a.com
(b)
1005 sec
Minimum Distribution time for Client-Server and P2P Architectures
Where F = file size u(s) = upload rate of the server u(i) = upload rate at user i N = number of peers dmin = minimum download time of any peer
Client-Server:
Min Dist = max( F * N / u(s), F / dmin)
P2P Dist:
Min Dist = max( (F / u(s), f/dmin ), (N * F / u(s) ) + N * u(i) )
Utilization
U = (L / R) / (RTT + L / R)
Where L = packet size
R = rate
RTT = round-trip time
OSI (Open Systems Interconnection) Model
Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Link Layer
TCP/IP Model
Application Layer
Transport Layer
Internet Layer
Link Layer
Why use Layered Protocols?
(1) Provides an abstraction for upper layers, so that the upper layers can use the services without worrying about how they operate.
(2) Different types of upper layers can use the same lower layer.
What is the difference between connection-oriented and connection-less?
Connection-oriented: Establish a connection before any data is transferred. It’s reliable and in-order, needed when we want to make sure data from a particular layer is transferred correctly. Think TCP
Connection-less: No connection is established beforehand, and data is not guaranteed to be reliable or in-order. Used when minimal over is preferred and reliability isn’t critical. Think UDP
FDM (Frequency Division Multiplexing)
Each circuit continually gets a fraction of the bandwidth.
STDM (Synchronous Time Division Multiplexing)
Each circuit gets all of the bandwidth periodically during brief intervals of time.
A cable TV system has 100 commercial channels; each of them is alternating between programs and advertising. Is this more like TDM (Time Division
Multiplexing) or like FDM (Frequency Division Multiplexing)?
The TV System is like FDM insofar as each channel is getting a fraction of the bandwidth at any given time, and the alternating between programs and advertising is like TDM, since each program / advertisement is getting the full bandwidth when it airs.
With the help of a diagram, describe the different components and the operation of an electronic mail application.
Client 1 -> over SMTP -> Client 1 Server -> Client 2 Server -> PoP3/IMAP/HTTP -> Client 2
We have seen a number of application-layer protocols. Give examples and explain the difference between (i) stateless and stateful protocols, (ii) push and pull protocols, and (iii) persistent and non-persistent protocols.
(i)
Stateless: HTTP 1.0 (without cookies), PoP3 (logging onto a different client will not be able to see messages that have been read since they’ve been deleted)
Stateful: IMAP
(Preserving state vs. not)
(ii)
Push: SMTP
Pull: HTTP, IMAP, PoP3
(iii)
Persistent: HTTP 1.1
Non-persistent: HTTP 1.0
Mention at least three techniques to scale client-server application architectures (i.e. reduce their load on the server and/or network for a large number of clients)?
(1) Caching
(2) Multiple Servers
(3) TCP Congestion Control
(4) Increase the bottleneck of the network
(a) A client sends a 128-byte request to a server located 100 km away over a 1-Gbps optical fiber, and then waits for a reply to get back. What is the utilization of the link (i.e. percentage of time the link is busy transmitting) during this transaction? Take the speed of light in fiber optics to be 200 km/msec. (b) Consider the situation of part (a) again. Compute the minimum possible response time both for the 1-Gbps link and for a 1-Mbps link. What conclusion can you draw?
(a)
U = L / R / (RTT + L / R)
L / R = (128 * 8 bits) / 1,000,000,000 bps
= 0.001 msec
RTT = 1 msec
Therefore U = 0.001
(b)
1-Mbps: 1.001 msec
1-Gbps: 1.000001 msec
Conclusion: Negligible.
Bandwidth Delay Product
= capacity (bits / s) * RTT
How many bits you need for a sequence number
Max N = (RTT + Tx) / Tx
(Tx = transmission time of a packet)
Then decide how many bits are needed to obtain N
Connection Establishment in TCP
1) Sender sends a SYN with sequence # x
2) Receiver sends a SYN with sequence # y
3) Receiver sends an ACK with sequence # x + 1
4) Sender sends an ACK with sequence # y+1
What is the role of the network layer?
To move packets from a sending host to a receiving host.
What is a virtual-circuit network?
A network that provides only connection service at the network layer (as opposed to connection-less). This is implemented in the routers in the network core as well as in the end systems.