New Perspectives On Web Design

(C. Jardin) #1
By Paul Tero CHAPTER 8

On Mac and Linux, the actual command is prefaced by sudo^8 which forces
you to put in the root password for the computer. You must also specify
which interface to renew, usually eth0 on Linux and en0 for Mac.
If this was successful, then voilà! You’re a tiny bit closer to being
back on the Internet. If not, check your broadband router. It may be off,
disconnected or broken, or it may just need resetting.


DefaulT gaTewaY


You know your broadband router was alive at some point in the recent past
because it gave you an IP address. But that could have been up to three
days ago: is it still there now?
Every computer on the Internet also has a default gateway^9. This is
basically the IP address of the piece of networking equipment at the other
end of your network cable or wireless connection. It is your computer’s
gateway to the Internet. Every time you request anything from the
Internet, it goes via this gateway. To find our your default gateway, run
netstat -nr on Mac and Linux, and route print (or ipconfig again) on
Windows. You will get something a bit like:


Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 eth0


In the Destination column above, the 0.0.0.0 (or the word “default”)
means anywhere and the G in the Flags column stands for “Gateway”. The
default gateway of this computer is therefore 192.168.0.1. For people
at home or in a small office this is probably the internal IP address of the
broadband router.


8 Especially on Linux, not all users are allowed to run sudo and sometimes it won’t ask for a password,
for example, if you have already run it recently. Also beware that sudo can be dangerous as it allows you
to run anything. You can inadvertently delete and stop things that should be left alone.
9 It ’s possible to have more than one default gateway, e.g. if you are connected to a virtual private network.

Free download pdf