Skip to content

The Network Layer

Introduction to the Network Layer

The Network Layer

  • Address Resolution Protocol

IP Addresses

  • 12.34.56.78

  • Dotted Decimal Notation

  • IP addresses belong to networks, not to the devices attached to those netwroks.

  • Dyanamic Host Configuration Protocol(DHCP)

  • Dynamic IP address

  • Static IP address

  • In most cases, static Ip addresses are reserved for servers and network devices, while dyanamic IP addresses are reserved for clients.

IP Datagrams and Encapsulation

  • IP Datagram A highly structured series of fields that are strictly defined.

IP Datagram Header

Bits0-34-78-1516-1819-31
Row 1VersionHeader LengthService TypeTotal Length
Row 2Identification
Row 3FlagsFragment Offset
Row 4TTLProtocolHeader Checksum
Row 5Source IP Address
Row 6Destination IP Address
Row 7OptionsPadding
  • The most common version of IP is version 4, or IPv4

  • Header Length field Almost always 20 bytes in length when dealing with IPv4

  • Service Type field These 8 bits can be used to specify details about quality of service, or QoS, technologies

  • Total Length field Indicates the total length of the IP datagram it’s acctached to

  • Indetification field A 16-bit number that’s used to group messages together.

  • The maximum size of a single datagram is the largest number you can represent with 16 bits

  • 65, 535

  • If the total amount of data that needs to be snt is larger than what can fit in a single datagram, the IP layer needs to split this data up into many individual packets.

  • Flag field Used to indicates if a datagram is allowed to be fragment, or to indicate that the datagram has already been fragmented

  • fragmentation The process of taking a single IP datagram and splitting it uo into several smaller datagrams

  • Time to Live(TTL) field An 8-bit field that indicates how many router hps a datagram can traverse before it’s thrown away.

  • Protocol field Another 8-bit field that contains data about what transport protocol is beign used

  • TCP

  • UDP

  • Header checksum field A checksum of the contents of the entire IP datagram header

  • IP options field An optional field and is used to set special characteristics for datagrams primarily used for testing purposes.

  • Padding field A series of zeroes used to ensure the header is the correct total size

  • Data payload section

LayerEncapsulation Structure
ApplicationMessage
TransportTCP or UDP header + Message
NetworkIP header + TCP or UDP header + Message
Data-linkEthernet header + IP header + TCP or UDP header + Message + Ethernet footer

IP Address Classes

  • IP addresses can be split into two sections: the Network ID and the host ID

  • 9.100.100.100 (9 - Network Id)(100.100.100 - host ID)

  • Address class system A way of defining how to global IP address space is split up

  • class A - 123.456.780.00(123-network ID)(456.780.00-host ID)

  • class B - 123.456.780.00(123.456-network ID)(780.00-host ID)

  • class C - 123.456.780.00(123.456.780-network ID)(00-host ID)

ClassLeft-most bitStarting IP addressLast IP address
A0xxx0.0.0.0127.255.255.255
B10xx128.0.0.0191.255.255.255
C110x192.0.0.0223.255.255.255
D1110224.0.0.0239.255.255.255
E1111240.0.0.0255.255.255.255
  • Class inter-domain routing

Address Resolution Protocol

  • ARP A protocol used to discover the hardware address of a node with a certain IP address

  • ARP Table A list of IP addresses and the MAC addresses associated with them

  • ARP Table entries generally expire after a short amount of time to ensure changes in the network are accounted for.

Subnetting

The process of taking a large netwrok and slitting it up into many individual and smaller subnetworks, or subnets

Incorrect subnetting setups are a common problemm you might run into as an IT Support Specialist, os, it’s important to have a strong understanding of how this works

IP address classes
ClassRangeMax Hosts
A0-12616 Million
B128-19164,000
C192-224254
D224-239N/A
E240-255N/A

Subnet masks

  • 10.0.1.1.0 (1.0.0 - NetworkID)(1- SubnetID)(10 - HostID)

  • Subnet masks 32-bit numbers that are normally written out as four octets in decimal

IP Address and Subnet Mask

Octet 1Octet 2Octet 3Octet 4
IP address9100100100
IP address (bin)0000 10010110 01000110 01000110 0100
Subnet mask (bin)1111 11111111 11111111 11110000 0000
Subnet mask255.255.255.0
  • A single 8-bit number can represent 256 different numbers, or more specifically, the numbers 0-255

Basic Binary Math

  • Base ten

  • Base two

  • Operator

  • two of the most important operators are OR and AND

  • In computer logic, a 1 represents true and 0 represents false

  • X or Y = Z “If either X or Y is true, then Z is true; otherwise , it’s false”

  • Subnet Mask A way for a computer to use and operators to determine if an IP address exists on the same network

CIDR

  • Netwrok ID

  • 8 bit - class A, 16 bit - class B, 24 bit - class C

  • Classes Inter-Domain Routing

  • Demarcate

  • Demarcation point To describe where one network or system ends and another one begins

  • CIDR notation

Basic Routing Concepts

  • Routing

  • Router A network device that forwards traffic depending on the destination on the destination address of that traffic

  • Basic Routing Diagram

  • ARP Table

Routing Tables

  • Destination network
  • Next hop
  • Total hops
  • Interface

Interior Gateway Protocols

  • Routing protocols

  • Routing protocols fall into two main categories: interior gateway protocols and exteterior gateway protocols

  • Interior Gateway Protocol are further split into two categories: Link state routing and distance-vector protocols

  • Interior gateway Protocols Used by routers to share information within a single autonomous system

  • Autonomous system A collection of networks that fall under the control of a single network operator

  • The two main types of interior gateway protocols are links state routing protocols and distance-vector protocols

  • In computer science, a list is known as a vector

Exterior Gateway Protocol

  • Internet Assigned Numbers Authority (IANA) A non-profit organization that helps manage things like IP address allocation

  • Along with managing IP address allocation, the IANA is also responsible for ASN, or Autonomous System Number allocation

  • Autonomous System Number(ASN) Numbers assigned to individual autonomous systems

  • AS19604 = IBM

Non-Routable Address Space

  • 4,294,967,295

  • 7.5 billion

  • This means that the IPv4 standard doesn’t even have enough addresses available for every person on the planet

  • Request for Comments

  • Non-routable address space

  • Network Address Translation

  • 10.0.0.0/8

  • 172.16.0.0/12

  • 192.168.0.0/16