Internet Flashcards
How does the internet work?
- Network of networks, which uses TCP/IP mainly to send data in a reliable, ordered and error checked way
Other used protocols:
- UDP - not reliable, less overhead
- HTTP - to transfer data
- HTTPS - to transfer securely using encryption (SSL/TLS)
- FTP & SMTP
e.g. Client issues a HTTP GET request for Twitch. The request is chunked into data packets and sent to the router. A query is sent to the DNS to get the IP address for the given DNS. The router then sends the packet to the server at the destination IP and the server responds with a HTTP code and the HTML content which can be rendered client side in the browser.
What is HTTP?
- HTTP (Hypertext Transfer Protocol)
- Used to send data between client & web server
e.g. When you open a website like YouTube your web browser sends a HTTP GET request to YouTube’s servers. YouTube’s servers then send back an HTTP response that contains the HTML code and video files for the web site
What are browsers and how they work?
Web browsers are software applications that are used to access the internet. They are responsible for rendering HTML code into web pages displaying images and videos and handling user input. When you open a web page in your browser the browser parses the HTML code and displays the web page accordingly. It also handles user interactions like clicking on links submitting forms and playing videos.
DNS and how it works?
DNS (Domain Name System) is a hierarchical, decentralized system that translates DNS names to IP addresses.
e.g. When you type a URL into your web browser it sends a DNS query to a DNS server. The DNS server then looks up the IP address for the domain name and returns it to your web browser. This allows your browser to connect to the correct web server.
What is a domain name?
A domain name is a unique address that identifies a website on the internet. It is made up of two parts: the top-level domain (TLD) and the second-level domain (SLD). The TLD is the part of the domain name that comes after the dot such as .com .net or .org. The SLD is the part of the domain name that comes before the dot such as google yahoo or facebook.
e.g. the domain name google.com consists of the SLD google and the TLD .com. It is the unique address that identifies the Google on the internet.
What is web hosting?
A service that provides storage and access to websites on the internet. When you sign up for a web hosting account you are renting space on a web server to store your website’s files. The web server then makes your website available to visitors from all over the world.
e.g. When you create a website you need to choose a web hosting provider to store your website’s files and make it accessible to visitors. Popular web hosting providers include Bluehost, HostGator and GoDaddy.
What is an IP address?
- A unique ID assigned to a computer on a network
- Used to route data to destination
e.g. 192.168.1.1
What are ports?
Ports are assigned to applications running on a system to allow data to be sent to the right app
e.g. dynamodb is running on 127.0.0.1:8000 & minio on 127.0.0.1:9000, requests sent to port 8000 will be directed to the dynamodb process
What is a socket?
- An endpoint for communication made up of ip address + port
e.g. a connection is established between two sockets when devices want to communicate together, devices negotiate parameters around the transmission of the data and then the data is transferred in segments
How is SSL/TLS used to secure communications over the internet?
- Client Hello:
The client initiates a connection, sending supported cryptographic functions. - Server Hello:
The server chooses cryptographic algorithms and responds.
3.Certificate Exchange:
The server sends its digital certificate to the client, including the public key.
The client verifies the certificate’s authenticity using a trusted Certificate Authority (CA).
- Key Exchange:
The client generates a pre-master secret, encrypts it with the server’s public key, and sends it to the server.
The server decrypts the pre-master secret using its private key.
5.Shared Master Secret:
Both the client and server use the pre-master secret to independently generate a shared master secret.
- Session Key Generation:
Both parties derive session keys from the shared master secret for encrypting and decrypting data during the session. - Finished:
Both parties exchange “Finished” messages, completing the handshake. - Secure Data Exchange:
Data exchange is now secure, using the derived session keys.