Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Can anyone confirm that this output from route (below) is wrong?
Seems to me my previous routing info might have gone back to un-set or default values since a couple of recent re-sets. (I may have had some overheating in the last few days.)
After using Linux for a couple of years now I am biting the bullet and trying to understand more about how to set up Samba and networking properly. (Previously I just let Yast arrange everything.)
I can ping 127.0.0.1 ok
I can ping my router/gateway ok, at 192.168.1.2
I cannot ping my server/host:
PING 192.168.2.22 (192.168.2.22) 56(84) bytes of data.
From 188.8.131.52: icmp_seq=1 Destination Host Unreachable
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.1.2 0.0.0.0 UG 0 0 0 eth0
I am wondering,
Is 192.168.1.0 supposed to be there.
Should there actually BE some ip addresses where those asterisks are?
I think I understand from the man page HOW to add something to the route tables, but I couldn't understand for sure WHAT to add.
E.g. it seems to me I would NOT want to just add my current server/host/machine ip, because it's only on lease for a limited time.
If your server's IP address is 192.168.2.22, that indicates that it is on a separate subnet. If this is the case, is the router at 192.168.1.2 physically connected to the 192.168.2.0 subnet through one of its interfaces?
I don't really understand your question.
My linux machine is connected with a network cable to my router/modem/gateway, which is 192.168.1.2.
according to what I understand of ifconfig, my NIC, eth0 on this box seems to be configured okay.
So my linux box/samba server IP address is 192.168.2.22.
I thought that address was just leased out by the router, just like these other ones on the XP boxes:
smbtree gives me:
My computers that use XP:
Got a positive name query response from 192.168.1.62 ( 192.168.1.62 )
(shows the shared directories)
Got a positive name query response from 192.168.1.188 ( 192.168.1.188 )
(shows the shared directories)
error connecting to 192.168.2.22:139 (No route to host)
error connecting to 192.168.2.22:445 (No route to host)
As you can see, I am pretty new at Samba.
I don't even really know what you mean by 'subnet'.
But in the troubleshooting info I have seen the first step is to check that we can ping the gateway, the loopback and the server.
192.168.1.x and 192.168.2.x are different subnets. Because of routing rules, they can't communicate without some sort of router between them. This means a server running routing services with multiple network cards, one per subnet, or an actual router that is connected to multiple subnets (this could also be accomplished with VLANS, but that probably doesn't relate to this issue).
What that means is that unless you have some type of routing device between these computers, they can't talk to each other. This would mean an actual routing device, not just multiple LAN ports on a router that are on the same subnet (this is typically how the Linksys, NetGear broadband routers work).
If your router's IP address is 192.168.1.2, and it is a DHCP server for the 192.168.1.x subnet, but does not have an interface configured for and connected to a subnet configured as 192.168.2.x, it should not be giving out DHCP addresses for the 192.168.2.x subnet.
Without more information, I would guess that the 192.168.2.22 address was configured statically, and was given an incorrect IP address. It likely should be 192.168.1.22. This is all based on assumptions that you have a single retail router that only has a single internal interface with multiple LAN ports on that interface. If this is not the case, there are other possibilities.
Is the server with the 192.168.2.22 address able to ping 192.168.1.2? The answer to that question will help paint a little bit better picture of the network itself.
Yes, it's just a cheap retail 4-port adsl modem/router.
Well, I have to say, I have absolutely NO idea why the address 192.168.2.x came to exist. Just a default setting maybe?
How did I "set up" (using the term loosely) the network?
I was using Samba, just the client, for about a year.
Then one day I thought I would share one of the folders on this linux machine.
I probably used Konqueror, right-clicked on a folder, and clicked on 'share' in the menu just to see what would happen.
If I did anything more than that it was probably just to let Yast set up a Samba server. I probably let Yast auto-detect and clicked 'accept' for any suggestions it gave me.
I have to say I have used this approach with Suse for anything I don't properly understand -- just let Yast have a go at it and see if it works.
(I am not being lazy in doing this -- I have also spent hundreds of hours learning about other aspects of the Nix Way. But I will certainly take 'works out of the box' when it's available.)
Since then I have made some settings that seemed necessary in smb.conf.
Here are some main entries:
workgroup = MSHOME
interfaces = 127.0.0.1 eth0
bind interfaces only = true
security = user
server string = Samba Server
add machine script =
domain master = false
dns proxy = no
netbios name = mugwump
So I take it that now 'mugwump' is the name of my machine, the 'hostname' for this machine, and also the name of the Samba Server here.
The name seems properly identified with the ip address (but can't be pinged):
# ping -c 2 mugwump
PING mugwump.localhost (192.168.2.22) 56(84) bytes of data.
From loopback4770.core6a-akl.iconz.net.nz (184.108.40.206): icmp_seq=1 Destination Host Unreachable
And I can ping almost anything from this machine (except itself), I can use the internet etc:
# ping -c 2 192.168.1.2
PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.
64 bytes from 192.168.1.2: icmp_seq=1 ttl=64 time=0.690 ms
# ping -c 2 google.com
PING google.com (220.127.116.11) 56(84) bytes of data.
64 bytes from jc-in-f99.google.com (18.104.22.168): icmp_seq=1 ttl=244 time=269 ms
I expect you are right when you say that the 192.167.2.x address doesn't belong here. But how did it get there? -- by some default I suppose.
And do you know how I would or should change it?
It's been quite awhile since I used SuSe, and I typically use the command line to configure network settings, and I don't remember exactly where to change them in SuSe. I do remember that the network config files were in different locations than the other distributions I use (Slackware, Fedora, and PCLinuxOS), but I'm sure you can change network settings in YaST.