I'd like my Linux box to join my little network

pscowboy

Distinguished
Apr 24, 2002
1,129
0
19,290
This is my first foray into Linux, and I'd like this unit to become part of my small office network.

I'm running RedHat 8.0. Tech support doesn't answer me; and I can't figure out how to get the settings right for this machine to join my five other boxes running XP and 98SE. I've read the documentation, but I'm lost.

The five existing computers see and talk to each other just fine through a switch. I can't get the Linux to show up.

All six have the same nics, and are cat5 cabled up. I'm asking for some fundamental help.
 

Tonka

Distinguished
Jun 11, 2003
21
0
18,510
PScowboy: what you need is Samba, I've gotting Samba to work when I had Mandrake loaded, and it's derived from RedHat so it should help out. For a little while now I've been running Knoppix which boots from a CD and has built in networking tools, sets up the home sharing very easy.

Hope this points you in the right direction.

Tonka
 

poorboy

Distinguished
Jan 17, 2002
634
0
18,980
As stated, you need Samba. There are two packages to start with - samba client and samba server. Once installed and set to run at startup, you'll have to make sure you are on the same subnet, eg 192.168.0.x and then the same workgroup/domain. Firstly, make sure you can ping the other machines. Once we know where it's at IP wise, we can get into Samba and filesharing specific stuff.

Richard.

<i>Knock Knock, Neo</i>
 

pscowboy

Distinguished
Apr 24, 2002
1,129
0
19,290
Installed Samba from the CD#2. Changed the Workgroup name in the smb.conf file to match the MS machines.

Using 10.10.10.x as IP addresses and a subnet of 255.0.0.0 on all.

I can ping the Linux box from any of the MS units. But I am unsuccessful in pinging anything from the Linux.
 

pscowboy

Distinguished
Apr 24, 2002
1,129
0
19,290
I'm pinging by IP address.

It seems that the ping is not getting out of the Linux box.

Do I have to set up a Gateway? One of the issues mentioned in one of the answering posts was setting up a Domain. I don't get that stuff. I don't think one sets up Domains in Windows? Or,maybe so?

Anyway, I've got every Samba rpm installed that I could find on the CD. But after that, there is no Wizard that comes up to help a guy properly set up the Linux to be accepted in a mixed environment. I know you guys will eventually get me through this.
 

poorboy

Distinguished
Jan 17, 2002
634
0
18,980
It possibly is the gateway that's the problem. Run "route" and see if tells you the anything meaningful. Setting up a domain isn't an issue until you start using domain names to locate machines.

If you "dont get" this networking stuff, post the contents of /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-eth0 and i'll try to spot anything obviously broken.

<i>Knock Knock, Neo</i>
 

pscowboy

Distinguished
Apr 24, 2002
1,129
0
19,290
ROUTE
Destination Gateway Mask Flags Use
168.121.1.1 255.255.255.255 uh ppp0
10.0.0.0 255.255.255.0 u eth0
10.10.10.0 255.255.255.0 u eth0
127.0.0.0 255.0.0.0 u lo
default 168.121.1.1 0.0.0.0 ug ppp0

network
NETWORKING=yes
HOSTNAME=localhost.localdomain
GATEWAY=10.10.10.0
GATEWAYDEV=eth0

ifcfg-eth0
USERCTL=no
PEERDNS=no
TYPE=Ethernet
DEVICE=eth0
HWADDR=00:04:5a:7b:da:2a
BOOTPROTO=none
NETMASK=255.255.255.0
ONBOOT=yes
IPADDR=10.10.10.1
NETWORK=10.0.0.0
BROADCAST=10.10.10.255
GATEWAY=10.10.10.0

This may be a dumb question, but, does Samba have to be installed on the MS machines?
 

lame

Distinguished
Sep 16, 2003
7
0
18,510
Ok, notice the default on the last line when you type route. It's trying to pass traffic out through your ppp interface, which obviously isn't what we want.

Flush the routing table and use:
$ route add default gw 10.10.10.0

See if you can then ping the gateway, if you can (and you should be able to), you're in business.

And no, samba doesn't need to be installed in windows :)
 

pscowboy

Distinguished
Apr 24, 2002
1,129
0
19,290
Well, we're getting there! I can now ping in both directions; and localhost is now seen in Network Neighborhood on the MS machines.

But when I click localhost in NN, unfortunately I get an error message saying that it's not accessible.

Also, how do I see the MS units from the Linux box??
 

poorboy

Distinguished
Jan 17, 2002
634
0
18,980
It's cool that it's working, but I don't think that lame's answer is entirely accurate. Default gateway is for when no other gateway matches. Eth0 should be used for network 10.10.10.0 automatically. The problem is that your NETWORK=10.0.0.0, not 10.10.10.0. Your NETMASK=255.255.255.0, which then puts you on 10.0.0.x not 10.10.10.x.

NN is Netscape Navigator? localhost will refer to a webserver that isn't running :) I'd recommend giving the machine a less ambiguous name. Take a look at /etc/samba/smb.conf

There are a few apps to access the Windows network from Linux, but for sensible browse and click type of access, I'd recommend KDE3 or Gnome2. If you have bandwidth to burn, take a look at <A HREF="http://www.ximian.com/products/desktop/features.html" target="_new">Ximian Desktop2</A> (free download).


<i>Knock Knock, Neo</i><P ID="edit"><FONT SIZE=-1><EM>Edited by poorboy on 09/17/03 01:01 AM.</EM></FONT></P>
 

lame

Distinguished
Sep 16, 2003
7
0
18,510
NN = Network Neighbourhood I believe. Erm, like poorboy said localhost is usually a reference to the machine you're on :)

As far as getting the filesharing setup, what's probably lacking here is a correct smb.conf. In said file is where you setup the shares for the linux box. In your smb.conf you'll want to make sure:

workgroup = <name of your workgroup>
netbios name = <something other than localhost :>

For help setting up specific shares either 'man 5 smb.conf' or http://ca.samba.org/samba/docs/man/smb.conf.5.html.

and,
poorboy: not the best answer but probably the easiest :)
 

pscowboy

Distinguished
Apr 24, 2002
1,129
0
19,290
I really appreciate the patience you guys are showing while I dork my way through this. Bad news! The ping ability went away, and I'm back to square one.

Poorboy's inference that my netmask was incorrect, induced me to try to "work" the numbers.

Mask______255.0.0.0
Network___10.10.10.0
IPaddr____10.10.10.1
Broadcast_10.10.10.255
Gateway___10.10.10.10

I tried the above, but the system refuses to give me a network of 10.10.10.0 and I still can't ping.

The ifcfg-eth0 file reflects the above numbers, but "route" at the command line gives me:
Destination__________Gateway____________Mask___________Use
10.0.0.0________________*___________255.0.0.0__________eth0
127.0.0.0_______________*___________255.0.0.0__________l0
default_________________*_____________0.0.0.0__________eth0

This is very frustrating for me. I've set up hundreds of Peer to Peers, and Novells in less than an hour each.
 

poorboy

Distinguished
Jan 17, 2002
634
0
18,980
Nope, the netmask was fine - it was the network that was wrong.

Mask 255.255.255.0
Network 10.10.10.0
IPaddr 10.10.10.1
Broadcast 10.10.10.255
Gateway 10.10.10.1
# probably don't need that last line anyway.

Remember to either reboot or restart the network after making the changes.

<i>Knock Knock, Neo</i>
 

poorboy

Distinguished
Jan 17, 2002
634
0
18,980
I'm almost wondering if it would be easier just to install RH9 or something, and take advantage of things "just working" and better config tools.

<i>Knock Knock, Neo</i>
 

pscowboy

Distinguished
Apr 24, 2002
1,129
0
19,290
I made your recommended changes. Rebooted; but it still won't ping. I must be missing something. Domain stuff? Samba stuff?

I've spent over 50 hours on this box trying to get it to work. It's now become a vendetta principle. In my entire techie life, I've never not solved a problem eventually. If I give in to RH9, I will be a beaten man. Please understand.
 

poorboy

Distinguished
Jan 17, 2002
634
0
18,980
I understand completely (unfortunately). I'm actaully little confused over this one, and that's bugging me bigtime - I'm supposed to know about this stuff...

You're not missing any software, and as shown in your previous post it *can* work when default gateway is pointed at the LAN. Traceroute might give some hints about where it's going wrong.

I guess you've checked out the RedHat doco?
<A HREF="http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/custom-guide/part-network-related-config.html" target="_new">http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/custom-guide/part-network-related-config.html</A>
<A HREF="http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/ref-guide/s1-networkscripts-interfaces.html" target="_new">http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/ref-guide/s1-networkscripts-interfaces.html</A>

<i>Knock Knock, Neo</i>
 

poorboy

Distinguished
Jan 17, 2002
634
0
18,980
One other thing, according to the RH8 doco, GATEWAY shouldn't be in ifcfg-eth0. I'm not sure you need to set it in /etc/sysconfig/network either, unless someone else on your network is routing traffic to the internet. When you dial out and ppp0 comes up, that will set its own new default gateway anyway.

<i>Knock Knock, Neo</i>
 

lame

Distinguished
Sep 16, 2003
7
0
18,510
$ ifconfig eth0 10.10.10.1 broadcast 10.10.10.255 netmask 255.255.255.0
$ route add default gw 10.10.10.1 netmask 0.0.0.0 metric 1 eth0

try inputting each of these, then trying to ping. and paste the results of an 'ifconfig eth0'
 

pscowboy

Distinguished
Apr 24, 2002
1,129
0
19,290
I changed default gw to same address as eth0.

The "route" command now pops up the gw right away as the host name, where in the past it took route about a minute to resolve the gw thing.

But alas, I still can't ping in that direction. The Windows machines have no trouble pinging the Linux box, but it does not show up in Network Neighborhood.

I'm freakin' pulling my hair out. Samba is set up perfectly (testparm says so). The nic is known good, the cable is known good. Route, netstat, & ifconfig also confirm that the network is up. We're missing something.
 

Dev

Distinguished
Sep 18, 2001
553
0
18,980
I didn't bother reading the whole thread, but I saw that you had samba working. What you need to do is this:
On the RH box:
#netconfig

IPaddress: 10.10.10.1
Mask: 255.0.0.0
Gateway: whatever your gateway is
DNS: whatever your dns is

On the windows pc's:

change addresses to 10.10.10.2 and increment by one for each. Give the mask of 255.0.0.0

The reason you can ping from windows to linux, but not vice versa is because MS's implementation of teh TCP/IP stack does not follow RFC standards, and thus can reach hosts on networks below them. The linux box gives a ICMP reply as it knows the mac even though it thinks it can't reach the network with the windows pc's on.

Dev

---
My Sig:
))
(( ___________________
|||_____________|_____|
 

pscowboy

Distinguished
Apr 24, 2002
1,129
0
19,290
Thanks for coming on board with this.

I punched in the numbers you suggested. Actually, I only typed in the IP address, and then the tool filled in everything else. I had no reason to not accept defaults. I don't have a real gw or nameserver. It's just a small internal office wanting to learn to use Linux.

Alas, STILL CAN'T PING. The boss is of the opinion now to scrap this deal. I've been trying to get this machine into their existing network for two weeks now and it won't work.
 

Dev

Distinguished
Sep 18, 2001
553
0
18,980
I am a little confused, but check that all your subnet masks are the same. In your posts you state that you have the mask of 255.0.0.0 (or /8 IOW), but the output shows 255.255.255.0

To make this work follow these instructions to the letter:
1. Determine netmask. Whether you want to use a /8 (255.0.0.0) or /24 (255.255.255.0) does not matter much for your setup, so choose the one you prefer. However, all machines need to have the same mask!!!!

On the Win boxes change the addresses to 10.10.10.x where x is any number (except 0 if you use a /24 mask).

On the Linux box:
# netconfig
IP Address: 10.10.10.x (same rule as above for x)
Mask: Either 255.0.0.0 or 255.255.255.0 (must be same for all boxes)

Network: This will be either 10.0.0.0 for a /8 mask or 10.10.10.0 for a /24 mask. Very important not to mess this up.
Gateway: Whatever gateway you have
Nameserver: Ditto

Now open a command prompt on the windows boxes:
C:\ipconfig /all

This will give you all the information on the IP settings. Make sure that all masks are the same and that all addresses are 10.10.10.x.

Then on the Linux machine:
#ifconfig -a

Make sure that IP address is 10.10.10.x and mask is the same as the windows boxes. (I can not remember if the mask is given in Hexadecimal on RedHat. If it does then ff: is the same as 255. and 00 is the same as 0.

Now ping all the hosts from every host, i.e. ping all the machines from the linux box, then repeat for all the windows boxes.

If you still don't have connectivity, change the cable. I have seen some strange issues from slightly broken cables. the most extreme was one where NetBios could communicate but not TCP/IP... That could be the case for you, but you should make sure that your addressing is correct first.

If you still have problems, please post the output of "ipconfig /all" and "ifconfig -a" from all the hosts.

Hope this helps...

Dev

---
My Sig:
))
(( ___________________
|||_____________|_____|
 

pscowboy

Distinguished
Apr 24, 2002
1,129
0
19,290
I decided to scrap the existing 10.10.10 numbers, and try something else. I deleted eth0 and started over using netconfig, which fills everything in for you after the IP address is entered. I get this:

Ip_____192.168.1.1
Mask___255.255.255.0
GW_____192.168.1.254
B'cast_192.168.1.255

It also set up the default network of 192.168.1.0

My route table is perfect:
Destination___________GW_____________Mask_________IFace
192.168.1.0_________0.0.0.0_____255.255.255.0_______eth0
127.0.0.0___________0.0.0.0_______255.0.0.0_________lo
0.0.0.0__________192.168.1.254_____0.0.0.0__________eth0

ifconfig confirms the nic is configured and up & running.
route -n and netstat -rn confirms that the network is setup.
Samba client & server are set up during boot.

Everything looks perfect, but this Linux will not ping my Windows machines (I don't think it's getting out of the box), nor is it visible in Network Neighborhood. What did I miss doing, that is not allowing this unit to join the existing computers?

Ipconfig on the Windows units: (showing first one, others same except macs & last # of IP addr.
Description........................Linksys LNE100TX(v5)
Physical Address...................00-04-5A-83-C1-27
DHCP Enabled.......................No
IP Address.........................192.168.1.2
Subnet Mask........................255.255.255.0
(Everything else is blank-no entries)

Ifconfig eth0:
Link encap:Ethernet HWaddr 00:04:5A:7B:DA:2A
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 METRIC:1
RXpackets:364 errors:0 dropped:0 overruns:0 frame:0
TXpackets:125 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RXbytes:57190 (55.8Kb) TXbytes:18931 (18.4Kb)
Interrupt:5 Base address:0x6000

The only thing I'm not sure of is that metric of 1. That usually means an external gateway, which I do not have. If it means I have to somehow change that to 0, how do I do that?