TCP/IP Addressing and Data Delivery The TCP/IP Protocol Suite IPv4 Addressing Default IP Addressing Schemes Create Custom IP Addressing Schemes IPv6 Address Implementation Delivery Techniques
OSI Model Location Network 3 Data Link 2 Application 7 Presentation 6 Session Transport 5 4 Network Data Link 3 Physical 2 1
The TCP/IP Model Application OSI Model TCP/IP Model Presentation Session Transport Transport Network Internet Data Link Data Link Physical
Encapsulation on TCP/IP Networks Data is sent from Application layer to Transport layer. Transport layer adds header to datagram and moves datagram to Internet layer. Internet layer adds another header and passes datagram to Network layer. Network layer adds header and trailer. Entire packet with header and trailer is sent. On receipt, headers and trailers are removed from data and it moves to Application layer.
Connection-Oriented and Connectionless Protocols Connection-oriented protocols: Connection established before any data is sent. Stream of data delivered in the order it was sent. Example: TCP. Connectionless protocols: Connection is not established before data is sent. Data may be delivered out of order. Example: UDP.
TCP TCP: Connection-oriented protocol. Guaranteed delivery. Part of the Internet protocol suite. Breaks data into segments then reassembles at the receiver end. Resends any data lost in transit. Resequences data. Sends data, waits for acknowledgement, resubmits, if necessary.
The Three-Way Handshake SYN: Active open by client sending SYN to server. Client sets packet sequence number to random value, A. SYN-ACK: Server replies with SYN-ACK. Acknowledgement number is A+1. Sequence number is another random value, B. ACK: Client sends ACK to server. Sequence number is the received acknowledgement value. Acknowledgement number is B+1.
UDP UDP: Connectionless IP suite Transport-layer protocol. Used with IP. Smaller, simpler header than TCP uses. Faster service: Does not wait for acknowledgement. Used in: VoIP. Real-time video. Network management applications. Used when performance is more important than ability to receive all data.
IP OSI Layer 3 protocol. Responsible for routing individual datagrams. Connectionless protocol. Acts as intermediary between higher protocol layers and the network. Carries TCP or UDP payload. When used with TCP: IP provides connection. TCP provides reliability.
Receiving Node Buffers Fill ICMP Flood warning Sending Node Receiving Node Receiving Node Buffers Fill 2 1 Data 3 Source Quench Message
Used for multicast packet routing IGMP IGMP Used for multicast packet routing
ARP
Protocol Analyzers Displays captured frames and contents
Data Transmission on IP Networks Sender transmits PDU and waits for ACK signal. Throughput increased if data is sent as larger PDUs. PDUs at Layer 4: Segments for TCP. Datagrams for UDP.
Introduction to IP Addressing Configure: IP address. Subnet mask. Default gateway. Benefits of using IP: Unique network addresses using IP addresses and subnet masks. Nodes can determine if PDU is destined for local or remote network. Routers use network address and default gateway to send PDU to correct network.
Binary and Decimal Conversion
IP Addresses 192.168.1.1 192.168.1.10 192.168.1.11
Dotted Decimal Notation Binary Format Decimal Notation
Subnet mask ignores the node portion Subnet Masks Network portion Node portion IP address 10010110.11010111.00010001.00001001 Subnet mask differentiates the network and node portions of the binary IP address 11111111.11111111.00000000.00000000 Network address 10010110.11010111.00000000.00000000 Network portion Subnet mask ignores the node portion
Network is divided into smaller subnetworks Subnets Subnet A Subnet B Network is divided into smaller subnetworks
IP Address Assignment Rules 139.80.100.10 255.255.0.0 139.90.100.10 255.255.0.0 TCP/IP 139.80.100.20 255.255.0.0 139.90.50.20 255.255.0.0
IP Address Classes Address Class Address Range Class A 0.0.0.0 to 126.255.255.255 Class B 128.0.0.0 to 191.255.255.255 Class C 192.0.0.0 to 223.255.255.255 Class D 224.0.0.0 to 239.255.255.255 Class E 240.0.0.0 to 255.255.255.255
Available Host and Network Addresses Calculate number of available host addresses: 2n-2 Can’t have all zeros or all ones Calculate number of available network addresses: 2a No need to reserve addresses
Private IP Addresses 10.0.0.0 to 10.255.255.255
Private IP Address Conflicts 192.168.1.0/24 192.168.2.0/24 Company Intranet
Private IP Address Conflicts (Cont.) 192.168.1.0/24 192.168.2.0/24 192.168.1.0/24 Duplicate addresses on this segment Company Intranet
Private IP Address Conflicts (Cont.) 192.168.1.0/24 192.168.1.0/24 VPN tunnel between two private networks Both internal networks use the same IP addresses, causing duplicates. One network needs to be changed, for example, to 192.168.2.0.
Default gateway is the address of the router connected to the Internet Default Gateways 139.87.10.9 Gateway 139.115.30.0 139.87.10.10 Default gateway is the address of the router connected to the Internet
Custom Subnets Routes traffic between subnets 203.175.10.0 Host range that arises from use of a non-default subnet mask 203.175.10.1 - 62 203.175.10.65 - 126 203.175.10.128 - 190 203.175.10.193 - 254 255.255.255.192 255.255.255.192 255.255.255.192 255.255.255.192 A class of leased addresses that are divided into smaller groups
Custom Subnet Masks Original subnet mask 11111111.11111111.11111111.00000000 255.255.255.0 /24 Custom subnet mask 11111111.11111111.11111111.11000000 255.255.255.192 /26
Classless Inter-Domain Routing CIDR combines the network address with a number 192.168.12.0 255.255.255.0 192.168.12.0 192.168.12.0/23 255.255.254.0 192.168.13.0 255.255.255.0
The Custom Subnetting Process Dividing line Dividing line 11111111.11111111.11111111.00000000 11111111.11111111.11111111.11000000 Network Host Network Host Subnetwork 192.168.1.0/26 “subnet zero” Subnetwork 192.168.64.0/26 “subnet 64” One network with 256 host addresses Four subnetworks with 64 host addresses each Network 192.168.1.0/24 Subnetwork 192.168.128.0/26 “subnet 128” Subnetwork 192.168.192.0/26 “subnet 192”
Number of subnets you need Move the mask this many bits to the right The Delta Method Number of subnets you need 128 64 32 16 8 4 2 1 7 6 5 4 3 2 1 0 Move the mask this many bits to the right
Network ID Calculation Step Example 1. Identify octet that contains both network and node bits 2. Convert shared octet for IP address to binary, add leading 0s as needed 3. Remove node bits from shared octet by applying subnet mask 4. Convert shared portion of IP address back to decimal 0111000 is 112, so the base network ID is 206.234.112.0
Guidelines for Creating Custom IP Addressing Schemes To create custom subnets: Assign an entire Class C octet to a subnet when possible. If your subnet has many nodes, consider using a shorter mask to create a larger address pool (/23 or /22). Make sure none of your subnets have overlapping IP addresses. To create custom subnet masks: Use the table to quickly map the number of needed subnets to the number of borrowed mask bits. Do not use custom subnet masks (VLSM) unless necessary. Exception: When assigning subnets to point-to-point WAN links, use a /30 mask to conserve IP addresses. To use CIDR: Use CIDR notation (as opposed to dotted decimal) for VLSM. When subnetting, physically organize the network topology so the subnets can be aggregated together into a supernet by a single border router.
Guidelines for Creating Custom IP Addressing Schemes (Cont.) To perform the subnetting process: Determine the number of subnets you need based on how many geographical locations, how many VLANs, or the need to isolate segments. Use the delta method to determine the subnet ID increments and the IP address ranges for each subnet. Use the number of subnets and number of mask bits table to help you with the subnetting process. To perform the delta method: Draw the number of mask bits in a diagram to help you identify the old and new mask positions. Use the number of subnets and number of mask bits table to help you identify the delta. To perform network ID calculation: Remember the network (subnet) ID must be an increment of a binary number (1, 2, 4, 8, 16, 32, 64, or 128). Use a diagram of bits to help identify the delta and the network ID increments.
IPv4 Address Space Limitations A theoretical maximum of approximately 4,295 billion separate addresses. The division of the address space into fixed classes: Node addresses falling either between classes or between subnets are unavailable for assignment. IP address classes provide a small number of node addresses. Depletion of Class A and Class B IP address assignments. Unassigned and unused address ranges within existing Class A and Class B blocks.
IPv6 128-bit binary address space. 340 billion, trillion, trillion addresses. New features: Simplified address headers. Hierarchical addressing. Support for time-sensitive network traffic. Required security. New structure for unicast addressing. Benefits include: Non-essential info in headers moved to optional extension headers. Stateless auto-reconfiguration of hosts. New IP header field enables IP to guarantee allocation of network resources. Implements Network-layer encryption and authentication with IPSec.
Transmission Types Unicast Multicast Anycast
IPv6 Addresses 2001:0db8:85a3:0000:0000:8a2e:0370:7334/64 Global addresses Site-local addresses Link-local addresses IPv6 transitional addresses Site (org) RIR ISP Subnet Host 2001:0db8:85a3:0000:0000:8a2e:0370:7334/64
IPv6 Tunneling Envelopes data packet in a form acceptable to the carrier: Microsoft DirectAccess Teredo tunneling Miredo tunneling 6to4 4to6
Router Solicitation and Advertising Router transmits router advertisement messages to nodes on link Nodes can send router solicitation messages to all routers on the link
Protocols bound to the network interface Protocol Binding Network interface Protocols bound to the network interface
Guidelines for Implementing IPv6 Addressing Implement IPv6 in phases. Ensure interoperability between IPv4 and IPv6. IPv4 network classes will not apply to IPv6. Configure AAAA DNS records for IPv6. Upgrade hardware to support IPv6. Ensure IPv6 environment is scalable. Ensure IPv6 packets sent on IPv4 network are encapsulated.
Connections Unacknowledged connectionless Acknowledged connectionless Connection-oriented
Flow Control Technique for optimizing data exchange between systems: Too much data, receiving node may drop packets. Too little data, receiver sits idle. Two flow control techniques are: Buffering. Data windows. TCP uses flow control to regular flow of data. UDP makes no attempt at flow control.
Buffering Handled by network card. Cache controller manages caching. To avoid flooding, squelch signal is used. TCP communicates the receiver’s buffer size so sender knows how much data it can send. UDP discards packets it cannot accommodate and expects the application to manage any errors.
Data Windows Without data windows With data windows 1 10 Packet ACK Defines how much data can be sent without waiting for an acknowledgment
Data sent with EDC in trailer Request data be retransmitted Error Detection Data sent with EDC in trailer Receiver generates an EDC and compares it with the one sent in the trailer Yes Do they match? No Request data be retransmitted Process data
Parity Checking Sender Receiver 1 1 1 2 3 4 Devices check data word by word 2 Sender adds one bit to each word of data 3 Receiver compares the transmitted and received bytes Compare bytes with parity bits Sender Receiver If there is a mismatch, the receiver requests retransmission 4 1 1 Parity bit Parity bit
Cyclic Redundancy Checking Sender attaches CRC to data Receiver calculates CRC for received block 1 2 Compare CRCs for error Values match and data is unaltered 3 1 1 1 1 CRC 1 1 1 1 CRC
Reflective Questions Where would you expect to use custom subnet masks? What measures have you taken to prepare for implementing IPv6?