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.
Both subnets work as there supposed to .(assigning IP's, etc.)
My 172.16.4.0 subnet can fully access the internet through another router 172.16.4.7, so that doesnt have to be configured for routing.
I have tried using the command "route add" but i cant seem to get it to work properly.
#route -n
Kernel IP routing table
Destination Gateway Genmask Flags Use Iface
172.16.31.255 172.16.4.253 255.255.255.255 UGH 0 eth0
172.16.4.253 172.16.4.7 255.255.255.255 UGH 0 eth1
172.16.4.253 172.16.31.255 255.255.255.255 UGH 0 eth1
127.0.0.1 127.0.0.1 255.255.255.255 UGH 0 lo
172.16.4.0 172.16.4.253 255.255.255.0 UG 0 eth0
172.16.31.0 172.16.31.255 255.255.255.0 UG 0 eth1
224.0.0.0 172.16.31.255 240.0.0.0 UG 0 eth1
224.0.0.0 172.16.4.253 240.0.0.0 UG 0 eth0
0.0.0.0 172.16.4.7 0.0.0.0 UG 0 eth0
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
You need to enable IP forwarding on the box that is in the middle. On the machine labeled COMP in your diagram, you need to add a route to 172.16.4.0/?? (you don't mention what bitmask/netmask you're using) with the gateway being the IP of eth1 on SERVER.
Which ever machine is doing the NAT to the outside world needs a route to 172.16.31.0/?? (again, bitmask/netmask???) and gateway will be the IP of eth0 on your SERVER machine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.