Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
conflicting network interfaces? what's up with this?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
grepcomputers
Guru
Guru


Joined: 16 Sep 2003
Posts: 375

PostPosted: Sat Dec 27, 2003 3:39 am    Post subject: conflicting network interfaces? what's up with this? Reply with quote

A brief overview of the setup:
eth0 - first port on a dual head nic, it died so now I use the second port, eth1. eth2 is yet another network card

eth1 - 192.168.0.4, gateway 192.168.0.1, broadcast 192.168.0.255, netmask 255.255.255.0
notes: my laptop is 192.168.0.1, it dials into the internet, my gentoo desktop gets internet access from the laptop. Laptop is running Win2K with windows network connection sharing. the laptop connects to the desktop with a crossover cable.

eth2 - 192.168.0.2, no gateway, broadcast and netmask the same as eth1
notes: connects to a hub, which my brother's WinXP box connects to. his machine is set up as: 192.168.0.3, netmask 255.255.255.0, no gateway

anyways, the problem is, when I have both network connections enabled, neither work. I can only have the one I want to use enabled. (eth0 is never enabled). needless to say, this is a little irritating. I can't for the life of me figure out what I did wrong. I've tried restarting the network on both sides in various combinations, but with no effect.

I had this problem before, but with dhcp, and someone gave me a fix - to use dhcpcd_ethX - but I can't figure out how to apply that here.

cheers...
...grep
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Sat Dec 27, 2003 6:54 am    Post subject: Networking 101 Reply with quote

First note : an interface does not have a gateway - the routing table has ONE gateway, and one only.

The fact that the gateway is reached via eth1 does not mean that it is eth1's gateway - it isn't.

Second - your brother's pc does not have a gateway set, and you expect networking to work for him ? Odd...

Third note: both interfaces are on the same subnet; this is not generally allowed in IP networking, you'd have to bridge the second to the first to make it work, and there are far easier solutions to your plight.

A tip: why not connect everything to the hub ? Much much (MUCH) easier if you ask me...but then, you probably have your reasons...

The easiest solution is to put the second interface (and your brother) on another subnet, say 192.168.1.0, and your problem will be solved...believe me.

Like so:
Code:
ifconfig eth2 192.168.1.1

And have your brother change his IP address to 192.168.1.2, gateway set to you (192.168.1.1)

That's all - your Linux box will do all the routing necessary.
Back to top
View user's profile Send private message
furgussen
n00b
n00b


Joined: 18 Oct 2002
Posts: 56
Location: Calgary, AB, Canada

PostPosted: Sat Dec 27, 2003 10:26 am    Post subject: Agreed Reply with quote

I agree with the all-into-the-hub idea.

If you have your brother's machine plugged into your machine, then your machine and the laptop need to be on for your brother to connect to the internet. If your brother is plugged into the hub, then just the laptop needs to be on.

Also, your brother's machine does need a gateway IP. Otherwise it wont be able to connect to machines off that subnet (ie. the internet).

Tyler
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum