LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-28-2004, 03:19 AM   #1
ConcreteClam
LQ Newbie
 
Registered: Nov 2003
Location: New York, USA
Distribution: Mandrake 9.1/Damn Small Linux
Posts: 7

Rep: Reputation: 0
Trouble config. two eth. cards to act as a router


Hello.

I'm having trouble configuring two ethernet cards to run on a DHCP sever/router. (Also a newbie at using Linux. Not very helpful. =P)

The net specs are:
3net (Realtek) PCI 10/100 eth plugged into Motorola SB4100 cable modem
Linksys 10/100 PCI eth going from box to Linksys 5 port 10/100 switch
Box running on Damn Small CD based Linux. (based on Knoppix, using because I don't have/want a hard drive for it)


When I boot up the computer, it runs through all the normal stuff, until it gets to the networking part. It (assumingly) detects and configs the ethernet cards okay, but when it says "Configuring network", it hangs for about 3 minutes, and then says "operation failed."

Running netcardconfig within Bash shows that they're both listed and set up, but when I try to use DHCP on either of them, they don't work. Note that both cards work by themselves, if booted with only one NIC.

Reading through some of the other posts, I tried some stuff...
cat /proc/pci lists both eth0 and eth1. I believe eth0's IRQ was 11, and eth1 was 9.
cat /proc/interrupts only shows eth0 on 11.

Plug-and-play OS is disabled in the BIOS. The IRQ share is set to three devices.

It had this problem trying to run on Mandrake 9.1, and Windows XP Pro. (The workaround for XP Pro was using a USB ADMtek(?) ethernet adapter, but it doesn't work in Linux.)
I've tried a lot of mucking around by myself, to no avail.

Any help? Thanks in advance. =)
-CC

*Comp specs that probably don't matter much*
Old crappy Gateway motherboard
P2 400mhz
192mb PC133 SDRAM
40x CDROM
3net 10/100 ethernet adapter
Linksys 10/100 ethernet adapter
 
Old 01-28-2004, 03:32 AM   #2
spuzzzzzzz
Member
 
Registered: Sep 2003
Location: Australia
Distribution: Gentoo
Posts: 465

Rep: Reputation: 30
Correct me if I'm wrong, but I don't think you can use DHCP unless you _already_ have a DHCP server in your network. ie. you can't use DHCP on the network interfaces of your DHCP server. Instead, you should set up your ethernet cards with static IPs and use the server as a method of configuring ips of _other_ computers.
 
Old 01-28-2004, 03:35 AM   #3
spuzzzzzzz
Member
 
Registered: Sep 2003
Location: Australia
Distribution: Gentoo
Posts: 465

Rep: Reputation: 30
on the other hand, if you only want the box as a router, why don't you try installing smoothwall? (smoothwall.org)
 
Old 01-28-2004, 03:51 AM   #4
ConcreteClam
LQ Newbie
 
Registered: Nov 2003
Location: New York, USA
Distribution: Mandrake 9.1/Damn Small Linux
Posts: 7

Original Poster
Rep: Reputation: 0
I guess you're right, I want it as a router. Like I said, I'm new at this. =)

I already tried out SmoothWall... it did the same as all the other ones. I also tried out RedHat 9, ClarkConnect, Lycoris 3, Byzantine OS, etc, etc...

So, I'm *guessing* (this is only a guess, remember =P) that it's a hardware problem, and not software...

Also, I really want to use a CD based distro. Having the hard drive run all night in my room drives me crazy with the noise.

Thanks for the suggestions...

Any other help?... Thanks in advance, again.

-CC
 
Old 01-28-2004, 01:51 PM   #5
fataldata
Member
 
Registered: Jun 2002
Location: Breckenridge, Colorado
Distribution: Ubuntu Hardy 8.04
Posts: 101

Rep: Reputation: 15
There are alot of these postings on this site. We need to make a sticky or bulletin with these steps to set this up. Here is a simple ouline of the things I did to configure my gateway/router

To set my pc up as a Linux gateway/router there seem to be three steps:
1. Enable IP forwarding.
2. Set firewall rules for the Filter table.
3. Set up postrouting on the nat table.
# Step 1.
echo "1" > /proc/sys/net/ipv4/ip_forward

# Step 2. Commands to set up the firewall.
iptables -P INPUT ACCEPT # set default policy on the FILTER table INPUT chain to ACCEPT
iptables -F INPUT # flush the chain
iptables -P OUTPUT ACCEPT # policy for OUTPUT chain
iptables -F OUTPUT
iptables -P FORWARD DROP # policy for FORWARD chain
iptables -F FORWARD
iptables -t nat -F # flush the nat table
# Allow all connections OUT and only existing and related ones IN"
iptables -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
#forward all packets from the internal interface if destined for the external interface

# Step 3. Enabling SNAT (MASQUERADE) functionality on $EXTIF"
$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up another eth card, to be used for a Router slacker101 Linux - Networking 1 06-20-2005 11:47 PM
Need help to route traffic properly with 2 eth cards mchan Linux - Networking 1 03-20-2005 07:55 PM
Two identical eth cards (tulip driver error) pgmer6809 Linux - Hardware 1 04-20-2004 12:43 AM
Put linux to act as an router little_ball Linux - Networking 1 01-30-2004 11:10 AM
2 static IP addresses on 2 eth cards Zingaro2002 Linux - Networking 8 01-21-2003 12:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration