Routing through a gateway
I'm trying to route traffic from subnet 192.168.2.x to subnet 192.168.3.x with limited success. Sometimes it works, sometimes not.
My Ethernet ports are configured as follows on box-3 (Fedora 5).... Code:
[root@box-3 toms]# ifconfig Code:
[root@box-3 toms]# route del default Why do I keep getting the default gateway? Do I need it? With only eth2 enabled on box-3, I can ping box-4 (Fedora 3) at 192.168.3.63. With eth1 and eth2 enabled, pinging box-4 is iffy. All iptables are off. What should I be checking, or restarting? The ultimate objective is to pass traffic through four boxes. Thanks! Tom D. |
Why do you need to add a route for 192.168.3.0/24 to 192.168.2.42 if you already have an interface in that subnet?
|
As zmanea mentions, no additional route is necessary for directly connected interfaces, since their routes are added with the interface is brought up.
Have you enabled ip_forwarding ? cat /proc/sys/net/ipv4/ip_forward Ff 0, then: echo 1 > /proc/sys/net/ipv4/ip_forward |
Quote:
Tom D. |
Quote:
/proc/sys/net/ipv4/ip_forward is blank, just tried echoing a "1" to it and fails (using su). I may be looking at permission issues so I'll need to log in as root and try again. |
When I used my laptop to forward traffic from my desktop to the wireless router, I found that I needed to enable the "nf_conntrack" module before forwarding would work. The kernel module may have a different name, depending on which kernel you use. If I remember correctly, it was something like tcp_conntrack.
With both interfaces up, you don't need to add a route. There should already be a 192.168.2.0/24 route and a 192.168.3.0/24 route. The hosts on the 192.168.2.0/24 network will need to use 192.168.2.42 as the default gateway (or the gateway to the 192.168.3.0/24 network). Is box-3 connected to the internet? If so, then you need a default route to your router or firewall. |
Quote:
Quote:
Then from box-2 I can ping box-3 via subnet 192.168.2.x -- no problem. Can ping box-3 subnet 192.168.3.x's port too, but that's as far as I get. I'm unable to ping box-4 from box-2 (box three being the gateway from subnet 2.x to 3.x). What would be my next step? Quote:
Tom D. |
Quote:
Tom D. |
All times are GMT -5. The time now is 08:58 AM. |