Jump to content

local network with 2 PCs [solved]


joaopa
 Share

Recommended Posts

I would like to link my 2 pc with a cable to do a local network. I have got a RJ45 cable to link the both computers.

But with mandriva 2007 Spring and drakconf, I do not manage to configure my local network.

 

Any idea to do that?

 

Thank you in advance for any answer

 

Joaopa

Link to comment
Share on other sites

Once you've connected both PCs with your crossover cable, this should be very easy. You even don't need dhcp; i.e. use static adresses instead Just make sure you setup your network cards (eth0) on both machines to IP numbers with different vaules like this:

 

PC one gets 192.168.0.1

PC two gets 192.168.0.2

 

You also should set proper hostnames for name resolution (not just "localhost"!!!). Assume your machines are named ernie and bert. All you have to do now is edit the file /etc/hosts in each case to reflect the changes. So do the following:

 

1. Open a terminal window and "su" to get root access

2. Type "cd /etc"

3. Type "nano hosts" (or use your favourite text editor for this; if not installed you can do that by "urpmi nano" before).

 

Your hosts file should have at least the following entries:

 

127.0.0.1 ernie localhost (this would be on the machine named ernie)

 

4. Just add a single linge:

 

192.168.0.2 bert

 

5. Save and exit

6. On the "bert" machine you repeat this, but the line to add is slightly different:

 

192.168.0.1 ernie

 

After saving and exiting the editor you can restart your network ("service network restart") and both of the PCs should see their companion. :-)

 

Good luck,

 

scoonma

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...