[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: My two boxes will not talk to each other - now they do.



Thanks to the three people who responded to my query on the subject, I was able to get my two boxes talking to each other. Both Patrick Wiseman and Douglas Allan Tutty suggested that I not use aliases for each box tied to a local domain name, which I had not properly configured in any event. They both suggested that I use static IP addresses for each box instead assigned by me, rather than dynamic ones assigned by the gateway through DHCP. Mr. Tutty went further, pointing out errors in the /etc/hosts file in both boxes.

On the strength of this information I added to both /etc/hosts files arbitrarily assigned IP addresses with aliases:

	192.168.0.2	SOL
	192.168.0.4	LAP

(I left untouched all the other information in both those files.)

Then on the server box (SOL) I ran "/etc/init.d/nfs-server start", which was accepted. I then pinged each box from the other. The response was "interesting". The SOL box returned:

	From 192.168.0.114 imcp_seq=1 Destination Host Unreachable

The LAP box returned   	

	From 192.168.0.142 imcp_seq=1 Destination Host Unreachable

I consequently concluded that 192.168.0.114 was the current address of the SOL computer and that 192.168.0.142 was that of the LAP computer. I changed the two /etc/hosts files to conform to these addresses and again pinged each box from the other. This time the returns included the current IP addresses of both, together with their aliases: LAP (192.168.0.142) and SOL (192.168.0.114).

Still using the aliases -- now linked to IP addresses -- I once more ran on the SOL computer as root "/etc/init.d/nfs-kernel-server start", which was accepted. Finally, as root on LAP I ran as root "mount -t nfs SOL:/home /home", which worked. The /home directory on SOL thereby became /home directory on the laptop -- a temporary arrangement set up for testing -- there is nothing yet in the /home directory on the LAP.

I then rebooted both boxes to see if these IP addresses were static. As the same ones reappeared after rebooting I assumed that they were indeed static.

After I had done all the foregoing I received a third answer to my query, from Ivan Tiliatnikov. As this one was off list I quote it in full:
-------------------------------------------------------------------------
To find a real IP address of the host use ifconfig command.

For example it shows that my laptop has an ip address

eth0      Link encap:Ethernet  HWaddr 00:12:3F:EA:0B:07

          inet addr:192.168.1.10  Bcast:129.78.236.255 Mask:255.255.255.0
              =====================

          inet6 addr: fe80::212:3fff:feea:b07/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:72991 errors:0 dropped:0 overruns:0 frame:0
          TX packets:35417 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:80972369 (77.2 MiB)  TX bytes:4090925 (3.9 MiB)
          Interrupt:169

The IP address is assigned either statically or dynamically via DHCP
( from your router ). In my case it is static so that I do not have to
change /etc/hosts all the time. Some of the routers can be configured
give fixed IP addresses to known hosts. Check if yours can do it. If
answer is yes, configure it to give your machine a static address e.g.
192.168.1.10. You will need MAC address of you network card to do that.
"ifconfig" command will help you again, see HWaddr feild ( HWaddr
00:12:3F:EA:0B:07 ).

Here is my setup I have two machine a desktop and a laptop.

laptop: 192.168.1.10
desktop: 192.168.1.11

In my LAPTOP  /etc/hosts a have an entry

127.0.0.1 localhost.localdomain localhost
192.168.1.10 mylaptop

On my desktop /etc/hosts is
127.0.0.1 localhost.localdomain localhost
192.168.1.11 mydesktop

If both machines are on and ifconfig shows that IP addresses are
correctly assigned, try

>From 192.168.1.10 try diagnostic command:

ping 192.168.1.11
or mydesktop

It will show you that traffic is reaching the second machine.

Press Ctrl-C to stop.

Hope this help.
--------------------------------------------------------------------------
I had not known about the ifconfig command. I ran it on both boxes. It confirmed those IP addresses and aliases, and much else besides.

Mr. Tiliatnikov suggested that I set up the gateway to assign to each box a static IP address, rather than allow DHCP on the gateway to assign a dynamic address, which presumably would be different each time each box is booted.

My gateway is a D-Link DI-704. Looking at its configuration I found that the connection to the ISP was PPPoE, and that the DHCP server was enabled, with the starting and ending addresses for the IP pool set at 192.168.0.100 to 192.168.0.199 respectively.

However, even though the DHCP server is enabled, it appears that once the gateway -- or at least mine -- initially assigns an IP address to a computer at random it is never changed thereafter. This arrangement consequently obviates the need to assign them manually, a complicated procedure.

				Ken Heard
				Toronto, Canada



Reply to: