4.1 The Internet

IP Address

What is an IP Address: A numeric label assigned to every device that uses the internet to communicate. IP stands for Internet Protocol. IP addresses are the identifiers that allow data to be sent over the internet.

  • contain location information
  • allows devices to communicate over internet
  • differentiates between computers, routers, and websites

A set of 4 8-bit numbers separated by periods. Each number is in the range 0-255. Exceptions are 0.0.0.0 and 255.255.255.255

  • 4.20.0.255
  • 16.23.234.1

IP Addresses allow us to send information in three main ways.

  1. Unicast - a specific device. Internet wide access. TCP is used
  2. Multicast - a group of devices. It is a specific range of IP addresses. Internet-wide access. UDP is used
  3. Broadcast - all devices. LAN-wide. Data stops at the router. UDP is used

Popcorn Hack - Finding your IP

  • whatsmyip.org works for both Mac and Windows
  • Alternatively, you can open up a command prompt (cmd into search bar), and type ipconfig
Answer
  • 8.8.8.8, Google DNS server
  • Didn’t want to put my own IP!

The OSI Model and TCP/IP Model

TCP/IP Protocols

A TCP/IP Protocol is a set of rules that govern something within computer communication. The IETF, or Internet Engineering Task Force, manages these rules and facilitates the open development of them.

Example: ASCII Protocol

  • ASCII (American Standard Code for Information Interchange), a type of character encoding, is an internet protocol governing how text is represented as binary.
  • It includes 128 characters, 95 printable.

There are many more protocols, each governing a specific area of how computers communicate. Ex. ARP, DNS, FTP, UDP, PPP, SAP

OSI Model

The OSI model, also known as the Open Systems Interconnection Model, helps represent communications between two computers.

  • The OSI model helps coordinate and classify standards
  • Each of the many protocols can be classified into one of the seven layers
  • Each layer has a function, and the protocols in that layer all help with that function
Layer Name Function Example
1 Physical Transport of data between tangible, physical things DSL
2 Data Link Device identification and forwarding on a LOCAL network (i.e., home, school) PPP
3 Network Manages identification and path that a device should take, very few of these protocols STP
4 Transport Manages the transport of data between computers (delivery method, i.e., fast vs. slow) UDP
5 Session Manages connectivity between devices SAP
6 Presentation Translates from data sent between computers (binary) to something humans can understand TLS
7 Application User Interaction, like resource sharing HTTP

Popcorn Hack

  • ASCII falls into the presentation layer because it sends data or communication between computers.
  • Another example of a protocol from the presentation layer is MIME, which formats emails to send text and attachments, videos, or URLs. It helps encode or decode data sent through emails.

TCP/IP Model

  • Another method of classifying protocols
  • Simplifies OSI model into four layers
  • Application, Presentation, Session layers are summarized into one Application layer
  • Data Link and Physical layers are summarized into one Link or Physical layer
  • This layer, also known as Network Access, is focused on the transport of bits (1s and 0s) between networks

Protocols

DNS - Domain Name Service

  • DNS, or Domain Name Service, is a naming system for websites on the internet.
  • DNS assigns and has records that relate domain names to IP addresses

What is a Domain Name?

  • Domain Names are strings used to identify addresses
  • They map hard to remember IP addresses into simple strings of text
  • Each website has its own IP address that you are sent to when you visit the website
  • Website to IP lookup
  • nslookup (website) in the command prompt

Popcorn Hack

  • Open up a command prompt and type “nslookup google.com”
  • You should get 142.250.68.78, we mainly care about the bottom address for now
  • Try visiting that website in your search bar!
Answer
  • The website from the IP address is the Google homepage!

Subdomains

  • Subdomains are a prefix added to a domain to separate parts of the website
  • There can be many subdomains, up to 127, and each can be up to 64 characters long
  • An example of this was seen in our passion projects: (SUBDOMAIN).stu.nighthawkcodingsociety.com

Domain Name Service Providers

  • DNS Providers manage and sell domain names

<… (Content continues) …>

Homework Questions

IP Addresses

  1. Which of the following IP Addresses are possible? Explain (yes/no) for each answer choice.
    • 1.1.1.1.1 Yes, because all numbers are below 255 and above 0, are not all 255 or all 0
    • 23.23.23.23 Yes because all numbers are below 255 and above 0, are not all 255 or all 0
    • 134.492.100.0 No because there is a number above 255, which is not possible, the number is 492
    • 255.256.55.255 No because there is a number above 255, which is 256
    • 2.93.255.19 Yes because all numbers are below 255 and above 0, are not all 255 or all 0
  2. If Dian Du is at home on his home network and sends a message to every computer on the network, what is this an example of? Explain.
    • Multicast
    • Unicast
    • Broadcast <— Example of a Broadcast because a broadcast is when a message is sent to all devices within a network, so it must be a broadcast since Dian Du is sending a message to every computer on the network. It’s not unicast because Dian Du isn’t dming one device only, or it isn’t multicast because he isn’t dming a select group of people.
    • Server A computer is communicating with Server B. They have already initiated communication, and Server A is now attempting to send data to Server B. - How does Server B ensure that they have received any sent packets before Server A continues sending packets in TCP? In UDP? - What is another use of this?

Server B can ensure it receives any packets before Server A sends more in TCP by sending ACK messages (acknowledgment messages). For UDP, there is not really a way to ensure the transfer. Another use of this is in emailing or streaming.