Chapter 1.4: The Internet

The Internet · Study Questions
Network basicsProtocols and packetsIP, NAT, DNSURL, port, HTTPSWeb and searchSecurity
Sercan KÜLCÜ · Giresun University · Computer Engineering

Multiple Choice · Network Basics

Question 1: Which Wi-Fi Band?

The modem is in the living room, and the computer is in the bedroom two walls away. The connection drops often. Which band choice and reasoning is most appropriate?

C: As frequency rises, speed potential increases while range and wall penetration decrease. In a far room, 2.4 GHz is more stable. 6 GHz, on the contrary, is the band most affected by obstacles (A is wrong).

Output Question · Network Basics

Question 2: Download Time

In the best case (line at full speed, no overhead), how many seconds does each download take?
(a) a 1.2 GB file on an 80 Mbit/s line
(b) a 1 GB file on a 20 Mbit/s line
Take 1 GB = 1,000 MB and 1 byte = 8 bits.

Show answer

(a) 120 s · (b) 400 s

1.2 GB×10001,200 MB×89,600 Mbit÷80120 s
  • Line speed is given in bits, file size in bytes: convert to the same unit first.
  • (a) 1.2 GB = 1,200 MB = 1,200 × 8 = 9,600 Mbit; 9,600 ÷ 80 = 120 s.
  • (b) 1 GB = 8,000 Mbit; 8,000 ÷ 20 = 400 s.
  • Common mistake: forgetting to multiply by 8 (you get 15 s for a).

Multiple Choice · Network Basics

Question 3: Bandwidth or Latency?

A student who will make video calls has two options. A: 100 Mbit/s, latency ≈ 600 ms (satellite, GEO). B: 30 Mbit/s, latency ≈ 10 ms (fiber). Which is more suitable?

D: A video call needs only a few Mbit/s, but at 600 ms latency people talk over each other. For downloading a large file, bandwidth is what matters: 1 GB takes ≈ 80 s on A and ≈ 267 s on B.

Multiple Choice · Protocols

Question 4: Matching Protocols

Which of the following protocol–task pairs is wrong?

A: SMTP is the protocol for sending email (from client to server and between servers). IMAP is used to read messages in the mailbox; since the message stays on the server, it looks the same on the phone and the computer.

Step-by-Step Trace · Protocols

Question 5: A Packet, Layer by Layer

A browser sends an HTTP request. What does the packet look like after each layer, and what happens on the receiving side?

DataGET /announcements

The application layer produces “what to say”: the HTTP request.

TCPDataport, seq. no.

TCP header: port number and sequence number. A lost piece can be requested again.

IPTCPDatasource/destination IP

IP header: source and destination IP. Routers choose a path by looking only at this.

EthIPTCPDataMAC

The frame header (MAC address) is added; the bits are put on the cable or radio wave.

IPTCPData

At the receiver the process reverses: headers are removed from the bottom up.

TCPData

If the destination IP is this server, the IP header is read and removed.

Data

TCP orders the pieces by sequence number and finds the right application by port number.

DataGET /announcements

The web server receives exactly the request the browser produced.

SENDER (browser)
Application: produce HTTP request (data)
Transport  : add TCP header
Internet   : add IP header
Link       : add Eth header, send
RECEIVER (server)
Link       : remove Eth header
Internet   : remove IP header
Transport  : remove TCP header
Application: pass data to web server

Step-by-Step Trace · Protocols

Question 6: When Packets Arrive Out of Order

A message “HELLO, WORLD!” is split into 4 packets and sent over TCP. The packets arrive in the order #3, #1, #4, and #2 is lost on the way. What does the receiver do?

buffer#1#2#3#4no packets yet

The message is not sent in one piece; it is split into 4 pieces.

buffer#1#2#3#4

Each packet travels independently with its own header; routers choose the best path available at that moment for each packet.

buffer#1#2#3ORLD#4

#3 arrives first. Its place is known thanks to the sequence number.

buffer#1HELL#2#3ORLD#4!

#1 and #4 have arrived too. Packets can arrive out of order.

buffer#1HELL#2#3ORLD#4!#2 missing → resend

The receiver does not request or acknowledge #2: its ACKs keep saying it is still waiting for #2. The sender notices this and resends #2.

buffer#1HELL#2O, W#3ORLD#4!

#2 is resent and this time it arrives.

buffer#1HELL#2O, W#3ORLD#4!

Put in order by sequence number: HELL + O, W + ORLD + ! = “HELLO, WORLD!”.

