Linux - NetworkingThis 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.
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.
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.
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.