Link to home
Start Free TrialLog in
Avatar of ccole
ccole

asked on

Samba/Network Neighborhood

I have been practically pulling my hair out trying to
figure out my problem.  Here is what it is: Basically,
Samba will not work no matter what I do. I can see the
linux computer under Network Neighborhood in my Win98
machine, but if I try to open it, it tells me that the
computer cannot be found.  It will not work to ping
the linux machine from my windows machine or vice
versa. Basically the only thing that works is that I
see the computer name under network neighborhood. I
have run testparm, and done smbclient -L localhost and
everything seems to be working properly on the linux
box. I really need to figure out the problem, somebody
PLEASE help me.  Thanks in advance

Christopher Cole
Avatar of dcavanaugh
dcavanaugh

If you can't ping either machine from the other one, I would start with basic IP connectivity before we get to Samba.  The packets that cause icons to show up in Network Neighborhood are broadcasts; not directed to any particular address.    I therefore suspect an IP addressing/routing problem.  Please post the results of the (Linux) ifconfig and route -n commands.  And tell us about the IP settings in Win98 network control panel.   I assume that this is a simple Ethernet connection, with neither machine using a dial-up ISP, true?
Avatar of ccole

ASKER

This is just a simple ethernet connection with no dial-up ISP or anything (networking is the first thing I've tried to do since I installed Redhat 6.1, so there is nothing else there).

The windows machine's IP address is 192.168.0.3 at subnet 255.255.255.0, and it's netbios name is OTHER.  The Linux machine's IP address is 192.168.0.1 at subnet 255.255.255.0, and it's netbios name specified in the smb.conf file is Christopher.

root# ifconfig
eth0    Link encap:Ethernet  HWaddr 00:60:97:7D:B1:AD
        inetaddr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
        UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
        RX packets:0 errors:0 dropped:0 overruns:0 frame:0
        TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:100
        Interrupt:10 Base address:0x300

lo      Link encap:Local Loopback
        inetaddr:127.0.0.1  Mask:255.0.0.0
        UP LOOPBACK RUNNING MTU:3924 Metric:1
        RX packets:0 errors:0 dropped:0 overruns:0 frame:0
        TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:0


root# route -n
Kernel IP routing table
Destination   Gateway   Genmask
192.168.0.1   0.0.0.0   255.255.255.255
192.168.0.0   0.0.0.0   255.255.255.0
127.0.0.1     0.0.0.0   255.0.0.0.0
(other columns, there wasn't room)
Flags  Metric  Ref  Use  Iface
UH     0       0    0    eth0
U      0       0    0    eth0
U      0       0    0    lo


Okay, that's what I got for both commands. I really don't know what the 192.168.0.0 thing came from, and why it's taking the up the 255.255.255.0 subnet as well as why the 192.168.0.1 has the 255.255.255.255 subnet. Thanks a LOT for trying to help, you have no idea how badly I want this up.
In the output from ifconfig, I noticed that eth0 has received zero packets.  This is interesting.  If nothing else in this message helps you, I would suggest replacing the Ethernet cards, cables on both machines, use different hub ports or replace the hub (assuming all of this is UTP/Cat.5 cable).   Tell me how all of this is physically connected.   Concentrate on the easy stuff first: cable & hub.  

In Network Control Panel settings for the Windoze box, what (if any) gateways are set in the TCP/IP properties?  You should not need a gateway if all you care about is the local subnet, but if you had a gateway, it would be 192.168.0.1  Assuming this problem remains unsolved, go to a DOS prompt and post the results of the ROUTE PRINT and IPCONFIG commands.  

Just for laughs, if you were to enable file sharing on the Windoze box and then shared drive C, there should be some broadcast packets that would be picked up on eth0 in the Linux box, causing the RX counter to increment on eth0, regardless of routing (unless my hardware-problem theory is true, in which case it would stay at 0).

Most people use 192.168.1.x  as their private class-C network, although there is nothing especially bad about using 192.168.0.x if you are not connected to the Internet.

The route for 192.168.0.0 is actually the one you need, it tells the machine that a packet addressed to any machine in the 192.168.0.x subnet can be delivered via eth0.  I suggest the following:

Get rid of the route for 192.168.0.1:
route del 192.168.0.1

Add a default route on the Linux box:
route add -net 0.0.0.0 eth0

Good luck.  If this was easy, everyone would have a network!
It sounds like you do have some basic network connectivity problems.  What make and model network card are you using?  Can you ping yourself using your local and network address?  Is a   hub or router between your linux machine and windows machine?
Some other questions that would stop you from finding the machine but not  affect pinging are:
How are you running samba?  Are you running it via the startup scripts as a standalone daemon, or through inetd, set up in the /etc/inetd.conf file?  Also do you have hosts.deny set through the tcpd wrapper so that it may deny your requests?  Check for log messages in /var/log/messages and /var/log/secure.  Do you have any kind of firewall turned on such as ipchains set to deny ping?
your routing table is wrong, remove it, and then add new routes,  like:
route add -net 192.168.0.0 192.168.0.1

do likewise on your Win box
route add 192.168.0.0 mask 255.255.255.0 192.168.0.3

Please refer to the man-pages (help or whatever) on either system for the correct syntax of route command
Avatar of ccole

ASKER

I removed the route to 192.168.0.1 and added a default route, and it still does not work (except I still see it under network neighborhood in the linux box).  As to ahoffmann's proposed answer, I think I just did basically that, and as I said before, this did not work. Thanks for trying to find an answer for me so far, though. I hope we will eventually be able to conclude my problem. I'll post the information that was asked for in my next post.
Avatar of ccole

ASKER

Right now I am using equipment that has been used in a network that I had between two computers already, so I know the actual hardware works (although I am relatively new to Linux, so very probably I set something up wrong). The only thing that hadn't been used was a CAT5 cable, which is now replaced for one that I have used and know works. My network card on the Linux machine is a 3Com 3c509B.  The one on my Windows machine is a Edimax 10/100 (it uses the Realtek Fast Ethernet chip, so it's basically a Realtek).  Both connect to a hub, and there is no router anywhere on the network.

No gateways on the win98 machine.  Both machines (linux and win98) can ping themselves (unfortunately, they cannot ping each other).  I start samba manually (for now) by typing "samba start" at the command line whenever linux starts. There is nothing under hosts.deny (the file is there, but there are no computers specified as with the hosts.allow file). There should be no firewalling or anything setup like that unless it was automatically done under the linux setup (which I doubt).  There was nothing that I found that may shed some light under any of the log files in /var/log.


Avatar of ccole

ASKER

I found some differences in the ifconfig properties since I last posted it. It may have to do with switching the CAT5 cable to one I know for sure works. My C drive, A drive, and D drive are all being shared out on the windows machine.  The only difference under ifconfig is that the TX packets for eth0 are now at 76.

Okay, here are the postings from the commands I gave in the MS-DOS prompt from Windows 98.
C:\>route print

Active Routes:

Network Addresses  Netmask          Gateway Address
127.0.0.1          255.0.0.0        127.0.0.1
192.168.0.0        255.255.255.0    192.168.0.3
192.168.0.3        255.255.255.255  127.0.0.1
192.168.0.255      255.255.255.255  192.168.0.3
224.0.0.0          224.0.0.0        192.168.0.3
255.255.255.255    255.255.255.255  192.168.0.3
(other columns, there wasn't room)
Interface    Metric
127.0.0.1    1
192.168.0.3  1
127.0.0.1    1
192.168.0.3  1
192.168.0.3  1
0.0.0.0      1


C:\>ipconfig (I don't think there was anything else, but I couldn't really tell because it scrolled by too fast)

0 Ethernet adapter :
        IP Address........ : 0.0.0.0
        Subnet Mask....... : 0.0.0.0
        Default Gateway... :

1 Ethernet adapter :
        IP Address........ : 0.0.0.0
        Subnet Mask....... : 0.0.0.0
        Default Gateway... :

2 Ethernet adapter :
        IP Address........ : 0.0.0.0
        Subnet Mask....... : 0.0.0.0
        Default Gateway... :

3 Ethernet adapter :
        IP Address........ : 192.168.0.3
        Subnet Mask....... : 255.255.255.0
        Default Gateway... :

I don't really know why the ethernet information we really want is on 3 Ethernet adapter...I didn't do anything on purpose to configure it that way.  Okay, that is the information you wanted. Don't be afraid to ask for anything else, I'll do anything. I badly want this problem to be solved. Thanks so much for helping so far!

 
Avatar of ccole

ASKER

Oh, now come to think of it, I think I actually might know why the network card is the 3 ethernet adapter. Besides having the TCP/IP adapter for my ethernet card, there are three other devices before it that each use up TCP/IP. There is TCP/IP -> AOL Adapter, TCP/IP -> AOL Dial-Up Adapter, and TCP/IP -> Dial-Up Adapter all before the network card's TCP/IP protocol.  (In other words, the network card has the 4th TCP/IP adapter on the list in the network properties, as well as 4th on the list under the ipconfig command...Just in case it was important)
Try adding 192.168.0.1 as a gateway in the TCP/IP properties for the Win98 box.  I would expect the last interface in IPCONFIG to look like this

3 Ethernet adapter :
 IP Address........ : 192.168.0.3
 Subnet Mask....... : 255.255.255.0
 Default Gateway... : 192.168.0.1

How about checking the "Set this protocol to be the default protocol" on the "Advanced" tab of "TCP/IP properties"?

On the Linux box, you mentioned that TX had increased, I assume RX is still zero, correct?

Try adding 192.168.0.1 as a gateway in the TCP/IP properties for the Win98 box.  I would expect the last interface in IPCONFIG to look like this

3 Ethernet adapter :
 IP Address........ : 192.168.0.3
 Subnet Mask....... : 255.255.255.0
 Default Gateway... : 192.168.0.1

How about checking the "Set this protocol to be the default protocol" on the "Advanced" tab of "TCP/IP properties"?

On the Linux box, you mentioned that TX had increased, I assume RX is still zero, correct?

Avatar of ccole

ASKER

I did all you said - 192.168.0.1 is the default gateway on the windows box, and IPCONFIG looks exactly like how you said.  The protocol is default in the TCP/IP properties also.  I figured out that the TX packets raise because I am trying to ping my other machine. The RX packets are still at zero, though. If that creates a problem, then I must have configured the network card incorrectly (something to do with the kernel module maybe? just a thought) and I will need some quick instruction and maybe an example of setting that up. Thank you so much for your help, I appreciate it greatly.
ASKER CERTIFIED SOLUTION
Avatar of dcavanaugh
dcavanaugh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
routing on Win98 seemss to be OK, so far (Default gateway not necessary, 'cause ther is a net route)

Please post result of
   netstat -rn
from your linux box, should look similar to that of win98.

then do following on linux

  ping 192.168.0.3

and in another shell:

   tcpdump -l -n -i eth0

You should see some ICMP echo requests
Based on your respones on Monday at 9:24, your network card is not receiving.  It may be sending.  It looks like everything should work.  The problem is either in your hub or network card configuration.  By what you are saying, if you are confident that your hub is working you may need to reconfigure your network card.  I don't know if you remember, what the Linux installation program said about the type of network card detected.  Redhat 6.1 should have support for your card already compiled into your kernel.  You can check your kernel config file under "/usr/src/linux/.config" to see if support (direct or modular) was built into the last compilation of your kernel.  CONFIG_NET_VENDOR_3COM=y or m.  CONFIG_EL3 should also be "y" or "m".  Also if you have any other devices available that you can use to do test pings from/to it may help you isolate the problem.
Is one of your machines plugged into the uplink port on your hub?  If so make sure the button is pressed correctly to disable the uplink to allow for use as a normal port.
Also, check your hub to see if the "connected" lights are on for each machine.  There should eb a light for each connected cable to verify connection.  Disconnect and reconnect them to ensure that the lights are functioning correctly.  Even try different ports.