Network+ (Chapter 6)
Subnet Formula
(2^x) - 2 Where x represents the number of zeroes in the subnet mask. If you have a /26 subnet mask on your network, what is the maximum number of hosts you can have on that network? 1. Because the subnet mask always has 32 digits, a /26 subnet means you have 6 zeroes left after the 26 ones. 2. (2^6) - 2 = 62 total hosts.
Protocols for the Internet Layer
- IPv4 - IPv6 - ICMP
UDP Datagram Header
- Source Port - Destination Port - Lenth - Checksum
TCP Packet Header
- Source Port - Destination Port - Sequence and ACK Numbers: These numbers enable the sending and receiving computers to keep track of the various pieces of data flowing back and forth. - Flags: These individual bits give both sides detailed information about the state of the connection. - Checksum: Checks the TCP header for errors.
Simplified IP Header
- Version: The version (Ver) field defines the IP address type: 4 for IPv4, 6 for IPv6 - Header Length: The total size of the IP portion of the packet in words (32 bits) is displayed in the header length field. - Differentiated Services Code Point (DSCP): The DSCP field contains data used by bandwidth-sensitive applications like VoIP. - Time to Live (TTL): Implementations of routers on the Internet are not perfect and engineers sometimes create loops. The TTL field prevents an IP packet from indefinitely spinning through the Internet by using a counter that decrements by one every time a packet goes through a router. This number cannot start higher than 255; many applications start at 128. - Protocol: In the vast majority of cases, the protocol field is either TCP or UDP and identifies what's encapsulated inside the packet.
DHCP Relay
A DHCP relay is required when an organization has many individual LANs and doesn't want to have many individual DHCP servers. A DHCP relay is built into most routers, accepts DHCP broadcasts from clients and then sends them via unicast addresses directly to the DHCP server.
MAC Reservation
A MAC reservation assigns a specific IP address to a specific MAC address. Always. From now on, anytime the system with that MAC address makes a DHCP Request, the DHCP reservation guarantees that that system will get the same IP address.
Domain Name System (DNS)
A TCP/IP name resolution system that resolves hostnames to IP addresses, IP addresses to host names, and other bindings, like DNS servers and mail servers for a domain. Uses UDP datagrams.
Internet Control Message Protocol (ICMP)
A TCP/IP protocol (Internet Layer) used to handle many low-level functions such as error reporting. ICMP messages are usually request and response pairs such as echo requests and responses, router solicitations and responses, and traceroute requests and responses. There are also unsolicited "responses" (advertisements) which consist of single packets. ICMP messages are connection-less.
Wide Area Network (WAN)
A geographically dispersed network created by linking various computers and LANs over long distances, generally using leased phone lines. There is no firm dividing line between a WAN and a LAN.
Routing Table
A list of paths to various networks required by routers. This table can be built either manually or automatically and contains the instructions that tell the router what to do with incoming packets and where to send them.
Automatic Private IP Addressing (APIPA)
A networking feature in operating systems that enables DHCP clients to self-configure an IP address and subnet mask automatically when a DHCP server isn't available. All DHCP clients are designed to generate an APIPA address automatically if they do not receive a response to a DHCP Discover message. However, APIPA cannot issue a default gateway, so you'll never get on the Internet using APIPA.
Address Resolution Protocol (ARP)
A protocol in the TCP/IP suite used with the command-line utility of the same name to determine the MAC address that corresponds to a particular IP address. If Computer A needs to speak with Computer B but doesn't have Computer B's MAC address stored yet, Computer A can send an ARP request to the universal MAC address for broadcast (FF-FF-FF-FF-FF-FF) to request Computer B's MAC address. Once Computer B responds to the ARP request by sending Computer A an ARP reply, then Computer A can begin sending unicast Ethernet frames directly to Computer B.
Dynamic Host Configuration Protocol (DHCP)
A protocol that enables a DHCP server to set TCP/IP settings automatically for a DHCP client. Uses UDP datagrams. DHCP servers use UDP port 67 and clients use port 68.
TCP Three-Way Handshake
A three-packet conversation between TCP hosts to establish and start a data transfer session. The conversation begins with a SYN request by the initiator. The target responds with a SYN response and an ACK to the SYN request. The initiator confirms the receipt of the SYN ACK with an ACK. Once this handshake is complete, the data transfer can begin.
DORA
Acronym used to describe the DHCP process. Discover, Offer, Request, and Acknowledgement
Public IP Address Designation
All end users get their IP addresses from their respective ISPs, which receive their IP addresses in the form of contiguous chunks called network blocks.
Dynamic Addressing
Also known as DHCP, dynamic addressing is a way for a computer to receive IP information automatically from a server program.
Rogue DHCP Server
An unauthorized DHCP server on the network.
Logical Addressing
As opposed to physical addressing, the process of assigning organized blocks of logically associated network addresses to create smaller manageable networks called subnets. IP addresses are one example of logical addressing.
LAN IP Addressing
At the LAN level, every host runs TCP/IP software over Ethernet hardware, creating a situation where every host has two addresses: an IP address and an Ethernet MAC address.
Three Ways to Send a Packet
Broadcast: Every computer on the LAN hears the message Unicast: One computer sends a message directly to another user Multicast: A single computer sends a packet to a group of interested computers. Used when routers talk to each other.
Network Blocks (Classful)
Class A: Addresses: 1.0.0.0 - 126.255.255.255 Subnet Mask: 255.0.0.0 Hosts per Network ID: 16,277,214 Class B: Addresses: 128.0.0.0 - 191.255.255.255 Subnet Mask: 255.255.0.0 Hosts per Network ID: 65,534 Class C: Addresses: 192.0.0.0 - 223.255.255.255 Subnet Mask: 255.255.255.0 Hosts per Network ID: 254 hosts per network Class D: Addresses: 224.0.0.0 - 239.255.255.255 Type: Multicast Class E: 240.0.0.0 - 254.255.255.255 Type: Experimental (Reserved)
DHCP Failover
In DHCP failover, two--and only two--DHCP servers work together to provide DHCP for the network. A DHCP failover pair shares a single scope, so if either fails, the other picks up the load. This helps to eliminate the single point of failure that exists by only having one DHCP server.
Default Gateway
In a TCP/IP network, the IP address of the router that interconnects the LAN to a wider network, usually the Internet. This router's IP address is part of the necessary TCP/IP configuration for communicating with multiple networks using IP. The default gateway is in the same network ID as the host. By convention, most network admins give the LAN-side NIC on the default gateway the lowest host address in the network, usually the hos ID of 1. Therefore, if a network ID is 22.33.4.x, the router is configured to use the address 22.33.4.1.
Transmission Control Protocol (TCP)
Part of the TCP/IP protocol suite (Transport Layer), operates at Layer 4 (Transport) of the OSI seven-layer model. TCP is a connection-oriented protocol that requires both the sending and receiving machines to acknowledge the other's presence and readiness to send and receive data via a three-way handshake. Most TCP/IP applications use TCP.
Internet Protocol version 6 (IPv6)
Protocol (Internet Layer) in which addresses consist of eight sets of four hexadecimal numbers, each number being a value between 0000 and ffff, using a colon to separate the numbers. No IP address may be all 0s or all ffffs. An example is fe80:ba98:7654:3210:0800:200c:00cf:1234.
Internet Protocol version 4 (IPv4)
Protocol (Internet Layer) in which addresses consist of four sets of numbers, each number being a value between 0 and 255, using a period to separate the numbers. Often called dotted decimal format. No IPv4 address may be all 0s or all 255s. Examples include 192.168.0.1 and 64.176.19.164.
Dotted Decimal Notation
Shorthand method for discussing and configuring binary IP addresses.
Loopback Address
Sometimes called the localhost, a reserved IP address used for internal testing: 127.0.0.1. When you tell a device to send data to 127.0.0.1, you're telling that device to send the packets to itself. Even though, by convention, you use 127.0.0.1 as the loopback address, the entire 127.0.0.0/8 subnet is reserved for loopback addresses.
Subnetting
Taking a single class of IP addresses and chopping it up into multiple smaller groups. Essentially the same as CIDR, except subnetting is done by an organization while CIDR is done by an ISP. It is a much more efficient use of IP addresses compared to class blocks, as it enables you to separate a network for security and for bandwidth control.
User Datagram Protocol (UDP)
The "fire and forget" missile of the TCP/IP protocol suite. Used for applications that have a lot of data to transport that doesn't necessarily need to be perfect (like VoIP or video streaming), or when the systems are so close to each other that the chances of a problem occurring are too small to bother worrying about. While it doesn't always send every packet perfectly like TCP, it is smoking fast.
IP Helper Address
The IP address of the real DHCP server when using DHCP relay.
Internet Protocol (IP)
The Internet standard protocol that handles the logical naming for the TCP/IP protocol using IP addresses. Internet Layer Protocol.
Classless Inter-Domain Routing (CIDR)
The basis of allocating and routing classless addresses by an ISP, not restricting subnet masks to /8, /16, or /24, which classful addressing did. That is why CIDR is often referred to as classless addressing.
Internet Assigned Numbers Authority (IANA)
The organization responsible for assigning public IP addresses. IANA no longer directly assigns IP addresses, having delegated this to the five Regional Internet Registries (RIRs). The RIR for North America is called the American Registry for Internet Numbers (ARIN).
DHCP Scope
The pool of IP addresses that a DHCP server may allocate to clients requesting IP addresses or other IP information like DNS server addresses.
Network ID
The portion of an IP address common to all nodes on the same network or subnet. For example, 202.120.10.x. It usually ends in 0, such as 202.120.10.0
Host ID
The portion of an IP address that is combined with the network ID to define a specific machine in a subnet. For example, a machine on a specific LAN with the network ID 202.120.10.0 could have a host address of 202.120.10.x, where x (the host ID portion) is equal to 60.
Static Addressing
The process of assigning IP addresses by manually typing them into client computers. Excellent for more critical systems on your network, but making any changes to the network is a serious pain with static addressing. Most systems today use the far easier dynamic addressing.
Encapsulation
The process of putting the packets from one protocol inside the packets of another protocol. An example of this is TCP/IP encapsulation in Ethernet, which places TCP/IP packets inside Ethernet frames.
DHCP Four-Way Handshake (DORA)
Used to automatically assign IP addresses to computers when they connect to a network. Consists of a DHCP server and lots of DHCP clients. Clients request IP information from DHCP servers, and DHCP servers in turn pass out IP information to clients. When a DHCP client boots up, it auomatically sends out a special DHCP Discover message using the broadcast address. This DHCP Discover message asks, "Are there any DHCP servers out there?" The DHCP server hears the request and then sends the DHCP client a DHCP Offer message. This message includes an IP address, subnet mask, and gateway. The DHCP client sends out a DHCP Request--a poor name choice as it is really accepting the offer--verifying that the offer is still valid. The DHCP server then send a DHCP Acknowledgment and lists the MAC address as well as the IP information given to the DHCP client in a database. At the end of this four-step DHCP dance, the DHCP client gets a DHCP lease. A DHCP lease is set for a fixed amount of time, often one to eight days. Near the end of the lease time, the DHCP client sends another DHCP Request message.
Private IP Addresses
Used to keep specific computers off the Internet. The ranges of addresses that are designated as private IP addresses are: 10.0.0.0 through 10.255.255.255 (1 Class A network block) 127.16.0.0 through 172.31.255.255 (16 Class B network blocks) 192.168.0.0 through 192.168.255.255 (256 Class C network blocks)
Variable Length Subnet Masking (VLSM)
Used to vary the size of the subnets created.
IP Exclusion
Used when you have a static IP address inside a DHCP pool that you don't want the DHCP server to issue to a DHCP client.
Subnet Mask
Value used in TCP/IP settings to divide the IP address of a host into its component parts: network ID and host ID. It is used to determine whether the destination IP address is local or long distance. It is nothing more than a string of ones followed by some number of zeroes, always totaling exactly 32 bits, types into every TCP/IP host. An example of a subnet mask is: 11111111.11111111.11111111.00000000 Converted into decimal it looks like: 255.255.255.0 Subnet Masks: 255.0.0.0 -- /8 255.255.0.0 -- /16 255.255.255.0 -- /24
Commands to Display IP and MAC Address
Windows: ipconfig macOS: ifconfig Linux: ip a