adding more gateway
I am using RH-9 distro with squid. everything is working fine.
My setup is like this for internet iam using RH-9. for intranet portal i am using one router. Now my problem is when i give the gateway to the router intranet portal is working fine, and i am not accessing internet. when i give the gateway of linux box i can able to access internet and not intranet portal. Just tell me how to route both the gateways and access both the things at same time. regards hari |
you have to add a route for the intranet "range". If you don't have any route about the intranet, the linux just send everything to your default gateway (the internet) so it gets lost.
Assuming your intranet range is "192.168.1.0", it shuold be something like : route add -net 192.168.1.0 netmask 192.168.1.255 gw 192.168.1.1 dev eth0 Of course, you will have the use the correct range/gateway ip/interface. |
2 network cards
If I have different range like 192.168.10.0, so how do I link it up with the 192.168.1.1 (router).
I am able to ping from 192.168.10.23(eth1) to 192.168.1.23 (eth0), but I cannot ping from eth1 to either 192.168.1.1 or outside. How do I forward the packets from eth0 to outsdie? Thx. |
I don't really understand what you ask. If you want your computer to send to a router "192.168.1.1" that "route" the 192.168.10.0 network, create a route like "route add -net 192.168.10.0 netmask 192.168.1.255 gw 192.168.1.1 dev eth0".
About the forwarding, well... it shouldn't be done by the linux computer unless the linux computer IS actually acting as the router. Make sure your ROUTER (what kind of router is it??) is correctly configurated to forward from an ip range to another, you might need to add some route in the router as well. |
2 network cards
I did the route cmd and capture the output.
~>route add -net 192.168.10.0 gw 192.168.1.1 netmask 255.255.255.0 ~>route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 * 255.255.255.0 U 0 0 0 eth1 192.168.10.0 192.168.1.1 255.255.255.0 UG 0 0 0 eth1 192.168.10.0 * 255.255.255.0 U 0 0 0 eth0 169.254.0.0 * 255.255.0.0 U 0 0 0 eth1 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default 192.168.1.1 0.0.0.0 UG 0 0 0 eth1 So, I do the ping now, but it can't reach! The output is: ping -c 5 -I 192.168.10.23 192.168.1.1 PING 192.168.1.1 (192.168.1.1) from 192.168.10.23 : 56(84) bytes of data. --- 192.168.1.1 ping statistics --- 5 packets transmitted, 0 received, 100% packet loss, time 4010m thx. |
i will explain my setup once again
i have 2 lan cards in my linux box. 1 is for inernet and other is for local. I have one external router (DAX) also. The router is for lease line in which through i am accessing SAP PORTAL. Now my problem is that i can't access both internet and SAP portal at a time. Explain me how to access both the things The private ip starts from 172.35.1.1 and my linux box ip is 172.35.1.9. The ip address of the router is 172.35.1.254. If i want to access SAP portal i will change the gateway (windows system) to 172.35.1.254 and if i want to access internet i will change the gateway to 172.35.1.9. I hope u people understand my setup. My distro is Whitbox |
Quote:
the above suggestion looks fine to me i can also suggest the same u can look into more by using iproute2 http://www.policyrouting.org/iproute2.doc.html regards |
All times are GMT -5. The time now is 03:07 AM. |