Jump to content

Two PC network


Trio3b
 Share

Recommended Posts

OK, new to linux and newer to networking. Read FAQ's and tips about connecting two PC's.

PC 1

Mandrake 10.0 dwnload

SiS ethernet

External serial dialup fot internet connection

 

PC 2

Fedora core 2

Intel 10/100 ethernet

internal PCI dialup modem for internet connection

 

Have these Pc's hooked up w/cat5e crossover cable.

Most of the tutorials describe the hdwr end of things but would like to know about setting these PC's up for file sharing. I'm not too worried about internet sharing right now, unless it is a given that you have to do both. I have setup each PC with dialup modem, and that's all working, but whenever I use the network config tool in FC2 or MCC in the GUI for the ethernet setup, I get the feeling that I'm setting up ethernet for INTERNET connection

( because then my dialup doesn't work right and have to delete the etho setup) and that's NOT what I want. I would like for the PC's to talk to each other to share files. Again, the tutorials go on about hdwr, but would like to know how to configure the ethernet cards to talk to each other, NOT the internet.

Thanks for any help

Link to comment
Share on other sites

try to check if when setting your LAN, make sure you've selected the ethernet, manual options, put static ip add, and make sure those ipś are private, ex. pc1 = 192.168.0.1, subnet-mask = 255.255.255.0, pc2 = 192.168.0.2, subnet = same, activate on boot, then, try to ping after assigning those ip. If uĺ be able to ping both pc, assuming that you've check ur firewall not blocking the packets... now you can either activate samba or nfs or ftp for file sharing, or you can use ssh, using kbear sftp capability...

 

dial-up, use kppp

Link to comment
Share on other sites

try to check if when setting your LAN, make sure you've selected the ethernet, manual options, put static ip add, and make sure those ipś are private, ex. pc1 = 192.168.0.1, subnet-mask = 255.255.255.0, pc2 = 192.168.0.2, subnet = same, activate on boot,

 

What if one of the computers is on DHCP? And how can I configure the DNS servers?

Link to comment
Share on other sites

What if one of the computers is on DHCP? And how can I configure the DNS servers?

 

If you mean that the dhcp request will be coming from your pc going to your isp, they should automatically assign your IP with their DNS. but if your the one that assign ip add into your box from your own DHCP server, you should indicate the DNS in your DHCP config file, i think its something like

"option domain-name-servers 123.123.1.1;123.123.1.2" --> sample only

DNS is the DNS of your ISP

Link to comment
Share on other sites

Is anyone familiar with the MCC GUI option for setting up this 2 PC network. I now have two MDK 10.0 PC's and have setup dialup access thru Kppp and mozilla on both(without the use of MCC. That is all working on each machine.

Next, I configured a new eth0 connection on each PC as per instructions:

 

using static IP's

PC 1

Zoom ext ser modem

Intel 10/100 eth card

localhost1.com

192.168.0.1

255.255.255.0

 

PC2

Intel 536ep PCI modem

SiS onboard LAN

192.168.0.2

255.255.255

 

using crossover cable

 

removed firewall on both PC's

Got as far as each PC pinging itself and the other PC.

 

Would like to connect PC1to PC2 with ethernet and use PC1 as gateway to internet thru Zoom dialup(no DSL here).

Now tried to setup internet sharing. MCC is very confusing about which of the following to use for the modem connection to internet , eth0 to the other PC, and where to place the gateway IP (Is it the IP of PC1?)

setup, manage, monitor, internet sharing, internet acces

 

I think I broke something because now PC2 can't ping itself or the other PC.

Does the fact that PC2 has been setup thru kppp have any effect on what MCC uses for the eth0 setup to PC1?

Any help appreciated

Thanks :wall:

Link to comment
Share on other sites

I got the same issue, I think there is a bug with mandrake but yuo can see more of this complain going on at linuxmodems.org mailing list.

Link to comment
Share on other sites

I think somethings going on with the Internet and network setup in MCC because I now have lost connection thru dialup on each PC.

 

fixed with these steps

I deleted the eth0 connection

then I opened /etc/resolv.conf and there was a bunch of junk. How do I know? 'cause I just went thru this with FC2, but FC2 has this problem even without messing with anything.

I then gedit and delete everything in the file(not the file itself) and save.

Viola!!

Ihave my Kppp and browsers back, but of course, no eth0.

Wish someone knew about networking

 

:wall:

Link to comment
Share on other sites

Mandrake wizards are not always the best tools, that combined with lack of networking knowledge often causes probs...

 

You can easily set it all up manually with this (should work, doing this from memory/notes):

 

PC 1:

Edit /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=static  
IPADDR=192.168.0.1         
NETMASK=255.255.255.0      
NETWORK=192.168.0.0        
BROADCAST=192.168.0.255    
ONBOOT=yes
MII_NOT_SUPPORTED=yes

 

PC 2:

Edit /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=static  
IPADDR=192.168.0.2         
NETMASK=255.255.255.0      
NETWORK=192.168.0.0        
BROADCAST=192.168.0.255    
ONBOOT=yes
MII_NOT_SUPPORTED=yes

 

PCs 1 & 2:

/etc/resolv.conf should contain the nameserver address(es) - put the address of your ISPs nameserver right at the top. eg:

nameserver 195.20.224.165
nameserver 195.20.224.166

This entry will get overwritten on the dialup machine when it dials up.

To get your ISPs nameserver addresses, either check their website or dial up and look in the file.

 

PC 1:

/etc/sysconfig/network:

HOSTNAME=A_unique_hostname  # localhost1.com actually exists on the Internet!!! You MUST choose a unique one, i.e. one that does not end in .com, .net, .co.uk etc...  something like 'localhost1.mynetwork' or 'brian'
NETWORKING=yes
GATEWAY=   	 # this will get sorted out when you dial up. Leave it blank.

 

 

PC 1:

We then need to set up packet forwarding:

Put the following command at the beginning of /etc/sysctl.conf

net.ipv4.ip_forward=1

PC 1:

Install iptables - type "urpmi iptables" as root, or use the package manager in the start menu or mcc

Add the following code to the bottom of /etc/rc.d/rc.local.

iptables -t nat -D PREROUTING -i eth0 -j loc_dnat
iptables -t nat -A POSTROUTING -o ppp0 -s 192.168.0.0/24 -d 0/0 -j MASQUERADE

 

PC 2:

/etc/sysconfig/network:

HOSTNAME=Another_unique_hostname
NETWORKING=yes
GATEWAY=192.168.0.1

 

Both PCs (the files should be the same on both machines - required if you want to access the machines by name):

/etc/hosts:

192.168.0.1 A_unique_hostname          # the hostname of PC 1
192.168.0.2 Another_unique_hostname    # the hostname of PC 2

 

Then Reboot both PCs (you can restart the network, but quicker to explain this way...)

 

Try it all out:

Try pinging your computers NIC (type "ping 192.168.0.1" on PC 1 )

If OK - Try pinging the NIC on PC 2 (type "ping 192.168.0.2" on PC 2)

If OK - Try pinging the gateway from PC 2 (type "ping 192.168.0.1" on PC 2)

If OK - Try browsing from each machine.

 

If you are still having problems, post the following information in the networking forum:

What works, what doesn't?

Output of "ifconfig" , "route -n" , "iptables -nvL" and "iptables -nvL -t nat"

Summary of the results of all pings above.

 

Good luck!

 

Chris

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