You are not logged in.

#1 2010-05-06 02:26:01

Stolen Identity
Member
Registered: 2009-01-31
Posts: 15

Setting up gateway. Can't get network card to do anything.

Firstly, I've been searching the forums, wiki, and Internet for days looking for a solution but have come up empty.  Though I know I'll probably look back on this thread with a feeling of embarrassment, I feel it's necessary.  That being said, I've never done anything with networking before.  I haven't a clue, really.

Here's the plan.  Take an old laptop and turn it into a gateway.  The main idea is to get wireless Internet on my 56k connection (yeah, I know).  However, I wanted the whole rig to work even when the Internet was down.  Having a local network filesystem is a secondary goal.

Here's a rough diagram of how it's supposed to be set up.

    -----------------------------------------
    --- Internet (via pcmcia modem) ---
    -----------------------------------------
    |
------------------
--- Gateway ---
------------------
    |
     --------------------------------------------------------
     --- Wireless Router (via pcmcia network card) ---
     --------------------------------------------------------

The modem works with minimal configuration thanks to wvdial.  That was the easy part.

Now, I'm assuming I have to run a dhcp server for the router to work, so I set up dnsmasq just like on the [wiki]router[/wiki] page.

/etc/dnsmasq.conf

interface=eth0
dhcp-range=10.0.0.2,10.0.0.14,255.255.255.240,12h

I also set up /etc/rc.conf just like that particular page exemplified.

eth0="eth0 10.0.0.1 netmask 255.255.255.240 broadcast 10.0.0.15"
INTERFACES=(eth0)
gateway="default gw 10.0.0.1"
ROUTES=(gateway)

I know there's more to it, sharing the connection with iptables for instance, but right now I have a roadblock.

I can't get anything to ping this machine.  None of the lights on the router come on when plugged in.  Trying to ping it from another machine yeilds a "network unreachable" error.  Furthermore, the lights on the card don't come on.  Ever.  So, one possibility is that the card itself is rubbish.

Here's my ifconfig eth0 output

eth0      Link encap:Ethernet  HWaddr 00:11:95:27:7B:42  
          UP 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)
          Interrupt:10 Base address:0xc000

I should note that it is down by default after boot.  I have to "ifconfig eth0 up" to get that.
Manually setting an IP, netmask, and broadcast changes the ifconfig output accordingly, but doesn't change the outcome any.

Output of dmesg | grep eth:

eth0: RealTek RTL8139 at 0xe103c000, 00:11:95:27:7b:42,  IRQ 10
eth0: link down
ADDRCONF(NETDEV_UP): eth0: link is not ready

I have tried loading the 8139too module, as hwdetect and hwd call for.  Still can't get it to do anything.

Seeing as how I have no clue what I'm doing, I've no doubt missed something glaringly obvious.  It would be swell if some of you folks could help me out here.  I'm definitely frustrated.

Thanks,
Mat

Offline

#2 2010-05-06 02:55:08

George.Harmony
Member
From: Off The Wire
Registered: 2010-04-30
Posts: 97

Re: Setting up gateway. Can't get network card to do anything.

I was attempting something similiar a few weeks ago. I tried a lot of tutorials on line, most dealing with Iptables. I have limited knowledge of setting up gateways also. I eventually stumbled upon Firestarter. It was easy to use and worked like a charm.

I know someone will come along with the command-line solution but if you want a gui and something easy to set up Firestarter will definitely fit the bill.


Desktop:  Compiz Stand Alone w/ Cairo Dock.
Laptop:    Pekwm w/ Tint2
Jukebox:   MPD w/ cli
Gateway: Vuurmuur w/dialog

Offline

#3 2010-05-06 03:07:05

Stolen Identity
Member
Registered: 2009-01-31
Posts: 15

Re: Setting up gateway. Can't get network card to do anything.

Actually, iptables doesn't seem to be the problem (yet).  I just need to figure out how to get the ethernet card working.

Offline

#4 2010-05-06 06:42:43

Sin.citadel
Member
Registered: 2008-01-22
Posts: 267

Re: Setting up gateway. Can't get network card to do anything.

eth0: link down occurs when the wire is disconnected from the switch port, either your port is stuck or your wire is not working correctly, try replacing the ethernet wire or restart your switch, if that doesnt work, you may need to set interface spefic option such as running the ethernet card on 10mbps etc.

Offline

#5 2010-05-07 16:31:19

Stolen Identity
Member
Registered: 2009-01-31
Posts: 15

Re: Setting up gateway. Can't get network card to do anything.

Thanks for your input, I borrowed a crossover cable from a friend and connected my laptop to this machine directly.  It works fine, so the network card isn't the issue.  Iptables is set up (it's not that complicated, really) and packet forwarding is working.  I'm typing to you now through my 56k gateway.

The next step is the wireless router.  I've tried all the straight cables I have laying around.  None of the lights come on, dmesg still gives me a link down message.  Anyone experienced with wireless routers care to share their insights?

Cheers,
Mat.

Offline

#6 2010-05-08 04:39:32

Sin.citadel
Member
Registered: 2008-01-22
Posts: 267

Re: Setting up gateway. Can't get network card to do anything.

have you tried connecting to the network with a wireless device, the switch ports may not be working correctly (did u check them all), use a wireless device to access the router and check its settings (maybe something is wrong), if nothing works, buy a new one.

Offline

Board footer

Powered by FluxBB