LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-05-2003, 05:37 PM   #1
KowCiller
LQ Newbie
 
Registered: Jul 2003
Distribution: RedHat Linux 7.3
Posts: 8

Rep: Reputation: 0
dhcpd.conf and 2nd NIC problem


Hello all!

Please excuse my newbieness when it comes to Linux, but I'll get right to the point.

What I would like: Home network with my Redhat Linux 7.3 box as the server. Handing out IPs to my other computers and sharing the internet connection obtained from my cable modem.

Where I'm at now:
eth0 = NIC that obtains an IP from my cable modem
eth1 = NIC that should hand out ips through dhcp

I have successfully set up my eth0 network card to accept dhcp ips from my cable provider, so i'm online!

Previously (before the internet conneciton was present), I successfully got my Linux box to hand out IPs to my other computers

THE BAD PART NOW:

Now that I have the internet connection up, when i try to start DHCP so other computers can get an IP address, I get this msg:

"No subnet declaration for eth0" It then tells me to add eth0 to my dhcpd.conf.

What do syntax do I need to add eth0 to my dhcpd.conf ? Remember, eth0 gets it's IP address from my cable modem... not eth1 that hands out IPs to my other computers...

Sorry for long post! Thanks a ton in advance!!

Aaron (KowCiller)
 
Old 07-05-2003, 06:24 PM   #2
andrew001
Member
 
Registered: Nov 2002
Distribution: Slackware 9.0
Posts: 321

Rep: Reputation: 30
I don't know why you're getting that error, but just so you know, you're also going to have to set up Network Address Translation or NAT so that the machines can share the linux boxes' connection.

One thing that I can think of that would explain why you're getting the error is you're starting dhcpd incorrectly. You need to do '/usr/sbin/dhcpd eth1' not just '/usr/sbin/dhcpd'.

Good luck,
Andrew
 
Old 07-05-2003, 06:42 PM   #3
KowCiller
LQ Newbie
 
Registered: Jul 2003
Distribution: RedHat Linux 7.3
Posts: 8

Original Poster
Rep: Reputation: 0
Andrew,

Thanks so much for the help!

By starting dhcp through the command you gave (/usr/sbin/dhcpd eth1) it seems to work.

Before I was attempting to use this command: /sbin/service dhcpd start

What is the difference between the two commands?

I'll start looking at how to set up the NAT now...

Thanks,

Aaron (KowCiller)
 
Old 07-05-2003, 07:59 PM   #4
cyph3r7
Member
 
Registered: Apr 2003
Location: Silicon Valley East, Northern Virginia
Distribution: FreeBSD,Debian, RH, ok well most of em...
Posts: 238

Rep: Reputation: 30
Yup you need to modify your rc init file to start the service on eth1 and you will be golden. Second IP forwarding will need to be turned on to get the internal traffic routed out. Add it to a rc init file also.....
 
Old 07-05-2003, 08:01 PM   #5
andrew001
Member
 
Registered: Nov 2002
Distribution: Slackware 9.0
Posts: 321

Rep: Reputation: 30
Great, I'm glad it worked out for you!

The only difference is that if you don't specify it will try and run dhcpd on all of the network interfaces. By passing it 'eth1', you told it to only run it on one. You were getting the error because eth1 was already using the dhcp client to get its ip address from your isp.

For NAT, you'll be able to find plenty of previous posts here on linux questions. You can do it yourself by using iptables, or use one of the many automatic firewall tools such as firestarter.

~Andrew
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dhcpd subnet declaration problems in dhcpd.conf vcrispo Linux - Networking 6 07-15-2005 10:32 AM
Slackware 2nd nic config problem NewbieUser Linux - Networking 3 02-17-2003 05:03 AM
Slackware 2nd nic config problem NewbieUser Linux - Networking 1 02-15-2003 01:03 PM
dhcpd.master or dhcpd.conf rickg Linux - Networking 0 04-11-2002 03:34 PM
Problem with adding a 2nd NIC to RH 7.0 IHawk Linux - Networking 0 02-18-2001 09:44 PM


All times are GMT -5. The time now is 01:09 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration