400 likes | 517 Views
Guide To TCP/IP, Second Edition. Chapter 2 IP Addressing And Related Topics. Objectives. Understand IP addressing, anatomy and structures, and addresses from a computer’s point of view
E N D
Guide To TCP/IP, Second Edition Chapter 2 IP Addressing And Related Topics Guide To TCP/IP, Second Edition
Objectives • Understand IP addressing, anatomy and structures, and addresses from a computer’s point of view • Recognize and describe the various IP address classes from A to E, and explain how they’re composed and used • Understand the nature of IP address limitations, and how techniques like Classless Inter-Domain Routing and Network Address Translation ease those limitations Guide To TCP/IP, Second Edition
Objectives (cont.) • Define the terms subnet and supernet, and apply your knowledge of how subnets and supernets work to solve specific network design problems • Understand how public and private Internet addresses are assigned, how to obtain them, and how to use them properly • Recognize the importance and value of an IP addressing scheme Guide To TCP/IP, Second Edition
IP Addressing Basics • Computers deal with network addresses in the form of bit patterns • IP uses a three-part addressing scheme • Symbolic: Example “support.dell.com” • Logical numeric: Example 172.16.1.10 • Physical numeric: Consists of a 6-byte numeric address, burned into firmware (on a chip) by network interface manufacturers Guide To TCP/IP, Second Edition
IP Addressing Basics (cont.) • Data Link Sublayers Layers • Media Access Control (MAC) • Logical Link Control (LLC) sublayer • At the Data Link layer, a network interface transfers frames, using MAC addresses, to another network interface only on the same physical or local network • At the Network layer, the sender’s address and the ultimate recipient’s address is in the IP packet header Guide To TCP/IP, Second Edition
Anatomy Of An IP Address • IP addresses use dotted decimal notation • IP Addresses take the form n.n.n.n, where n is guaranteed to be between 0 and 255 • Each number is an 8-bit number that is called an octet Guide To TCP/IP, Second Edition
IP Address Classes • IP addresses are further subdivided into five classes, from Class A to Class E • First three classes of addresses (A thru C), divide the octets as follows • Class A n. h.h.h • Class B n.n. h.h • Class C n.n.n. h • n = Network, h = Hosts Guide To TCP/IP, Second Edition
IP Address Classes (cont.) • Address Classes D and E are for special uses • Class D addresses are used for multicast communications • Class E addresses are reserved entirely for experimental use Guide To TCP/IP, Second Edition
More About Class A Addresses • Expressed in binary form, Class A addresses always take the following binary form: • 0bbbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb • b = 1 or 0 • 00000000 thru 01111111 for first octet • Addresses consisting of all 0s and all 1s, for the variable “b”, are reserved for special uses • Network ID and Broadcast Address (-2) • Address 127.n.n.n is reserved for loopback testing Guide To TCP/IP, Second Edition
Class A Address Facts And Figures • 10 is reserved for private network (10.0.0.0-10.255.255.255) 127.n.n.n is loopback testing => 124 addressable on the public network. Guide To TCP/IP, Second Edition
More About Class B Addresses • Class B addresses always take the following binary form: • 10bbbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb • b = 1 or 0 • 10000000 thru 10111111 for first octet Guide To TCP/IP, Second Edition
Class B Address Facts And Figures • Addresses with all 0’s and all 1’s are for special purpose. (-2) network ID and broadcast address. • 172.16-172.31 is reserved for private network (-16) • 127.n.n.n is loopback testing => 124 addressable on the public network. Guide To TCP/IP, Second Edition
More About Class C Addresses • Class C addresses always take the following binary form • 110bbbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb • b = 1 or 0 • 11000000 thru 11011111 for first octet • Addresses consisting of all 0s and all 1s, for the variable “b”, are reserved for special uses • Network ID and Broadcast Address Guide To TCP/IP, Second Edition
Class C Address Facts And Figures Guide To TCP/IP, Second Edition
More About Address Classes D And E • Class D addresses always take the following binary form: • 1110bbbb.bbbbbbbb.bbbbbbbb.bbbbbbbb • b = 1 or 0 • 11100000 thru 11101111 for first octet • Class E addresses always take the following binary form: • 11110bbb.bbbbbbbb.bbbbbbbb.bbbbbbbb • b = 1 or 0 • 11110000 thru 11110111 for first octet Guide To TCP/IP, Second Edition
Network, Broadcast, Multicast, And Other Special IP Addresses • Network addresses cannot identify a particular host on a network • Network addresses have all 0s in the host bit positions • Broadcast Address is the address that all hosts on a network must read • Broadcast addresses have all 1s in the host bit positions • Broadcast Frame and Packet Structures • Network Packet Broadcast 255.255.255.255 • Data Link Frame Broadcast 0xFF-FF-FF-FF-FF-FF • Multicast packet and address structures Guide To TCP/IP, Second Edition
Multicast And Other Special IP Addresses (cont.) • Host uses a service that employs a multicast address • Host registers itself to “listen” on that address • Data Link layer destination address is based on the Network layer multicast address Guide To TCP/IP, Second Edition
Broadcast Packet Example Guide To TCP/IP, Second Edition
Multicast Packet Example Guide To TCP/IP, Second Edition
Data Link MAC Conversion Guide To TCP/IP, Second Edition
Vanishing IP Address Space • Mid-1990s experts began to predict that the Internet would “run out” of available IP addresses • Address space saving techniques • Classless Inter-Domain Routing (CIDR) • Trade in existing IP network addresses ($) • RFC 1918 private IP addresses range • Network Address Translation (NAT) lets networks use private IP addresses internally and maps them to public IP address externally Guide To TCP/IP, Second Edition
Understanding Basic Binary Arithmetic • Binary equivalents • 0000 (0), 0001 (1), 0010 (2), 0011 (3) • 0100 (4), 0101 (5), 0110 (6), 0111 (7) • 1000 (8), 1001 (9), 1010 (10), 1011 (11) • 1100 (12), 1101 (13), 1110 (14), 1111 (15) • Converting decimal to binary • Division or subtraction methods • Converting binary to decimal • Add powers of 2 for each bit placement Guide To TCP/IP, Second Edition
Understanding Basic Binary Arithmetic (cont.) • High-Order bit patterns • Left most bits of an octet • 11000000 • Low-Order bit patterns • Right most bits of an octet • 00000011 Guide To TCP/IP, Second Edition
IP Networks, Subnets, And Masks • Class A, B, and C default masks • Class A: 255.0.0.0 • Class B: 255.255.0.0 • Class C: 255.255.255.0 • IP subnets and supernets • Network addresses are further subdivided beyond their defaults with subnet masks “stealing bits” from the host portion, this is called subnetting • Supernetting combines contiguous network addresses Guide To TCP/IP, Second Edition
IP Networks, Subnets, And Masks (cont.) • Calculating subnet masks • 2b – 2 = (the number of usable subnets) • Constant-Length Subnet Mask (CLSM) • Subnetting into multiple equal segments • Each subnet includes the same number of stations • Variable-Length Subnet Mask (VLSM) • Subnetting into multiple unequal segments • Each subnet may not have the same number of stations • Calculating supernets • Supernets “steal” bits from the network portion of an IP address to “lend” those bits to the host Guide To TCP/IP, Second Edition
Classless Inter-Domain Routing (CIDR) • Ignores the traditional A, B, and C class designations for IP addresses • Allows IP addresses from Class A, B, or C to be combined as a larger address space • CIDR limitations: • Network address must be contiguous • Routers in the routing domain must understand CIDR notation • CIDR RFCs: 1517, 1518, and 1519 Guide To TCP/IP, Second Edition
Public Versus Private IP Addresses • Private IP addresses: • RFC 1918 designates specific addresses for use as private IP addresses • Private IP addresses are not routed across the public Internet • Public IP addresses: • Used when identifying servers or services that must be accessible to the Internet • Assigned to routers, proxy servers, firewalls, web servers, e-mail servers, FTP servers, and news servers Guide To TCP/IP, Second Edition
Private Address Ranges Guide To TCP/IP, Second Edition
Managing Access To IP Address Information • IP security • Private IP addresses and NAT • Proxy server • Reverse proxy Guide To TCP/IP, Second Edition
Obtaining Public IP Addresses • Public IP addresses issued by ISPs • ICANN manages all (Internet Corporation for Assigned Names and Numbers) • IP-related addresses • Protocol numbers • well-known port addresses • assigns MAC layer addresses Previously IANA (Internet Assigned Numbers Authority - http://www.iana.org/) managed this task. • www.icann.org Guide To TCP/IP, Second Edition
IP Addressing Schemes • The Network space • Number of physical locations • Number of network devices at each location • Amount of broadcast traffic at each location • IP network is a broadcast domain • Routing (instead of bridging) is done to prevent unnecessary broadcasts from clogging expensive WAN circuits 2 • Availability of IP addresses Guide To TCP/IP, Second Edition
IP Addressing Schemes (cont.) • The Network space (cont.) • Delay caused by routing from one network to another • Size of the routing tables • Time required for the network to “converge” • Route aggregation or summary addresses • The Host space • Assign IP addresses based function (.1-.6 network devices)(.9-.14 servers) Guide To TCP/IP, Second Edition
Chapter Summary • IP addresses provide the foundation for identifying individual network interfaces (and therefore computers or other devices as well) on TCP/IP networks • Understanding address structures, restrictions, and behavior is essential to designing TCP/IP networks and appreciating how existing TCP/IP networks are organized • IP addresses come in five classes named A through E Guide To TCP/IP, Second Edition
Chapter Summary (cont.) • Classes A through C use the IPv4 32-bit address to establish different break points between the network and host portions of such network addresses • Class A uses a single octet for the network address and three octets for the host address; Class B uses two octets each for network and host portions; and Class C uses three octets for the network portion and one octet for the host portion Guide To TCP/IP, Second Edition
Chapter Summary (cont.) • Thus, only a few (124) Class A networks exist, but each can support more than 16,000,000 hosts; numerous (over 16,000) Class B networks exist, and each can support around 65,000 hosts; finally, approximately 2,000,000 Class C networks exist, each with only 254 hosts per network • Understanding binary arithmetic is essential to knowing how to deal with IP addresses, particularly when working with subnet masks Guide To TCP/IP, Second Edition
Chapter Summary (cont.) • Knowing how to convert from decimal to binary, and vice versa, helps you understand how the concept of stealing bits from the host portion of an IP address permits a network to be subdivided into logical subnetworks, or subnets • Likewise, it helps you understand how stealing bits from the network portion of multiple contiguous IP addresses increases the number of addressable hosts To help ease address scarcity, the IETF created a form of classless addressing called Classless Inter-Domain Routing (CIDR) that permits the network-host boundary to fall away from octet boundaries Guide To TCP/IP, Second Edition
Chapter Summary (cont.) • CIDR is best used to aggregate multiple Class C addresses to decrease the number of networks, while increasing the total number of addressable hosts • This technique is called supernetting • Likewise, to make best use of IP network addresses, a technique called subnetting permits additional bits to be taken from the host portion of a network • Recognizing the following bit patterns (decimal values follow in parentheses) helps when calculating or examining subnet masks: 11000000 (192), 11100000 (224), 11110000 (240), 11111000 (248), and 11111100 (252) Guide To TCP/IP, Second Edition
Chapter Summary (cont.) • Several techniques exist to hide internal network IP addresses from outside view, including address masquerading and address substitution • These techniques replace the actual internal network address from the source field in the IP header with a different value that reveals nothing about the actual address structure of the originating network • Either Network Address Translation software or a proxy server usually handles this kind of task • Within the Class A, B, and C IP address ranges, the IETF has reserved private IP addresses or address ranges Guide To TCP/IP, Second Edition
Chapter Summary (cont.) • Any organization may use these private IP addresses without charge and without obtaining prior permission, but private IP addresses may not be routed across the public Internet • Another important job for Network Address Translation software, in fact, is to map a range of private IP addresses to a single public IP address to permit computers that use private IP addresses to obtain Internet access Guide To TCP/IP, Second Edition
Chapter Summary (cont.) • When it comes to obtaining public IP addresses, the Internet Corporation for Assigned Names and Numbers (ICANN; previously the Internet Assigned Numbers Authority, or IANA, handled this task) is the ultimate authority • Today, unassigned public IP addresses are extremely scarce and therefore unlikely to be allocated to most ordinary organizations • In fact, most IP address assignments come from ISPs that subdivide already assigned Class A, B, or C addresses to assign public IP addresses to their customers Guide To TCP/IP, Second Edition