Notes for Computer Information Technology 160
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

oct10-ip.md 1.8KB

October 10 - IP

Overview

  • IP: v4 and v6
    • Class A, B, C, D
    • CIDR
  • Mask
    • umask
    • mask
  • IP (protocols)
    • ICMP (ping, traceroute)
    • UDP
    • TCP
    • DNS
  • OSI Model
  • Commands
    • host
    • nslookup
    • dig
    • ifconfig

The Internet

There are multiple ways to get to where you want to go.

  1. A computer makes a request for some information from a location.
  2. The receiving end understands the request and sends the information back.

When you call someone, you look them up in your contacts, when you go to www.google.com, your computer looks up its ip address in Domain Name System (DNS)

An ip (v4) address is always in this format: XXX.XXX.XXX.XXX, for example, 127.0.0.1

IPv4 vs IPv6

There are more internet devices than possible IPv4 addresses, so IPv6 was created.

An IPv6 address is represented as eight groups of four hexadecimal digits, each group representing 16 bits (two octets, a group sometimes also called a hextet[6][7]). The groups are separated by colons (:). An example of an IPv6 address is:

2001:0db8:85a3:0000:0000:8a2e:0370:7334

- Wikipedia

OSI Model Layers:

  • Application layer 7
  • Presentation layer 6
  • Session layer 5
  • Transport layer 4
  • Network layer 3
  • Link layer 2
  • Physical layer 1

A single piece of data can be packages which multiple parts like the return address on a letter:

[ Header (layer 2) | IP Header(layer 3) | UDP Header (layer 4) | DATA (layer 7) | Footer (layer 2) ]

Sockets

[ address | port ][ address | port ]
[ source name ][destination name]

Ping and ICMP

$ ping example.com

do a dns lookup of example.com then send an ICMP “echo” message, the server should send one back