LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Attention Newbies: Basic Networking (https://www.linuxquestions.org/questions/linux-networking-3/attention-newbies-basic-networking-116880/)

scorpatron 11-16-2003 10:56 PM

Attention Newbies: Basic Networking
 
Attention newbies!

Steps in Networking:

1. Configure a basic peer 2 peer network (that means, 2 computers running with 2 basic ips on the same subnet)

#Note about Subnets.... when you define a subnet.. you're really assigning how many computers are in your network! ie

# 255.255.255.0 = a max of 254 computers
# 255.255.0.0 = a max of 66000 something computers
# You should read more information! because you use linux there is a better way of doing this which looks like 123.123.123.123\27 or something.. you can specify the size of your network alot better

2: Setup your IPTable!!!!!!! IMPORTANT

3: Setup 2 NFS servers, you must enable the service! it's not automatic!

4: Add more computers manually, or by using DHCP. I Suggest manually (it's simple) unless you configure your DCHP/DNS servers to intergrate!

JoAnywhere 11-17-2003 10:43 AM

Scorpion,
being a relative newbie, who got networking going, I'd have to say that your comments aren't going to be that useful.

if you want to help people
1. Let them kow what distros you are discussing (YES - there are differences - particularly between the SysV and non SysV distros)

2. Let them know each step involved in achieving part 1 of your instructions. If the card isn't recognized, or they have to compile drivers, or edit files they are stumped right there.

Don't get disheartened - anyone who attempts to document these things gets my vote - but you need to extend what you are saying.

Regards
Jo

pabloromero 11-17-2003 03:35 PM

Re: Attention Newbies: Basic Networking
 
>2: Setup your IPTable!!!!!!! IMPORTANT
>3: Setup 2 NFS servers, you must enable the service! it's not automatic!

Thanks a lot Friend.

I have a peer to peer network (coaxial cable) that works fine in Windows 98SE. When i try yo do this in Linux ( i need to test Linux, and see how it is ), i failed.

I'm furious...with me, with Linux, with Redmond, with the Pope...ICAN NOT TO MAKE A SIMPLE "PING" each other.

I did all the manual says: eth0, ip addresing...all that thing...Im systems engineer, i make vertical applications..and Linux made me feel unuseful.

Ah! Red Hat Linux 8 with GNOME looks pretty. Thats the only thing i get from Linux. So:

Can you explain the 2 and 3 steps...?

Thanks my Friend. If I can not make a simple peer to peer network in Linux...I will back to Microsoft. Linux will be for geeks for ever and ever...
This is true: make a peer to peer network in Windows took me 10 minutes. In Linux two weeks?....

Thanks a lot! Gracias de verdad!

Pablo

scorpatron 11-19-2003 01:52 AM

JoAnywhere:

1) I am running a RedHat9 Network, with all RedHat9 2.4.20-8 Kernals

2) Okay good point, I'll help people ask they come tho....


pabloromero:

You can't ping your peers? this could be lots of things...

-Firstly, your IPTable is your Firewall/TCP-IP Filter! If it's setup wrong traffic will get blocked! (RH8 might use IPChains instead.. but follow teh same process)

Go into Server Settings --> Services, and stop the 'IPTables' service and try pinging the
client again... any luck? if not....

-Secondly,

If your IPTables/IPChains isn't blocking your network (which you tested by disabling it) you've probably/definately got a basic networking problem.

Setup 2 clients.. make sure they can both ping their own ip addresses! make sure they're both running on the same subnet mask! make sure they have both got their Firewalls disabled.. and ping eachother....

If you're still not getting responses from pings you've got a simple problems, either your ethernet adapters arn't loading the correct modules (drivers.. type lsmod in console) or... your cable arn't werkinz.

Let me know how that goes..


2) Now to explain IPTables a bit more:

Inside services there is a service named "IPTables" (on earlier redhats it could be IPChains) it is either started or stopped..

Inside /etc/sysconfig there is a file named iptables

This file dictates your TCP networking security!

It's VERY VERY complex but it can also be very very simple..
There are LOTS of posts about iptables/ipchains on this forum

If you have problems starting/stopping this process let me know

3) Setup your NFS Servers

Okay, so once you get ping responses you probably want to share files and printers.. mybe even your internet connection!

Printers are shared with CUPS printer server
Files are shared with Samba or NFS (If you want an easy ride go for NFS, Samba is for when you have windows clients on the network...)
Internet Connections are shared via routing.. this is different for your type of internet connection... I have an ADSL Router which makes life simple.. if you have an ADSL router you will need to setup one of the computers as a router using IPTables.. bascially you route traffic to and from another computer.. I dunno how to do that, however my RH9 bible has info on that...

NFS Servers: To set one up, make sure you install the packages which are on your RH cds.. then on ONE of the computers, create a share.. set the host as * (set it as *.yourdomain when it's working) set the source/dir to whatever dir you want to share (make sure that you change the permissions on that directory!) then leave the user's setup as it is..

(This is all done through the RH admin GUI's!)

Once you have created a share, go to the other comp, ping the host to make sure it's alive, disable iptables/chains and type this:

mount 10.0.0.1:/home/user/share /local/dir-where-you-want-the-share-to-be

or

mount host:/home/user/share /local/dir

Depending if you have DNS setup you can just use the host name....

---

If you get no response.. then it worked! however these are the errors I got when trying:

no rpc server: - means that the nfs isn't started on the server! go into services and start the process!

permission denied: - means 1 of 2 things, 1: you typed the dir wrong! you must type the whole thing, 2: you havn't set the permissions correctly on the server folder which is shared!

connection refused: - iptables blocked your attempt! or you typed the wrong host/ip

Those are the error messages I got anyway...

----


Good luck dude! hope this helps!

pabloromero 11-19-2003 02:18 PM

the home networking saga continues
 
Thanks for your reply, Friend:

>Go into Server Settings --> Services, and stop the 'IPTables' service and try pinging the client again>

I will try this.

>Setup 2 clients.. make sure they can both ping their own ip addresses!

Yes. They can. PINGing themselves works.

>make sure they're both running on the same subnet mask!

Yes. They are-.

>make sure they have both got their Firewalls disabled
Yes. There are no firewalls-

>If you're still not getting responses from pings you've got a simple problems, either your ethernet adapters arn't loading the correct modules (drivers.. type lsmod in console) or... your cable arn't werkinz.>

My tiny network WORKS under both Windows 98SE. Machine 1 has a 3com combo adapter. The other one an WinBond combo adapter. The cable is a coaxial BNC with terminators. No hub. No switch.

I will test all what you say.

>If you have problems starting/stopping this process let me know

Question: IPTABLES must be set on an internal LAN?

Thanks again, my friend: Windows world made me crazy and Linux was my hope...but for now...Red Hat 8 Linux is driving me nuts...

Cheers.

scorpatron 11-19-2003 04:50 PM

hey dude... you're network still isn't working?

first off you don't have to run IPTables.. especially if you don't use the internet.. it's just a good idea thats all

second, your network still doesn't work? okay im not going to pretend that im a networking guru.. infact im a network noob..

1: Has each of your NIC's got an alias? ie... eth0 or eth1?
2: Are there any errors occuring when you stop and start the network service?

Dude if they can ping themselves normally that means that they understand what address they should be...

Try these ips:

10.0.0.1
255.255.255.0

10.0.0.2
255.255.255.0

I dunno what else I can help you with, I need more information...

What are you using your network for? are you sharing files? are you sharing the internet?

Are they both running RH8?

I use RH9 btw.....

good luck...

pabloromero 11-20-2003 09:06 AM

SHARKS...SHARKS: go and eat all the pinguins!
 
Dear friend:

I need you see the scenario, its SIMPLE.

I have a tiny network with two computers.

COMPUTER A: Windows 98SE ( partition 1 ) and RED HAT LINUX 8
( partition 2 ). GRUB is the launcher.-

COMPUTER B: Windows 98SE

-----
Computer A IN WINDOWS: 192.168.0.1 - netmask 255.255.255.0. Thats all.

Computer B only-windows: 192.168.0.2 - netmask 255.255.255.0. Thats all.
-----

I boot both in windows. I PING the machines. I ping themselves. THE TINY NETWORK under Windows WORKS FINE.


So far, so good.

----

Now i want to make the "other net" to learn and test LINUX. In the future i plan to use the Kylix language.

I boot the COMPUTER A with RED HAT 8. It has the eth0 well configured.
i ping the card fine. ping localhost...shows what i expect.

/etc/hosts says:

127.0.0.1 localhost.localdomain localhost
192.168.0.1 servidor.linux servidor

Hostname says "servidor".

IPTABLES shows nothing. it says ACCEPT in every line.
ROUTE shows both things.

NFS is mounter, IPTABLES is mounted
( testing all this i stopped and started the service )

/etc/resolv.conf says nothing. is empty.

more? under /etc/sysconfig/network says "hostname=servidor.linux"...i put another things in it, but always RH8 leaves the file like that.
What other things? NETWORKING='yes"...but always i back to see the file and i see the hostname word only...

The other files network related shows the same things. There are nothing else.

Well.

I Boot the computer A. login as "root". NO ERRORS on any services.
there are no alias, nothing. My Linux is...pure. No firewalls. Nothing, nada, niet...

I boot the COMPUTER B. i go the C:\.

SO:

IN LINUX i PING SERVIDOR itself ....fine.

IN WINDOWS I PING 192.168.0.2 ( the same machine )...fine.


I ping FROM LINUX (A) TO WINDOWS (B)....DESTINATION HOST UNREACHABLE.

I ping FROM WINDOWS (B) to LINUX (A)...time exausted.

WELL.

Remember WINDOWS NT and its horrible "hardware list compatible" book?
Does LINUX have another? LINUX is more of the same thing?

Time I did the tiny LAN with Windows98SE: 10 minutes.

From two weeks ago I face with this problem. Nobody on the net says ANYTHING about this "LAN HOME NETWORKING with two stupid machines"

Im the only person on this world with this problem?

All people says me: "On internet you...", "The DNS..", my anger grows...I dont have internet connection here, i dont have DNS,
I-just-want-a-simple-ping-between LINUX AND WINDOWS. ALL SAMBA STUFF will come later when I-CAN-PING-MY-F***ING-MACHINES and I can share files.

Im not a geek. Im just a simple Systems Engineer. I write applications and programs for bussiness. My knowledge about the TCP/IP is simple.
With Windows or Novell networks i use what i know about TCP/IP and never I had any problem.

Until now, LINUX frustrated me a lot.

Can you imaging how I feel with I hear "LINUX will be THE ORGASM...its the future...its the best" and i-can-not-get-any-answer-from-my-machines-when-i-ping-each-other"

A good case for the X expedients...

On the patagonia, in Argentina, there are a lot of pinguins.
Now, i like SHARKS...

Thank you my friend. Gracias , mi amigo.

Pablo

xjphil 11-20-2003 11:18 AM

Instead of ignoring samba, maybe it is exactly what you want.

If you want to share windows files to a linux machine, it should work. It worked for me (RH9 to a WinME machine) automatically, without any setup, other than the sharing in WinME that was already done.

So just open the graphic file explorer on your linux machine with your windows machine sharing a folder on the network. In the location bar, type "smb://" and it should find samba serving machines. if you know the Windows hostname, type it all caps after the smb:// and then you should see the shared folder. Thats how I did it without any set up at all. The NFS stuff was much harder.

pabloromero 11-20-2003 11:37 AM

you did not read my problem
 
Evidently...you didnt read my problem.

xjphil 11-20-2003 11:48 AM

All I can say is if you have TRIED what I said, and it doesn't work, then I cannot help you.

If you have not tried it, maybe windows is for you.

scorpatron 11-20-2003 11:59 AM

hey dude,

i've read your situation and understand a bit more now,

you are involved in a linux->microsoft network, this changes things,

when it comes to the network, thats the same story tho! basically you should be able to ping your peer connections just like in MS... if not a bit faster in linux.

so what does this tell me? if i were in your shoes... I would attempt to mimic the original network... so give the linux box the same network settings as it was under windows!

Ok now heres a couple more things:

Each network has 2 ips you should NOT use! thats the *.*.*.0 and the *.*.*.255! ones a broadcast ip and the other.. well.. can't remember.

Just use the subnet mask of 255.255.255.0, this will allow up to 254 computers on your network! and thats as small as it goes without upgrading a few things..

Use the ips 192.168.1.1 and 192.168.1.2... simple

If you can't ping eachother THE NETWORK IS BLOCKED .. it's that simple. Ethernet cards and cable arn't expensive! prehaps $40 for the lot.


------


Secondly!

If you are on a windows network use Samba! Samba is a linux based file/print server designed to talk to windows! it's not hard to setup, it's on your RH cd's,

If you get to the stage where you need to setup samba, that means your network is actually working.. let me know when that happens :P

good luck!

pabloromero 11-20-2003 12:38 PM

sharks eat pinguins...
 
FOR XJPHIL: "If you have not tried it, maybe windows is for you"...
similar to some answers that come from Redmond.

FOR THE GOOD GUY SCORPATRON:

>"I would attempt to mimic the original network... so give the linux box the same network settings as it was under windows">

I did that. No results. if you read my last post...you can see it.

>>Just use the subnet mask of 255.255.255.0, this will allow up to 254 computers on your network! and thats as small as it goes without upgrading a few things..Use the ips 192.168.1.1 and 192.168.1.2... simple>>

I did that. No results, as you can see.

>>If you can't ping eachother THE NETWORK IS BLOCKED>>

My network is bloqued for Linux bu not blocked for Windows?
Why does my lan work in Windows and does not for Linux-Windows?

Linux -i was told- was the cheapper, no additional hard required...all lies it seems...

SAMBA wont work if there are no LAN first. The lan must work and the machines must be able to ping each other. Then, SAMBA would work.

----------->>>> BUT:

1) To networking TCP/IP windows with TCP/IP linux SAMBA IS REQUIRED?
2) Normally a Linux machine with a Windows machien with the TCP/IP normally configured, must be able ping each other with anymore work?

Thanks my friend. The sharks are sooooooo funny....

sarahan 11-20-2003 04:55 PM

gee whiz. chill out. keep your sharks to yourself. If you really wanna know what's going on with linux, then try a more hands-on distribution like gentoo or slackware. Redhat was too much like windows for me - all config files named bizarre things and hidden away.

Other than that, you can try to find a log file about your network status. Those are great for diagnosing problems. On my computer (I use Gentoo, your files may not be in the same place), they're in /var/log

P.S. - sharks are not funny. nor are you.

pabloromero 11-20-2003 05:36 PM

>hands-on distribution like gentoo or slackware. Redhat was too much like windows for me - all config files named bizarre things and hidden away.>

Interesting. I reinstalled three times RH. Now I must try another LINUX because i-can-not-ping-each-machine...

>Other than that, you can try to find a log file about your network status. Those are great for diagnosing problems. On my computer (I use Gentoo, your files may not be in the same place), they're in /var/log>

I did that. Shows nothing.

> sharks are not funny. nor are you>

Let me tell you a tiny story:

Some month ago, a friend of mine, came from Japan. He had buyed a beautiful clock, very impressive. With buttons, colors...a lot of functions, temperature, blood pressure, heart rythm, etc, etc, etc, etc...

I asked: what time is it?

He pressed a lot of buttons, nothing. He read the clock manual...WHERE IS THE TIME...WHAT IS IT THE TIME FUNCION? WHERE IS THE TIME CONFIGURATION?

We know that impressive clock must give the time. But we can find it.

So, you undertand my bad joke about the sharks for opposite to the nice Linux logo?

Linux is not funny, im not funny, you are not funny...and my losed time is not funny. The redmond guys ( the sharks ) eat pinguins. I did my home lan network in 10 minutes and its working with Windows. If Linux is the Nirvana, why i can to do it? How more time do i have to lose to make-a-simple-ping-from-a-linux-machine-to-a-windows-machine?

I like sharks. They clean the ocean.

sarahan 11-20-2003 07:27 PM

Hey, if Windows is so easy (I agree - it is easy), stick to it and quit wasting your time. Wait a few months and chances are that the latest linux distribution will be easier to configure. If you want the easiest, auto-configured linux, go mandrake. You probably should have tried it first anyway. In fact, do yourself a favor and try that one now.

Linux isn't the nirvana, it's a great alternative.


All times are GMT -5. The time now is 04:52 AM.