# how to setup my local network

## zxy

I have a problem  with my network. There are probably two problems:

1. hardware drivers

2. network setup

let's start with no. 2

2. Network !!!!!  (that's what I really need)

------------------------------------------------------------

I would like to setup my network (i tried various howtos but nothing worked - currently i'm totaly lost).

These are my needs:

  1. I want to have my computer connected to internet and occasionaly i want to connect a laptop to it. 

  2. Laptop should have the capability of using my computer's internet and I want to transfer files from one to the other.

  3. On my computer I have  a scanner and a printer. Laptop needs to use them too. 

1. Hardware

-------------------

I have a GigaByte motherboard K8N Ultra 9 with Marvel network card. I can connect two network cables to the computer.

  lspci:

       Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 19)

       FireWire (IEEE 1394): Texas Instruments TSB82AA2 IEEE-1394b Link Layer Controller (rev 01)

       Bridge: nVidia Corporation CK804 Ethernet Controller (rev a3)

With 2.6.14-gentoo-r6 kernel I can connect to the internet with adsl-start. 

Drivers used:

tux ~ # ethtool -i eth0

driver: forcedeth

version: 0.41

firmware-version:

bus-info: 0000:00:0a.0

tux ~ # ethtool -i eth1

driver: eth1394

version: $Rev: 1312 $

firmware-version:

bus-info: ieee1394

tux ~ #

I tried kernel 2.6.15 which has a sky2 driver but that does not work. ethtool shows that driver is used, but it's impossible to adsl-start. Nothing happens.

But that's ok if forcedeth and eth1394 drivers work in 2.6.14-r6.

Please help me, because i got lost with the sea of howtos, and nothing worked.

----------

## NeddySeagoon

zxy,

Neither of the drivers you cite are for your Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller.

forcedeth is the driver for a nVidia Ethernet

eth1394 provides ethernet over firewire, which almost nobody wants. 

You probably need the New SysKonnect GigaEthernet support (EXPERIMENTAL) (SKGE) or Marvell Yukon Chipset / SysKonnect SK-98xx Support (DEPRECATED) (SK98LIN) driver fir your network interface.

Follow  this post

You can do all the things you want to do but lets sort out your network first.

How do you connect your PC to the internet ?

Describe the wiring and devices involved.

Sight of your lspci output, at least, the Ethernet line(s) would also be useful.

----------

## zxy

about network setup.

I'm quite new to networking in this manner. I would like to set it up from ground up. And I want it to be safe and stable. Any help would be appreciated, even howto links, ideas, ...

Thank you

----------

## zxy

to: NeddySeagoon

I connect to the internet via adsl-start. It uses eth0.

----------

## zxy

output of lspci:

00:00.0 Memory controller: nVidia Corporation CK804 Memory Controller (rev a3)

00:01.0 ISA bridge: nVidia Corporation CK804 ISA Bridge (rev a3)

00:01.1 SMBus: nVidia Corporation CK804 SMBus (rev a2)

00:02.0 USB Controller: nVidia Corporation CK804 USB Controller (rev a2)

00:02.1 USB Controller: nVidia Corporation CK804 USB Controller (rev a3)

00:04.0 Multimedia audio controller: nVidia Corporation CK804 AC'97 Audio Controller (rev a2)

00:06.0 IDE interface: nVidia Corporation CK804 IDE (rev a2)

00:07.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev a3)

00:08.0 IDE interface: nVidia Corporation CK804 Serial ATA Controller (rev a3)

00:09.0 PCI bridge: nVidia Corporation CK804 PCI Bridge (rev a2)

00:0a.0 Bridge: nVidia Corporation CK804 Ethernet Controller (rev a3)

00:0b.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)

00:0c.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)

00:0d.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)

00:0e.0 PCI bridge: nVidia Corporation CK804 PCIE Bridge (rev a3)

01:0a.0 FireWire (IEEE 1394): Texas Instruments TSB82AA2 IEEE-1394b Link Layer Controller (rev 01)

02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 19)

05:00.0 VGA compatible controller: nVidia Corporation NV43 [GeForce 6600] (rev a2)

----------

## zxy

tux ~ # ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:14:85:32:1D:DC

          inet6 addr: fe80::214:85ff:fe32:1ddc/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:152220 errors:0 dropped:0 overruns:0 frame:0

          TX packets:159124 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:96202517 (91.7 Mb)  TX bytes:108556682 (103.5 Mb)

          Interrupt:217 Base address:0x2000

eth1      Link encap:UNSPEC  HWaddr 00-14-85-56-00-30-07-7C-00-00-00-00-00-00-00-00

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

gre0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-60-26-00-00-00-00-00-00-00-00

          NOARP  MTU:1476  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Local Loopback

          LOOPBACK  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

ppp0      Link encap:Point-to-Point Protocol

          inet addr:195.210.233.136  P-t-P:213.250.19.90  Mask:255.255.255.255

          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1

          RX packets:151972 errors:0 dropped:0 overruns:0 frame:0

          TX packets:158872 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:3

          RX bytes:92842379 (88.5 Mb)  TX bytes:105053649 (100.1 Mb)

sit0      Link encap:IPv6-in-IPv4

          NOARP  MTU:1480  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

tunl0     Link encap:IPIP Tunnel  HWaddr

          NOARP  MTU:1480  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

----------

## zxy

this is the output you asked for,

but what did you mean when you asked about wiring

----------

## NeddySeagoon

zxy,

A few detials from your posts. You connect to the internet using an interface called ppp0. Thats not eth0, although it may use the same hardware.

Your eth0 does not have an IP address but the HWAddr looks sane, so your kernel is in good shape.

Your eth1 is ethernet over firewire. It can only be used by other devices that also support ethernet over firewire.

Don't count on using this interface for your network. You only have one real ethernet controller.

The question about wiring was aimed to discover the network wiring between your PC and your ISP. For example, I use a cat5 cable to a 8 port switch, which leads to my firewall. The firewall is then connected to an ADSL router. Its not clear to me if you use a network wire (cat5) from your PCs network connector to some other box or USB to some other box.

----------

## zxy

first, i'm working on using kernel 2.6.15, but i have a mouse problem, it does not work witx X (7) any more) so i'm switching kernels

second ,i use sky2 driver there and my output is:

ethtool -i eth0

driver: sky2

version: 0.11

firmware-version: N/A

bus-info: 0000:02:00.0

ethtool -i eth1

driver: eth1394

version: $Rev: 1312 $

firmware-version:

bus-info: ieee1394

About eth1394: I woul like to setup my network, even with eth1394 for now(probably slow), and later when I get another (real) eth1 adapter I'll change eth1394 to this new adapter.

With sky2 I have a problem. I cannot connect to internet any more - not with adsl-start. 

NeddySeagoon, thank you for your assistance.

----------

## zxy

P.S. I don't have a router. I have adsl as i got it form my internet provider. No firewall no router ...

I was thinking of having my computer as a firewall

----------

## NeddySeagoon

zxy,

I cannot find a sky2 driver in the kernel. What do the two commands 

```
grep SKGE /usr/src/linux/.config

grep SK98LIN /usr/src/linux/.config
```

return ?

Ethernet over firewire is in theory, very fast - faster than Gigabit Ethernet. In practice, the implementation is not complete.

I have never set it up and only heard of one person making it work. By all means give it a try if both your PCs have a firewire interface.

I really advise getting another real network card though.

You can use the PC with the network connector to provide a firewall to itself and other PCs. You will also set it up as a router. This guide will help with that. It assumes that you will set up the router on its own PC but that is not required.

----------

## zxy

sky2 is (as far as i know) firs time available in kernel 2.6.15

aaaand, yes!!!

i have both ethernet adapters working

eth0 : marvel card with sky2 driver

eth1 : nvidia card with forcedeth driver

both working, I mean when i connect internet cable to any port i can connect with adsl-start.

So, for the hardware part I'm throu....  YES

I don't have 1394 ethernet compiled in my kernel any more. It was a mistake, because lack ok knowledge.

----------

## zxy

I'll try howto you gave me now...

Will send a reply, when I'm finished.

----------

## NeddySeagoon

zxy,

Ah - I misread your lspci.  You have 

```
00:0a.0 Bridge: nVidia Corporation CK804 Ethernet Controller (rev a3) 

02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 19)
```

Sorry about that.

Its good that you have removed eth1394 from your kernel.

If you follow the guide I linked to, you should be able to get both PCs on the internet without trouble.

After that, its possible to set up printer and scanner sharing.

Do both the printer and scanner work with the PC they are actually connected to yet ?

Thats the first steps.

----------

## zxy

with printer and scanner i had some problems, they are called canon probles...

I even asked canon for support, but they are not interested. 

My scanner is Canon 4200F and printer I just dont remember now (PIXMA 3000 or something similar), because Im not seting up my machine at home.

Anyway, scanner does not work (yet) until sane backend is available for it, but I hope it will be soon.

For printer i didn't get support too, until  I found TurboPrint. With it printer works.

When setting up net, I would also need it to be set up in the way, that if internet is not available, it does not wait for 30s during boot. Or even better if I could choose to which internet account it connects, as I move the computer from time to time and it's not pleasant to edit /etc/ppp/pppoe.conf every time.

Is it possible to have some sort of chooser during boot and to have one option selected as default, and then also to have falback to oter possibilitis?

I hope it's not too much. 

I've been away for an hour, now I'm really going to the howto.

Thanks

----------

## zxy

P.S. Do you maybe know if there exists similar software to TurboPrint for printers, something like TurboScan?

I need something that supports unsupported   :Wink:   (by sane) scanner.

----------

## NeddySeagoon

zxy,

This page says that the Cannon 4200F is unsupported, which is not good news.

If you did have it going, drop them an email saying how. That will help others too.

Go here to check on printer support, when you know exactly what it is.

----------

## zxy

I went through the howto. I installed everything as it says. I noticed that I have a newer version of iptables than the one used in the howto. 

Now i don't know how to continue. 

I stopped where I want allow other users to use http. 

iptables .....-j NAT --to 192.168.0.56 is not accepted.

I found out that is because newer iptables do not allow multiple connections on newer kernels. 

So how to continue?

P.S. This text may look strange, because my mouse in X does not work with 2.6.15 kernel, yet, and I'm forced to use Links.

----------

## zxy

There was a misunderstanding. My scanner does not work, but my printer does (using TurboPrint)

----------

## NeddySeagoon

zxy,

I'm sorry about the misunderstanding - it way mine.

For Linux support for your printer, linuxprinting.org is the authoritive site. If its listed as supported, then it works.

If its listed as partially supported, it may well work with a driver for a closely related model. Thats does not always mean a close model number.

----------

## zxy

sorry to bother you so much, but what about iptables for newer kernels (>=2.6.11_rc1). They do not allow this 

iptables -t nat -A PREROUTING -p tcp --dport 80 -i ${WAN} -j NAT --to 192.168.0.56

----------

## NeddySeagoon

zxy,

I have to admit to being lazy about iptables. I use Smoothwall on a dedicated PC for my firewall.

There are several tools to help build your firewall rules, you need not do it by hand.

```
emerge fire -s
```

will find a few.

----------

## zxy

Thank you for your help.

I'll go now and explore the world of firewall programs. In this manner i could say, that this topic is SOLVED.

Zxy

----------

## NeddySeagoon

zxy,

They are not firwall programs.  The firewall is provided by iptables. These programs help with writing the firewall rules that iptables will use to implement your firewall.

----------

