• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 199
  • Last Modified:

IP Routing Conifuration Dilemma

I'm trying to set up a linux box as a router.
I have set up zillions of linux boxes as firewalls using IP MASQ but am unable to seem to get plain-old routing setup
I have already tried:
-enabled IP forwarding ( echo 1 > /proc/sys/net/ipv4/ip_forward)
-started a routed (redundant, but...)
-tried adding IP forwarding rules via ipfwadm (i.e. ipfwadm -F -a accept -S LAN/LANMASK -D 0/0 -W worldinterface0)

whats going on?
I have a feeling I'm dong somthing exceedingly stupid.
what is it? any ideas?  things to check?
thanks much.
-Dave
0
blundar
Asked:
blundar
  • 3
  • 2
  • 2
1 Solution
 
ghjmCommented:
- Forget routed unless you want dynamically changing routes.
- Don't do anything with ipfwadm except to make sure it's not rejecting anything. (I assume you don't want firewall functions here.)
- Add static routes as appropriate using the "route" command
- Make sure the *other* machines on the network are set up correctly

It sounds to me like what you're missing is the routing. There's no magic, routed won't figure it out for you.

-Graham
0
 
ahoffmannCommented:
did netstat -rn show appropriate routes?
0
 
blundarAuthor Commented:
Ok....
all routes are ok...
15.10.0.0 netmask 255.255.248.0 (to 15.10.0.1 the NAT cisco...)
15.10.8.0 netmask 255.255.248.0 (to LAN)

I can ping 15.10.0.1
I can ping 15.10.8.anything
I have 15.10.8.anything set up with 15.10.8.1 (my machine, ethernet card 2) as the default gateway.
Whats goin on?
Im confused...
-Dave
(2.0.35)
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
ahoffmannCommented:
Do all the hosts in your net have the same netmask (M$ for example is very picky about it)?
Do you have a default route to the default gateway, or do you believe that som protocol stacks use the first IP address in the net as default gateway (I would not recommend this)?
0
 
blundarAuthor Commented:
I'm gonna post the whole routing tables ASAP.
FYI- If I add a ipfwadm -F -a m -S 15.10.8.0/21 -D 15.10.0.0/21 and set the default gateway to the NAT box, it works fine.  go figure...

0
 
ghjmCommented:
Aha!

The Cisco doesn't know how to route back to your 15.10.8.0 network. That's the problem.

Add a static route on the Cisco that lists 15.10.0.xx (your Linux box's address on the Cisco's network) as the gateway for 15.10.8.0.

Your Cisco is probably either sending 15.10.8.0 packets to its default gateway, or trying to ARP for them on its local Ethernet, neither of which will work.

-Graham
0
 
blundarAuthor Commented:
Thanks Graham.  I did that in my test pseudo-Cisco (Linux box w/ Masq) and things worked ok.  Further problems will be posted if any.  Thanks much.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now