On a LAN, nodes can communicate through their physical Mac addresses
Optimal for small-scale, not large-scale
Characteristics of an IP Address:
32-bit long numbers made up of four octets, each being described in decimal numbers, in dotted decimal notation
A single octet: 8 bits that can represent all decimal numbers from 0-255
Example: 12.34.56.78
Non-example: 123.456.789.100 because bolded version is greater than 255
IP addresses are distributed in large sections to organizations and companies, making them more hierarchical and easier to store data about compared to physical addresses
Ex: IBM owns every IP with the number 9 as the first octet
IP addresses belong to networks, not devices, so your device will connect to different networks with different IP addresses
Dynamic Host Configuration Protocol: connect a new device and an IP address will be assigned to it automatically
Produces dynamic IP addresses
Static IP address: configured on a node manually
Ethernet Frames: data packets at the ethernet layer
Describe how IP datagrams are encapsulated inside the payload of an Ethernet frame
IP Datagram: data packets under the IP protocol
Like any ethernet frame, IP datagrams are a highly structured, strictly defined series of fields
Primary sections: header and payload
Correctly identify and describe the many fields of an IP datagram header
Header
Contains more data than an ethernet frame header
4 bits
indicates what version of Internet Protocol is being used
Most common versions: version 4 (IPv4)
Next most common version: version 6 (IPv6)
Length Field
4 bits
Declares how long the entire header is
almost always 20 bytes in length (which is the minimum)
Service type field:
8 bits
can be used to specify details about quality of service, or QoS, technologies
QoS: there are more services that allow routers to make decisions about which IP datagram may be more important than
others
Total length field
16 bits
indicates the total length of the IP datagram it’s attached to
Maximum size of a single datagram is the largest number you can represent with 16 bits: 65,353
Otherwise, IP layer splits data into individual packets, utilizing the identification field
Identification field:
16 bits
groups messages together
ensures that the receiving end understands that every packet with the same value in that field is part of the same transmission
Flag Field:
Indicates if a datagram is allowed to be fragmented or if the datagram has already been fragmented
Fragmentation: process of taking a single IP datagram and splitting it up into several smaller datagrams
Fragmentation offset field
Contains values used by the receiving end to take all the parts of a fragmented packet and put them back together in the correct order
Time to live (TTL) field
8 bits
Indicates how many router hops a datagram can traverse before it’s thrown away
Useful when there’s a misconfiguration in routing leading to an endless loop
Protocol fields
8 bits
contains data about what transport layer is being used
Most common transport layer protocols: TCP and UDP
Header checksum field
checksum of the contents of the entire IP datagram header
Source IP Address
32 bits
Destination IP address
32 bits
IP Options Field
optional field
sets special characteristics for datagrams primarily used for testing purposes
Padding field: series of zeros to ensure the header is the correct total size
Encapsulation:
Similar to data payload section for Ethernet
Entire contents of IP datagram are encapsulated as a packet into the payload for an ethernet frame
Sections of an IP Address:
Network ID: 1st octet
Host ID: 2nd octet
Address class system: a way of defining how the global IP address space is split up
Class A: 1st octet is used for the network ID, last three for the host ID
total of 24 bits of host ID space
left most bit begins with 0
any IP from 0-127 for first octet
Class B: 1st two octets are used for network ID, second two are used for host ID
left most bit begins with 10
any IP from 128 - 191
Class C: 1st three octets are used for network ID, last is used for host ID
left most bit begins with 110
any IP from 224
Address Resolution Protocol (ARP)
ARP: protocol used to discover the hardware address of a node with a certain IP address
Once an IP datagram has been fully formed, it needs to be encapsulated inside an ethernet frame, which means the transmitting device needs a destination MAC address to complete the Ethernet frame header
ARP table: list of IP addresses and the MAC addresses associated with them
if destination lacks an entry in the ARP table, the node that wants to send data sends a broadcast ARP message to the MAC Broadcast addresses
These types of broadcast ARP messages are received by all computers on a LAN
When ARP broadcast is received, sends an ARP response, which contains the MAC address for the network interface in question
ARP table entries generally expire after a short amount of time to ensure changes in the network are accounted for