LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Problems with LAN setup (https://www.linuxquestions.org/questions/linux-networking-3/problems-with-lan-setup-380241/)

zener 11-05-2005 01:00 PM

Problems with LAN setup
 
Can someone please link me somewhere where are step-by-step instructions (console) on how to setup a LAN between two or more PCs? Oh, something else, my distro saw my Ethernet port as a gateway to Internet, which is not. How can I correct it?

JohnLen 11-05-2005 01:53 PM

You'd better try Categorized howto's at http://TLDP.org
Also, what is your LAN card. What setup do you want: Static or DHCP?

crispyleif 11-05-2005 02:59 PM

Some very basic things ppl would probably need to know in order to answer :

2 or more PC's : OS/Distro ?
(Mixed OS's LAN can differ alot from pure linux LAN)

What equipment you're using to share your internet connection ?
like perhaps you're using a router ?
as pointed out, static or DHCP ip-setup ?

Wireless stuff involved ?


Just some friendly hints. Good formulated questions --->> Good, precise answers

zener 11-06-2005 05:53 AM

I want to setup a mixed OS's LAN(one will be using Mandrake 10.1 and the other Windows XP). There is no router between them and the internet connection is not shared. So, aguess, the IPs are static. Oh, the LAN is wired. What to do with the ethernet issue? The particular PC is using Mandrake 10.1

crispyleif 11-06-2005 08:15 AM

Now that sounds like a fairly easy task. I'm a newbie too, but I have samba/nfs running :)

I don't know if Mandrake comes with Samba installed, but I guess it do.
If it doesn't , read your way to how to get it installed in Mandrake. In Debian I would "apt-get samba" I think Mandrake uses a similar command. Otherwise it probably has some graphical front-end to the package management.

But let's presume you have Samba installed, cause that is really all you need in this situation. I recommend diving into editing smb.conf by hand. (the file that configures the samba server). If that's not an option I'm sure Mandrake has some fancy GUI for this too.

Google for samba howto mandrake.... should not be a problem ;)

Give static IP's and set up /etc/hosts with hostname and IP for both Computers. Do this on both computers.

On the XP machine all you have to do is click network neighbourhood or search for computers on the network...

EDIT: This is for accessing linux from XP, in XP you simply share a folder and use Samba to mount it in linux ---> go google

One tip : Since your connecting directly from pc to pc, remember to use crossover cable, not regular network cable...

zener 11-06-2005 09:57 AM

Thanx a lot, but how do I configure samba.conf ? Not literally how, I know, with vi, but how do you modify it, what parameters do fill in?

crispyleif 11-06-2005 05:02 PM

That depends what you want it to do off course :)

Again, google is the place to go... search for samba howto , first hit I got was this : http://www.samba.org/samba/docs/man/...n/install.html
(the official Samba HOWTO - recommended)

How your smb.conf will eventually look depends on what you will be sharing and way of sharing it. (could be more, just staying basic here).

Let's say you want to share the directory /home/shared with the xp computer.

smb.conf :

[shared]
comment = *put your description here*
path = /home/shared
admin users = *your username* ----as in XP !
writable = yes
valid users = *your username* -----as in XP !

in shell:

smbpasswd -a *username*

# restart samba. this can differ among distro's. verify that the services are running.

### Please note ###

This is ONE out of ALOT of ways to do this...samba is very flexible, you can set up domain accounts, password autentication in different ways, open access (don't recommend it, don't use it, hence won't give you example for it ;))or , well, loads of stuff...This is also a very minimal configuration, yet should be enough for your needs.

If something doesn't work, post it here and search around on your own. I'm a newbie myself as said earlier, but this worked for me.

Hope you succeed !

Hotshoe Tom 11-21-2005 06:11 PM

HELP with Network Setup for a Newbie
 
Hi folks,

I am new to Linux, and just recently setup several computers with Mepis 3.3.1. I have tried Redhat 8, Suse 9.1, Fedora, and while they are all nice in their own way, I like Mepis for its simplicity and lack of overwhelming choices for applications. It gives you the basics with labels that help newbies like me identify what the application does. Something that is missing in some other distributions.

Ok, here is the network configuration I am trying to use. I have an older AMD Athon 1300 MHz processor on a PC Chips board...cheap and dirty but it works. Using the built in network card on the motherboard ( an M825G ) to link to the DLink Router. model DI-604, which connects to my DSL switch. Using Ntelos as my ISP.

I have a plug in NIC, an OvisLink OV8139dA29C3000479 serial number. From that card I am attempting to feed a Linksys 8 port switch to service the other 8 computers in the network. This server should provide internet gateway, fileserver and firewwall protection for the internal network.
Previously, everything was windows, but I am tired of fighting with microsoft for the rights to their D*** software and am going to migrate all but two of those machines to Linux, if I can get AMD machine to work as a file server, internet gateway, and firewall. We have had a few intrusions on the windows network and want a Linux box as a gatekeeper in the hope that will keep most of the baddies at bay.

When I try to turn on eth0 feeding the internal network, it disables my internet connection on the server. I have figured out ( duh! ) that if the server cant access the internet then none of the clients can either. So I am at a loss as to what to do. I can be reached at tlwomack@alternative-images.net

HELP!

Hotshoe TOm aka Thomas Womack

crispyleif 11-22-2005 12:43 AM

What Distro is the server running ? Mepis there too ?

Have you set up IP masquerading ?

Hotshoe Tom 11-22-2005 07:18 AM

Additional info about my (attempted0 setup
 
Thanks for the reply. I am running Mepis on the server box too, and in fact since the last post, have reinstalled again due to problems that have something to do with the network card(s). Not at all sure what the problem was, but it seems to be behaving normally after the reinstall. I have not turned on Samba server yet or added the second NIC. The NIC that is integral with the motherboard is a VIA Rhine model and the disk that came with the motherboard has a driver for the 2.4.x kernel but the driver that Mepis 3.3.1 installed seems to work well, so I dont feel compelled to install it.

The rest of the computers in the network are a hodgepodge of Windows XP, Windows 2000, Mepis 3.3.1, and Linux SuSe 9.1. Many of these machines are dual or triple boot boxes with Linux and multiple windows OS's installed.

I would like to use DHCP on all network connections to minimize the management overhead for the 8 or so computers on the net.

The last time I tried to walk through this installation, I got the basic server box up and running as a client, with a functioning internet connection provided from my Router connected to the DSL switch and then shut the system down, installed the second NIC, rebooted and attempted to connect to the internet with it once again only to find that the autoconfiguration that Mepis tries to do hoses the internet connection. So, if I disable the second NIC through the Mepis OS Control panel, then internet connectivity returns...verry, very puzzling. I am of course using DHCP for both cards.

So at this point, I am waiting about installing the second card (again) until I get some guidance from someone on the setup for that card.

Anyone that can provide some help to get this box up and doing it's job would be appreciated.

tlwomack@alternative-images.net

Thanks in advance,

Hotshoe Tom aka Thomas Womack

crispyleif 11-22-2005 04:10 PM

I think this might be over my head, but I would like to a thought :

Would be interesting to see the output from ifconfig from both server NICs + output from route or arp command.

Hotshoe Tom 11-22-2005 06:26 PM

OOOOOPS!!!!
 
I have egg on my face, but I really did not know any better...I talked to a guy today who knows linux here locally and he said I was using the wrong OS. I was trying to run the client OS as a server and he said it would not work...so I am downloading the SOHO server software and will try that. LOOOOONG download at 74k/sec though. :)

Anyway, if I run into the same problems with it after install, I will be back for help. Thanks for all the advice and for trying to help this newbie out!

Regards,

Hotshoe Tom aka Thomas Womack

crispyleif 11-23-2005 08:12 AM

Ahh... lets hope it gets all good .. If Mepis gives you trouble on the file/print server part I can really recommend Debian. Very very reliable.

Anyway : Good luck

Hotshoe Tom 11-23-2005 07:59 PM

SoHo Mepis Server 3.3.1 installed...still no internet connectivity, no 'shares'
 
Hi Crispy and any other interested parties,

Got the OS downloaded and installed and the configure process is really over the top in complexity. I tried to keep the defaults but found they didnt work. Part of the problem is, I am guessing, that I am trying to do this in stages. That is, migrate just a couple of the 10 workstations this net will have on it, at least at first until I can get a working system. Then and only then, do I want to migrate the rest of the network. In the meantime, users want internet capability and email and since we havent moved email in house yet, internet connectivity is necessary for that to happen. So here is the deal, when the server first starts up, there should be at least the ability to connect to the internet on the server, right? The defaults I believe are dhcp for both the wan and lan connections. However, that does not work and I have yet to be able to get the server to access the internet, let alone pass packets to the shares that it cant see. Things are NOT going well...HELP!

Thanks in advance,

Hotshoe Tom aka Thomas Womack

crispyleif 11-24-2005 06:28 AM

Can you post the output from ifconfig , route and arp commands from both NICs ?

EDIT: I don't know about the SOHO software mentioned, but regular Mepis is based on Debian unstable and a custom kernel as far as I know. Debian unstable is no problem on a desktop, but on a server you should *really* consider running Debian stable (or another distro known to be stable as server).

That beeing said, the unstable branch of Debian (which I think Mepis is based upon) has not brought me any troubles yet. So I absolutely think there is a solution to your problem(s), we'll see when you get some info about the kernel routing etc.

Thought of something, if I get you correctly , this is your setup :

8 pcs <---> router <----> server <----> dsl

the 8 pcs can have ip configured by the router (dhcp) if you want to, the router have a static ip, but as far as I know , in this setup, the server NEED to be configured to have static ip (not dhcp), so that you can tell the router about the server. I'm not sure though if you need to subnet your internal network for this to work.


crispyleif 11-24-2005 10:05 AM

totally off topic : checked out your website and noticed you photograph landscapes (among other things). Back in the "good" old windows days I made a little "msn space" thing , chances are you might just find some nice shots of Norwegian nature there.

link : http://spaces.msn.com/members/happyhd

Why I'm I writing about a microsoft service regarding personal photos in a linux forum ?

No idea. If you (or others) check out the pictures, enjoy.

Hotshoe Tom 11-26-2005 12:10 PM

Off topic for sure...:) but thanks!
 
Hi Crispy,

I appreciate the kind words and you taking the time to look at the website...many hours of work went into putting that up and of course the photography...took way more time than I could even hope to measure. These days I cant get away from the computer long enough to go take any photos...arghh!

Anyways, got more questions for you. Finally got server up and running with the Mepis 3.3 SoHo software and while the server can connect, none of the computers up under it can. I have turned off the firewall, tried enabling as many settings as possible through the myriad options in Webmin panel, still no luck. cant even see the clients in the show current and expired leases area. Which I could when it was running off the cd. I installed it to the hard drive, restarted the system with no other changes and then could not see clients leases and of course no client could connect to the internet or share files. I am ready to go back to Windows....or give up on the idea of a secure network under a Linux server...

Hotshoe Tom aka Thomas Womack

crispyleif 11-26-2005 05:24 PM

I would like to help you, please (as previously suggested) post the output from the commands ifconfig, route and arp. Ifconfig output needed from both NICs on the server.

Also, did I understand your network setup correctly ?

SAR

Hotshoe Tom 11-27-2005 02:02 PM

Network Config Help
 
Hi Crispy,

HEre is the text from the log files you requested. Had to figure out how to access the information and save it...I want to compare what I am sending you now with what I have saved on the hard drive for the installed system. Maybe we can see some things that need to be changed. Anyways, here is the text from each of the log files in turn when running from the CD.

arp
Address HWtype HWaddress Flags Mask Iface
192.168.0.1 ether 00:11:95:7A:05:40 C eth0

ifconfg
eth0 Link encap:Ethernet HWaddr 00:50:FC:9C:9D:B9
inet addr:192.168.0.10 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::250:fcff:fe9c:9db9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1018 errors:0 dropped:0 overruns:0 frame:0
TX packets:188 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:421200 (411.3 KiB) TX bytes:26027 (25.4 KiB)
Interrupt:10 Base address:0xcf00

eth1 Link encap:Ethernet HWaddr 00:0D:87:79:77:E2
inet addr:192.168.79.1 Bcast:192.168.79.255 Mask:255.255.255.0
inet6 addr: fe80::20d:87ff:fe79:77e2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:54 errors:0 dropped:0 overruns:0 frame:0
TX packets:66 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4130 (4.0 KiB) TX bytes:8909 (8.7 KiB)
Interrupt:10 Base address:0xad00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2230 errors:0 dropped:0 overruns:0 frame:0
TX packets:2230 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:390171 (381.0 KiB) TX bytes:390171 (381.0 KiB)

root@1[root]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
192.168.79.0 * 255.255.255.0 U 0 0 0 eth1
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0


As I said, this is from the default CD setup...clients cannot see the server or the internet or each other. I tried disabling the firewall in webmin per another suggestion I got elsewhere and it didn't help.

Hope this gives you enough to go on, I can also send the same files as created by the installed system. You'll probably need them eventually if we can get this thing going from the CD, the installed system should be easy (HAHA).

Hotshoe Tom
:newbie: :Pengy:

crispyleif 11-27-2005 03:22 PM

now we're getting somewhere..

## Router ##

Your routers IP seems to be 192.168.0.1 , if you go into the router admin interface by typing 192.168.0.1 in a browser from the server, can you see listings of your internal network there ?

Is the router set to DHCP or static IP ?

Do your router have an option to assign some computers with a static IP while still running DHCP for the rest ? I know D-Link has this , not sure for your brand.


## Internal network ##

Do you know if any of the 8 pcs can see the router ?

I'm thinking that your pcs does't have the router as default gateway. This is set in /etc/network/interfaces on Debian. See if you have that file and what is there.
Check what the system says : type "route" in a console/terminal on one of the 8 pcs.
Post it here.

Hotshoe Tom 11-27-2005 07:04 PM

Server Setup Help
 
Hi Crispy,

now we're getting somewhere..

## Router ##

Your routers IP seems to be 192.168.0.1 , if you go into the router admin interface by typing 192.168.0.1 in a browser from the server, can you see listings of your internal network there ?

Yes, the Router with that address is connected to the DSL modem on one side and the server on the other. It is a D-Link DI-604. Under the WAN tab, it is set for Dynamic IP address. Under the DHXP tab, the dhcp option is turned on. I can see 3 clients connected directly to the router besides the server. Anything that is connected under the server is invisible.

Is the router set to DHCP or static IP ? The DI-604 is set to DHCP

Do your router have an option to assign some computers with a static IP while still running DHCP for the rest ? I know D-Link has this , not sure for your brand.

Yes, that is the way it is currently configured. The d-link router sees the server and shows up under fixed dhcp setting.

## Internal network ##

Do you know if any of the 8 pcs can see the router ?

No they cant. They have active leases that are being renewed, but no packet transfer from the internet is taking place. Cant see the server, cant see the internet, and mostly cant see each other. I have one machine ( a windoz xp client box ) that can see a linux client box, but when I go into samba on the linux box, it does not see the windoz box. Both have active leases on the server.

I'm thinking that your pcs does't have the router as default gateway.
This is set in /etc/network/interfaces on Debian. See if you have that file and what is there.

I tried looking at /etc/network/interfaces but got a 'permission denied' response when typed directly in a console window, and yes I was logged in as root! By using the GUI and going into Routing & Gateways under the Networking tab, I was able to set that to 192.168.0.1 from the 192.168.79.1 it was set to. Then I reran the route function on one of the 8 clients and it gave me exactly the same results ( kinda puzzling huh?), even after stopping and restarting that connection. Here is the text from the route function:

route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.79.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.79.1 0.0.0.0 UG 0 0 0 eth0
Check what the system says : type "route" in a console/terminal on one of the 8 pcs.

Post it here.


Thanks for the help Crispy.... hope this gives you some idea of what to do next....

