Solved

need help with networking

Posted on 1998-10-08
20
288 Views
Last Modified: 2010-03-18
okay i no some about linux and use it i, i have 2 computers and one is windows 98 and my other one is linux, i wish to network them together so i can dail in with the linux one and be online with this one. i know i need a hub and 2 eithernet cards wich im getting but what do i need to do to set it up with linux to recognize this network and the same question with the windows machine.
0
Comment
Question by:sly00
  • 10
  • 9
20 Comments
 
LVL 3

Expert Comment

by:marcelofr
ID: 1587100
It may help if you post your linux distribution (there are several, you know). What you need by this time is to make a TCP/IP network with them. Each machine has an IP number (different from each other and from the rest of the internet ;-)

But there are some reserved ip numbers for your situation: say your linux box will be 192.168.1.1 and your win box 192.168.1.2 (each number dot-separated is a byte but you cannot use 0s or 255s freely) You have also a "netmask" used for something called subnetting. You don't need to worry, just use 255.255.255.0 for each machine.

You need to configure both machine's TCP with this information. Also you can set your win box to use linux machine as gateway (the device that let's you reach other machines not locally connected), DNS server (to resolve the ip number for www.linuxhq.com) and other services (ie.: you could use linux as dhcp server, but you need to create an small dhcp configuration file... nothing difficult, but...

tell us about your distribution, so we can tell you more.

One little tip: an easy text editor: mc -e file_to_edit

Good luck
0
 

Author Comment

by:sly00
ID: 1587101
in reply my distribution is slackware 3.5 kernel 2.0.34

0
 

Accepted Solution

by:
rforrest earned 170 total points
ID: 1587102
Your question covers a pretty broad range of topics, so I'll try to outline the major pieces, starting with the network hardware. You are correct in that you will need 2 ethernet cards. If you are using 10base-T (twisted pair) you should use a hub. For 2 machines, I would recommend using coax. Connect a T connector to each card, run the coax between the T's, and put a 50 ohm terminator on the other side of both T's.  Also make sure that the cards are supported under Linux and Windows.  Any NE2000 compatible card should work. Linksys cards work great.

First you should configure TCP/IP on each machine. During Linux installation it will ask you for the IP address and netmask of the machine.  Pick something like 192.168.1.1, using a netmask of 255.255.255.0. the broadcast address should be 192.168.1.255.

Under windows, install the card drivers. Then go into Control Panel|Network and install TCP/IP. Set the IP address of the Win98 machine to 192.168.1.2, netmask 255.255.255.0, and gateway to 192.168.1.1. You will also need to enable DNS. Enter whatever hostname and domain name you like, but under DNS serve search order, put in the nameserver address provided by your ISP. That's all you should have to do under Win98.

Assuming Linux detected your ethernet card (you should see eth0 listed when you type ifconfig at the root prompt), try to ping first the Linux box, and then the win98 machine. Enter: 'ping 192.168.1.1' (without the quotes) and 'ping 192.168.1.2'  You should get a response back from both. If one or both don't respond you have a problem. Check your cables, cards, drivers, and IP addresses. ifconfig will tell you what IP address linux is using.

Next you need to set up PPP. This can be tricky. See the HOWTOs and the pppd man page for exact details. You need a pppd options file (/etc/ppp/options) and a chat script (/etc/ppp/isp.scr for example). Here is what I use:

#/etc/ppp/options
#my modem is on COM1
/dev/cua0
115200
chat -vf /etc/ppp/isp.scr
crtscts
debug
lock
noipdefault
defaultroute


#/etc/ppp/isp.scr
'' ATZ OK ATDT5551212 CONNECT

Now, if your ISP is using PAP to authenticate (most do), add a line to the options file that reads: user your_username
Then create a file called /etc/ppp/pap-secrets like this:

#/etc/ppp/pap-secrets
your_username    *    your_password

If your ISP uses CHAP, the process is similar. see the pppd man page for details.  If your ISP doesn't use either, but requires you to type your username and password at a login prompt, add the following to the isp.scr file:
   ogin: your_username
   assword: your_password
This assumes that the machine prompts you with login: and password:  Change if necessary.

WHEW! Now try it out.  on a different virtual console, type tail -f /var/log/messages so you can see what's going on. Then as root, type pppd. If all goes well, it should dial in and connect to your ISP and set up your routing tables correctly.

If this all works, try to ping the outside world. Ping a known-good IP address like 198.41.0.4 or 204.71.177.70.

Next, you need to set up DNS resolution. Create a file called /etc/resolv.conf:

#/etc/resolv.conf
#replace xx.xx.xx.xx with your ISP's nameserver address
nameserver xx.xx.xx.xx

Now try to ping www.whatever.com. It should work.

---OKAY, now you're connected. But you need to masquerade to let Win98 talk to the world.  Make sure your kernel is compiled with IP masquerading enabled. There are a couple more options you need. See the IP masquerade HOWTO for details.

After you've done this, use ipfwadm to configure the masquerade. This is also the command you would use if you want to firewall.

Issue the commands:
ipfwadm -F -f
ipfwadm -F -i masquerade -S 192.168.1.0/24 -D 0/0

I would add these 2 command to /etc/ppp/ip-up so they are executed every time you dial.

That should be just about everything. Remember, there are hundreds of little details involved in this, so there's no replacement for a little hacking around. The HOWTOs are great, as is the pppd man page.  Good Luck!!

0
 

Author Comment

by:sly00
ID: 1587103
okay i got linksys cards with bnc conneters got that all set up but linux wont detect the card i get a error i have tryed everything the card only came with unix and win software not linux
any ideas
0
 

Expert Comment

by:rforrest
ID: 1587104
The drivers for Linux are built into the kernel. Are the cards NE2000 compatible? You will need to recompile your kernel (see the kernel howto for more info).  I'm assuming you bought PCI cards(?)  You need to select NE2000 compatible cards in the kernel.  Don't include them as a module. This will screw you up. (cd to /usr/src/linux and type make menuconfig to get to the kernel setup menu)  Select PCI adapters, and pick the relevant cards.  It won't hurt to pick more than one if you're not sure.  Then recompile the kernel and reinstall lilo according to the slackware and howto directions.  This should allow Linux to detect the cards.  From there, you should be able to follow the directions I've outlined above.

Good luck! If you have problems, please let me know.  I'll do my best to get you up and running.
0
 

Author Comment

by:sly00
ID: 1587105
umm it was not pci one of the comps does nto support pci =] its isa cards its a linksys ether16 fully ne2000 compatible i have selected isa suport and ne2000 support and recompiled the kernel infact its a 2.0.35 kernl now i decided since i had to recompile a kernel might as well get the most recent on
0
 

Expert Comment

by:rforrest
ID: 1587106
Okay, a Linksys ISA card should be fine as long as it's NE2000 compatible. In the kernel configuration, make sure that NE2000 cards are compiled in (not as a module). The question is something like "Other ISA cards". Say Yes.  Then pick NE2000 from the list.  Recompile, install LILO and reboot.  You have to make sure that the new kernel is really the one booted.  Log in as root and type 'cat /proc/version'.  This should show you the kernel version that it's running.  If it's anything other than 2.0.35, you're booting an old kernel.  edit /etc/lilo.conf and point it to the newly compiled kernel.  (The kernel usually resides in something like /usr/src/linux/boot/i386/zImage after it's compiled).  Then run ifconfig and you should see eth0.
0
 

Expert Comment

by:rforrest
ID: 1587107
Oh, also... After you edit /etc/lilo.conf, you must run /sbin/lilo to install the new configuration file and update LILO.
0
 

Author Comment

by:sly00
ID: 1587108
good news i got it set up now all i gotta do is figure out how in the world i get internet acess from dailing in with the linux machine and being able to use the internet on the windows one
i pinged both comps ip's and got replys linux now recognizes it
what i was doing wrong was i was setting ne2000 as module

0
 

Expert Comment

by:rforrest
ID: 1587109
Great! Now you really need to study the pppd and chat man pages. Use the guide I wrote earlier to create your /etc/ppp/options, and /etc/ppp/isp.scr files. Of course, replace the phone number 5551212 with your isp's phone number, and /dev/cua0 with the port your modem is on.  /dev/cua0 is com1, /dev/cua1 is com2, etc. If your modem is not on a standard com port/irq, you'll have to use setserial.  For example, my modem is on COM3, IRQ 5.  I use the following command:
  setserial /dev/cua2 irq 5
it tells linux that my modem is using com3 irq 5.  You'll have to play around with the options in /etc/ppp/options to make it work.  But what you should end up with is a correctly configured dialup connection.  Don't worry about the windows machine for now.  when you get Linux to dial up and connect (test is by pinging the outside world), all you have to do is use ipfwadm (again as outlined above) to make windows and any other machine on your LAN see the internet.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Expert Comment

by:rforrest
ID: 1587110
P.S.  This is getting pretty involved, and we're throwing quite a few messages back and forth.  If you'd like to email my adddress is reid@cvtelecom.com   You can also call me at 407-522-8958.  My name is Reid.  I'd be happy to help you out.
0
 

Author Comment

by:sly00
ID: 1587111
my linux connect has been working all the time im sorry for not clearfying that i use the script BitchX for irc and have been for a while thats why i was wondering about the win machine cause setting up the linux dail up was a peace of cake it will connect and stay connected
i just need to set the win machine to leach off the connect

0
 

Expert Comment

by:rforrest
ID: 1587112
okay.  Issue the following command:
ipfwadm -S 192.168.1.0/24 -D 0/0

This is assuming your linux IP address is 192.168.1.1 and your win IP address is 192.168.1.2.  Make sure the default gateway on the win machine is set to the linux box (192.168.1.1) and it is configured to use the DNS server of your ISP.  Your linux box also needs to have a default route set to your ISP.  type 'route' as root, and you should see a route with a destination of 0.0.0.0.  This is your default route.
0
 

Author Comment

by:sly00
ID: 1587113
for route i see genmask 255.255.255.0
and 255.0.0.0
and how i get my dns server of my isp they dont give one we just disable it

0
 

Expert Comment

by:rforrest
ID: 1587114
okay, the genmask you can pretty much ignore. What you want to look at is the destination and gateway addresses. These are the first two IP addresses listed.  It will also tell you which interface the route is using.  For example, your default route should have a destination of 0.0.0.0 (or it may say default), and an interface of ppp0.  If this is not listed, make sure you put 'defaultroute' in your /etc/ppp/options file.  You will have to ask your ISP for their nameserver IP address.   Hint: If you can type 'nslookup www.yahoo.com' and receive a response, your DNS is set up correctly on the linux side. Look in /etc/resolv.conf for the nameserver address, and set the win machine to look for the DNS server listed there.
0
 

Author Comment

by:sly00
ID: 1587115
for route i see genmask 255.255.255.0
and 255.0.0.0
and how i get my dns server of my isp they dont give one we just disable it

0
 

Author Comment

by:sly00
ID: 1587116
supposeing that i had my nameserver adress were would i put that ?
cause my ip is not static and  /etc/resolv.conf just gives my current ip addy
0
 

Expert Comment

by:rforrest
ID: 1587117
put the nameserver address in /etc/resolv.conf.  The file should read:

#/etc/resolv.conf
nameserver your_nameserver_address

0
 

Author Comment

by:sly00
ID: 1587118
okay i have gotten a long ways now here is what i got its kinda wired but here it is okay for some reason the linux box cannot reach any out side lines like when i do nslookup or other thinks like lynx www.yahoo.com and so on BUT i have like icq for the windows machine and like irc and net browser they all work on the windows machine tied into the linux dail up cause i can send and recive msg's over icq with this =]
now how do i get the linux box to reach outside. im sure u have probably heard of BitchX for linux a irc script it does not even work and i would like to run stuff like that off the linux box aswell
so now all i need is to figure out why the linux box is not reaching out side lines any ideas and how to fix that problem cause im kinda lost on that one
0
 

Author Comment

by:sly00
ID: 1587119
more info on what my linux box is doing is this
i can ping a good ip but when it comes to nslookup and typing lynx www.yahoo.com it dont work
when ns look up it says
cant find server name for adress 207.132.116.5 no response from server
default servers are not avialbe

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now