Internet Addressing
Internet Addressing
1
In order for a host machine to be able to
deliver data through the Internet, it must
be configured with an IP address,
gateway address and subnet mask.
2n 2n-1 .... 27 26 25 24 23 22 21 20
20 = 1, 21 = 2, 22 = 4, 23 = 8, etc
10000010.11000010.11100000.10100000 = 130.194.224.160
4
Addressing Schemes :
Class A – Large networks
Normal
Class B – Medium networks classes
Class E – Reserved
5
Class A/B/C Summary :
32-bits
w . x . y . z
Note : an IP address hence has at least 2 parts : a NetID part, & a HostID part
(analogy : a telephone number has an AreaCode part and a LocalNumber part)
6
Note : Fixed Leading Bits (0 for Class A, 10 for Class B, 110 for Class C, etc)
1111
Note how the IPs in the normal classes have a dividing point separating the
NetID & the HostID. Also note the fixed leading bits for the different classes.
7
Addressing Ranges :
Class A :
1.xxx.xxx.xxx to 126.xxx.xxx.xxx
Class B :
128.0.xxx.xxx to 191.255.xxx.xxx
Class C :
192.0.0.xxx to 223.255.255.xxx
8
9
Side note – are we running out of IP
addresses?
Groups of (commonly)
geographically located nodes are
placed into a common subnetwork.
11
eg. Consider the IP address
130.194.224.7 :
12
When subnets are in use, one
problem that may arise is – “What is
the real local HostID?” (i.e., what is
directly connected to this node)
In order for subnetting to work, a
subnet “mask” is implemented on all
nodes and routers. This is used to
determine the real Host ID for any
particular IP address.
13
• with subnetting, an IP address is
now made up of 3 components :
NetworkID, SubnetID, & HostID.
14
Administrators may alter the
subnetwork mask to deal with
specific problems.
e.g., rather than allocate the entire
range of the HostIDs to individual
hosts, he may decide to create
“subnets” of devices (perhaps based
on departments or locations), then
use a subnet mask to distinguish
between them.
15
Digression: What is a mask?
20
Using Subnet masks
21
Example : Determining the Subnet
Mask of a Subnetted Network
Eg.
22
Determining the Subnet ID of an IP
Address Through Subnet Masking
In this example, let’s consider a host on this network with
a real IP address of 154.71.150.42 :
ifconfig
ping
ethtool
netstat
traceroute
26
ifconfig
This tool changes the configuration of
interfaces.
Usage :
Example usage:
ping 130.194.1.99
28
ethtool
Permits configuration of the
ethernet interface(s).
Example usage:
ethtool eth0
(displays the current hardware configuration)
ethtool –s eth0 speed 10
(alters the current interface speed to 10Mbps)
29
netstat
A tool for displaying the current
network statistics, particularly
the external network connections.
Example usage:
netstat –a
(show all internet sockets – try this command while you have
some internet browsing sessions opened)
30
traceroute
A tool for following the path taken
in the Internet by packets from
source host to destination address.
Example usage:
traceroute 130.194.1.99
31
Some useful web references
http://www.tcpipguide.com/free/index.htm
http://www.computerhope.com/jargon/i/ip.htm
http://www.webopedia.com/TERM/S/subnet_mask.html
http://www.freesoft.org/CIE/Topics/26.htm
http://www.tech-faq.com/ip-address-classes.shtml
http://download.microsoft.com/download/9/4/6/946958ef-7b86-4ddc-bfdb-
c7ed2af4ce51/TCPIP_Fund.pdf
http://acc6.its.brooklyn.cuny.edu/~gurwitz/core5/nav2tool.html
http://www.mathsisfun.com/binary-decimal-hexadecimal-converter.html
32