{"id":377,"date":"2020-08-18T19:23:47","date_gmt":"2020-08-18T20:23:47","guid":{"rendered":"http:\/\/www.linux-tutorial.info\/?page_id=77"},"modified":"2020-08-22T19:26:02","modified_gmt":"2020-08-22T20:26:02","slug":"this-is-the-page-title-toplevel-210","status":"publish","type":"page","link":"http:\/\/www.linux-tutorial.info\/?page_id=377","title":{"rendered":"IP Addressing"},"content":{"rendered":"\n<title>IP Addressing<\/title>\n<p>\nIn today&#8217;s\nworld of inter-connected computers, you may have a connection to hundred of thousands of other\nmachines. Granted there is no single cable connecting all of these computers, however there is a\nlogical connection in that you can use the telnet program from your PC in California and connect to\na machine in Germany. The problem is, how do the packets get from one end to another. Added to that,\nhow do you keep your local <glossary>network<\/glossary>\nin California from getting overloaded with packets that are being\nsent between machines in Germany and at the same time making sure that those telnet packets do get\nthrough? The answer is provided by the Internet Protocol (<glossary>IP<\/glossary>).\n<\/p>\n<p>\nJust as a street <glossary>address<\/glossary> is\nnot always sufficient to get your letter delivery, so is the host <glossary>IP address<\/glossary>\nnot always sufficient to get the\npacket delivered. If I sent you a letter, it could be sent to a single, central post office, whose\njob it was to distribute mail throughout the entire US. Because of the incredibly large number of\npieces of mail, this is impractical. Instead, there are thousands of offices,\nall over the country, whose job it is to <glossary>route<\/glossary>\nthe mail for us.\n<\/p>\n<p>\nIf we lived in a small town, the local post office\ncould catch a letter destined for a local <glossary>address<\/glossary>\nbefore it goes further. Mail with addresses\noutside could be sent to other post offices to be processed.\n<\/p>\n<p>\nA similar situation applies to\nIP addresses. In local, self-contained networks, the <glossary>IP<\/glossary>\n<glossary>address<\/glossary>\nalone is sufficient. However, when\nmultiple networks are combined, machines spend more time trying to figure out if the <glossary>packet<\/glossary>\nbelongs\nto them than actually processing information. The solution is a <glossary>network<\/glossary>\n<glossary>mask<\/glossary>.\nJust as a zip code\ntells a postal worker whether to process a particular piece of mail locally or not, the <glossary>network<\/glossary>\nmask\n(or netmask) tells machines whether or not they can simply ignore a <glossary>packet<\/glossary>\nor need to process it\nfurther. How this works, we&#8217;ll get to in a moment.\n<\/p>\n<question id=\"278\" text=\"How big are IP version 4 (IPv4) IP addresses?\" \/>\n<question id=\"279\" text=\"What is the term used to refer to IP address notation?\" \/>\n<question id=\"\" type=\"MC\" text=\"What is dotted-decimal notation.\" \/>\n<concept id=\"172\" description=\"The term used to refer to IP address notation is called 'dotted-decimal notation'.\" \/>\n<p>\nEvery machine on the <glossary>network<\/glossary>,\nneeds to have its own, unique <glossary>IP<\/glossary>\n<glossary>address<\/glossary>. Just like every house has a unique mail address. If that <glossary>network<\/glossary>  is\nconnected to the rest of the world, that <glossary>address<\/glossary>\nmust not only be unique within the local <glossary>network<\/glossary>,\nbut unique within the rest of the world, as well.\nWith the most common <glossary>IP<\/glossary>\nversion (IPv4), IP addresses are 32-bit\nvalues. They are usually represented by four sets of numbers, ranging from 0-255 separated by dots (.). This is referred to as <em>dotted-decimal notation<\/em>. In <glossary>dotted-decimal notation<\/glossary>,\n an address might look like this:\n<\/p>\n<p>147.132.42.18<\/p>\n<question id=\"280\" text=\"What is the term used for the individual numbers in an IP address?\" \/>\n<concept id=\"173\" description=\"The term used for the individual numbers in an IP address is called an 'octet'.\" \/>\n<concept id=\"\" description=\"The term 'octet' in an IP address comes from the fact that it consists of 8 bits.\" \/>\n<p>\nSince each of these numbers range between 0-255,\nthey can be represented by eight bits and are therefore referred to as an <em>octet<\/em>. This IP\naddress is often thought of as being composed of a <glossary>network<\/glossary>\nportion (at the beginning) and a node (or\nmachine) portion at the end. This would be comparable to writing a street address\nas:<\/p>\n<p>95061.Main_Street.42<\/p>\n<p>\nWhere 95061 is the zip code and Main Street is the street and\n42 is the <glossary>address<\/glossary>\non that street. The reason we write the street address in this fashion, is that\nit&#8217;s common to think of the <glossary>IP<\/glossary>\n<glossary>address<\/glossary>\nas moving from the general to the more specific.\n<\/p>\n<question id=\"281\" text=\"In what range is the first octet of a class A IP address?\" \/>\n<question id=\"282\" text=\"In what range is the first octet of a class B IP address?\" \/>\n<question id=\"284\" text=\"How many byte\/octets are used for the network portion of a class A address?\" \/>\n<question id=\"285\" text=\"How many byte\/octets are used for the network portion of a class B address?\" \/>\n<question id=\"478\" text=\"In what range is the first octet of a class C IP address?\" \/>\n<question id=\"480\" text=\"Not all IP addresses are available on the Internet.\" \/>\n<question id=\"481\" text=\"How many byte\/octets are used for the network portion of a class C address?\" \/>\n<question id=\"\" type=\"MC\" text=\"How many classes of networks are in common use?\" \/>\n<question id=\"\" type=\"MC\" text=\"What is the default subnet mask for a class A network?\" \/>\n<question id=\"\" type=\"MC\" text=\"What is the default subnet mask for a class B network?\" \/>\n<question id=\"\" type=\"MC\" text=\"What is the default subnet mask for a class C network?\" \/>\n<concept id=\"\" description=\"There are three classes of networks in common use: A, B and C.\" \/>\n<p>\nCurrently, there are three classes of networks in common use, which are broken down by both\nthe range used in the first octet and the number of octets used to identify the <glossary>network<\/glossary>.\n Class A\nnetworks are the largest and use the first octet as the <glossary>network<\/glossary>\n<glossary>address<\/glossary>.\nNetworks in this <glossary>class<\/glossary> will\nhave the first octet in the range 1-126. Class B networks used the first two octets, with the first\nbeing in the range 128-192. The smallest networks, <glossary>class<\/glossary>\nC use the first three octets in the network\naddress and with the first in the range 192-223. How <glossary>IP<\/glossary>\naddresses are broken down by the different\nnetwork classes is shown in Table 0\\1.\n<\/p>\n<p>\n<table BORDER cellspacing=1 bordercolor=\"#000000\" cellpadding=7 WIDTH=561>\n<tr><td><b>Class<\/b><td><b>Range within 1st octet<\/b><td><b>Network ID<\/b> <td><b>Host ID<\/b> <td><b>Possible networks<\/b> <td><b>Possible hosts per network<\/b><\/tr>\n<tr><td>A <td>1-126 <td>a <td>b.c.d. <td>126 <td>16,777,214<\/tr>\n<tr><td>B <td>128-191 <td>a.b <td>c.d <td>16,384 <td>65,534<\/tr>\n<tr><td>C <td>192-223 <td>a.b.c <td>d <td>2,097,151 <td>254<\/tr><\/table>\n<b>Table &#8211; <glossary>IP<\/glossary> Address Breakdown by Network\n<\/b>\n<\/p>\n<question id=\"479\" text=\"Network addresses 200 and above are reserved for special purposes such as multicast addresses.\" \/>\n<concept id=\"\" description=\"The network address 127 represents the local computer, regardless of what network it is really on.\" \/>\n<concept id=\"\" description=\"Network addresses 224 and above are reserved for special purposes such as multicast addresses. \" \/>\n<question id=\"\" type=\"mc\" text=\"Which of the following is not a valid host IP address?\" \/>\n<p>\nThere are a couple of\nthings I would like to point out about this table. First, the network address 127 represents the local computer, regardless of what network it is really on.\nThis is helpful for testing as well as many internal operations. Network addresses 224 and above are reserved for special purposes such as multicast addresses. The terms &#8220;possible networks&#8221; and &#8220;possible hosts per <glossary>network<\/glossary>&#8221; are those that are calculated mathematically. In some cases, 0 and 255\nare not acceptable values for either the <glossary>network<\/glossary>\n<glossary>address<\/glossary>\nor the <glossary>host<\/glossary>\naddress. However, 0 can be used in a <glossary>network<\/glossary>\n<glossary>address<\/glossary> for either the second or third octet (for example, 10.2.0).\n<\/p>\n<question id=\"\" type=\"TF\" text=\"The first octet by itself is not sufficient to determine the network class.\" \/>\n<concept id=\"\" description=\"he first octet by itself is not sufficient to determine the network class.\" \/>\n<concept id=\"\" description=\"Large corporations are often given Class A networks, which they break down into smaller subnets.\" \/>\n<p>\nKeep in mind\nthat a Class A <glossary>address<\/glossary>\ndoes not necessarily mean that there are 16 million hosts on a single\nnetwork. This would be impossible to administrate and would over burden most <glossary>network<\/glossary>\ntechnologies.\nWhat normally happens is that a single entity with a lot of machines, such as Hewlett-Packard is given a Class A\n<glossary>address<\/glossary>.\nThey will then break it down further into smaller <em>sub-nets<\/em>. We&#8217;ll get into more details\nabout this shortly.\n<\/p>\n<question id=\"\" type=\"mc\" text=\"What does a network host combine to determine which packets it should receive or ignore?\" \/>\n<concept id=\"\" description=\"A network host uses the network ID and host ID to determine which packets it should receive or ignore.\" \/>\n<p>\nA <glossary>network<\/glossary>\n<glossary>host<\/glossary>\nuses the network ID and host ID to determine which packets\nit should receive or ignore and to determine the scope of its transmissions (only nodes with the same <glossary>network<\/glossary>\nID accept each other&#8217;s IP-level broadcasts). Because the sender&#8217;s <glossary>IP<\/glossary>\n<glossary>address<\/glossary>\nis included in every outgoing <glossary>IP<\/glossary>\n<glossary>packet<\/glossary>,\n it is useful for the receiving computer system to derive the\noriginating <glossary>network<\/glossary>\nID and <glossary>host<\/glossary>\nID from the <glossary>IP<\/glossary>\n<glossary>address<\/glossary>\nfield. This is done by using <glossary>subnet<\/glossary>\nmasks, as described in the following section.\n<\/p>\n<question id=\"\" type=\"mc\" text=\"In what case would you not need to have IP addesses be unique world-wide?\" \/>\n<p>\nIn some cases, there is no need to have IP\naddresses that are unique world-wide, since the <glossary>network<\/glossary>\nwill <i>never<\/i> be connected to the rest of the world. For example,\nin a factory where the machines communicate only with each other via TCP\/IP. There is no reason for these\nmachines to be accessible from the Internet. Therefore, there is no need for them to have an official <glossary>IP address<\/glossary>.\n<\/p>\n<p>\nYou <i>could<\/i> just randomly assign IP addresses to these machines and hope\nthat your <glossary>router<\/glossary> or <glossary>firewall<\/glossary>\nis configured correctly not to pass along the packets from these machines. One slip and you have the potential for not only messing up your own <glossary>network<\/glossary>, but someone else&#8217;s as well.\n<\/p>\n<question id=\"328\" text=\"One problem with the current IP address scheme is that even private address must be unique among all machines world-wide.\" \/>\n<question id=\"\" type=\"MC\" text=\"In terms of IP addresses, what is a 'private network'?\" \/>\n<question id=\"\" type=\"TF\" text=\"'Private' network addresses are not routed across the internet.\" \/>\n<concept id=\"215\" description=\"Not all IP addresses are available on the Internet.\" \/>\n<concept id=\"\" description=\"Private network address do not need to be unique world-wide, only within a given network.\" \/>\n<p>\nThe solution was provided in RFC-1918. Here, three sets of <glossary term=\"IP address\">IP addresses<\/glossary>\nwere defined for use in &#8220;private&#8221; networks. These won&#8217;t be routed and there is no need to coordinate their\nuse with any of the registrations agencies. The <glossary>IP<\/glossary>\naddresses are:\n<\/p>\n<question id=\"\" type=\"mc\" text=\"What is the IP address range for private class A addresses?\" \/>\n<question id=\"\" type=\"mc\" text=\"What is the IP address range for private class B addresses?\" \/>\n<question id=\"\" type=\"mc\" text=\"What is the IP address range for private class C addresses?\" \/>\n<p>\n10.0.0.0        &#8211;  10.255.255.255<br \/>\n172.16.0.0      &#8211;  172.31.255.255<br \/>\n192.168.0.0     &#8211;  192.168.255.255<br \/>\n<p>\nAs you can see that there is just a single <glossary>class<\/glossary>\nA <glossary>address<\/glossary>, but 16 class B and\n255 <glossary>class<\/glossary>\nC networks. Therefore, no matter what size your <glossary>network<\/glossary>\nis, you can find a private network\nfor your needs. Note also that because these are private addresses, there is no requirement that says if you have\nonly a class C network, for example, that you need to use addresses in the 192.168 range. I have worked in companies\nthat have created a large number of class C networks in the 10. private address range.\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>IP Addressing In today&#8217;s world of inter-connected computers, you may have a connection to hundred of thousands of other machines. Granted there is no single cable connecting all of these computers, however there is a logical connection in that you &hellip; <a href=\"http:\/\/www.linux-tutorial.info\/?page_id=377\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-377","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/377","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=377"}],"version-history":[{"count":1,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/377\/revisions"}],"predecessor-version":[{"id":594,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/377\/revisions\/594"}],"wp:attachment":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=377"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}