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 03-11-2005, 04:04 AM   #1
Creak
Member
 
Registered: Feb 2004
Distribution: debian
Posts: 187

Rep: Reputation: 30
Two eth interfaces, but one only with internet...


Hi

I have 2 eth interfaces (onboard and pci card) and when I plug the cable on the first one (eth0), the internet doesn't work (no dns), but when i plug the cable on the eth1, it works... BTW the 2 cards can see the internal network. Here is my /etc/networks/interfaces:
Code:
# The primary network interface
auto eth0
auto eth1

## DHCP
#iface eth0 inet dhcp
#iface eth1 inet dhcp

## Static
iface eth0 inet static
    name Carte Ethernet (onboard)
    address 172.16.130.220
    network 172.16.130.0
    netmask 255.255.255.0
    broadcast 172.16.130.255
    gateway 172.16.130.254

iface eth1 inet static
    name Carte Ethernet (pci)
    address 172.16.130.221
    network 172.16.130.0
    netmask 255.255.255.0
    broadcast 172.16.130.255
    gateway 172.16.130.254
And my /etc/resolv.conf:
Code:
nameserver 10.42.6.6
nameserver 10.42.6.7
 
Old 03-11-2005, 07:35 AM   #2
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
Take a look at ip route list and see which interface is listed as default

This will be the interface internet traffic (non-local traffic) will use..

What are you trying to achieve with two interfaces on the same subnet?
 
Old 03-11-2005, 08:15 AM   #3
Creak
Member
 
Registered: Feb 2004
Distribution: debian
Posts: 187

Original Poster
Rep: Reputation: 30
I don't understand the stuff about the "ip route list"... I take a look where? Google?

The problem comes from the configuration of the PCs in my schools... There are 2 eth cards and the cable isn't always on the same plug. I'm just bored of switching between the 2 interfaces and i want to know a way of making it automagically
 
Old 03-11-2005, 11:07 AM   #4
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
I wish it was easier than that..

Do ip route list in a command line or route -n

Someone had a sense of humour when they set it up, coz it's a basic routing mistake to have 2 possible connections like that without some special programming to swap between them..
 
Old 03-11-2005, 03:31 PM   #5
Creak
Member
 
Registered: Feb 2004
Distribution: debian
Posts: 187

Original Poster
Rep: Reputation: 30
I know "ip route list" doesn't work (ip is not a known executable). But route does work, but i'm at home right here, i'll try tomorrow!
 
Old 03-11-2005, 04:04 PM   #6
gsgleason
Member
 
Registered: Oct 2004
Posts: 69

Rep: Reputation: 15
it's generally not a good idea to have two interfaces on the same subnet, and on top of that, each with a default gateway.

I would remove the configuration for one of them and just use the other.
 
Old 03-12-2005, 01:52 AM   #7
Creak
Member
 
Registered: Feb 2004
Distribution: debian
Posts: 187

Original Poster
Rep: Reputation: 30
That's what i used to do, i was just searching a way to prevent me to switch the cable between the 2 cards, because the cable isn't plug on the same card each time...
 
  


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
Internet Sharing with 3 eth devices problem, Mandriva 2006 muhon Linux - Networking 2 11-08-2005 06:08 PM
Internet error, eth fails at boot shajith Linux - Networking 2 06-14-2005 07:09 AM
configuring eth interfaces problem cranium2004 Linux - Networking 5 04-07-2005 06:55 AM
internet problems with mandrake 10, eth problems rApT0r Linux - Newbie 10 04-11-2004 06:44 PM
No eth ???? codedv Debian 6 12-24-2003 04:59 AM

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

All times are GMT -5. The time now is 08:15 PM.

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