LinuxQuestions.org
Help answer threads with 0 replies.
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 09-27-2006, 11:54 AM   #1
gerrit_daniels
Member
 
Registered: Oct 2003
Location: Belgium
Distribution: Kubuntu
Posts: 34

Rep: Reputation: 15
routing problem


I have a machine with 5 ethernet cards that I'm trying to configure as a router/firewall, but I'm having a problem. I'm using Mandriva linux 2006.

My modem/NAT-router is connected to eth4 and has the IP-address 192.168.254.1. The 4 other network cards are used to connect 4 different subnets. The computer also runs dhcpd for those 4 subnets. I haven't started configuring the firewall so that shouldn't be an issue (I think).

The network cards are configured as follows:
Code:
$ ifconfig | grep -E -e "(eth|lo|inet )"
eth0      Link encap:Ethernet  HWaddr 00:0C:F6:16:E9:E4
          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
eth1      Link encap:Ethernet  HWaddr 00:0C:F6:16:F0:B6
          inet addr:10.0.1.1  Bcast:10.0.1.255  Mask:255.255.255.0
eth2      Link encap:Ethernet  HWaddr 00:10:5A:67:1D:E4
          inet addr:10.0.2.1  Bcast:10.0.2.255  Mask:255.255.255.0
eth3      Link encap:Ethernet  HWaddr 00:10:5A:67:21:89
          inet addr:10.0.3.1  Bcast:10.0.3.255  Mask:255.255.255.0
eth4      Link encap:Ethernet  HWaddr 00:50:BA:E9:11:86
          inet addr:192.168.254.254  Bcast:192.168.254.255  Mask:255.255.255.0
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
This is my routing table:
Code:
$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        0.0.0.0         255.255.255.0   U     10     0        0 eth0
10.0.1.0        0.0.0.0         255.255.255.0   U     10     0        0 eth1
10.0.2.0        0.0.0.0         255.255.255.0   U     10     0        0 eth2
10.0.3.0        0.0.0.0         255.255.255.0   U     10     0        0 eth3
192.168.254.0   0.0.0.0         255.255.255.0   U     10     0        0 eth4
0.0.0.0         192.168.254.1   0.0.0.0         UG    10     0        0 eth4
And this is my dhcpd configuration:
Code:
$ cat /etc/dhcpd.conf
ddns-update-style ad-hoc;
authoritative;
option domain-name-servers 195.238.2.21,195.238.2.22;

subnet 10.0.0.0 netmask 255.255.255.0 {
    option routers 10.0.0.1;
    range 10.0.0.100 10.0.0.200;
}

subnet 10.0.1.0 netmask 255.255.255.0 {
    option routers 10.0.1.1;
    range 10.0.1.100 10.0.1.200;
}

subnet 10.0.2.0 netmask 255.255.255.0 {
    option routers 10.0.2.1;
    range 10.0.2.100 10.0.2.200;
}

subnet 10.0.3.0 netmask 255.255.255.0 {
    option routers 10.0.3.1;
    range 10.0.3.100 10.0.3.200;
}
When I login to the router/firewall, I can ping the modem and google.com.

When I connect a machine to one of the subnets it gets the correct information from the DHCP server. From this machine (eg 10.0.0.200) I can ping all the interfaces on the router/firewall (eg 192.168.254.254, 10.0.0.1, ...) but I can't ping the modem (192.168.254.1). So I'm thinking there is something wrong with my routing table. Can anybody tell my what I've done wrong?

I also checked the routing table on my home machine (the one I'm typing this message on) and here I also have an entry for the loopback interface. Can this be the cause of the problems?
 
Old 09-27-2006, 05:45 PM   #2
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
try this to enable routing and hope your kernel has routing enabled


echo "1" > /proc/sys/net/ipv4/ip_forward
 
Old 09-28-2006, 02:08 PM   #3
gerrit_daniels
Member
 
Registered: Oct 2003
Location: Belgium
Distribution: Kubuntu
Posts: 34

Original Poster
Rep: Reputation: 15
I tried "echo 1 > /proc/sys/net/ipv4/ip_forward", but it didn't solve my problem. I installed mandriva as a firewall/router so I think it should have routing enabled.

Any other ideas?
 
  


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
Routing problem!! vishamr2000 Linux - General 0 05-21-2006 02:26 PM
routing problem DRagonRage Debian 8 09-21-2005 03:29 PM
routing problem nowonmai Linux - Networking 2 10-09-2003 07:59 AM
Routing problem exalik Linux - Networking 1 08-16-2003 04:39 AM
Help With Routing Problem LAR12345 Linux - Networking 6 02-04-2003 02:40 PM

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

All times are GMT -5. The time now is 06:27 AM.

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