DHCP for 4 NIC

I got 4 NIC, using Fedora Core...

eth0
ip: 222.222.222.222
netmask: 255.255.255.255
gateway: 222.222.222.220

eth1
ip: 192.168.1.1
netmask: 255.255.255.0
gateway: 192.168.1.1

eth2
ip: 192.168.2.1
netmask: 255.255.255.0
gateway: 192.168.2.1

eth3
ip: 192.168.3.1
netmask: 255.255.255.0
gateway: 192.168.3.1

i have active dhcp and dhcrelay at my Services Configuration

but i cannot see any dhcp.conf at my /etc but i found similiar to dchp where is /etc/log.d/conf/services/dhcpd.conf. but the dhcpd.conf only contains this:

###########################################################################
# $Id: dhcpd.conf,v 1.2 2002/10/12 02:08:09 kirk Exp $
###########################################################################

# You can put comments anywhere you want to.  They are effective for the
# rest of the line.

# this is in the format of <name> = <value>.  Whitespace at the beginning
# and end of the lines is removed.  Whitespace before and after the = sign
# is removed.  Everything is case *insensitive*.

# Yes = True  = On  = 1
# No  = False = Off = 0

Title = "dhcpd"

# Which logfile group...
LogFile = messages

# Only give lines pertaining to the dhcpd service...
*OnlyService = dhcpd
*RemoveHeaders

########################################################
# This was written and is maintained by:
#    Kirk Bauer <kirk@kaybee.org>
#
# Please send all comments, suggestions, bug reports,
#    etc, to kirk@kaybee.org.
########################################################

I already share the internet from eth0 to other NIC....and i try to connect client pc xp with one of this NIC and succesfully get the internet connection. but from the client i have to set the manual for network configuration. but i would like to make it dhcp....

thanks

emlilyAsked:
Who is Participating?
 
LuxanaConnect With a Mentor Commented:
try have a look on this link there is the solution what you need:

http://www.experts-exchange.com/Networking/Linux_Networking/Q_21035744.html

also

http://www.experts-exchange.com/Networking/Linux_Networking/Q_21124494.html

emlily,

try first make dhcp server and internet sharing for one subnet if it works add more.

0
 
LuxanaCommented:
HI


#EXAMPLE: /etc/dhcpd.conf


default-lease-time 86400;
max-lease-time 172800;
option domain-name "your_domain";
option domain-name-servers 192.168.1.1;
option routers 192.168.1.1;
#setting for eth1
subnet 192.168.0.0 netmask 255.255.0.0 {
        range 192.168.2.1 192.168.254.254;
}
#setting for eth0
subnet 10.0.0.0 netmask 255.0.0.0.{
       range 10.0.1.1 10.0.2.254;
}

is that what you need, to create dhcp for more subnets?
0
 
emlilyAuthor Commented:
yeah...but for eth1 and others, i just need to add setting same like eth0? the eth0 is using static ip where it directly connect to the modem...the dchp only for other NIC except eth0
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
emlilyAuthor Commented:
can you show me the example similiar to my configuration at my first message?
0
 
LuxanaCommented:
default-lease-time 86400;
max-lease-time 172800;
option domain-name "your_domain";
option domain-name-servers 192.168.1.1;
option routers 192.168.1.1;
#setting for eth1
subnet 192.168.0.0 netmask 255.255.0.0 {
        range 192.168.2.1 192.168.254.254;
}
#setting for eth0 for youe eth0 which is atached to modem just specify subnet and netmask and leave {} empty so #dhcp will be disabled on that particular subnet
subnet 222.222.222.222 netmask 255.255.255.250{  
}



0
 
LuxanaCommented:
emlily,

Why you are having eth1-3 on the same subnet? Why don't you use only eth1 to conect your clients as they all are on same network?

eth1
ip: 192.168.1.1
netmask: 255.255.255.0
gateway: 192.168.1.1

eth2
ip: 192.168.2.1
netmask: 255.255.255.0
gateway: 192.168.2.1

eth3
ip: 192.168.3.1
netmask: 255.255.255.0
gateway: 192.168.3.1
0
 
LuxanaCommented:
also I'm a bit confused;

you need to setup eth0-3 to use dhcp server or you want to run dhcp server on your subnets using eth1 eth2 eth3?
0
 
emlilyAuthor Commented:
i dont know....what i know is the eth0 is spread the internet to orther NIC....

example for eth1, all the client of dhcp after i connect to the router will be 192.168.1.X.

so which proper way?
0
 
emlilyAuthor Commented:
i mean which are the best setting for my situation. I using fedora for Linux router, where i split the office network, web server and ftp server.
0
 
LuxanaCommented:
emlily,

How many clients do you have on your network?
Here is the setting what you should use:

internet->eth0(externalIP)->translate externalIP to eth1 on subnet 192.168.0.1 using masqurade(or you can use proxy)->client

there is no point use one network car for each user so:

clients will get ip setting from eth1 whre will be your dhcpd service running lets say:
client 1:
ip:192.168.0.10
mask: 255.255.255.0
dns server 192.168.0.1
gateway 192.168.0.1

client 2:
ip:192.168.0.11
mask: 255.255.255.0
dns server 192.168.0.1
gateway 192.168.0.1

and so on...

http://www.faqs.org/docs/Linux-HOWTO/Firewall-HOWTO.html
0
 
emlilyAuthor Commented:
i understand...the purpose i put the NIC is to separate the network. the eth1 i want to connected to the router. and from the router will do the dhcp to the client...

my question is how to do the dhcp for all the NIC by following my configuration above

thanks
0
 
emlilyAuthor Commented:
thank you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.