Previous Next Contents Generated Index Home


Appendix C

Internet Protocol Routing




This appendix describes:


Overview of IP Addressing

Internet protocol (IP) addresses are 32 bits long. Thus, there is a possibility of approximately a total 4 billion addresses for the entire Internet. An IP address is expressed as a series of octets separated by dots. For example, the address 11111111 00000001 00000101 00001010 is written as 127.1.5.10, or using hexadecimal notation, 7f.1.5.a0.

Because of this vast number of addresses, there was a need to organize the network hierarchically into administrative domains. This need led to the definition of name administrative domains and network classes. Since each site can vary in size, IP addresses are divided into three main types or classes. A large site can reserve a class A address and receive 224 individual addresses, while a small site can reserve a class C address and receive 28 individual addresses.


Network Classes

Class A uses the first octet for the network address, and the rest for host addresses within this network. For example, a site whose network address is 129.0.0.0 would own the 224 addresses between 129.0.0.0 and 129.255.255.255.

Network
Host

0xxxxxxx  

xxxxxxxx  

xxxxxxxx  

xxxxxxxx  

Class B uses two octets for the network address, and two for the host address. For example, a site whose network address is 129.123.0.0 would own the 216 addresses between 129.123.0.0 and 129.123.255.255.

Network
Host

10xxxxxx  

xxxxxxxx  

xxxxxxxx  

xxxxxxxx  

Class C uses three octets for the network address, and one for the host address. For example, a site whose network address is 129.123.56.0 would own the 28 addresses between 129.123.56.0 and 129.123.56.255.

Network
Host

110xxxxx  

xxxxxxxx  

xxxxxxxx  

xxxxxxxx  


Subnetting

Subnetting is defined as dividing a network into smaller segments, or subnets, which is imperative for Class A and B networks. Routers do not forward packets outside a subnet if the destination address is within the same subnet. Thus, network traffic is decreased dramatically by segmenting a large network. For example, there is a class B network that is segmented into 255 subnets. Unless a packet destination is a host outside the subnet, a local packet is sent to 255 hosts instead of 256,000.


Netmasks

The format of the netmask is a series of 1s followed by a series of 0s. By ANDing an IP address with a netmask, we can get the address of the subnet.

Routers use netmasks to decide whether to forward a packet to an external subnet. For example, there is a machine with an IP address of 129.123.56.95 that is sending an email to another machine whose IP address is 129.123.56.100. By ANDing both IP addresses with a netmask (255.255.255.00), the result is 129.123.56.0 for both machines. The router then concludes that both the source machine and destination machine are in the same subnet. Therefore, the router does not forward the email to external subnets.

On the other hand, if the destination address is 129.123.67.100, then the resulting subnet address is 129.123.67.0. The router forwards the email to the external subnet (129.123.67.0).


Note - Although some of these examples apply to Ethernet links, the principles still apply regardless of the type of network.



Previous Next Contents Generated Index Home

Copyright © 2000 Sun Microsystems, Inc. All Rights Reserved.