LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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
 
LinkBack Search this Thread
Old 01-09-2007, 09:38 PM   #1
boyfren
LQ Newbie
 
Registered: Jan 2007
Posts: 13

Rep: Reputation: 0
Can not share internet...


I have 2 NICs. One is built-in and the other is PCI. I am connected on a network with internet connection. I've configured the PCI(eth1) to connect via internet successfully. But when i configured the built-in (eth0) interface, eth1 can no longer connect via internet but can ping its gateway IP. I found out that when I ping outside connection e.g. yahoo.com, the system uses the eth0 as the external interface connected via internet when in fact, it's the eth1 thats connected via internet.

I prefer to use the eth1 as my interface for my primary internet connection and eth0 for sharing the access to other PCs in the network. Is there a way around with this? Or is it possible to swap the ethx ID?
 
Old 01-09-2007, 10:02 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: At home: Arch, OpenBSD, Solaris. At work: CentOS, Debian, Ubuntu
Posts: 3,625

Rep: Reputation: 101Reputation: 101
It sounds like your default gateway is getting screwed up and Linux thinks it's supposed to be routing Internet traffic through eth0 (device names like eth0 and eth1 are just labels -- they're not special in any way). Can you post the output of "netstat -rn" when you have both NICs up. In particular look for where the 0.0.0.0 route is set to go.
 
Old 01-10-2007, 12:10 AM   #3
boyfren
LQ Newbie
 
Registered: Jan 2007
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by btmiller
It sounds like your default gateway is getting screwed up and Linux thinks it's supposed to be routing Internet traffic through eth0 (device names like eth0
Yes, you are right... I got it fix myself... tnx for the tip. What actually happen was, when i added the eth1 there exist 2 gateways because the 2 IPs are of different IP blocks (eth0: 192.168.1.XXX, eth1 192.168.254.XXX). I just removed the gateway IP of eth1 since it's the gateway itself. I also found that out in your suggestion to check using netstat -rn and I saw 2 gateways confusing linux.

I am now on the go to share the internet in my network.... Thanks again... your tip did help a lot... whew!!! God bless!
 
  


Reply

Tags
interface, network


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to share internet? Dentist Linux - Networking 2 08-13-2009 03:50 PM
how to share internet with XP naveen_varma Linux - Networking 10 12-23-2008 02:21 AM
how to share internet asimhafeez Linux - Networking 3 03-15-2005 02:15 PM
How to share internet Free-Blade Linux - Newbie 5 09-19-2004 05:10 AM
MD 10.0 and internet share fatcpu Mandriva 0 03-16-2004 06:43 PM


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

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