Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Problem with Samba, I am trying to setup Samba right now and everything seems to be setup correctly, however when I try and access the samba server from my XP computer it can't find the host. the pathway is correct and the user is correct, my NIC's are setup properly and my smb.conf file is correct I believe. The only file I have in question is my /etc/hosts files which reads
"127.0.0.1 localhost.localdomain localhost"
>>Ryan_Sutton
>>Newbie
>..everything seems to be setup correctly, however....
=>this is the best part of all posts
the "however" rules
ok,
1.) check your syntax
testparm
2.) you would find hosts from win xp regardless of /etc/hosts
3.) check hostname
hostname
4.) go to windoze command prompt and type
net view
5.)check master browser in linux by
nmblookup -M "-"
6.) try to ping linux box
7.) give us some report, ( so list won't go forever)
1- testparm gives no errors
2-great
3-hostname is correct
4-net view showed no results
5-Showed me 3 IP addresses with __MSBROWSE__ after each one and a <1>, Looks like my Bcast, gateway and ip for the second NIC
6-no ping
7- so I guess it's not Samba that is messed up but some network setting in Linux isn't set
did you remember that you need to add a route to 255.255.255.255? Do this with "/sbin/route add host 255.255.255.255 dev eth?" Make sure it's in your rc.local as well. Remember, just adding to rc.local without rebooting doesn't run it. You can check to see if the route exists by typing "route" and looking for an entry similar to this:
Destination Gateway Genmask Flags Metric Ref Use Iface
255.255.255.255 * 255.255.255.255 UH 0 0 0 eth0
Can you ping your windows box from linux?
You said you cant ping your linux box, maybe you have ipchains or iptables running?
How does your linux box get it's IP addy DHCP or static?
Looks like you are behind some sort of firewall, linksys, d-link maybe.
find the ip of your windows machine: start/run cmd ipconfig /all .
Look at your ip, gateway,dns will probably something like 192.168.0.100
255.255.255.0
192.168.0.1
Now go over to your linux box and type netconfig
Select static, ip address of 192.168.1.111 something different then your windows machine) subnet mask of (default) 255.255.255.0, gateway 192.168.0.1, and input DNS if you want the machine to access the net by using hostnames. You dont have to use DHCP, you just have to use IP's that are on the same network/subnet and use the same netmask.
Now check to see if samba is starting, Find out what runlevel you are in: type runlevel it's probably 3 or 5
Go to /etc/rc.d/rc3.d and look for a file like this S85smbd if you dont have this in either rc3.d or rc5.d then samba is'nt installed.
You can also use ntsysv to select what programs start or dont start in the current runlevel. If the file starts with a K**smbd then rename it to start with a S. Now samba should start when the computer boots. Before you start samba make sure your smb.conf (/etc/samba/smb.conf) is set up correctly. There are many examples of smb.conf on this forum so I wont go into that now, if you have problems with it then we will work on that when we get there. But I think you have a networking problem, and that needs to be fixed first.
You've got a conflict... 192.168.1.x adresses can be routed to eth0 or eth1. It's not good. You must change one of them. I understand that eth0 is where your DSL is connected and eth1 is for local network. So, change ip of eth1 to 192.168.1.0 (netmask the same as it's now). Then reconfigure Windows machines to use 192.168.1.x IPs. BTW I'm not sure about how does your network look like. Can you make a small drawing (with IPs and where is DSL connected)?
My DSL goes into my Windows desktop computer, which is connected to my Linux desktop, which is connected to my Laptop. I don't want the Linux box to host the DSL at this time. I mainly work with my laptop and my Linux box. I'm guessing the reason my laptop can't ping my Linux box is because the laptop is settup for DHCP, and being that the DHCP has to go through the linux box to assign an ip to the laptop, maybe that is the problem? Should I set the Linux NIC's to DHCP so they can recieve an IP from my windows desktop? I prefeer to have them static. At this time I don't need the DSL to go into the linux box, I just need it to be able to share files VIA samba with my windows box's. I hope that explains my setup a little better.
Now I understand But it's still complicated.
Well, I think the easiest solution is to give Linux and the Laptop static IPs (192.168.0.x adresses).
Then routing table for Linux should be:
route add -host laptop_ip_here eth1
route add -net 192.168.0.1 netmask 255.255.255.0 eth0
route add default eth0
This should allow you to ping and use Samba. I hope there's no mistake...
Ok, I just switched the settings on eth0 to DHCP and know I am going to set eth1 staticly, However I don't believe I can set the IP on my laptop staticly as ICS requires the use of DHCP but I think it will work with DHCP if I use one DHCP and one static set NIC in the Linux box, thx for the info, much appreciated!
man: to setup your network you'll need some skill. I suggest you buying a hub (4ports-doesn't cost much $30 or so), which will make things easier ~ 3x if not you need cascading network
ie
internet-----|widoze|------lan, clas0------|linux|----lan, clas1------|laptop|
you need to have two network classes since your laptop isn't directly connected to gateway. Then you will have ICS between desktop and linux and set static ips on eth1(linux) and laptop
so ips would bi like this
desktop
nic1 -public ip
nic2 -192.168.0.1
default gw your ISP ip
linux
eth0-dhcp with default gw 192.168.0.1
eth1-192.168.1.1
laptop
nic1 -192.168.1.2 default gw 192.168.1.1
+ need to setup ip forwarding on linux. plus setup routing on windows
or
setup nat on linux
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.