[SOLVED] Can I ping each computer with this router configuration?
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.
Can I ping each computer with this router configuration?
Hello forum,
I have a desktop computer (Ubuntu) connected to one of the LAN ports of the Cradlepoint MBR1000 router via an Ethernet cable. I also have a Verizon mobile broadband USB modem (USB760) plugged into the USB port of the Cradlepoint router.
I also have a laptop (Ubuntu) with a wireless wi-fi adapter (802.11g). The laptop also has an Ethernet card but I'm not using it. The desktop computer does not have a wi-fi adapter, only the laptop does.
With the above setup, I have Internet access to both the desktop computer as well as the laptop computer, which I am well pleased with.
Is there a way I can have file sharing between the desktop and the laptop, or at least ping between them, the way I have it set up? I can't use the ad-hoc method because for that to work each computer needs a wi-fi adapter. The router is using DHCP but can also be configured manually.
I am a newbie in networking so please dummy it down for me.
I have a desktop computer (Ubuntu) connected to one of the LAN ports of the Cradlepoint MBR1000 router via an Ethernet cable. I also have a Verizon mobile broadband USB modem (USB760) plugged into the USB port of the Cradlepoint router.
Yes you have.
Quote:
I also have a laptop (Ubuntu) with a wireless wi-fi adapter (802.11g). The laptop also has an Ethernet card but I'm not using it. The desktop computer does not have a wi-fi adapter, only the laptop does.
Yes you also have.
Quote:
With the above setup, I have Internet access to both the desktop computer as well as the laptop computer, which I am well pleased with.
Yes you have. and yes you are pleased.
Quote:
Is there a way I can have file sharing between the desktop and the laptop,
Nothing can stop an industrious man from doing that, in having what you currently have.
Quote:
or at least ping between them, the way I have it set up?
If you cannot ping you cannot share.
Quote:
I can't use the ad-hoc method because for that to work each computer needs a wi-fi adapter. The router is using DHCP but can also be configured manually.
I am a newbie in networking so please dummy it down for me.
Help will be much appreciated,
Roy
First things first:
Try to understand your problem first.
By replying to a bad question I am giving you the honor for it. Don't wonder if nobody cares.
We do not know what your problem is. Be specific. How far have you done in solving that problem? If your problem if to ping, then you should have tried it by now. What happened?
Okay. Choose between creating a wireless workgroup, or creating a cabled network and make your ubuntu the server. Either way you'll have need to buy, either cards for those which don't have, or cables for the other hosts.
Come back with a concrete question and we can help you.
Is there a way I can have file sharing between the desktop and the laptop,
Yes.
Quote:
or at least ping between them,
Yes.
Ping should work now. The thing to find out is what the IP address of the target machine is. Since you are running DHCP, the router is assigning the IP addresses. The problem this presents, is you never know from boot to boot, what address has been assigned; unless you know how to find out.
To find out an address that has been assigned in linux, open a konsole and run the command 'ifconfig'. The command is without the quotes.
The field inet addr is the IP address assigned to my machine.
To ping a remote machine, you need its address. Either you go to that machine and run ifconfig, or you can connect to your router and look to see what address has been assigned. To connect to my router, I use Firefox, and in location bar I type the IP address of my router. I know what it is, since I configured it. If you have never configured it, ( ie, you brought it home, turned it on and it worked ), then once you know your own IP, it is a good bet the IP address of your router will be the same as your system, ALL BUT THE LAST DIGITS. It will end with a .1
Most router have some security, they require passwords, and a user IP to connect to. If it has never been configured, then look in the documentation for the router. It will tell you the factory defaults.
Once in the router, look for the range of addresses the router is assigning. Usually if factory defaults are still the configuration, this range will be all addresses in the class C range, minus the first and last addresses. The max range for class C is 256 decimal. So, if you have not changed the config the range would be .2 to .245 ( last digits only ).
To make DHCP work without all this guess work, most routers allow you to assign IP addresses based on MAC addresses. MAC addresses are burned to the card when they are manufactured. The field marked 'HWaddr' is the MAC address. So, once you get into the router, there usually is an option to configure a 'DHCP Reservation' What you can do is assign what IP address will be assigned by MAC address. Here is what is looks like on my router.
Quote:
Client Name Assign IP Address To This MAC Address MAC Address
Presto_2 192.168.1.10 00:14:A5:22:E6:BB
peigi-PC 192.168.1.12 00:1F:E1:75:92:4E
dlink-7B913F 192.168.1.11 00:21:91:7B:91:3F
cliffs-mini 192.168.1.13 90:4C:E5:3C:E8:40
The left column is the name I gave the system. Next is the IP address I want assigned. Next, MAC address.
So, to ping the system called cliffs-mini I 'ping 192.168.1.13' and if it is on, ( Its a netbook ) the ping will work.
The is a good way to set the network up, since if a system is on the home network, I know the IP address. It works. If the system goes mobile, and I connect to another network, it will work there with what ever IP gets assigned. Perfect.
No need to configure ad-hoc at home. Sharing will work through the router.
Hope this helps. Ask any questions you need clarification on.
Sorry for not making myself clear in my post. I should have stated that I can not ping from either computer. I get a message saying the destination host is unreachable.
In response to Cliff's response, I have already assigned static IP addresses on both of my computers because they kept swapping on me when I was trying to configure the router. And both of these addresses are within the range of the router (192.168.0.100 to 192.168.0.199). The IP addresses of my desktop is (static) 192.168.0.150 and the address of the laptop is (static) 192.168.0.155.
And I have already tried assigning a DHCP reservation for my desktop (it is the only one that showed up as a Dynamic DCHP client by default, which I then reserved to a regular DHCP reservation. The laptop never showed up at all but when I tryed to add it as well, I got an error message saying the MAC address is already set, so apparently I am only allowed to have one DCHP reservation at a time, which is for the desktop. I think this is what you were saying in your reply, about only assigning one computer a DCHP reservation. But I still can not ping either computer.
And my Ubuntu firewall is disabled on both computers so I doubt that port 22 is blocked by the firewall.
Can you please help me figure out why I can't ping each computer?
Your help will be greatly appreciated and thank you for your help so far.
Roy
UPDATE
Just for the record, I can ping and browse folders on either of the remote computers when I connect my laptop to a LAN port on the router using an Ethernet cable. It uses the Ethernet card in the laptop. Ubuntu configures everything for me and it works "out of the box". But I can't get it to work wirelessly.
Have you got a default route set on each system? To fine out, in a konsole run the command 'netstat -r' ( withou the quotes ). It should look similar to this:
Quote:
netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt 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.1 0.0.0.0 UG 0 0 0 eth0
Basically, if you point each system to the router ( the default ) they should be able to talk to each other. How about firewalls on either or both systems?
But to show my ignorance in this matter, I do not what that means but it does look similar to your example. Does it appear that each system is pointed to the router? And the firewalls in both computers are disabled.
I can, however ping and browse folders on each of the other computers using an Ethernet cable from the router's LAN to my laptop's Ethernet card. I just can't seem to get it to work wirelessly.
Thanks for you help and I could use a little more.
Post the route information for both the desktop and the laptop. The one you posted looks correct for the ifconfig listing you showed in your earlier post. Run ifconfig again at the same time, for both computers. That way, we won't miss any changed items since your earlier posts.
Code:
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
...
eth0 Link encap:Ethernet HWaddr 70:f1:a1:8c:01:41
inet addr:192.168.0.150 Bcast:192.168.0.255 Mask:255.255.255.0
If you can't ping, check if you have a setting in the router that doesn't allow it (like the wired interfaces being isolated from the wired) or check your computers. Is the firewall configuration is blocking pings on each host. ICMP ping replies may be disabled. Does your firewall configuration treat the wireless device and the wired device differently? The wired interface might be assigned to a logical internal or trusted zone, while the wireless may be assigned to an external or untrusted zone.
Try connecting both computers using an ethernet cable. Can you ping between them now. Another thing to try is shutting down the unused interface on your laptop. The default route (default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0 ) is for internet traffic. The other (192.168.0.0 * 255.255.255.0 U 0 0 0 eth0) is the route that would be used to ping another computer on the LAN. On the laptop, is the same device indicated at the end of the line?) Note that this is the listing you didn't post.
Checking the ifconfig info and routes should be done first. The firewall configurations can wait for now.
I added some updated information two posts above to answer some of your questions. Let me study my configuration a little more and I'll get back with you soon.
I wanted to see if both systems were pointed at your router. They are, that is good.
Quote:
I can, however ping and browse folders on each of the other computers using an Ethernet cable from the router's LAN to my laptop's Ethernet card.
That should not work; unless its a cross - over cable. The cables that connect a system to a router are straight through cables. Cables to connect two systems without a hub are cross-over cables. They are wired differently. Cross-over cables have the Tx pair on one end connected to the Rx pair on the other, and vice a versa. Cables that connect system to router have Tx to Tx, Rx to Rx, no cross over.
IThat should not work; unless its a cross - over cable. The cables that connect a system to a router are straight through cables. Cables to connect two systems without a hub are cross-over cables. They are wired differently. Cross-over cables have the Tx pair on one end connected to the Rx pair on the other, and vice a versa. Cables that connect system to router have Tx to Tx, Rx to Rx, no cross over.
That used to be important (especially when the straight and crossover cables got mixed up in the store cupboard!) but most (all?) recent SOHO network interface hardware is auto-sensing so it does not matter now.
You could try running nmap and see if you can scan any ports from the laptop to the desktop. Your latest ifconfig listing indicates that you are using wireless. It is the one with the IP address.
Run "nmap <desktop hostname or IP>" from the laptop. You could also use telnet to test a particular port:
Here I am using it to check if the microsoft-ds (port 445) service is running on a nas drive:
Code:
telnet maxtor 445
Trying 192.168.1.103...
Connected to maxtor.
Escape character is '^]'.
If the port isn't open, there are three possible problems to consider: no route to the host, firewall blocking port, networking service isn't running.
If the desktop is running nfs instead of samba, use "telnet elite 2049".
I have a different router. It's wireless, lan and modem in a box. It has a web interface. In the settings there I have an option called "Clients isolation". Maybe you have something similar? Since the ip addresses are in the same range, there should be no routing involved. Maybe you need to add routing for it to work? I don't know but I would try to read up on that router.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.