knowt logo

codehs unit 11 the internet

11.1: welcome to the internet
  • The internet connects people all around the world and stores an incredible amount of information online. 

  • The internet has been used for citizen science, to solve very complex and time consuming issues in a matter of days.

  • The internet has been used for e-commerce, entertainment, crowdfunding, and travel

  • The internet has given many people access to large amounts of information including scientific publications and online courses

  • The internet has some negatives such as anonymity and censorship

11.2: internet hardware

Network: made up of computers all connected to different routers, which transfer information between those computers.

Bit sending: can be sent using electricity (ethernet), light (fiber-optic cables), or radio (wifi, cell)

Bitrate: The rate at which a system can send bits. 1 bit per second = low and 1 megabit per second = high

Latency: The speed of a bit going from the sender to the receiver. The lower the latency, the faster.

Bandwidth: The capacity of data transfer, measured by bitrate. High bitrate = high bandwidth

11.3: internet addresses

Internet protocol (IP): A protocol that defines the layout of an internet address (IP address). 

IP address: a series of numbers that is unique to every computer. The first 2 letters specify the network, the next specify a sub network (region), the next is a sub sub network, and the last specifies the exact location.

Addressing: allows computers to send and receive information by giving each computer an individual address. This allows other computers to know where to send information, and who is sending information.

IPv4: An outdated version of IP addresses, containing 32 bits (2^32). It has been around since the 80s.

IPv6: The version of IP addresses that we are currently switching over to. It contains 128 bits (2^128). 

11.4: viewing websites

Server: An address that sits at a certain location and listens to requests from computers. 

Step 1: the URL (uniform resource locator)