split the message into 4 packets (#1..#4)
add a header to each packet:
  seq no, source, destination
send the packets (paths are independent)
receiver: put each arriving packet in the buffer
a missing piece is not acknowledged → it is resent
when all have arrived, order by seq no
join the message, hand it to the application

Step-by-Step Trace · Addressing

Question 7: Decimal to Binary: 200

The last octet of 172.16.5.200 is converted to binary by trying the weights from largest to smallest. What do number and bits become at each step?

Start: no bits written yet.

200 ≥ 128 → “1”, 200 − 128 = 72.

72 ≥ 64 → “1”, 72 − 64 = 8.

8 < 32 → “0”, number unchanged.

8 < 16 → “0”.

8 ≥ 8 → “1”, 8 − 8 = 0. Equality counts as “greater than or equal” too.

0 < 4 → “0”.

0 < 2 → “0”.

0 < 1 → “0”. All 8 weights used.

128164132016081402010

Check: 128 + 64 + 8 = 200 ✓.

number = 200
bits = ""
for each weight in 128,64,...,1
  if number >= weight then
    bits = bits + "1"
    number = number - weight
  otherwise
    bits = bits + "0"
print(bits)

Step-by-Step Trace · Addressing

Question 8: Local and Public IP with NAT

A phone at home (192.168.1.11) connects to a web server (198.51.100.20:443). The router’s public IP is 203.0.113.7. How do the packet’s addresses change at each step?

The source is the phone’s local (private) address; this address is not routed on the Internet.

The router replaces the source address and port with its own public address (NAPT).

The mapping is written to a table so the reply can later be matched to its owner.

The server sees only 203.0.113.7; it sends the reply there.

The router looks at destination port 61005: the mapping belongs to the phone.

The destination is translated back to the local address and port.

All devices at home look like a single address (203.0.113.7) from the outside.

phone: sends the packet
router: makes the source a public IP:port
router: writes the mapping to the NAT table
server: sends the reply to the address it sees
router: finds the mapping in the NAT table
router: translates the destination to the local address
phone: receives the reply

Step-by-Step Trace · Addressing

Question 9: DNS Resolution

A user opens www.kampus.edu.tr for the first time; no cache has a record. In what order does the query proceed? (Correct IP: 198.51.100.44)

Local caches are checked first: no record.

The question goes to the DNS resolver in the network settings.

The root server does not know the name but points to the .tr servers.

The .tr server does not know the full address either; it points to the authoritative server.

The authoritative server knows the record and answers.

The resolver keeps the answer for the TTL; the next query is answered immediately.

The IP is passed to the browser.

Now that the browser knows the IP, it connects to the web server. The name was resolved right to left, from general to specific.

check browser and OS cache
ask the resolver (ISP DNS)
resolver → root server
resolver → .tr server
resolver → authoritative server
cache the answer (TTL)
pass the IP to the browser
browser connects to the server

Output Question · Addressing

Question 10: Parts of a URL

Split the URL below into protocol, domain name, path, query and fragment. Which part is not sent to the server? Which port is used?

https://kutuphane.ornek.edu.tr/search?book=java&page=3#results
Show answer httpsprotocolkutuphane.ornek.edu.trdomain name/searchpath?book=java&page=3query#resultsfragment
  • Protocol: https (encrypted HTTP) → default port 443
  • Domain name: kutuphane.ornek.edu.tr (converted to an IP by DNS)
  • Path: /search · Query: ?book=java&page=3 (two name=value pairs)
  • Fragment: #results → not sent to the server; the browser scrolls to that part of the page.

Multiple Choice · Addressing

Question 11: The Padlock in the Address Bar

A browser shows the “connection is secure” (padlock) indicator on a site. What does this indicator guarantee?

C: HTTPS encrypts data against eavesdropping on the way; the certificate check verifies that you are really talking to that domain. Phishing sites can also obtain certificates for their own domains and use HTTPS, so the padlock does not mean the site is trustworthy.

Step-by-Step Trace · Web

Question 12: The Journey of a Web Request

The user types https://www.ornek.edu.tr/announcements and presses Enter. Follow the steps; the server responses accumulate in the output.

The browser splits the URL: https → port 443.

DNS resolution gives the IP address of the domain name.

First the TCP connection, then TLS negotiates the encryption key.

HTTP request over the encrypted channel: “give me the /announcements resource”.

The server reads the file, or pulls the announcements from a database and builds HTML.

200 OK: success. If the resource were not found, 404 would be returned.

While the HTML is read, the CSS, JavaScript and images it needs are fetched with separate requests.

HTML structure, CSS appearance, JavaScript behavior: combined and drawn on screen.

split the URL into parts
DNS: ask for the domain name's IP
open the TCP connection + TLS negotiation
send GET /announcements
server prepares the page
response: status code + HTML
request CSS, JS, images separately
draw the page on screen

Output Question · Web

Question 13: Search with an Inverted Index

A search engine has crawled three sites. Build the inverted index and find the result of each query (all query words must appear; - excludes).

S1: "network security password"
S2: "network cable price"
S3: "password manager security"

(a) network security   (b) password
(c) network -cable    (d) cable password
Show answer network→ S1, S2security→ S1, S3password→ S1, S3cable→ S2price→ S2manager→ S3

(a) {S1,S2} ∩ {S1,S3} = S1 · (b) S1, S3 · (c) {S1,S2} − {S2} = S1 · (d) {S2} ∩ {S1,S3} = no result

The Web is not browsed at query time; the word-to-site lists are intersected. The results are then ranked by criteria such as relevance, freshness and links.

Multiple Choice · Web

Question 14: An Effective Search Phrase

You want to find PDF documents containing the word “scholarship” only on sites with the gov.tr extension. Which query is appropriate?

A: site: limits the search to a given domain, filetype: to a document format. B searches for the exact phrase with these three words side by side; C excludes what you want; D mixes up the operators.

Output Question · Web

Question 15: To, Cc, Bcc

Ali sends an email like this: To: Ayşe · Cc: Mehmet · Bcc: Zeynep.
(a) Whom does Ayşe see in the recipient list?
(b) If Mehmet clicks “Reply all”, who receives the reply?
(c) Who knows that Zeynep received it?

Show answer AliAyşeToMehmetCcZeynepBcc
  • (a) Ayşe and Mehmet. Bcc recipients are not visible to the other recipients.
  • (b) Ali and Ayşe. Zeynep does not appear in the list, so the reply does not go to her.
  • (c) Only Ali (and Zeynep herself).

Multiple Choice · Security

Question 16: The Three Goals of Security

An attacker breaks into the student information system and changes a student’s midterm grade from 45 to 85. Which goal of information security (CIA) is violated first and foremost?

B: Integrity means information is not changed without permission; hashes and digital signatures protect it. Merely reading the grade would be a confidentiality breach, and bringing the system down would be an availability breach.

Output Question · Security

Question 17: Password Length

An attacker can make 10 billion (1010) guesses per second. How long does it take to try all possibilities in the worst case?
(a) 8 lowercase letters (26 symbols)
(b) 8 characters, letters + digits + symbols (94 symbols)
(c) 12 lowercase letters (26 symbols)

Show answer (a)≈ 21 s(b)≈ 7 days(c)≈ 110 daysbar length: time (logarithmic)
  • (a) 268 ÷ 1010 ≈ 21 seconds
  • (b) 948 ÷ 1010 ≈ 6.1×105 s ≈ 7 days
  • (c) 2612 ÷ 1010 ≈ 9.5×106 s ≈ 110 days

Each character multiplies the number of possibilities: length is more effective than adding symbol types. (Passwords found in a dictionary are guessed much faster.)

Output Question · Security

Question 18: Firewall Decisions

Rules are tried from top to bottom; the first matching rule applies. The admin IP is 192.0.2.50. What is the decision for each incoming connection?

1 Inbound 443  Anyone    Allow
2 Inbound 22   Admin IP  Allow
3 Inbound 23   Anyone    Block
4 Inbound all  Anyone    Block

(a) 203.0.113.25 → 443
(b) 192.0.2.50   → 22
(c) 203.0.113.25 → 22
(d) 203.0.113.25 → 23
(e) 203.0.113.25 → 80
Show answer
Matching ruleDecision
(a)1Allow
(b)2Allow
(c)4 (source does not match rule 2)Block
(d)3Block
(e)4 (default deny)Block

Good practice: block everything first, then allow only the necessary ports. Telnet (23) is closed because it is unencrypted. A firewall alone does not stop a harmful file the user downloaded themselves.

Multiple Choice · Security

Question 19: Not a Phishing Sign

Which of the following is not a sign that an email is phishing?

D: Typing the address yourself instead of clicking the link and finding the announcement on the official site verifies the message through a separate channel; it is the recommended protection. A is a double-extension executable, B a fake domain, C urgency and a password request.

Multiple Choice · Security

Question 20: 3-2-1 Backup

Elif keeps her thesis files on her laptop; she also copies them to an external disk that is always connected to the computer and to a USB stick on her desk. According to the 3-2-1 rule, what is the most important gap?

B: There are 3 copies and 2 different media (SSD, external disk/USB), but all of them are in the same room. Fire, theft or ransomware could destroy all of them at once. Also, an always-connected disk can be hit by ransomware.

The End

The Internet: Study Questions
Lecture slides: Chapter 1.4: The Internet · Lecture notes
1 / 1 Sercan KÜLCÜ. All rights reserved.