Addressing Contents
Total Page:16
File Type:pdf, Size:1020Kb
IPv4 - Wikipedia, the free encyclopedia Página 1 de 12 IPv4 From Wikipedia, the free encyclopedia The five-layer TCP/IP model Internet Protocol version 4 is the fourth iteration of 5. Application layer the Internet Protocol (IP) and it is the first version of the protocol to be widely deployed. IPv4 is the dominant DHCP · DNS · FTP · Gopher · HTTP · network layer protocol on the Internet and apart from IMAP4 · IRC · NNTP · XMPP · POP3 · IPv6 it is the only standard internetwork-layer protocol SIP · SMTP · SNMP · SSH · TELNET · used on the Internet. RPC · RTCP · RTSP · TLS · SDP · It is described in IETF RFC 791 (September 1981) SOAP · GTP · STUN · NTP · (more) which made obsolete RFC 760 (January 1980). The 4. Transport layer United States Department of Defense also standardized TCP · UDP · DCCP · SCTP · RTP · it as MIL-STD-1777. RSVP · IGMP · (more) 3. Network/Internet layer IPv4 is a data-oriented protocol to be used on a packet IP (IPv4 · IPv6) · OSPF · IS-IS · BGP · switched internetwork (e.g., Ethernet). It is a best effort IPsec · ARP · RARP · RIP · ICMP · protocol in that it does not guarantee delivery. It does ICMPv6 · (more) not make any guarantees on the correctness of the data; 2. Data link layer It may result in duplicated packets and/or packets out- 802.11 · 802.16 · Wi-Fi · WiMAX · of-order. These aspects are addressed by an upper layer ATM · DTM · Token ring · Ethernet · protocol (e.g., TCP, and partly by UDP). FDDI · Frame Relay · GPRS · EVDO · HSPA · HDLC · PPP · PPTP · L2TP · Contents ISDN · (more) 1. Physical layer 1 Addressing Ethernet physical layer · Modems · PLC 1.1 Address representations · SONET/SDH · G.709 · Optical fiber · 1.2 Allocation Coaxial cable · Twisted pair · (more) 1.3 Private networks 1.4 Localhost 1.5 IP Addresses ending in 0 or 255 1.6 Resolving 1.7 Exhaustion 2 Network address translation 3 Virtual private networks 4 Address Resolution Protocol 5 Reverse Address Resolution Protocol/DHCP 6 Packet structure 6.1 Header 6.2 Data 7 Fragmentation and reassembly 7.1 Fragmentation 7.2 Reassembly 8 See also 9 External links Addressing IPv4 uses 32-bit (4-byte) http://en.wikipedia.org/wiki/IPv4 22/11/2007 IPv4 - Wikipedia, the free encyclopedia Página 2 de 12 addresses, which limits the address space to 4,294,967,296 possible unique addresses. However, some are reserved for special purposes such as private networks (~18 million addresses) or multicast addresses (~1 million Internet addressing growth map. addresses). This reduces the number of addresses that can be allocated as public Internet addresses. As the number of addresses available are consumed, an IPv4 address shortage appears to be inevitable, however Network Address Translation (NAT) has significantly delayed this inevitability. This limitation has helped stimulate the push towards IPv6, which is currently in the early stages of deployment and is currently the only contender to replace IPv4. Address representations When writing IPv4 addresses in human readable form, the most common notation is the dot-decimal notation. There are other notations based on the values of 200.100 in the dot-decimal notation which comprises four octets in decimal separated by periods. This is the base format used in the conversion in the following table: Notation Value Conversion from dot-decimal Dot-decimal 192.0.2.235 N/A notation Dotted 0xC0.0x00.0x02.0xEB Each octet is individually converted to hex Hexadecimal Dotted Octal 0300.0000.0002.0353 Each octet is individually converted into octal Concatenation of the octets from the dotted Hexadecimal 0xC00002EB hexadecimal Decimal 3221226219 The hexadecimal form converted to decimal Octal 030000001353 The hexadecimal form converted to octal Most of these formats should work in all browsers. Additionally, in dotted format, each octet can be of the different bases. For example, 192.0x00.0002.235 is a valid (though unconventional) equivalent to the above addresses. A final form is not really a notation since it is rarely written in an ASCII string notation. That form is a binary form of the hexadecimal notation in binary. This difference is merely the representational difference between the string "0xCF8E83EB" and the 32-bit integer value 0xCF8E83EB. This form is used for assigning the source and destination fields in a software program. http://en.wikipedia.org/wiki/IPv4 22/11/2007 IPv4 - Wikipedia, the free encyclopedia Página 3 de 12 Allocation Originally, the IP address was divided into two parts: Network id – first octet Host id – last three octets This created an upper limit of 256 networks. As the networks began to be allocated, this was soon seen to be inadequate. To overcome this limit, different classes of network were defined, in a system which later became known as classful networking. Five classes were created (A, B, C, D, & E), three of which (A, B, & C) had different lengths for the network field. The rest of the address field in these three classes was used to identify a host on that network, which meant that each network class had a different maximum number of hosts. Thus there were a few networks with lots of host addresses and numerous networks with only a few addresses. Class D was for multicast addresses and class E was reserved. Around 1993, these classes were replaced with a Classless Inter-Domain Routing (CIDR) scheme, and the previous scheme was dubbed "classful", by contrast. CIDR's primary advantage is to allow re-division of Class A, B & C networks so that smaller (or larger) blocks of addresses may be allocated to entities (such as Internet service providers, or their customers) or local area networks. The actual assignment of an address is not arbitrary. The fundamental principle of routing is that address encodes information about a device's location within a network. This implies that an address assigned to one part of a network will not function in another part of the network. A hierarchical structure, created by CIDR and overseen by the Internet Assigned Numbers Authority (IANA) and its Regional Internet Registries (RIRs), manages the assignment of Internet address worldwide. Each RIR maintains a publicly searchable WHOIS database that provides information about IP address assignments; information from these databases plays a central role in numerous tools that attempt to locate IP addresses geographically. Reserved address blocks CIDR address block Description Reference 0.0.0.0/8 Current network (only valid as source address) RFC 1700 10.0.0.0/8 Private network RFC 1918 14.0.0.0/8 Public data networks RFC 1700 127.0.0.0/8 Loopback RFC 3330 128.0.0.0/16 Reserved (IANA) RFC 3330 169.254.0.0/16 Link-Local RFC 3927 172.16.0.0/12 Private network RFC 1918 191.255.0.0/16 Reserved (IANA) RFC 3330 192.0.0.0/24 Reserved (IANA) RFC 3330 192.0.2.0/24 Documentation and example code RFC 3330 192.88.99.0/24 IPv6 to IPv4 relay RFC 3068 192.168.0.0/16 Private network RFC 1918 198.18.0.0/15 Network benchmark tests RFC 2544 http://en.wikipedia.org/wiki/IPv4 22/11/2007 IPv4 - Wikipedia, the free encyclopedia Página 4 de 12 223.255.255.0/24 Reserved (IANA) RFC 3330 224.0.0.0/4 Multicasts (former Class D network) RFC 3171 240.0.0.0/4 Reserved (former Class E network) RFC 1700 255.255.255.255 Broadcast Private networks Of the 4 billion addresses allowed in IPv4, four ranges of address are reserved for private networking use only. These ranges are not routable outside of private networks, and private machines cannot directly communicate with public networks. They can, however, do so through network address translation. The following are the four ranges reserved for private networks: number of largest CIDR Name IP address range classful description IPs block 24-bit 10.0.0.0 – 10.255.255.255 16,777,216 single class A 10.0.0.0/8 block 20-bit 172.16.0.0 – 16 contiguous class 1,048,576 172.16.0.0/12 block 172.31.255.255 Bs 16-bit 169.254.0.0 – 256 contiguous class 65,536 169.254.0.0/16 block 169.254.255.255 Cs 16-bit 192.168.0.0 – 256 contiguous class 65,536 192.168.0.0/16 block 192.168.255.255 Cs The ranges 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are reserved for private networking by RFC 1918, while the 169.254.0.0/16 range is reserved for Link-Local addressing as defined in RFC 3927. Localhost In addition to private networking, the IP range 127.0.0.0 – 127.255.255.255 (or 127.0.0.0/8 in CIDR notation) is reserved for localhost communication. Any address within this range should never appear on an actual network and any packet sent to this address does not leave the source computer, and will appear as an incoming packet on that computer (known as Loopback). IP Addresses ending in 0 or 255 It is a common misconception that IP addresses ending in 255 or 0 can never be assigned to hosts on a subnet, but this is purely an artifact of classful addressing. In classful addressing (now obsolete with the advent of CIDR), there are only 3 possible subnet masks: 255.0.0.0 (Class A), 255.255.0.0 (Class B), 255.255.255.0 (Class C). If we have the subnet 192.168.5.0/255.255.255.0, the network identifier 192.168.5.0 refers to the entire network, so to avoid confusion, it cannot be assigned to a device on the network.