<html>
<head>
<title>DHCP under the Hurd</title>
</head>
<body>
<h2>DHCP under the Hurd</h2>
<p>
This document is a little recipe of how to get connected to the Internet
under the Hurd with a DHCP connection ( for example, usual Cable
Modem ISP's ). Althought there's no DHCP client at this moment for the Hurd,
this is no problem if you have another operating system in your computer
with a DHCP client. In this document I suppose that the OS with
DHCP client support is Linux ( as is my case ),
but it will be easy to adapt what is said in this recipe to another OS.
Thanks to <a href="mailto:alfredo@netropolis-si.com">
Alfredo Fernández</a> and, although in a very indirectly way,
Tony Sanmartí for their
unvaluable help without which this document would never be wrotten.
</p><p>
As this is a recipe, just follow the next steps :
</p><ol><li>
<p>
For configure the network under the Hurd you only need three parameters :
your IP address, the gateway address and the netmask; since the only thing
that DHCP does is to provide you those parameters, and configure the network
according them, all withouth the need of any knowledge from the user,
the only thing you need is to obtain those parameters;
in linux this is made with :
</p><pre>
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:50:BF:5D:2F:C7
inet addr:217.216.187.229 Bcast:217.216.191.255 Mask:255.255.248.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4027 errors:0 dropped:0 overruns:0 frame:0
TX packets:710 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:695432 (679.1 KiB) TX bytes:77054 (75.2 KiB)
Interrupt:10 Base address:0xa400
# route
Destination Gateway Genmask Flags Metric Ref Use Iface
217.216.184.0 * 255.255.248.0 U 0 0 0 eth0
default cliente-2172161 0.0.0.0 UG 0 0 0 eth0
# route -n
Destination Gateway Genmask Flags Metric Ref Use Iface
217.216.184.0 0.0.0.0 255.255.248.0 U 0 0 0 eth0
0.0.0.0 217.216.184.1 0.0.0.0 UG 0 0 0 eth0
</pre><p>
This could seems quite complicated if it the first time you make it and
you know almost nothing about networking ( as was my case ); so let's make
a brief interpretation of those parameters :
</p><ul><li><p>
ifconfig just give you the IP address and the netmask :
</p><pre>
inet addr:217.216.187.229 Bcast:217.216.191.255 Mask:255.255.248.0
</pre><p>
So take a piece of paper and anotate those two parameters.
</li></p><li><p>
route gives you the gateway address; the gateway is indicated in the line
starting with <samp>default</samp> in the <samp>Destination</samp> field :
</p><pre>
Destination Gateway Genmask Flags Metric Ref Use Iface
< forgot about the first line !! > < forgot about the first line !! >
default cliente-2172161 0.0.0.0 UG 0 0 0 eth0
</pre><p>
but better if you have the gateway address in a more numeric way;
this is why <samp># route -n</samp> is typed :
</p><pre>
Destination Gateway Genmask Flags Metric Ref Use Iface
< forgot about the first line !! > < forgot about the first line !! >
0.0.0.0 217.216.184.1 0.0.0.0 UG 0 0 0 eth0
</pre><p>
the gateway address is 217.216.184.1; again, anotate it.
</p></li></ul>
</li><li>
<p>
Another fundamentak thing to set up your network under the Hurd are
the addresses of the nameservers. In linux they are stored with the
file /etc/resolv.conf. Copy this file to your Hurd's partition :
</p><pre>
# cp /etc/resolv.conf <hurd-mount-point>/etc/resolv.conf
</pre>
</li><li>
<p>
Reboot your machine and boot the Hurd; login as root and type :
</p><pre>
# settrans -fgap /server/socket/2 /hurd/pfinet -i eth0
-a 217.216.187.229 -g 217.216.184.1 -m 255.255.248.0
</pre><p>
of course substitute these example values above by your network parameters
</p>
</li><li>
<p>
Let's test the network :
</p><pre>
# ping hurd.gnu.org
</pre><p>
did it works OK ? In that case :
</p><pre>
# lynx hurd.gnu.org
</pre><p>
and enjoy surfing the net !
</li></ul><p>
</p>
</li></ol><p>
</p>
</body>
</html>