Specifies exactly what resource you want, and where it is located. The URL is made up of the domain (where the resource is located), and the path (the exact resource you're requesting). 

Step 2: the request

Your request is sent from your computer and will be forwarded to the server that is located at the website/thing you are requesting. 

Step 3: the response

The server will then send that resource back to your computer/browser over the internet.

Step 4: rendering the request

The computer will then take the resource and render it into the browser window for you to view. 

This all happens in less than a second. 

11.5: DNS

How do two computers find each other? While IP addresses are good for the computer, it is hard for humans to remember these. 

DNS (domain name system)

Translates names into IP addresses. Different websites will register domains, which the DNS will then match to a specific IP address.

Step 1: check memory 

The computer will check the cache to see if the address is one that you have already visited recently (to save storage)

Step 2: ask the root server

The DNS will ask a root server to look at all the top level domains and find a certain domain (.com, .edu, etc). It then sends it an IP address

Step 3: ask the top level domain server

The DNS will ask the top level domain to look for a certain domain that is it in charge of (wikipedia, codehs, etc), and it will send back an IP address

Step 4: as a hosting server

The DNS will ask the second level domain for a certain subdomain (www, about, info, etc) that it is looking for, the second level domain will then send an IP address

Stage 5: saving in cache

The computer will save the domain/IP address so it doesn't have to go through the process again.

This system is scalable. Each layer is only in charge of a small amount of information, and it is easy to add more elements/new layers. It is also much faster to only search one layer versus searching the entire internet.

DNS hierarchy:

  1. Root server 

  2. Top level domain (com, gov, edu, org)

  3. Second level domain (google.com, codehs.me)

  4. Sub domain (karel.codehs.me)

11.6: routing

Routing

The process of sending data from one computer to the other across networks. The data is sent through routers, which determine the route that the data will take to reach its destination. 

Every computer will connect to a router, and the router will forward every request that the computer has. Versus having every computer connected to one another, which becomes impossible with billions of different computers. 

Sending messages

The router will take the message that the computer sent, and then calculate the best low cost route. It calculates which path is the fastest, which connection is the best, which router is the most reliable, and which is the shortest. 

Redundancy

The redundancy in the amount of different routes that information can take is very important to the internet functioning properly. The multiple paths allow the information to still move between computers because it has multiple paths. If a few routers break, the system will still work. This makes the system fault tolerant, scalable, and reliable. 


11.7: packets and protocols

All data sent over the internet is sent through several packets. Packets are units of data that are sent over a network. 

All packets have metadata, which will tell you where the packet is going, who the packet is from, and the size of the packet.

Once all the packets arrive, they are pieced back together to form the full resource.

IP addresses control the layout of all packets.

TCP (transmission control protocol): a protocol that allows you to send and receive multiple packets between two computers. TCP will check that all packets arrive and are put back together in the correct order. 

With TCP, one more layer of information is added to the packet. We will also know the packet number, which indicates the order to put the packets back together.

If one number is missing, TCP will just rerequest the packet.

The data inside packets is structured with HTTP (hypertext transfer protocol), a protocol that standardizes the language for talking to web servers to send and receive web resources. This protocol, if all computers decide to use it, allows computers to communicate with web servers with ease.

HTML (hypertext markup language): the information that HTTP is defining

TCP/IP, DNS, and routing all work together to send packets across the internet. HTTP makes sure that the information inside the packet is understandable. 





The full process

Step 1: the URL

Using the domain and the path, the URL will locate where on the internet this resource is at and what exactly you are requesting.

Step 2: create an HTTP request

The computer will create a (hypertext transfer protocol) request to the host, asking to get the certain resource that you are asking for.

Step 3: using DNS to get the IP address

The DNS will then convert the domain into an actual IP address.

Step 4: TCP/IP breaks the request into packets

The TCP/IP will break the request into packets containing the sender, the receiver, the size, and the order.

Step 5: packets are routed to the correct location

Now, the packets are sent through routers to the server's IP address.

Step 6: the original request is pieced together from the packets

The request is now pieced together for the server to see the full request.

Step 7: the server creates an HTTP response

The server will now create an HTTP response to the sender's request.

Step 8: TCP breaks the response into packets

The TCP/IP will break the response into packets containing the sender, the receiver, the size, and the order.

Step 9: the response packets are routed to the computer

Now, the packets are sent through routers to the computer's IP address.

Step 10: the response is pieced together

The file is pieced back together using the packets. If any packets are missing, TCP will re-request them.

Step 11: the page is rendered!

The browser request is rendered and able to be viewed. It all happens in less than a second.


11.8: sequential, parallel, and distributed computing

Sequential computing: completes one task at a time, in order. 1 task is put through the processor to reach the result. Cons: with tens or hundreds of tasks to be completed, the computer will be slowed down greatly.

Parallel and distributed computing: completes multiple tasks at a time, simultaneously. Instead of using just one processor, the tasks will have multiple processors to be put through. This way, the process is much faster. Parallel computing is usually done with just one computer, with multiple processors. Distributed computing is usually done with several autonomous computing systems working on divided tasks.


Sequential pros/cons:

  • Slower

  • Does one task at a time in order

  • Easier to find bugs

  • No setup needed

Parallel pros/cons:

  • Faster

  • Completes tasks simultaneously

  • Difficult to find bugs

  • Difficult to use and set up correctly

Distributed pros/cons:

  • Scalable

  • Fault-tolerant

  • Reliable

  • Complex

  • Expensive to maintain


11.9: cybersecurity

All information on the internet is sent through shared wires. This means that private information can be viewed by criminals.

Cybercrime:

  • Identity theft

  • Stealing money

  • Stealing private information

  • Controlling private computers

Cyberwarfare:

  • Hacking into government computer systems, which control communication, transportation, water, energy production

DDOS (distributed denial of service) attack: spams a web server with so many requests that it breaks down/crashes. Valuable information can be released as it crashes.

DNS spoofing: Pretends to be a DNS name resolver, but gives your computer the wrong IP address sending you to a fake website. 

Solution: cybersecurity. Has protocols to encrypt and decrypt information, and has security software. Follows the best practices, as most cybersecurity breaches happen due to human error.

Cryptography: devices on the internet will encrypt their information. Some examples of standard cryptography are SSL/TLS, and https://.

Public and private key: the public key encrypts and the private key decrypts.

11.11

Digital millennium copyright act: Prevents online theft, the reproduction or redistribution of copyrighted works.

Copyright and creative credit: To access and share content, we find ethical and legal ways to do so. Copyright is a form of creative protection, usually for artistic works (movies, tv shows, etc). Any original work is protected by copyright.

All rights reserved: creator reserves all rights

Some rights reserved: creator may allow for reuse or modification as long as they are cited as the creator

Public domain: creator has dedicated the work to the public and waived all rights

Taking pictures, quotes, or videos and passing them off as your own violates copyright.

Distributing copyrighted materials over file-sharing networks violates copyright.




ES

codehs unit 11 the internet

11.1: welcome to the internet
  • The internet connects people all around the world and stores an incredible amount of information online. 

  • The internet has been used for citizen science, to solve very complex and time consuming issues in a matter of days.

  • The internet has been used for e-commerce, entertainment, crowdfunding, and travel

  • The internet has given many people access to large amounts of information including scientific publications and online courses

  • The internet has some negatives such as anonymity and censorship

11.2: internet hardware

Network: made up of computers all connected to different routers, which transfer information between those computers.

Bit sending: can be sent using electricity (ethernet), light (fiber-optic cables), or radio (wifi, cell)

Bitrate: The rate at which a system can send bits. 1 bit per second = low and 1 megabit per second = high

Latency: The speed of a bit going from the sender to the receiver. The lower the latency, the faster.

Bandwidth: The capacity of data transfer, measured by bitrate. High bitrate = high bandwidth

11.3: internet addresses

Internet protocol (IP): A protocol that defines the layout of an internet address (IP address). 

IP address: a series of numbers that is unique to every computer. The first 2 letters specify the network, the next specify a sub network (region), the next is a sub sub network, and the last specifies the exact location.

Addressing: allows computers to send and receive information by giving each computer an individual address. This allows other computers to know where to send information, and who is sending information.

IPv4: An outdated version of IP addresses, containing 32 bits (2^32). It has been around since the 80s.

IPv6: The version of IP addresses that we are currently switching over to. It contains 128 bits (2^128). 

11.4: viewing websites

Server: An address that sits at a certain location and listens to requests from computers. 

Step 1: the URL (uniform resource locator)

Specifies exactly what resource you want, and where it is located. The URL is made up of the domain (where the resource is located), and the path (the exact resource you're requesting). 

Step 2: the request

Your request is sent from your computer and will be forwarded to the server that is located at the website/thing you are requesting. 

Step 3: the response

The server will then send that resource back to your computer/browser over the internet.

Step 4: rendering the request

The computer will then take the resource and render it into the browser window for you to view. 

This all happens in less than a second. 

11.5: DNS

How do two computers find each other? While IP addresses are good for the computer, it is hard for humans to remember these. 

DNS (domain name system)

Translates names into IP addresses. Different websites will register domains, which the DNS will then match to a specific IP address.

Step 1: check memory 

The computer will check the cache to see if the address is one that you have already visited recently (to save storage)

Step 2: ask the root server

The DNS will ask a root server to look at all the top level domains and find a certain domain (.com, .edu, etc). It then sends it an IP address

Step 3: ask the top level domain server

The DNS will ask the top level domain to look for a certain domain that is it in charge of (wikipedia, codehs, etc), and it will send back an IP address

Step 4: as a hosting server

The DNS will ask the second level domain for a certain subdomain (www, about, info, etc) that it is looking for, the second level domain will then send an IP address

Stage 5: saving in cache

The computer will save the domain/IP address so it doesn't have to go through the process again.

This system is scalable. Each layer is only in charge of a small amount of information, and it is easy to add more elements/new layers. It is also much faster to only search one layer versus searching the entire internet.

DNS hierarchy:

  1. Root server 

  2. Top level domain (com, gov, edu, org)

  3. Second level domain (google.com, codehs.me)

  4. Sub domain (karel.codehs.me)

11.6: routing

Routing

The process of sending data from one computer to the other across networks. The data is sent through routers, which determine the route that the data will take to reach its destination. 

Every computer will connect to a router, and the router will forward every request that the computer has. Versus having every computer connected to one another, which becomes impossible with billions of different computers. 

Sending messages

The router will take the message that the computer sent, and then calculate the best low cost route. It calculates which path is the fastest, which connection is the best, which router is the most reliable, and which is the shortest. 

Redundancy

The redundancy in the amount of different routes that information can take is very important to the internet functioning properly. The multiple paths allow the information to still move between computers because it has multiple paths. If a few routers break, the system will still work. This makes the system fault tolerant, scalable, and reliable. 


11.7: packets and protocols

All data sent over the internet is sent through several packets. Packets are units of data that are sent over a network. 

All packets have metadata, which will tell you where the packet is going, who the packet is from, and the size of the packet.

Once all the packets arrive, they are pieced back together to form the full resource.

IP addresses control the layout of all packets.

TCP (transmission control protocol): a protocol that allows you to send and receive multiple packets between two computers. TCP will check that all packets arrive and are put back together in the correct order. 

With TCP, one more layer of information is added to the packet. We will also know the packet number, which indicates the order to put the packets back together.

If one number is missing, TCP will just rerequest the packet.

The data inside packets is structured with HTTP (hypertext transfer protocol), a protocol that standardizes the language for talking to web servers to send and receive web resources. This protocol, if all computers decide to use it, allows computers to communicate with web servers with ease.

HTML (hypertext markup language): the information that HTTP is defining

TCP/IP, DNS, and routing all work together to send packets across the internet. HTTP makes sure that the information inside the packet is understandable. 





The full process

Step 1: the URL

Using the domain and the path, the URL will locate where on the internet this resource is at and what exactly you are requesting.

Step 2: create an HTTP request

The computer will create a (hypertext transfer protocol) request to the host, asking to get the certain resource that you are asking for.

Step 3: using DNS to get the IP address

The DNS will then convert the domain into an actual IP address.

Step 4: TCP/IP breaks the request into packets

The TCP/IP will break the request into packets containing the sender, the receiver, the size, and the order.

Step 5: packets are routed to the correct location

Now, the packets are sent through routers to the server's IP address.

Step 6: the original request is pieced together from the packets

The request is now pieced together for the server to see the full request.

Step 7: the server creates an HTTP response

The server will now create an HTTP response to the sender's request.

Step 8: TCP breaks the response into packets

The TCP/IP will break the response into packets containing the sender, the receiver, the size, and the order.

Step 9: the response packets are routed to the computer

Now, the packets are sent through routers to the computer's IP address.

Step 10: the response is pieced together

The file is pieced back together using the packets. If any packets are missing, TCP will re-request them.

Step 11: the page is rendered!

The browser request is rendered and able to be viewed. It all happens in less than a second.


11.8: sequential, parallel, and distributed computing

Sequential computing: completes one task at a time, in order. 1 task is put through the processor to reach the result. Cons: with tens or hundreds of tasks to be completed, the computer will be slowed down greatly.

Parallel and distributed computing: completes multiple tasks at a time, simultaneously. Instead of using just one processor, the tasks will have multiple processors to be put through. This way, the process is much faster. Parallel computing is usually done with just one computer, with multiple processors. Distributed computing is usually done with several autonomous computing systems working on divided tasks.


Sequential pros/cons:

  • Slower

  • Does one task at a time in order

  • Easier to find bugs

  • No setup needed

Parallel pros/cons:

  • Faster

  • Completes tasks simultaneously

  • Difficult to find bugs

  • Difficult to use and set up correctly

Distributed pros/cons:

  • Scalable

  • Fault-tolerant

  • Reliable

  • Complex

  • Expensive to maintain


11.9: cybersecurity

All information on the internet is sent through shared wires. This means that private information can be viewed by criminals.

Cybercrime:

  • Identity theft

  • Stealing money

  • Stealing private information

  • Controlling private computers

Cyberwarfare:

  • Hacking into government computer systems, which control communication, transportation, water, energy production

DDOS (distributed denial of service) attack: spams a web server with so many requests that it breaks down/crashes. Valuable information can be released as it crashes.

DNS spoofing: Pretends to be a DNS name resolver, but gives your computer the wrong IP address sending you to a fake website. 

Solution: cybersecurity. Has protocols to encrypt and decrypt information, and has security software. Follows the best practices, as most cybersecurity breaches happen due to human error.

Cryptography: devices on the internet will encrypt their information. Some examples of standard cryptography are SSL/TLS, and https://.

Public and private key: the public key encrypts and the private key decrypts.

11.11

Digital millennium copyright act: Prevents online theft, the reproduction or redistribution of copyrighted works.

Copyright and creative credit: To access and share content, we find ethical and legal ways to do so. Copyright is a form of creative protection, usually for artistic works (movies, tv shows, etc). Any original work is protected by copyright.

All rights reserved: creator reserves all rights

Some rights reserved: creator may allow for reuse or modification as long as they are cited as the creator

Public domain: creator has dedicated the work to the public and waived all rights

Taking pictures, quotes, or videos and passing them off as your own violates copyright.

Distributing copyrighted materials over file-sharing networks violates copyright.