4.1 The Internet
https://aidanlau10.github.io/projecttri2//2023/11/27/internet_IPYNB_2_.html
Part 1
-
How did the internet come to life? It all began by these massive computers. They were isolated and very hard to work on. As a result, the idea of the internet came to life. It was to easily communicate between users and opened many gateways to digital communication.
-
The internet is basically a way for computers to talk to each other using networks
-
A packet is a small amount of data or information sent over a network that includes information about the sender and destination.
- A computer network is a group of computing devices interacting with each other in some sort of way
How do computers send data to each other?
-
In a process called packet switching, a message(file) is broken up into packets which are reassembled by the receiver. It is often times converted into something the computer can understand like binary.
-
A path is between the sender and receiver and the router will help find the path. For example, If you’re accessing a website, routers determine the optimal path for the data packets to traverse the internet (routing), following a series of interconnected devices (paths) to reach the web server.
-
Routing is a process that finds a path from the sender to receiver
-
Bandwidth is the maximum amount of data that can be sent in a computer network
Popcorn Hack 1
- What is the diagram showing?
- Bandwidth
- Computer Network
- Packet Switching
- Operating System
- Two possible answers
computer network, packet switching
Part 2
-
Protocols are sets of rules for the way data is transferred throughout the internet
- There are two acceptable models that show the layers that data is sent by protocols
- OSI
- TCP/IP
- TCP/IP is more widely accepted but OSI is still used
- The OSI(Open Systems Interconnect) model shows the 7 layers you have to go throught to communicate between other computers
- TCP(Transmission Control Protocol) is a protocol for how to send messages between devices
Popcorn Hack 2
A request from the frontend to the backend is being made and the response returns JSON. What layer(s) did the data go through?
- Application
- Transport
- Internet
- Network Access
- All layers
all layers
What is an example of the OSI/TCP Model
Network Access/Internet Layer
- The process usually starts with the Internet layer where the user’s computer is assigned a unique IP address so it can communicate with other computers or web servers
- A DHCP(Dynamic Host Configuration Protocol) assigns the computer its unique IP address
Application/Transport Layer
- The user sends a request to a server or page
- If the user wants to go to a website like amazon.com, it has its unique IP address but it isn’t readable by humans so a DNS(Domain Name Service), which stores the IP address inside of a database, sends it over the user
- During this process, the user sent a TCP request for the IP of amazon.com to the DNS server and the DNS server sent a TCP response in the form of packets for the IP of amazon.com
- Now, the user can send a request to the IP of the webpage like amazon.com
- The last step is for a router to send the user to the correct destination of the IP. In this case, amazon.com.
Popcorn Hack 3
How does a user get the IP for a web page when they enter the url?
- It goes through layers when the request is made to the webp
- The DNS sends it to the user in the form of a TCP response
- There is no need for the user to know the ip when going to the url
- The user automatically knows
2 (look at code)
Protocols used here are:
- HTTP - Hyper Text Transfer Protocol
- HTTP is a protocol that says how data is transferred over the internet
- Used for sending requests from a user and receiving a response in the form of HTML or JSON from the server.
- In last trimester, you made a request to the backend from the frontend using HTTP and it sent a response in the form of JSON
- HTTPS
- HTTPS is HTTP with security. In last trimester’s final project, the devops person used certbot to make the HTTP requests to the backend secure.
- TCP/IP - Transmission Control Protocol, Internet Protocol
- TCP/IP is important because HTTP requests and responses depend on a TCP connection between the client and server
- Once a TCP connction is made, HTTP requests are carried in TCP packets
- IP sends the TCP packets to the correct location
- When you made the HTTP request from the frontend to the backend, your request was broken up into TCP packets and sent to the correct location by IP
Homework
Bandwidth:
- In the context of computer networks, elaborate on the concept of bandwidth. Discuss how bandwidth influences the speed and efficiency of data transfer. Provide examples of scenarios where both high and low bandwidth can impact the performance of internet connected devices.
A bandwidth is the maximum transfer rate of data and is usually measured in bps (bits per second). It’s important in determining the speed and efficiency of sending data. A high bandwidth means that large amounts of data can be sent in a shorter time period, whereas a low bandwidth is slower, delayed transfers. For example, high bandwidths are good for transferring large files because they can be downloaded faster and more efficiently than with a low bandwidth. On the other hand, low bandwidths are generally less beneficial, espcially in more secluded areas or areas with many people online (both extremes). For rural locations, low bandwidths cause slow internet. For very crowded areas, the performance is weaker when many people are using networks.
Computer Network:
- Explore computer networks by detailing the key components and their interplay. Discuss the significance of scalability, security, and reliability in designing computer networks. Provide real-world examples of how different types of computer networks, such as local area networks (LANs) and wide area networks (WANs), serve distinct purposes in various settings.
Key components of comupter networks: links (wired, wireless) connect nodes (computers, servers, routers, etc.), defense (firewall) secures/regulates network traffic, protocols
Scalability: if the number of devices on a network is increased, the network should be able to adapt to the growth without having a weaker performance.
Security: network defense like firewall or encryption protect data from unauthorized access
Reliability: makes sure that the network is consistent in connectivity without constant disruption
Examples:
- LAN used in confined spaces (offices, schools, etc.); quick transfer of data, lots of security
- WAN used in larger areas and connects LAN in cities/countries; lower bandwidth, long distance communication
Packet Switching:
- Investigate packet switching and its role in modern communication systems. Compare and contrast packet switching with alternative methods, such as circuit switching, highlighting the advantages that packet switching brings to data transmission. Describe the journey of a data packet through a network.
Packet switching is when data is separated into packets and then sent. Circuit switching is when a path is created to connect two points during the time period of the connection. They are different because packet switching is more efficient and works for any transfer rate whereas circuit switching is inefficient for inconsistent data and is less acommodating to differing network conditions.
The journey of packet swtiching begins when the data is split into packets. Each packet contains information about its route so it to arrives at the correct destination. Then, each individual packet is transferred over to its next destination. Finally, packets are reunited in the right order to recreate the original data