LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Can I ping each computer with this router configuration? (https://www.linuxquestions.org/questions/linux-networking-3/can-i-ping-each-computer-with-this-router-configuration-833313/)

rrrssssss 09-20-2010 06:10 AM

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.

Help will be much appreciated,
Roy

malekmustaq 09-20-2010 08:57 AM

Quote:

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.
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.

Good luck.

camorri 09-20-2010 08:59 AM

Quote:

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.

Here is what it looks like:
Quote:

ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:1D:7D:20:F4:67
inet addr:192.168.1.26 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:78642 errors:0 dropped:0 overruns:0 frame:0
TX packets:41438 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:46118792 (43.9 MiB) TX bytes:3270555 (3.1 MiB)
Interrupt:24 Base address:0xc000
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.

rrrssssss 09-20-2010 10:52 AM

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.

Below is the ifconfig readout from the laptop:

Code:

roy@roy-laptop ~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr a4:ba:db:ca:aa:05 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:18

eth1      Link encap:Ethernet  HWaddr 70:f1:a1:8c:01:41 
          inet addr:192.168.0.155  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::72f1:a1ff:fe8c:141/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:43305 errors:0 dropped:0 overruns:0 frame:619
          TX packets:7513 errors:7 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6051326 (6.0 MB)  TX bytes:602551 (602.5 KB)
          Interrupt:17 Base address:0xc000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:74 errors:0 dropped:0 overruns:0 frame:0
          TX packets:74 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:7460 (7.4 KB)  TX bytes:7460 (7.4 KB)

roy@roy-laptop ~ $

And this is the ifconfig readout for the desktop:

Code:

roy@roy-desktop ~ $ ifconfig
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
          inet6 addr: fe80::72f1:a1ff:fe8c:141/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:44584 errors:0 dropped:0 overruns:0 frame:0
          TX packets:42691 errors:0 dropped:1 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:30323146 (30.3 MB)  TX bytes:5634787 (5.6 MB)
          Interrupt:19 Base address:0xe000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:276 errors:0 dropped:0 overruns:0 frame:0
          TX packets:276 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:42060 (42.0 KB)  TX bytes:42060 (42.0 KB)

roy@roy-desktop ~ $

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.

camorri 09-20-2010 12:26 PM

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?

rrrssssss 09-20-2010 12:37 PM

When I run the netstat -r command on the desktop, this is what I get:

Quote:

roy@roy-desktop ~ $ netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth0
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
If I run the command on the laptop I get:

Quote:

roy@roy-laptop ~ $ netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
link-local * 255.255.0.0 U 0 0 0 eth1
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth1
roy@roy-laptop ~ $
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.

Roy

jschiwal 09-20-2010 12:59 PM

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.

rrrssssss 09-20-2010 01:14 PM

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.

Thank you for your help so far,
Roy

camorri 09-20-2010 01:20 PM

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.

catkin 09-20-2010 01:37 PM

Quote:

Originally Posted by camorri (Post 4103611)
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.

jschiwal 09-20-2010 01:48 PM

Is the Laptop's ifconfig the same as before? Is eth0 the wired interface and eth1 the wireless device? The route configurations look good.

rrrssssss 09-20-2010 02:34 PM

My laptop's ifconfig is a little different now that I had an Ethernet cable connected between it and the LAN port on the router.

And yes, eth0 is the wired interface and eth1 is the wireless interface.

Code:

roy@roy-laptop ~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr a4:ba:db:ca:aa:05 
          inet6 addr: fe80::a6ba:dbff:feca:aa05/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:2689 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2242 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2278492 (2.2 MB)  TX bytes:210330 (210.3 KB)
          Interrupt:18

eth1      Link encap:Ethernet  HWaddr 70:f1:a1:8c:01:41 
          inet addr:192.168.0.155  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::72f1:a1ff:fe8c:141/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:52568 errors:0 dropped:0 overruns:0 frame:971
          TX packets:9591 errors:7 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7168003 (7.1 MB)  TX bytes:806944 (806.9 KB)
          Interrupt:17 Base address:0xc000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:89 errors:0 dropped:0 overruns:0 frame:0
          TX packets:89 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:9166 (9.1 KB)  TX bytes:9166 (9.1 KB)

roy@roy-laptop ~ $

I'm still hoping and trying to get wireless file-sharing to work.

Thanks for you help so far,
Roy

jschiwal 09-20-2010 03:11 PM

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".

rrrssssss 09-20-2010 03:45 PM

I ran a nmap command and got this results:

Code:

roy@roy-desktop ~ $ nmap -A -T4 scanme.nmap.org

Starting Nmap 5.00 ( http://nmap.org ) at 2010-09-20 16:40 EDT
Interesting ports on scanme.nmap.org (64.13.134.52):
Not shown: 993 filtered ports
PORT      STATE  SERVICE VERSION
22/tcp    open  ssh    OpenSSH 4.3 (protocol 2.0)
|  ssh-hostkey: 1024 60:ac:4d:51:b1:cd:85:09:12:16:92:76:1d:5d:27:6e (DSA)
|_ 2048 2c:22:75:60:4b:c3:3b:18:a2:97:2c:96:7e:28:dc:dd (RSA)
25/tcp    closed smtp
53/tcp    open  domain
70/tcp    closed gopher
80/tcp    open  http    Apache httpd 2.2.3 ((CentOS))
|_ html-title: Go ahead and ScanMe!
113/tcp  closed auth
31337/tcp closed Elite

Service detection performed. Please report any incorrect results at http://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 30.07 seconds
roy@roy-desktop ~ $

This seems to tell me that the port I use for networking with ssh (port 22) is open. Each of my computers gave the same output.

I'm still open to suggestions.

Thanks,
Roy

Guttorm 09-20-2010 04:11 PM

Hi

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.


All times are GMT -5. The time now is 03:33 PM.