Use Basic TCP/IP Concepts Flashcards
Transmission Control Protocol/Internet Protocol (TCP/IP)
Network protocol suite used to implement the Internet and most WANs and LANs. It uses a four-layer network model that corresponds roughly to the OSI model as follows: Network Interface (Physical/Data Link), Internet (Network), Transport (Transport), Application (Session, Presentation, Application).
Link or Network Interface layer
Communications on this layer take place only on a local network segment and not between different networks. On an Ethernet or Wi-Fi segment, data at the link layer is packaged in a unit called a frame, and node interfaces are identified by a MAC address.
Internet Layer
The Internet Protocol (IP) provides packet addressing and routing within a network of networks.
For data to be sent from one IP network to another, it must be forwarded by an intermediate system (a router).
IP provides best effort delivery that is unreliable and connectionless. A packet might be lost, delivered out of sequence, duplicated, or delayed.
Transport Layer
The Transport layer determines how each host manages multiple connections for different application layer protocols at the same time.
Transmission Control Protocol (TCP) guarantees connection-oriented forwarding of packets. TCP can identify and recover from lost or out-of-order packets.
User Datagram Protocol (UDP) provides unreliable, connectionless forwarding. It is used in time-sensitive applications, such as speech or video, where a few missing or out-of-order packets can be tolerated. Rather than causing the application to crash, they would just manifest as a glitch in video or a squeak in audio.
Application Layer
The Application layer contains protocols that perform some high-level function, rather than simply addressing hosts and transporting data. Each application protocol uses a TCP or UDP port to allow a client to connect to a server.
IPv4 Addressing
IPv4 address is 32 bits long. In its raw form it appears as:
11000000101010000000000000000001
The 32 bits can be arranged into four groups of eight bits (one byte) known as “octets.”
11000000 10101000 00000000 00000001
To make IP addresses easier to use, they are used in dotted decimal notation. This notation requires each octet to be converted to a decimal value:
192.168.0.1
If all the bits in an octet are set to 1, the number obtained is 255 (the maximum possible value). Similarly, if all the bits are set to 0, the number obtained is 0 (the minimum possible value). Therefore, theoretically an IPv4 address may be any value between 0.0.0.0 and 255.255.255.255. However, some addresses are not permitted or are reserved for special use.
Network Prefixes
An IPv4 address provides two pieces of information encoded within the same value:
The network number (network ID) is common to all hosts on the same IP network.
The host number (host ID) identifies a host within a particular IP network.
A prefix is a 32-bit value with a given number of contiguous bits all set to 1. For example, a prefix with 24 bits is the following binary value:
11111111 11111111 11111111 00000000
This can be written in slash notation in the form /24. The prefix can also be expressed in dotted decimal as a subnet mask:
255.255.255.0
subnet mask
Number of bits applied to an IP address to mask the network ID portion from the host/interface ID portion.
IPV4 Forwarding
When a host attempts to send a packet via IPv4, the protocol compares the source and destination IP address in the packet against the sending host’s subnet mask. If the masked portions of the source and destination IP addresses match, then the destination interface is assumed to be on the same IP network or subnet.
If on the same network, on Ethernet, the host would use the address resolution protocol (ARP) to identify the MAC address associated with the destination IP address.
If on a different network the packet is forwarded to a router rather than trying to deliver it locally. Most hosts are configured with a default gateway parameter. The default gateway is the IP address of a router interface that the host can use to forward packets to other networks. The default gateway must be in the same IP network as the host.
Public IP Address
Some IP address ranges are designated for use on private networks only. Packets with source IP addresses in public ranges are permitted to be forwarded over the Internet. Packets with source IP addresses from private ranges should be blocked at Internet gateways or forwarded using some type of translation mechanism.
Private Address Ranges
The IPv4 address scheme defines certain ranges as reserved for private addressing, often called “RFC 1918” addresses after the document in which they were published. Hosts with IP addresses from these ranges are not allowed to route traffic over the public Internet.
There are three private address ranges:
10.0.0.0 to 10.255.255.255 (Class A private address range). Network prefix /8
172.16.0.0 to 172.31.255.255 (Class B private address range). Network prefix /16
192.168.0.0 to 192.168.255.255 (Class C private address range). Network prefix /24
Internet Access Using Private Addressing
As a host configured with a private address cannot access the Internet directly, some mechanism must be used to allow it to forward packets. Internet access can be facilitated for hosts using a private addressing scheme in two ways:
Through a router configured with a single or block of valid public addresses; the router uses network address translation (NAT) to convert between the private and public addresses.
Through a proxy server that fulfills requests for Internet resources on behalf of clients.
IPv4 Host Address Configuration
Each host must be configured with an IP address and subnet mask at a minimum to communicate on an IPv4 network.
The IPv4 address is entered as four decimal numbers separated by periods, such as 192.168.0.100.
The subnet mask is entered in dotted decimal notation, such as 255.255.255.0. When used with the IP address 192.168.0.100, this mask identifies 192.168.0 as the network ID and means that the last octet ( .100 ) is the host ID.
A host cannot be assigned either the first or last address in an IP network. For example, in the IP network 192.168.0.0/24, 192.168.0.0 is the first address and is used to identify the network itself. The last address 192.168.0.255 is used to broadcast to all hosts. Valid host addresses range from 192.168.0.1 to 192.168.0.254
Two other parameters are typically configured to make the host fully functional:
The default gateway parameter is the IPv4 address of a router, such as 192.168.0.1 . This is the IP address to which packets destined for a remote network should be sent by default. This setting is not compulsory, but failure to enter a gateway would limit the host to communication on the local network only.
One or more Domain Name System (DNS) server IPv4 addresses. These servers provide resolution of host and domain names to their IP addresses and are essential for locating resources on the Internet. Typically, the primary DNS server address would be configured as the same as the gateway address. Often two DNS server addresses (preferred and alternate) are specified for redundancy.
Static IP Address
Static IP address are manually assigned. The administrator must keep track of which IP addresses have been allocated to avoid issuing duplicates. In a large network, configuring IP statically on each node can be very time consuming and prone to errors that can potentially disrupt communication on the network.
Static addresses are typically only assigned to systems with a dedicated functionality, such as router interfaces or application servers that need to use a fixed IP address.
Dynamic Host Configuration Protocol
As an alternative to static configuration, a host can receive its IP address, subnet mask, default gateway, and DNS server addresses from a dynamic host configuration protocol (DHCP) server.
DHCP is the Protocol used to automatically assign IP addressing information to hosts that have not been configured manually.