A Simple IP / smba problem for the IP gurus
The problem is simple, but yet annoying. Here is a breif description.
I have two machines on a aimple LAN. Nothing fancy at all. Just a 10BT hub, and one ethernet card per machine. Machine Summary: 1 x Microsoft Windows XP Professional (IP: 208.152.2.199) 1 x SuSE Linux Professional 8.1 (running Samba). (IP: 208.152.6.114) The problem in on the Linux machine. The machine receives its IP via DHCP, and is 208.152.6.114 For some reason, the ONLY way to get Samba to network nicely with Windows is If i manually set the linux IP to something like 208.152.2.x (example: 208.152.2.111). Unfortunately setting this IP manually makes me lose my internet connection (on the Linux machine). I tried filling in the values for the Defaul Gateway, Subnet Mask, DNS Servers, as well as the DHCP server and that did NOT help. Is there a way to use an IP (received by DHCP) and network it nicely without having to have EITHER LAN or internet? Can someone please help? Thanx |
The IP address you are getting via DHCP for the linux box - does it have an entry in a DNS server anywhere. If it doesn't then Windows probably isn't ever going to see it.
cheers Jamie... |
I don't know if it does or not. The DNS server is controlled and maintained by my ISP, so I know nothing about its nature or what it does :(
|
Sounds like internally you have no name lookups which will cause you problems like this. Make sure that the IP address being used by your linux box is in /etc/hosts on linux and c:\windows\system32\drivers\etc\hosts on Windows (you may need to create this file). You want something like
Code:
208.152.6.114 linuxBoxesHostName cheers Jamie... |
What is your exact network setup ie. what connects to what.
Subnet mask as well have you got it as 255.255.255.0 cos they are on different subnets. |
Well, the setup is very simple. There is a 10BT hub, and both machines are connected to the hub. The hub gives each machine an IP via the DHCP server of our ISP.
As for different subnets, please note that that should NOT be a problem. With the same setup, If i reboot the linux machine into Windows 2000, I get the same IP, and subnet mask, and networking works without a hitch!!! |
If you are using class c masks i.e. 255.255.255.0 then it is definitely a problem, as these will be two different subnets and it will not work. Have you supplied the subnet mask in the DHCP? If machines are left to assume the mask then you may get odd results. If you want to use these addresses you will need to use a class B mask - 255.255.0.0
|
You said it yourself, it won't work until you manually set the linux ip to 208.152.2.x. That is because at 208.152.6.x, it is on a different subnet than the XP box. The only way those two ip's would work together is if you set the subnet mask for both with a starting value of 255.255.0.0 (you can subnet starting with /16 and get those two to be within the same subnet but that is beyond this particular issue). Also, I notice that you are using addresses that do not belong to the blocks allocated by RFC 1918 to private organizations. Be aware that those addresses most likely belong to another organization, so you should take care to make sure that IP's in your setup that MAY belong to someone else don't get passed out of your routing boundary. I am not going to bother working it out, but you probably may get some functionality if one of those masks is 16 bit and the other 24 bit, but you really should assure that they are set correctly. If both masks are 24 bit, those two ip's will not communicate.
|
Quote:
Also, I do NOT wish to set up the IP manually. I just want ot set up networking with the IP the dhcp server assigns. In other words, I don't see the "point" in setting up things manually if they work in winbloze just fine! NOTE: I will post the outputs of ifconfig and ipconfig in the next reply. |
data
Linux side
Code:
fallasteeni:~ # ifconfig Code:
Code:
# smb.conf is the main samba configuration file. You find a full commented Again, I must emphasize that I do NOT wish to manually set things up. I would much rather get things to work with the IP address the DHCP server assigns. This is because the DHCP server is controlled by my ISP and it assigns new IPs periodically. |
alrighty then, you are running samba on a box with a live ip and then the two machines are supposed to network together using these ip's? First, I won't even bother about the security thing. Second, if you isp is sending leased addresses to the boxes and giving you a live address and gateway then these two boxes will also send out communications via the internet and SMB will not pass that way (most likely) through an ISP router, at least not with any frequency. Let me just add that Linux and Windows are irrelevant when it comes to standards based networking protocols like tcp/ip. If I link two machines via some common media (as long as there is no router configured to route between them) with two incompatible network ip addresses, they will NEVER communicate. I don't care if its linux-linux , windows-windows, linux-windows, or TRS80-AppleII. There is alot more going on here.
|
You're definately not going to get those two machines talking nicely to one another when they're on different subnets. You can't have two different subnets on the same physical network and expect things to work properly...
If you are managing to get IP from one machine to another under Windows then it must be going from one machine through your hub out onto the web to that subnets default gateway, through to the other subnet and back into your hub to the 'other' machine. Crazy stuff... Jamie... |
that's what I am saying lol... you are trying to pass smb/netbios calls out through to your isp, through their routing and back into your other machine... I am amazed you have had any success at all!
|
I don't understand. If you read the output from ifconfig and ipconfig (above) they BOTh say the subnet mask is 255.255.255.0 So what's the problem?
Also, What I fail to understand is in windows I get the same Ip i get for linux, on the same subnet, BUT in linux i have to force a different IP and in windows i don't What's going on here? Also, Is there ANY way I can peacfully use the IP the DHCP server assigns to do this networking without manually setting up an IP like say 208.152.2.111 ??? |
I know you want to do this automatically, but here is what I would do, and you would only have to do this once:
On XP: Go to your network properties, TCP/IP properties, Alternate Configuration tab, and manually assign an IP address and netmask (ex. 192.168.0.1 mask:255.255.255.0) -On Linux: Create a subinterface eth0:1 and assign an IP from the same subnet in previous example (ex. 192.168.0.2 mask:255.255.255.0) -Modify your hosts file to reflect the name/ip mappings on BOTH machines (linux, typically /etc/hosts-- on Windows XP: c:\<system root>\system32\drivers\etc\hosts This is also a better idea for security, I would bind samba only to your internal IP on linux. Hope this helps! |
All times are GMT -5. The time now is 11:41 AM. |