![]() |
||||||
| Home | Info | Meetings | Mail List | Board | HOWTOs | Links |
DHCP Client at Winthrop HOWTOWarren Dukes, zzdukesj@pobox.winthrop.edu A tutorial on how to setup a DHCP client at Winthrop University, so that Dorm residents who use linux can have access to the Network. Table of Contents1. Introduction 2. Client Setup
3. Name Resolution Issues
4. Samba
5. Troubleshooting
1. IntroductionDHCP is the protocal used by Winthrop University to dynmaically assign IPs to Dorm residents. One of the pitfalls of the DHCP implementation at Winthrop is that it appears an NT server is used to assign the addresses and/or DHCP client implementation in Linux has only recently begun to mature. This howto, assumes your ethernet card is working and operates properly in linux. For help on configuring an ethernet card, Ethernet-Howto. If you have any suggestions, inqueries, corrections or comments email, one of the authors. 2. Client Setup2.1 RedHat 6.x and Mandrake 6.x and 7.0First, get pump-0.7.4-1.i386.rpm. Then install pump-0.7.4-1.i386.rpm as root:
Now, create or edit /etc/pump.conf so that it contains:
Now, to check to see if it works, execute:
If it did not give you a failure everything is good. If it did not work check out Troubleshooting. Now, execute:
Finally, to make sure that networking will start on startup, execute:
Now everyting should work. Note: If you have any problems getting an IP address and you know your ethernet card is working, see Troubleshooting 5.2. Note also, most of the time pump works, but occasionally it will not, again see Troubleshooting 5.2. 2.2 Other Distros using 2.2.xFirst, download dhcpxd-1.0.3.tar.gz. Then, download dhcpclient.cpp.patch. Now, uncompress and untar the dhcpxd--1.0.3.tar.gz:
Change to the dhcpxd directory you just made:
Copy the patch to dhcpxd-1.0.3:
Apply the patch:
Now make dhcpxd:
And install dhcpxd:
Create a script(dhcpxd.script) to run dhcpxd with the contents of:
Now make the script executible:
And run the script:
Hopefully it works, if not check out troubleshooting. Note: I don't know anything about distros other than RedHat, so if you could fill in the details about a specific distro and how to get dhcp to work on startup, send an email. 3. Name Resolution IssuesThe DHCP clients correctly set the nameservers, however the linux box's hostname is not entered into the DNS. This can be worked around for localhost issues by updating the /etc/hosts file when the ip is assigned. However updating /etc/hosts will not allow other computers to resolve your hostname, only localhost. One semi-workaround, is to start the smb server daemon, which can report the ip that was update in /etc/hosts to the WINS server. This will allow windows boxes on the campus network to resolve you hostname, but non-Windows machines will not be able to resolve your hostname. Another workaround is to use a free DNS service. I suggest www.justlinux.com, which will allow you to have a name and dns entry in the penguinpowered.com domain. Also, another free DNS service is ddns.org, where your domain would be ddns.org. 3.1 Update /etc/hostsTo update the /etc/hosts dynamically, open your favorite editor, and
compose a script(updateHosts) that contains(where myhost is your hostname):
Make the script executable:
Now execute the script and your /etc/hosts file should contain your current
IP address:
You will want to execute the script everytime you reboot your computer or bring up your ethernet device. Note: There is a chance that the DHCP server may give you a new/different IP address when your DHCP client renews the lease to your current IP address. To solve this problem you can add a cron job to root's crontab, and have it execute the above script every 2 hours, 6 hours, or whatever. 3.2 Free DNS Service Configuration3.2.1 Configuring penguinpowered.comFirst, you need to go to http://my.justlinux.com and open an account. Then, go to My Control Panel, login(if you are not already), and go to "Dynamic DNS services." Now click add and enter your desired hostname, and press "Save." Now download jlclient-1.1.tar.gz, or get the latest version from here. Now unzip and unarchive jlclient-1.1.tar.gz:
Now change to the jlclient-1.1 directory:
Now (make sure you are root), copy jlclient.pl to /sbin/:
Now create a config file(as root), following the prompts:
Open your favorite editor and compose a script(dns.penuinpowered or append
to updateHosts):
Then, make the script executable(if you did not append to updateHosts):
Then, execute the script(if you appended to updateHosts, obv. execute that):
You will want to execute the script everytime you reboot your computer or bring up your ethernet device. Note: There is a chance that the DHCP server may give you a new/different IP address when your DHCP client renews the lease to your current IP address. To solve this problem you can add a cron job to root's crontab, and have it execute the above script every 2 hours, 6 hours, or whatever. 3.2.2 Configuring ddns.orgComing 4. Samba4.1 Accessing BirdnestTo access Birdnest(or access Samba(WFW) shares), make sure that you have smbfs compiled into your kernel or available as a module. The methods for accessing Birdnest, should be exactly the same for any other Samba(Windows For Workgroups/Network Neighborhood) service/share. 4.1.1 Using smbclientYou can access Birdnest via, smbclient by:
You will then be prompt for your password. Now you should be logged on and greeted with a "smb:\>" prompt. Type help at the prompt to get a list of commands. The commands are very similar to generic "ftp", so you should feel at home. 4.1.2 Using smbmountsmbmount is a tool to mount Samba(WFW) services/shares as you would any other filesystem under Linux. To mount your Birdnest account(where /mnt/smb is your mount point):
You will then be prompt for your password. To umount the your Birdnest account:
If you would like to be able to mount Birdnest without being root,
make sure you have smbmount, smbumount, and smbmnt setuid root:
4.2 Samba Server ConfigurationYou should take a look at SMB-HOWTO. Tips for /etc/smb.conf:
If you would like users to have access to their directories:
If you want to have a public share:
Note: In order to access shares make sure 95/98/NT are using encrypted passwords. Also, in order to access user shares in 95/98, it will be necessary to set the Network login/usrname in the registry. 5. Troubleshooting5.1 Make Sure Your Ethernet Card Is WorkingTo ensure that your eithernet card is working, while attempting to obtain an IP address via pump or dhcpxd, run /sbin/ifconfig repeatedly to ensure your ethernet card is able to send(TX packets:) and receive(RX packets:) packets. 5.2 If you are using Red Hat, or Mandrake...With Red Hat or Mandrake, sometimes pump seems to have a problem getting an ip address. For more reliable results use dhcpxd following the instructions in section 2.2 Other Distros using 2.2.x. 5.3 Troubleshooting with dhcpxddhcpxd has many options, run dhcpxd --help to see what they are. Particularly useful is the "-t" option. |
||||||
|
Modified:
Thu Feb 3 21:35:39 EST 2000
|
||||||