LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 04-11-2004, 01:12 AM   #1
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Blog Entries: 1

Rep: Reputation: 30
How to setup a lan with CrossOver Cables


Im trying to get 2 computers (both running RedHat 9) so me and my friend can play some counter-strike, so how do I go about doing this, I have 1 crossover cable, and I want one computer connected to the internet so my friend computer and I can share internet. Just to let u know I have almost no experience on seting up a network, so help me through please. Thanx in advance!
 
Old 04-11-2004, 02:34 AM   #2
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,372

Rep: Reputation: 46
on each computer type this:

ifconfig eth0 192.168.0.1(2 for second computer) netmask 255.255.255.0

as long as your ethernet card is identified by the kernel it will be fine, this way though you type it every time you reboot, you can add it to a script or figure out redhatsnetworking system (I always make my own networking scripts and ditch the builtins for the systems I am on.)
 
Old 04-11-2004, 03:34 AM   #3
microsmart
LQ Newbie
 
Registered: Apr 2004
Posts: 12

Rep: Reputation: 0
I am sorry, I have this problem two.2 of my computers have Fedora installed. One has wireless Lan connection with IP 192.168.0.2 and I have crossover cable to connect 2 computer, but I don't know how to setup.Can you help me?I cannot set 2 computer to 192.168.0.1 and 192.168.0.2,right?Do I have to set their IP: 127......??Please help me, I am just a newbie!
Thank you in advance!
 
Old 04-11-2004, 05:18 AM   #4
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,372

Rep: Reputation: 46
the commands/ip's I gave you should be fine as long as the 2 computers connected to the crossover are the only computers connected to eachother, if the wireless connects one to the internet while it is connected to the other and it uses that ip address change my commands to be 192.168.1.1 and 192.168.1.2, if you want you can change the subnet mask to 255.255.0.0 if you want but it won't do much, or if you want a very different ip scheme to be ultra safe try 10.1.9.1 and 10.1.9.2 on the same subnet (255.255.255.0) (subnet is netmask if you were wondering)
 
Old 04-11-2004, 07:24 AM   #5
microsmart
LQ Newbie
 
Registered: Apr 2004
Posts: 12

Rep: Reputation: 0
Thank you very much!I got it, I can access one computer by "ssh 10.1.9.2" from 10.1.9.1 , but It seems 10.1.9.2 cannot access to the internet.(10.1.9.1 has wireless connection).Do I have to set GATEWAY or BROASTCAST for 10.1.9.2?Thanx in advance!
 
Old 04-11-2004, 12:36 PM   #6
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,372

Rep: Reputation: 46
you would need to configure the computer with wirelesss as a router, to do this you need to get bind (http://www.isc.org/), and iptables (http://www.netfilter.org/), bind is the dns server, ipfilters configures your routing and firewall, if you want to go it alone download those and read there man pages, but since that will not be enough (there is to much to figure out on your own in a reasonable ammount of time) I recommend this tutorial: http://www.tldp.org/HOWTO/IP-Masquer...WTO/index.html but it is VERY long and has more information than you need, and it does not cover dns, if you want the quick and dirty snag this script it lists: http://www.tldp.org/HOWTO/IP-Masquer...FIREWALL-2.4.X and make whatever changes you need for your network cards (eth0 eth1, etc.)

then you will need dns, the above will let you ping and browse sites by ip address, but to resolve the domain names (www.google.com for instance) you need the dns working also (both dns and iptables should run on the machine w/ the internet connection)
here is a good dns howto:
http://www.tldp.org/HOWTO/DNS-HOWTO.html I recommend you read this, it is not to long and will give you lots of valuable information about how networks work and how the internet woks, you will not be disappointed, but if you just want the quick and dirty (requires skimming still in other sections): http://www.tldp.org/HOWTO/DNS-HOWTO-5.html you need to read everything up till this, and then this, after it is just fine tuning and advanced settings.

this may seem overwhelming at first, but do not let it scare you off, and do not give up, 4 months into my linux usage I got 2 servers liek this up and running (sharing 2 56k connections) (5 years ago) and I even including dhcp (automatic IP address assignment)

oh, and after the router is configured you need to issue this command on the other box:

route add default gw 10.1.9.1 eth0 netmask 255.255.255.0

this will set the server (10.1.9.1) as your default router to connect to the internet, gw stands for gateway(router) I recommend reading the man pages and help for the route command it is confusing as hell and almost prevented me from succeeding
 
Old 04-12-2004, 02:38 AM   #7
microsmart
LQ Newbie
 
Registered: Apr 2004
Posts: 12

Rep: Reputation: 0
Thank you very much!It's very kind of you.I've just begun using Linux for 2months, I'll try my best.I love Linux
Thanx a lot!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
2 Computers LAN Crossover Samba azuiden Linux - Networking 1 11-15-2005 07:06 PM
computers, crossover cables & internet, Oh My! Imyrryr Linux - Networking 6 06-03-2004 12:31 AM
CROSSOVER Network!!!... setup Genjix Linux - Networking 5 12-26-2003 07:32 PM
Help Selecting CAT5 and CAT5e lan cables mobassir Linux - Networking 2 12-06-2003 06:07 PM
confused about crossover cables bubba169 Linux - Networking 10 09-02-2002 11:15 AM


All times are GMT -5. The time now is 08:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration