First, let me see if I understand what you're saying:
You have a desktop PC which is dual-boot Linux and XP.
You have a laptop that runs XP.
You want the desktop (when it is running Linux) to provide DHCP service to the laptop.
The desktop also has a second NIC which has your Internet IP address. I suspect you want Linux to be a gateway to the internet for your laptop, in addition to providing it an IP address. (And if you don't have some other kind of firewall, I'm telling (not asking) you, you want Linux to be a firewall, too.)
You didn't say what distribution you're using. I'm going to describe things in terms of Red Hat, since that's what I'm most familiar with.
There are two separate packages "dhcpcd" (which is the client) and "dhcp-server" which is the server (the "dhcp-server" might be called just "dhcpd" (no "c" in front of the final "d")). If you don't have dhcpd.conf, you probably have the client installed rather than the server.
Samba is for doing file-sharing between a Linux box and a Windows machine. It's something that happens after all the machines involved already have their network stuff working. It doesn't hurt anything to have it on your system, but you're several steps away from doing anything with it.
When you're editing your dhcpd.conf file it should look something like this:
Quote:
option domain-name "clacour.com";
option subnet-mask 255.255.255.0;
option broadcast-address 10.1.1.255;
option routers 10.1.1.200;
option domain-name-servers 10.1.1.1;
ddns-update-style ad-hoc;
subnet 10.1.1.0 netmask 255.255.255.0 {
range 10.1.1.2 10.1.1.250;
}
|
The domain name can be whatever you want - it's mainly going to get used when you put a partial system name in. Mine happens to be real -- I really do have "clacour.com", but it doesn't have to be a real one. (You can also leave it out entirely.)
The "option routers" and "option domain-name-servers" lines are important. They are what tell all your client machines what to use as a default gateway (the "option routers" line) and where to go for DNS info. I run my own caching-only DNS service, because my ISPs DNS servers are atrocious. If you've been getting on the Internet with XP on the desktop, run "winipcfg" and get the DNS info from that. While you're there, get the gateway info, too.
The gateway that you put on the options routers line is NOT going to be what your ISP says the gateway is. It's going to be the internal address of your desktop.
Let's say you set up the desktop (internally) as 10.1.1.1. DHCP gives the laptop 10.1.1.2. When the laptop tries to get to the Internet, it's going to look at it's own internal stuff and see "my gateway is 10.1.1.1", so that's where it will send the packet.
Your desktop, on the other hand, WILL have your ISPs gateway as its gateway. It will get the packet from the laptop, look at the IP address and say "No clue where that is. Time to hand it off to the gateway. Let's see, my gateway is 203.196.174.xxx" (whatever your ISP told you).
I really hope you're using Red Hat, because this next piece is simple if you are, and could get pretty hairy if you're not.
Install the package "redhat-config-securitylevel", then run it to set up your firewall. After you've done that, set up your kernel to do ip-forwarding, and you should be all set. I'm deliberately not telling you how to turn on ip-forwarding yet. I want to be real sure you have a firewall working first.
In fact, if you can get out to the Internet from the desktop now, make the firewall your top priority. Red Hat ships with a fairly secure setup, but the more protection the better.
Good luck,
CHL