LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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

View Poll Results: Do you have two nics on your debian server?
Yes 1 100.00%
No 0 0%
Voters: 1. You may not vote on this poll

Reply
 
Search this Thread
Old 09-07-2008, 06:23 AM   #1
muncherelli
LQ Newbie
 
Registered: Sep 2008
Posts: 5

Rep: Reputation: 0
Question Setting default route w/ two nice


-- SORRY THREAD TITLE SHOULD SAY NICS NOT NICE --

I am somewhat of a Linux N00b, so I apologize upfront if my terminology is not correct. And this is my first post to LinuxQuestions w00t :P.

At my house I have two seperate internet connections. One that feeds my server (Debian sid), and one that feeds my router. I have my server hooked to my router via eth0, and my internet connection (DHCP) directly connected to eth1.

What I want to do is make sure all traffic goes over eth1, and not eth0, since that bandwidth is for my router and any clients I have hooked up to the router. Right now any time I ping out from the server, it is using my "client" internet connection [eth0](172.16.120.x), and not my DHCP [eth1] internet feed. I still need eth0 for access to the server via LAN for ftp and ssh'ing into it.

After searching around, it seems I need to add some sort of routing by using the route add command, but the documentation is very confusing for a noob like me :P, and I'm not really sure that is the correct command/method to direct all outbound traffic to eth1. Here is a cat at my ifconfig:

Code:
eth0      Link encap:Ethernet  HWaddr 00:a0:cc:e4:66:02
          inet addr:172.16.120.5  Bcast:172.16.120.255  Mask:255.255.255.0
          inet6 addr: fe80::2a0:ccff:fee4:6602/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:25033 errors:0 dropped:0 overruns:0 frame:0
          TX packets:43405 errors:28 dropped:0 overruns:0 carrier:25
          collisions:3188 txqueuelen:1000
          RX bytes:2110144 (2.0 MiB)  TX bytes:11026175 (10.5 MiB)
          Interrupt:10 Base address:0x1400

eth1      Link encap:Ethernet  HWaddr 00:50:ba:c7:ce:60
          inet addr:<MAH INTERNET IP>  Bcast:68.102.63.255  Mask:255.255.224.0
          inet6 addr: fe80::250:baff:fec7:ce60/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1484321 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2787 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:90797856 (86.5 MiB)  TX bytes:380143 (371.2 KiB)
          Interrupt:9 Base address:0x1800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:69 errors:0 dropped:0 overruns:0 frame:0
          TX packets:69 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5801 (5.6 KiB)  TX bytes:5801 (5.6 KiB)
and cat /etc/network/interfaces:

Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface

auto lo eth0 eth1
iface lo inet loopback

# The primary network interface

iface eth0 inet static
        address 172.16.120.5
        netmask 255.255.255.0
        network 172.16.120.0
        broadcast 172.16.120.255
        gateway 172.16.120.1

iface eth1 inet dhcp
I'm not really sure which direction to go to find out how to do this. Any help on this would be greatly appreciated.

Last edited by muncherelli; 09-07-2008 at 06:30 AM. Reason: Title error
 
Old 09-07-2008, 12:44 PM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
Remove the gateway statement from the eth0 config.
 
Old 09-07-2008, 01:41 PM   #3
muncherelli
LQ Newbie
 
Registered: Sep 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Wow, thank you very very much. Glad I asked here!
 
  


Reply

Tags
debian, dual, nic


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
Quagga default route not showing in kernel default route (netstat -nr) Valkyr1e Linux - Networking 3 08-03-2008 09:20 PM
Default route took 20s to display with 'route' command Akhran Linux - Newbie 3 11-04-2006 04:59 AM
dhclient not setting default gateway - no WAN route kadissie Linux - Networking 2 03-10-2005 04:55 AM
dhcp w/ comcast not setting default route pengcow Linux - Networking 0 05-25-2004 11:16 AM
Linux router - setting up a DMZ or default machine to route to Rooboy Linux - Networking 12 02-18-2004 03:44 PM


All times are GMT -5. The time now is 01:20 AM.

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