LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 06-01-2006, 07:31 AM   #1
BeagleBen
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Rep: Reputation: 0
DHCP with 2 Network Cards


Hello

I am wanting to setup dhcp with my linux server

I have one network adapter setup with a fixed external IP address of 88.96.xx.20 with a subnet of 255.255.255.248 from my isp

the router address is 88.96.xx.22 with the same subnet


I want to setup an internal network running as dhcp, with a range of 192.168.2.1 to 192.168.2.60 on a second network adapter, can any body help cant seem to get the 2 to talk

I am used to windows 2003 which handles this for me, sorry I am a linux newbie

I am using suse 10

Beagle
 
Old 06-02-2006, 04:05 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
getting the 2 to "talk" has nothing to do with DHCP at all, what are you actually asking about, how to set up a DHCP server or enabling routing on linux? dhcp servers are generally very easy to configure, just requiring basica modification of the default dhcpd.conf file that comes with it. as for routing....
Code:
echo "1" > /proc/sys/net/ipv4/ip_forward
/sbin/iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
where eth1 is your external nic
 
Old 06-06-2006, 05:44 AM   #3
BeagleBen
LQ Newbie
 
Registered: Jun 2006
Posts: 2

Original Poster
Rep: Reputation: 0
DHCP with 2 Network Cards

Thaks ACID

This is what I have so far in my dhcpd

option domain-name "livesupport.me.uk";
option domain-name-servers 212.23.3.100, 212.23.6.100;
default-lease-time 14400;
ddns-update-style none;
subnet 192.168.2.0 netmask 255.255.255.0 {
range 192.168.2.1 192.168.2.60;
default-lease-time 14400;
max-lease-time 172800;
echo "1" > /proc/sys/net/ipv4/ip_forward
/sbin/iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
}

The Clients pick up an IP but cannot connect to the web, not sure what to configure as default gateway

Thanks Beagle
 
Old 06-06-2006, 12:51 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
woah... those commands are, as i said, nothing at all to do wtih DHCP, and certainly have no place in a dhcpd.conf file at all. they are bash commands that would be run once on startup of your server. as for what your default gateway is, well you really must know that... it's whatever machine is to be used as the default route towards the internet. i.e. the one that those commands i gave should be run on.
 
Old 06-06-2006, 04:35 PM   #5
tertius
LQ Newbie
 
Registered: Mar 2006
Location: Johannesburg ,South Africa
Distribution: Linux Redhat
Posts: 25

Rep: Reputation: 15
hi,

What acid meant I think is that you need to insert the "echo...." command in your /etc/rc.d/rc.local file.
This means when ever your pc starts up it will run those two command which allows ip forwarding..

the "iptables -t nat ...." commmand you have to insert from the command line,then do a "service iptables save" to save it. Masquerading is needed to work through yout linux box.. Your default gw on your box is supposed to be the 88.96.xx.22 ip.

When you say you can't get the 2 to talk what do you mean? can you ping the two ip's of your nic's from your linux box??
 
  


Reply



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
dhcp with two NIC cards powah Linux - Networking 7 02-23-2006 02:28 PM
dhcp, multiple cards, no go !*#@ Recirqie Linux - Networking 11 01-10-2005 03:21 AM
network cards dhcp and suse 8.2 spjsm Linux - Hardware 2 05-29-2003 09:33 AM
network cards dhcp and suse 8.2 spjsm Linux - Networking 0 05-28-2003 09:22 AM
DHCP server on two LAN cards V.krishna kumar Linux - Networking 3 10-24-2002 12:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:34 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration