Skip to content

Latest commit

 

History

History
78 lines (43 loc) · 2.91 KB

02-internet.md

File metadata and controls

78 lines (43 loc) · 2.91 KB

Internet

Websites on the Internet

How do they work?

https://projects.propublica.org/graphics/images/data-institute/presentations/how-websites-work.pdf

Internet Basics

https://developer.mozilla.org/en-US/docs/Learn/Common_questions/How_does_the_Internet_work

  • Internet - a network of networks
  • "World Wide Web" - a service built on top of the internet's infrastructure (other services include e-mail and IRC chat, neither of which use HTTP)
    • HTML - Hypertext Markup Language
    • HTTP - Hypertext Transfer Protocol

DNS Lookup

Source: Mozilla Developer Network

❇️ Example

There are lots of programs that can resolve a domain name for you, one of those is dig (domain information groper).

dig google.com +short

❇️ Example

Let's set up a custom domain!

  1. In the GitHub repo, create a file called CNAME with the name of the domain

  2. Set up the apex domain name to point to GitHub's servers in Namecheap:

    https://help.github.com/en/github/working-with-github-pages/managing-a-custom-domain-for-your-github-pages-site#configuring-an-apex-domain

  3. Check that the domain is correct using dig

Routing

Data travels sent over the internet is chopped up and sent in packets. Here is what an IP packet looks like. It has a header which contains the metadata and a payload which contains the data. Different protocols handle packets differently. For example, some protocols like those you might use to stream video will tolerate packet loss, other protocols like TCP/IP which is used to transmit websites don't).

Routers route those packets to their correct destinations based on the metadata the packet carries.

https://en.wikibooks.org/wiki/A-level_Computing/AQA/Computer_Components,_The_Stored_Program_Concept_and_the_Internet/Structure_of_the_Internet/Packet_switching

Here is a strange videos:

❇️ Example

You can use traceroute to see how your request is routed to its destination.

traceroute google.com

The Internet has Layers

Source: Wikimedia Commons

If you're really interested:

And if you're not: