Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

linux routing

Posted on 2003-03-01
8
Medium Priority
?
278 Views
Last Modified: 2010-03-18
I am trying to make set up router on redhat linux 7.2 and no luck. Here i smy situation:

linux box with two NICs (REALTEK) with public IPs. Let say on one NIC has ip 217.75.74.1 with mask 255.255.255.0 and second NIC has ip 217.75.75.1 with mask 255.255.255.0. Now thereis a 217.75.74.0 network on one side an 217.75.75.0 on the oter.

Here is where i get stuck. I ping from 217.75.74.0 network the router and i get respons from both 217.75.74.1 AND 217.75.75.1. But this is where it ends. I can't ping any further. Let's say a ping from host 217.75.74.2 host with ip 217.75.75.2 no luck, ping won't go through. What I am doing wrong?

i tried enabling ip_forward - still no luck. Please help.
0
Comment
Question by:lmx-net
6 Comments
 

Expert Comment

by:ken_330
ID: 8051341
hey .
   u got only two valid IPS...so u should expect any response since u dont have any nodes with that address right?

   if not please elaborate it clearly .
0
 

Author Comment

by:lmx-net
ID: 8051620
What do you mean two valid IPs? I have two whole subnets ... I can pretty much pick from 252 IPs on each side ... So my gateway one (1st NIC) has IP 217.75.74.1 and the other gateway (2nd NIC in the linux box) has IP 217.75.75.1. And then I can pick what ever IP, so lets say from 217.75.74.20 i want to ping 217.75.75.35 and no luck ... The ping simply wont go pass the second NIC in the linux box.
0
 
LVL 1

Accepted Solution

by:
Jaem earned 300 total points
ID: 8051635
1) you need to do
echo 1 > /proc/sys/net/ipv4/ip_forward
on the linux box (router)
2) you need to tell the other boxes on 217.75.74.0/24 and 217.75.75.0/24 the route to the other network.

boxes on 217.75.74.0/24
either
route add -net 217.75.75.0/24 gw 217.75.74.1
or
route add default gw 217.75.74.1

boxes on 217.75.75.0/24
either
route add -net 217.75.74.0/24 gw 217.75.75.1
or
route add default gw 217.75.75.1

One nice way to debug it, is use tcpdump and ping and look where the connections break.
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!

 

Author Comment

by:lmx-net
ID: 8051652
Thanks Jaem, The thing is i have tried the ip_forward, but I will try it again. The other thing is, the IPs on one side are spread all over one city and the others are spread another city. So I can't really go around and add a route to everybodys computer. Somehow it has to be dona on the linux box. What can be done?
0
 
LVL 1

Expert Comment

by:Jaem
ID: 8051695
Do you use DHCP to allocate the IP addresses? Then you should be able to give the boxes the name of the router. But basically, if a box on 217.75.74.0/24 wants to talk to one on 217.75.75.0/24, it needs to know the route to get outside its network, and the responding box needs the same info. Else have you tried ping/tcpdump to track the packets? It could tell you where they get lost.
0
 

Expert Comment

by:CleanupPing
ID: 9077747
lmx-net:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question