Hotshoe Tom

crispyleif 11-27-2005 08:02 PM

Ok...

There might be a little misunderstanding here, as I wrote before, have I understood your network setup correctly ?

The 8 pcs are connected to the router, but is the server between the router and the DSL connection ? (this is my impression). Or is the router directly connected to the DSL box ?


....and believe me, there is a BIG difference....

Hotshoe Tom 11-27-2005 08:21 PM

misunderstanding...but not too much :)
 
Hi Crispy,

Here is the setup:

DSL -> Dlink Router -> Server -> 8 port switch ->client
->client
->client

etc.

The Dlink addy is 192.168.0.1, not sure what the switch is...you have the other numbers. Does this help make it clearer?

Hotshoe Tom

crispyleif 11-28-2005 03:07 PM

Hi Tom

This makes things clearer indeed !

The problem is (you might have this one figured out) that the server doesn't forward packets between eth0 and eth1 , ie it's not working as a router. I will not try to explain this cause I haven't succesfully done that myself. What I do know about is a setup where your server AND the switch are connected to the router. That, btw, is something you might want to investigate... having the server as server and the router as firewall. Or route everything by the server first :

DSL --- Router --- Switch --- Clients

Server - connected to the router

That being said, the setup you want is doable, I have seen threads in here explaining it :)

Summary :

Your server have internet access because it find the router as default gateway at 192.168.0.1.

The clients should have the router as default gateway, but they can't get to the router cause the packets never get there. The switch doesn't know where the router is, all it sees is the clients and the server. Your server is every packet's dead end right now.

In your setup, the crucial is getting the server to act as router/gateway between your internal network and the router/DSL connection. I know this can be done with Iptables or Ipchains or 3dparty software. However, if this is how you want it, I really don't see why you need a second router (the Dlink one). Not putting you down or anything, I should have seen this before , my apologies , but I recommend having either the pc OR the router functioning as , well, router. You can use the server as firewall in addition if you want.

Some links you might like :

Linux Router Project : http://pigtail.net/LRP/
Debian Router : http://gate-bunker.p6.msu.ru/~berk/router.html
You will like this one : http://www2.linuxjournal.com/article/3546


Again, I should have seen this more clearly before.

All this said, I honestly believe that you are closer to the solution than you think.


Keep posting... I'm curious... hopefully others have more to say on this

SAR

Hotshoe Tom 11-28-2005 07:28 PM

Almost there, but not quite...:)
 
Hi Crispy,

First of all let me say thanks for sticking with me on this one. I know it has not been easy to visualize the setup I am trying to use. There are two reasons for doing it this way. One I want all internal computers that I use and that my wife uses for our respective businesses behind a double layer of protection, that is a hardware firewall in the dlink router and the software firewall in the server. Secondly, I want a way to connect a client's computer up to my internet connection so that it cannot access the rest of our doubly protected network. This is to protect myself from any virus or other malware that might exist on the client's computer. After all, when people bring me their computer, it is because it is sick and until I get into it and figure out what is wrong, I dont want any chance of whatever it is infected with attacking any machine on the network. So there will be unused ports on the dlink router that I can use for my client's computers to access the internet behind a reasonably secure hardware firewall. Once I am sure their machine is squeaky clean, then and only then would I consider connecting it up to the internal network. As it stands now, anytime I hook up a client's computer to the network, I have to disconnect all the other machines here out of self defense.

Having said all of that, I will poke around on those links you sent me and see if I can figure out why the packets are not being passed through the server to the client machines downstream. Yeah, and you were right, I had figured out that they werent being passed, it is the WHY that puzzles me at this point. Oh well, this is a learning experience and when I finally do figure it out, I am sure it will be a simple answer, I bet I will be kicking myself....:) for not having thought of it before.

I'll let you know if I get any other flashes of insight....

Hotshoe Tom....puzzled, yes, mighty puzzled...

crispyleif 11-30-2005 03:55 PM

Glad to help


Looking forward to hear about your progress on this :)


SAR


All times are GMT -5. The time now is 01:58 AM.