LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 11-17-2008, 08:04 PM   #1
Leffster
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Rep: Reputation: 0
DHCP problems using multiple external NICs on same subnet


Let me start by telling you what I want to achieve, or rather need to .

I have to setup a NAT-firewall with multiple external NICs and one internal. The problem is that the external NICs must use DHCP and they are all on the same subnet. Not stopping there, the DHCP-servers are on a completely different subnet, obviously forwarded by the default gw.

Ok, so far I've come to the DHCPrenew-process since I can only have ONE default gateway and since the DHCPserver is on another subnet all requests gets routed through the default NIC. They all start out fine, broadcasting and receiving an IP but when it's time to renew... I've tried to trick dhclient into adding different static routes (by dev) before sending the request but found out that dhclient-enter-hooks is only called *after* any dhclient stuff.

What I really would like is some way to make everything originating from one NIC to exit through the same (like multiple default gateways). Is this possible or am I just wishing?

I'm not sure that this will ever work but any ideas are gratefully appreciated, I do feel like an idiot and that I lack some iptables/routing knowledge here.

Edit: Ok, feeling more and more like an idiot I'll look into http://lartc.org/ before asking for more help. Sorry.

Last edited by Leffster; 11-17-2008 at 08:39 PM.
 
Old 11-18-2008, 03:43 AM   #2
SonJelfn
Member
 
Registered: Aug 2003
Location: Sendai, Japan
Distribution: Slackware, Slackware64, Debian
Posts: 63

Rep: Reputation: 17
I'm sorry, but I do need to ask the following question:

Why exactly do you need to have more than one external interface on the same subnet?

I ask because, depending on what you want, it might be more feasible than what you are asking for right now.

There *are* ways to segment your traffic via different interfaces, but most of the time it's much easier to have each external NIC on a different IP subnet. That way you don't mess around too much with the routing tables which are problematic. Even then though, you do have the issue of segmenting your traffic, say certain machines to go out certain interfaces.

You can read up the examples on the following page:
http://www.linuxfoundation.org/en/Net:Iproute2_examples

As I said, depending on what you want, you could also do bonding on the external NICs which would use only one IP, leaving your routing tables as they are and effectively using all your external NICs to balance your traffic load.

Read:
http://www.linuxfoundation.org/en/Net:Bonding

If you can specify what exactly is your purpose with all the external NICs, I might be able to help you more.

Until then, good luck.
 
Old 11-18-2008, 11:46 AM   #3
Leffster
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Original Poster
Rep: Reputation: 0
I knew I couldn't get around that question.

First, thank you for the links, I will read up on those. The purpose of multiple external NICs is mainly that my UL is capped and it's done on a IP- or NIC-base so a second NIC gives me twice the upload or rather a way for me to have my own, maxed out, UL regardless of everything else. I do have quite a lot http-traffic. The other, not so small reason is my thirst for knowledge.

That being said my first thought was just to get the interfaces up and running, giving me the possibility to do whatever I want to, not mainly loadbalancing. So far things are working the way I thought except the DHCP renewal which is *very* strange, ifup will *always* work, DHCPREQUEST to the server that is on another subnet will *never* work (on the second NIC) but since dhclient falls back to broadcasting after a while I thought things would be ok BUT it's not. It will *sometimes*, typically 8-9 out of 10 return ok but then, all of a sudden, it's just 'No DHCPOFFERS received.' On thing I've learned through my years is that there's nothing like *sometimes*, there's always a reason but in this case I'm stumped.. (perhaps not the right word, english isn't my native tounge)

Well, I'll go back into reading about the bonding, thanks so far.
 
  


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 - Multiple range in 1 subnet??? - Debian Sarge 3.1, DHCP3.0 kenwoodgt Linux - Networking 1 01-24-2008 03:23 PM
two nics on one subnet on one machine mauricem Linux - Networking 2 04-27-2007 06:28 AM
dhcp and multiple external IPs inc0gs Linux - Networking 4 06-15-2005 02:27 PM
DHCP Subnet Problems Hunza Linux - Networking 14 06-14-2004 03:38 AM
DHCP server with multiple nics and subnets hawkpaul Linux - Networking 6 12-20-2001 07:32 AM

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

All times are GMT -5. The time now is 06:33 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