LinuxQuestions.org
Help answer threads with 0 replies.
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-19-2010, 03:17 PM   #1
asl1176
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Rep: Reputation: 0
Multible network interfaces, router settings?


Hey guys!

I have a Debian machine up and running with tree network interfaces.
This is what i want it to work with.

eth0 = dhclient from ISP (external)
eth1 = acting as dhcpserver with iptables, for sharing eth0 to "int network A)
eth2 = dhclient to connect to an netgear router that has similar ip adress suffix as eth0 (int network B)

Eth1 is a separat network that has nothing to do with eth0 and eth2, eth2 is simply a gigabit interface to be able to use the machine as a samba server and acces all the files that are on it.

Is it possible to do this? When i have tried i allways get routing problem, I am not able to remotly login to the machine, the only way to conncet to the machine is through eth2.

Both eth0 and eth2 get the same default gateway.

I have tried to search some and found something called multiple ip routing? Am i am the right way or am i total ofcourse?

Thanks in advance POint me in the right direction....
 
Old 11-21-2010, 05:40 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 652Reputation: 652Reputation: 652Reputation: 652Reputation: 652Reputation: 652
I think you're missing the point, you should only have *one* default gateway as thats how you get to any networks that aren't directly connected. The default gateway should be configured on eth0, none of the other interfaces need one. For example, you would need to set up a static route to [host_b]'s network if you have something like this:

Code:
[host_b]----[router_b]-----[host_a]--------[internet]
                               \___________[host_c]
cheers
 
Old 11-22-2010, 12:53 AM   #3
asl1176
LQ Newbie
 
Registered: Nov 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Yes, i know that, but how do i force dhclient not to set the default gateway givven from dhcp on eth2? I want to "force" dhclient to use the default gateway given from eth0...
 
Old 11-22-2010, 08:35 AM   #4
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 652Reputation: 652Reputation: 652Reputation: 652Reputation: 652Reputation: 652
If you want to ignore the gateway provided by the dhcp server, setting the below in /etc/sysconfig/network-scripts/ifcfg-eth2 would work on a Red Hat based distro:

Code:
DHCLIENT_IGNORE_GATEWAY=yes
.. but I'm not sure if there's an equivalent way to do it on Debian, sorry.

<edit> just found this link maybe it will help http://serverfault.com/questions/293...ries-from-dhcp </edit>

Last edited by kbp; 11-22-2010 at 08:37 AM.
 
  


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
[SOLVED] /etc/network/interfaces configuration for virtual interfaces nonshatter Linux - Networking 4 10-25-2010 07:22 AM
changed router wireless essid, /etc/network/interfaces no longer works! snow_bound Linux - Wireless Networking 0 12-29-2006 07:21 AM
how to config. network settings for having a static ip with a router kkeith Linux - Newbie 2 10-19-2005 06:00 AM
making WiFi settings in /etc/network/interfaces permanent Lleb_KCir Linux - General 3 05-11-2005 12:22 AM
Need help with network settings and router evanmac Linux - Networking 3 03-14-2003 01:40 AM

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

All times are GMT -5. The time now is 09:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration