Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-28-2004, 04:19 AM
|
#1
|
LQ Newbie
Registered: Nov 2003
Location: New York, USA
Distribution: Mandrake 9.1/Damn Small Linux
Posts: 7
Rep:
|
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
|
|
|
01-28-2004, 04:32 AM
|
#2
|
Member
Registered: Sep 2003
Location: Australia
Distribution: Gentoo
Posts: 465
Rep:
|
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.
|
|
|
01-28-2004, 04:35 AM
|
#3
|
Member
Registered: Sep 2003
Location: Australia
Distribution: Gentoo
Posts: 465
Rep:
|
on the other hand, if you only want the box as a router, why don't you try installing smoothwall? (smoothwall.org)
|
|
|
01-28-2004, 04:51 AM
|
#4
|
LQ Newbie
Registered: Nov 2003
Location: New York, USA
Distribution: Mandrake 9.1/Damn Small Linux
Posts: 7
Original Poster
Rep:
|
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
|
|
|
01-28-2004, 02:51 PM
|
#5
|
Member
Registered: Jun 2002
Location: Breckenridge, Colorado
Distribution: Ubuntu Hardy 8.04
Posts: 101
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 06:03 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|