Subjects ->
Computer Networks ->
Lectures ->
Lecture #12
INT21CN Computer Networks
Practical #12
- Discover the IP address of the computer you're using to read this
Prac sheet. How you do this depends on what operating system you're
running.
- On MS Windows, the only (built-in) way that I know of is to
start up a "Command Prompt" (the thing that used to be called a
DOS Window) and type the command
ipconfig
,
or ipconfig /all
if you want to know
everything. There are lots of freebie GUI apps that
Windows users can download that will tell them the same
information -- most net-based gamers do this sort of thing all
the time!
- on a MacOS (9.2 and earlier) system you can simply look at the
"TCP/IP" Control Panel. On MacOS X, the information is in the
"Network" option of the System Preferences utility. The
ifconfig
works as well in a terminal
window, see next bullet point.
- The generic Unix command for this is
ifconfig -a
. This lists IP addresses,
and lots more, for all network interfaces on the machine. NB: this command doesn't work on SGI systems.
Instead, you have to specify which interface you want
to know about. Typically we use
ifconfig ef0
to find out about
interface ef0
.
What is the (apparent) class of the IP address
that you discover? What is the netmask in use? Are
there any other IP addresses mentioned that are interesting? And
anyway, why did I use the word "apparent" above?
- Optional Exercise: write [1] a computer program that can
translate between 32-bit numbers and dotted decimal form. Extend
your program to determine whether the address is class A, B or C,
and print the network and host portions. Further extend your
program to recognise and identify special IP addresses such as the
limited broadcast address, a directed broadcast address, etc.
-
These practical exercises accompany
Lecture #12.
See Tute #12 for the tutorial exercises
accompanying this prac.
[Previous Practical]
[Index]
[Next Practical]
Copyright © 2005 by
Philip Scott,
La Trobe University.