SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Is it possible for me to network my Slackbox with my WindowsXP laptop if both of them are using DHCP for their internet connections? They are both connected to a hub but I have had no luck going through the tutorials on Linux Questions or by reading the Samba man pages or by reading the Slackbook chapter on Samba. I'd like to try to ping the two computers but how can I do this if I don't know the IP address?
All the examples I have found seem to have static IP addresses. Could this be my problem. It seems so simple to set up in all the stuff I have read and yet I have been trying to get these machines to talk to one another for three days to no avail.
Any good links to tutorials or info would be much appreciated.
If you want your machines to get an IP address through DHCP, there must of course be a DHCP server that serves IP addresses.. it looks as if your LAN does not have a DHCP server.
People with broadband connections that use a NAT router between their LAN and the internet (so that multiple computers may use the internet connection) usually have a DHCP server running on that router. If you have such a box between the hub and your cable/adsl modem, you should verify if the DHCP server has been activated in the router's configuration.
If you do not have a DHCP server on your network, you will have to use static IP addresses. Use the netconfig command on your Slackware box to setup an IP address and use the network applet in your XP computer's Control Panel to setup a static IP address there.
For this to work, the two IP addresses (Linux and XP) must be in the same IP network range. This is determined by the network mask. Without a DHCP server present, you will also have to configure the IP address for the default gateway (for Slackware, that is also done using the netconfig command) and you will have to enter one or more IP addresses for DNS servers if you want to surf the internet using names instead of IP numbers.
I DO have DHCP through my ISP, it is how both of my systems connect to the internet. My confusion is that I thought that with DHCP my system would be assigned a different IP Address each time I start up. All the tutorials I have found for setting up networking are referencing static IP's. SO my question is still "can I network two PCs that are both using DHCP?"
If both PC's are assigned an IP address through the ISP's DHCP server, then they should be able to communicate with each other. After all, both are getting an IP address that you can use on the Internet, and so the two PC's should be able to find one another.
Now, DHCP-assigned IP addresses are dynamic in nature, but that does not mean that you get a different IP address each time you refresh the lease by powering up the PC or by explicitly renewing the lease using dhcpcd (in Linux) or ipconfig (in Windows XP).
A DHCP server that still has unused IP addresses in it's address pool will give your PC the same address it had received before, unless the PC explicitly asks for another address. Only when the DHCP server runs out of free IP addresses will it delete the lease for an address that is not actively used at that moment, so it can hand out that IP address to a new client that asks for an IP address.
ISPs will have more than enough IP addresses for the customers they serve, so normally you will not get a new IP address each day.
Another reason for losing your IP address to someone else is when you shut down your PC long enough that the lease on your IP address expires. When that heppens, the DHCP server will be able to re-use your IP address when a new dhcp client on the network asks for an address. Lease times can vary between hours and weeks, depending on the ISP and the plans it has with its network topology.
What does sometimes happen (at least with my ISP) is that an ISP grows so fast, that in certain areas the number of customers becomes bigger than the number of IP addresses in that particular network segment. The ISP will then have to re-shuffle the network address ranges that it owns, and then it may happen that one day your neighborhood will get IP addresses in a completely different IP range.
This all sums up to: the IP addresses assigned to your PC's will (most probably) not change each time your PC boots up.
I think it will make your life easier if you use a "Dynamic DNS" service such as for instance http://dyndns.org/ (DynDNS.org is not the only site that provides this service for free by the way) and register a host name for each of your PC's. That hostname will then always point to your computer's IP address, even if your PC eventually gets another IP address. You will have to install a DynDNS client on the computers to watch over the IP address. This DynDNS client will also update the hostname record at dyndns.org at regular intervals so that it will not be deleted because of inactivity.
If you do not want to use a DynDNS hostname, then you must find out your computers' IP addresses and use them in communication.
Alien Bob said it all really, but I spent ages typing this before I saw his post, and it has a slightly different slant, so I'm going to post it anyway, hope you don't mind Bob:
Your isp will only offer you one IP address at a time (unless you pay for more that is) whether it be static or dynamically assigned to you.
So a typical configuration might be that your router will negotiate an IP address from your ISP, and hold it until you restart your router (or have it set to time out). Your router then serves IP addresses to the boxes on your network, again statically or via DHCP. These IP addresses will be in the same IP network subnet range, eg 192.168.1.2 and 192.168.1.3 (192.168.xxx.0 & 192.168.xxx.255 are reserved for special purposes). Even with DHCP in use, your boxes will normally get the same ip addresses issued to them, as the router will cache the previous assignments.
Ranges beginning with 192.168 (amongst others) are reserved for local networks. This range is set in the router config.The router will also have a gateway ip address in the same range, often it is the first available, 192.168.1.1 in this example. The boxes on your local network will connect to the gateway address to access the net, and the router manages the link between the gateway and the IP address your isp assigned to you. This way, your local network can be kept separate from the internet, and pass traffic which is restricted to your network only.
If you do not have a router that can serve ip addresses to your two boxes, (statically or via DHCP) then you cant really have a local network unless one box is served from the other, meaning the box first in line to the net must be on to allow the second to connect to the net (somewhat inconvenient). Should the first box be running XP, then it can be configured to use ICS (internet connection sharing) to pass on the internet connection to the other box.If the first box was linux, you would invoke ip_forward to the second box.
A hub can pass on ip addresses assigned by a router (either hardware or an OS on a box) but it is not smart enough to issue ip addresses on its own.
Perhaps I cannot set up a home LAN without having one of my systems serve the other. But I'm still not positive. I will describe my setup in more detail:
I have a Linksys ADSL Ethernet Modem which feeds into a hub which both my Windows and Linux systems are connected to. Both are currently using DHCP to connect to the internet.
On the Windows system the IP address (from ipconfig) is 207.6.238.15 and on the Linux system (from ifconfig) the IP address is 207.6.248.104
I can ping and get a response when pinging from the Windows box to the Linux box, but nothing happens if I try to ping the Windows box from the Linux box(the cursor just sits there and does nothing)
It seems that my ISP's DHCP is giving me two unique IP address'.
So, even though I don't have a router, is it possible for me to get these two PC's to network and share files given that they do have seperate IP's?
Also, if I want to serve my Wndows laptop from my Slackbox do I need two NIC cards or can I do it through the hub?
On the Windows system the IP address (from ipconfig) is 207.6.238.15 and on the Linux system (from ifconfig) the IP address is 207.6.248.104
It would be interesting to see more detail, because the netmask will determine whether the two IP addresses are in the same subnet. When they are, then network traffic from one to the other will never leave your home. If they are in separate IP subnets, then all traffic between the two computers will go via the default gateway. That gateway may be your ADSL router, or a router at your ISP's location (which would be bad for performance and security of course... you want to keep your traffic inside the house)
You could post the results of ifconfig -a (Linux) and ipconfig /all (Windows) here so that you can get answers about it.
Quote:
I can ping and get a response when pinging from the Windows box to the Linux box, but nothing happens if I try to ping the Windows box from the Linux box(the cursor just sits there and does nothing)
Maybe the Windows computer runs a "personal firewall" that blocks ping and possibly other network traffic as well. If that is the case, you will have to configure the firewall to see the IP addresses in your local network as "trusted".
Quote:
Also, if I want to serve my Wndows laptop from my Slackbox do I need two NIC cards or can I do it through the hub?
You just need one NIC, and configure Samba with a couple of shares that the Windows machine can access.
Both computers show similar information:
For both, the NETMASK = 255.255.224.0, which creates an IP subnet that can hold 8190 IP addresses that are all local to each other (i.e. they can communicate directly with each other and do not need to pass the data through the default gateway).
This ipcalc URL shows that nicely: http://jodies.de/ipcalc?host=207.6.2...5.224.0&mask2=
So, conclusion is that your computers will talk to each other and their network traffic will stay inside your house.
The fact that Windows cannot be pinged must be due to your Norton Internet Security firewall.
Get an account at http://www.dyndns.org/ and create host names for your computers, install a dyndns client on both PC's and start using hostnames (for instance adds2one.dyndns.org) instead of IP addresses to talk to the other computers.
I added the IP for my Slackbox to the safe addresses in Norton and now I can not only ping but also see each computer from the other! I can see the Windows laptop from KDE in Remote Places->Samba Shares->Home and I can see my Slackbox in Windows under My Network Places->Entire Network->Microsoft Windows Network->Home.
I am almost there but not quite.
When I try to access the files on my WIndows Laptop from KDE I get asked for a username and password but none of my usernames or passwords seem to work. Any idea what username and password would be needed for this? Would it be something set on the Windows machine or in Linux?
When I go onto my Linux box from my laptop I see a folder that says Printers and Faxes but no folders or files. How do I add access to files and folders on my Linux box?
Thanks so much for all your time and for getting me this far.
I also registered two DNS names from dyndns.org and will set about setting those up shortly. Anyone reccomend a particular dyndns client for windows and one for linux. There seems to be quite a few choices.
When I try to access the files on my WIndows Laptop from KDE I get asked for a username and password but none of my usernames or passwords seem to work. Any idea what username and password would be needed for this? Would it be something set on the Windows machine or in Linux?
This is because you have not setup filesharing on your Windows box (yet) - you can create a share in WIndows that does not require a user/password when you access it over the network.
Quote:
When I go onto my Linux box from my laptop I see a folder that says Printers and Faxes but no folders or files. How do I add access to files and folders on my Linux box?
whoo hoo!! I've got it all working! Thanks alien bob!
I can now ping using the DSN names, www.lapy.homeip.net and www.boxy.homeip.net but I am currently not making use of them. I know that I use them instead of the IP address's asigned by DHCP but I don't know where to put them.
And now I am running into the problem that my ip is changing each time I reboot so that I have to reconfigure the firewall each time I start up. How do I make use of the DNS names?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.