[Next] [Previous] [Up] [Top] [Contents]

18.6 Difference between Ethernet and Internet Addresses

18.6.2 Internet (IP) address

The Internet address is a 32-bit number (4 8-bit fields), that represent the individual machine and subnet of the network. Each 8-bit field is designated by a decimal number between 0 and 255, in the form: a.b.c.d. These addresses are divided into two parts: a network address and a host address. If the first bit of the address is 0, then this is a Class A address, allowing up to 224 - 2 hosts on a network. Class B networks have the first 2 bits as 10, and allow up to 216 - 2 hosts on a network. Class C address have the first 3 bits as 110, and allow up to 28 - 2 hosts on a network. There are also Class D addresses. These are reserved for multicasting, and have their first four bits as 1110. The following Table illustrates the characteristics of the IP Classes.
IP Classes
ClassFirst 4 bits# Network Bits# Host BitsNetwork Number
A0xxx7241 to 127
B10xx1416128 to 191
C110x218192 to 223
D111028Multicast224 to 239

These correspond to the following IP addresses characteristics.
IP Addresses
ClassMaximum # of NetworksMaximum # of HostsAddress RangeNetwork AddressHost Address
A12816,777,2141.*.*.* to 127.*.*.*ab.c.d
B16,38465,534128.*.*.* to 191.*.*.*a.bc.d
C2,097,152254192.*.*.* to 223.*.*.*a.b.cd

The Network and Broadcast addresses are reserved and not used for actual hosts. A Network addresses has a host value of 0, as in 128.146.116.0. A Broadcast address has all ones in the host address, e.g. 128.146.116.255. Earlier versions of SunOS (4.X) use the old style, all zeroes, to indicated the broadcast address, e.g. 128.146.116.0. All Sun systems accepts broadcasts from both the 0 and 255 addresses. If you are running SunOS 4.X you should reset the broadcast in /etc/rc.local to use the 255 address.

An address starting with 127 in the first field designates a loopback address, 127.0.0.1. This refers to the internal interface used by the machine to send a packet to itself. This is usually designated as interface lo0.

On a national basis IP addresses are assigned by the Network Information Center (NIC). Locally, these are assigned by the OSU/UTS NIC. A valid IP address and name would look like:

128.146.116.4 nyssa.acs.ohio-state.edu

where 128 --> .edu NIC
.146 --> .ohio-state
and .116.4 --> nyssa.acs UTS
where .116 --> a subnet of .acs.ohio-state.edu
and .4 --> nyssa

IP and hostname pairs are kept in /etc/hosts, which might have the contents:

127.0.0.1 localhost

128.146.116.4 nyssa nyssa.acs.ohio-state.edu loghost

There are 3 class B networks assigned to the Ohio State University:

128.146

140.254

164.107

Which should leave OSU with ample room for expansion for the near future.


Unix System Administration - 8 AUG 1996
[Next] [Previous] [Up] [Top] [Contents]