LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 02-13-2006, 09:41 AM   #1
anilbh
Member
 
Registered: Oct 2005
Location: India
Distribution: Proud User Fedora FC5/ Fedora 7 /Ubunt 7.10
Posts: 188

Rep: Reputation: 30
Unhappy With 2 NICs cannot see Windows machine on Linux


Help,

I put in a 2nd NIC card in the machine. I did this as I wanted to use the ADSL modem as well as be connected to the LAN.
The card connected to the Modem is eth0. The one connected to the LAN is eth1. I have set the IP address of eth0 to 192.168.0.6 and of eth1 to 192.168.0.1.

The windows machine is 192.168.0.2 .
----
I have been able to see the machine a few times as well as browse through the directories. I have been able to Ping this machine as well , erratically.
Now it is just impossible to even ping the machine. There were a number of things I did to be able see the windows machine under Network in Nautilus the file browser . I have no record of these . I have variously tweaked the Samba users settings , Network settings , as well as used Webmin .

I am sure I have disturbed one or more setting . Any help will be VERY welcome.

When I ping using Nettools I get no response . When I ping through the terminal I get
From 192.168.0.6icmp_seq1 Destination host unreachable.
Would interchanging the connections cure this .
I have no problem when both are running Windows.

I am using a hub as there is another computer also connected
....
....

Last edited by anilbh; 02-13-2006 at 10:02 AM.
 
Old 02-13-2006, 09:49 AM   #2
okmyx
Member
 
Registered: May 2004
Location: Cornwall, UK
Distribution: Ubuntu 8.04
Posts: 464

Rep: Reputation: 31
You've got a problem because both cards are on the same subnet.

Seeing as your modem connects via ethernet (technically a modem/router) why not hook both PCs and the modem to a switch/hub and sort all your problems in one go.
 
Old 02-13-2006, 09:55 AM   #3
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
okmyx hit it on the head:
192.168.0.6 is being used as your interface to access 192.168.0.0/16 (or /24, depending on your subnet mask). In other words, any packets destined for a 192.168. ip address will be routed to THAT card, not the one connected to your LAN.
 
Old 02-13-2006, 10:07 AM   #4
anilbh
Member
 
Registered: Oct 2005
Location: India
Distribution: Proud User Fedora FC5/ Fedora 7 /Ubunt 7.10
Posts: 188

Original Poster
Rep: Reputation: 30
I thought so too. But do note that it has worked at least once for an entire session. Is there someway I could avoid the requests from going to 192.168.0.6 the 2nd card . The built-in card is now eth1 .
 
Old 02-13-2006, 10:10 AM   #5
anilbh
Member
 
Registered: Oct 2005
Location: India
Distribution: Proud User Fedora FC5/ Fedora 7 /Ubunt 7.10
Posts: 188

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by Matir
okmyx hit it on the head:
192.168.0.6 is being used as your interface to access 192.168.0.0/16 (or /24, depending on your subnet mask). In other words, any packets destined for a 192.168. ip address will be routed to THAT card, not the one connected to your LAN.
Incidentally I had ( before I had this problem ) tried connecting the modem to the hub . That does not work for ADSL .
 
Old 02-13-2006, 10:10 AM   #6
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
You could use something like:
Code:
route del -net 192.168.0.0 netmask 255.255.0.0 dev eth0
route add -net 192.168.0.0 netmask 255.255.0.0 dev eth1
To move the route for the 192.168.0.0 net over to eth1.
 
Old 02-13-2006, 10:17 AM   #7
Matir
Moderator
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 118Reputation: 118
Quote:
Originally Posted by anilbh
Incidentally I had ( before I had this problem ) tried connecting the modem to the hub . That does not work for ADSL .

What occured when you had connected it in this way? I've seen that setup multiple times before with no problems.
 
Old 02-13-2006, 10:25 AM   #8
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 876

Rep: Reputation: 184Reputation: 184
You need 192.168.0.x addresses on one eth and 192.168.1.x addresses on the other, and they should be on a 255.255.255.0 subnet mask. The normal IP forwarding capabilities of Linux make it a ROUTER therefore, by definition you must have different networks on each interface.

Use this setup -

PC

IP 192.168.1.2
mask 255.255.255.0
bcast 192.168.1.255
default gateway 192.168.1.1

eth1
IP 192.168.1.1
mask 255.255.255.0
bcast 192.168.1.255

eth0
IP 192.168.0.1
mask 255.255.255.0
bcast 192.168.1.255
default gateway 192.168.0.2

modem
IP 192.168.0.2
mask 255.255.255.0
bcast 192.168.1.255

Last edited by baldy3105; 02-13-2006 at 10:28 AM.
 
Old 02-13-2006, 11:10 AM   #9
anilbh
Member
 
Registered: Oct 2005
Location: India
Distribution: Proud User Fedora FC5/ Fedora 7 /Ubunt 7.10
Posts: 188

Original Poster
Rep: Reputation: 30
Smile

Quote:
Originally Posted by Matir
What occured when you had connected it in this way? I've seen that setup multiple times before with no problems.
The modem is a HUWAEI Smartax 882 . I dont remember what happened . I tried that in Sep 2005 . When I got Broadband. Will try again since it does not take much time.
 
Old 02-13-2006, 11:15 AM   #10
anilbh
Member
 
Registered: Oct 2005
Location: India
Distribution: Proud User Fedora FC5/ Fedora 7 /Ubunt 7.10
Posts: 188

Original Poster
Rep: Reputation: 30
Thumbs up

Quote:
Originally Posted by baldy3105
You need 192.168.0.x addresses on one eth and 192.168.1.x addresses on the other, and they should be on a 255.255.255.0 subnet mask. The normal IP forwarding capabilities of Linux make it a ROUTER therefore, by definition you must have different networks on each interface.

Use this setup -

PC

IP 192.168.1.2
mask 255.255.255.0
bcast 192.168.1.255
default gateway 192.168.1.1

eth1
IP 192.168.1.1
mask 255.255.255.0
bcast 192.168.1.255

eth0
IP 192.168.0.1
mask 255.255.255.0
bcast 192.168.1.255
default gateway 192.168.0.2

modem
IP 192.168.0.2
mask 255.255.255.0
bcast 192.168.1.255
Yes this seems to be the answer . However before I read this . I did the following and The problem appears to have gone . I can browse the window files and I can ping the computer . I dont know if it will stay that way .
This is what I did :
I deleted ALL the entries in the Network Configuration box and reinstalled them ..
In case the problem reapears I will do as suggested and try MATIR's advice too.
And maybe I will finally understand what routing means.

The Browseabilty vanished again.
So I did the minimum changed the IP address of eth0 to 192.168.1.2 and that seems to have cured the problem.
Will also try connecting both the modem and the NIC to the hub.
I have definitely done it before with luck so any advice here will help.

Last edited by anilbh; 02-13-2006 at 08:21 PM.
 
Old 02-13-2006, 11:52 AM   #11
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 11,451
Blog Entries: 4

Rep: Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505Reputation: 1505
Quote:
Originally Posted by anilbh
Help,

<snip> . I have no record of these . I have variously tweaked the Samba users settings , Network settings , as well as used Webmin.

I am sure I have disturbed one or more setting . Any help will be VERY welcome.

<snip>....
....
Hi,

I would suggest that you create a written system log for any of your machines. Entry should be explicit for ANY changes you make to the machine, be it hardware or software (OS & user).

Time stamp the entries for any change. Don't erase a mistake, just line it out and initial then stamp this also. You will be surprised how this will help you. If you want to referrence a change just do so with an entry then file it with the same stamp.

Sure it sounds like a lot of work but it will pay for itself in the long run. Spiral notebooks are cheap! 3-ring is not as good since people have a tendency to open them thus breaking the trail.

HTH!

Last edited by onebuck; 02-13-2006 at 11:54 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
sharing internet from a windows 98 machine to a Red Hat Linux machine ritwiksolutions Linux - Newbie 7 03-14-2006 11:20 AM
ssh connection from a Windows machine to a Linux machine pistachio Linux - Networking 1 08-30-2005 11:45 AM
copy from windows machine to a linux machine s_deepblue Linux - Networking 3 03-12-2005 02:43 PM
One Machine, Multiple NICs, and a single Newbie CozyMel Linux - Networking 2 10-09-2002 01:53 AM
how do i use my linux machine to be a gateway for a windows machine? Sanjuro Linux - Networking 2 02-09-2002 05:29 AM


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