Internet

OIM3600
OIM3600

Rounters

  • Try tracert -d www.google.com in Command Prompt (Windows),
    traceroute -n www.google.com in Terminal (macOS/Linux)
  • Try again without -d (or -n)
OIM3600
OIM3600

Protocols

  • TCP/IP
  • UDP
  • DNS
  • DHCP
  • HTTP/HTTPS, SMTP/POP3/IMAP, FTP/SFTP, SSH, WebSocket, ...
OIM3600

TCP/IP

  • IP
    • #.#.#.# (IPv4)
    • #:#:#:#:#:#:#:# (IPv6)
  • TCP
  • Port
    • 80: HTTP
    • 443: HTTPS
OIM3600
OIM3600
OIM3600
OIM3600
OIM3600
Feature TCP UDP
Reliability Reliable Not reliable
Data Integrity Ensures data integrity No data integrity guarantee
Sequencing Ensures data sequencing No data sequencing
Connection Connection-oriented Connectionless
Speed Slower due to reliability Faster due to lack of reliability
Flow Control Provides flow control No flow control
Usage Web browsing, email, file transfer Streaming, real-time applications
OSI Layer Transport Layer (Layer 4) Transport Layer (Layer 4)
OIM3600

DNS

  • Try nslookup www.babson.edu
OIM3600
Domain Name IP Addresss
localhost 127.0.0.1
google.com 142.251.35.174
github.com 140.82.114.4
one.one.one.one 1.1.1.1
babson.edu 155.48.7.191
www.babson.edu 34.226.183.173
OIM3600

DHCP

OIM3600

HTTP

OIM3600

HTTPS

OIM3600

https://www.example.com

OIM3600

https://www.example.com/

OIM3600

https://www.example.com/path

OIM3600

https://www.example.com/file.html

OIM3600

https://www.example.com/folder/

OIM3600

https://www.example.com/folder/file.html

OIM3600

https://www.example.com/folder/file.html

OIM3600

https://www.example.com/folder/file.html

OIM3600

https://www.example.com/folder/file.html

OIM3600

https://www.example.com/folder/file.html

OIM3600

https://www.example.com/folder/file.html

OIM3600
OIM3600

HTTP Requests


GET

POST

...
OIM3600

HTTP Request Header


GET / HTTP/1.1
Host: www.example.com
...

OIM3600

HTTP Request Header

Examples:

GET / HTTP/1.1
Host: www.babson.edu
...

GET /search?q=cats HTTP/1.1
Host: www.google.com
...
OIM3600

HTTP Response Header


HTTP/1.1 200 OK
Content-Type: text/html
...

OIM3600

Example (HTTP via curl)

  • Request
    curl -I http://www.babson.edu
    ...
    
  • Response
    HTTP/1.1 301 Moved Permanently
    Location: https://www.babson.edu/
    ...
    
OIM3600

Another Example (HTTPs via curl)

  • Request
    curl -I https://www.babson.edu/something-funny
    ...
    
  • Response
    HTTP/1.1 404 Not Found
    ...
    
OIM3600

200 OK
301 Moved Permanently
302 Found (or Moved Temporarily)
304 Not Modified
307 Temporary Redirect
401 Unauthorized
403 Forbidden
404 Not Found
418 I'm a Teapot
500 Internal Server Error
503 Service Unavailable
...

OIM3600

418 - I’m a teapot

  • Request
    curl -I -X GET https://www.google.com/teapot
    ...
    
  • Response
    HTTP/1.1 418 I'm a Teapot
    ...
    
OIM3600

Another 302/301 Example

GET / HTTP/1.1
Host: BabsonRejects.com
...
GET / HTTP/1.1
Host: BentleyRejects.com
...
OIM3600
OIM3600
OIM3600
OIM3600

Activity: pass a mail/envolop to a student

sheme, or protocol

Use Chrome Incognito mode and Dev Tool on www.babson.edu and www.babson.edu/index.php

https://twitter.com/alexxubyte/status/1708863540067696878