+------------+------------+----------+-------------------------------+ | Network | Host | Type of | Purpose | | Identifier | Identifier | Address | | +------------+------------+----------+-------------------------------+ | all 0s | all 0s | this | Used during bootstrap to | | | | computer | ask for own's IP address | +------------+------------+----------+-------------------------------+ | Network | all 0s | specified| The specified network, | | Identifier | | network | independent of its hosts | +------------+------------+----------+-------------------------------+ | Network | all 1s | specified| Broadcast address for the | | Identifier | | network | specified network. | +------------+------------+----------+-------------------------------+ | all 1s | all 1s | local | Broadcast on local network | | | | network | | +------------+------------+----------+-------------------------------+ | 127 | anything | loopback | Testing of TCP/IP while not | | | | | using the network | +------------+------------+----------+-------------------------------+
To account for subnetting a routing tables T takes the form:
Then when an IP address A has to be routed the algorithm used is:
For each row i of routing table T Let D = T[i].subnet-mask BitwiseAnd IP; If (D == T[i].subnet-id) then { Forward packet to T[i].next-hop; break; }Normally, routing moves packets across the internet until the packet arrives to the destination network. Then the packet is directed to a specific host. With subnetting it becomes possible to route packets across the internet to arrive to a specific subnet, and then to move within the subnet to a specific host.
The ideas of masks and subnetting have been generalized to allow more complex partitions of networks than the one we have just discussed. In particular, variable length subnet masks have been used. This is done with the Classless Inter Domain Routing (CIDR). Now the masks used in routing can be of any size and in matching IP addresses one aims for the longest match. For example, suppose that in a routing table we have a row for the network 1101011110110 and a row for the network 11010111101 then, if we are looking for the destination 11010111110110111111001011101001 we will use the first row since it matches the given destination and it is more specific than the second row. CIDR helps reduce two kinds of problems: the fact that IP addresses are not efficiently allocated using the class oriented schema; and the fact that routing table may grow to be very large.
Routing Protocols, like RIP (Routing Information Protocol) and BGP (Border Gateway Protocol), are used by routers to exchange the information needed to maintain routing tables. Routing will be discussed in a later lecture. An Autonomous System is the technical term for somebody's network (or a group of related networks). The exchange of routing information within an autonomous system and among autonomous systems is done using a variety of gateway protocols. An autonomous system may be isolated and protected from its environment through the use of a firewall ingargio@joda.cis.temple.edu