Solved

Routing for local interfaces

Posted on 2001-09-04
7
244 Views
Last Modified: 2010-03-17
I am trying to test some devices attached to serial ports on my Linux box. I can establish PPP connections to a remote machine (which I don't control). Each PPP connection has the same remote IP address but each local IP address is unique.

My question is: How can I route packets to one of my PPP addresses through my ethernet interface and vise versa?

It seems as though the kernel sees that the outgoing packet is destined for a local interface and immediately chooses the 'lo' interface. I have tried bringing down the 'lo' interface and the result is that I cannot ping any of my own interfaces.

I am using RH7.1 with a 2.4.7 kernel built with RH's i686 configuration except that Policy Based Routing has been added.

Thanks
0
Comment
Question by:MFCRich
  • 4
  • 3
7 Comments
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
I'm a little confused by the way you've stated the question as to what you are trying to accomplish. I'm going to guess that what you want to know is "how can I route packets from the local network to the remote PPP device and vice versa".  With the PPP connection up the Linux box should know how to route data to the remote device because one end of that network is local. And it should also know that packets from the remote PPP node destined for the local network should be sent out eth0 as that is a locally attached network. Obviously for this to work the remote PPP device must have an IP on some network other than that of the local lan.

Now that's fine for a data packet from the PPP device passing through the Linux box onto the local network (assuming the remote PPP device see's the Linux box as a default route). However, other nodes on the local network don't know where to send the reply back to as the source IP isn't on the local net. Either each node on the local net that the remote PPP device needs to talk to needs a static route configured that points to eth0 of your Linux box, or the default router for the local net needs that route.
0
 
LVL 4

Author Comment

by:MFCRich
Comment Utility
I'll restate the problem:

I have several devices attached to serial ports on my Linux box through which I establish PPP connections to another machine. I have no control over the other machine and I don't even know its OS or arch but every PPP connection has the same IP on the remote end. The local ends get unique IP's of course.

Now I also have an ethernet connection on my machine through which I can talk to an ethernet interface on the PPP server. My default gateway is on my "ethernetwork".

In order to test these devices ( up to 64 of them ) I need to force packets that are destined for the IP of interface ppp0, say, to go out eth0 so they will arrive at ppp0 from the PPP server. Responses should follow the reverse path. The packets must not go through the lo interface.

In summary:

- All packets are locally generated and destined for a local interface. No forwarding is involved on my part.

- Currently it appears that the Linux routing code sees that the destination IP is on a local interface and therefore routes them through lo. This is the behavior I wish to stop.

Thanks again
0
 
LVL 4

Author Comment

by:MFCRich
Comment Utility
Additional info:

The IP addresses I am assigned by the PPP server are on the PPP servers subnet so routing over the ethernet to my PPP interfaces works fine. I have tested this with another machine on the same subnet as my Linux box using ping, ftp, and telnet.
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 40

Accepted Solution

by:
jlevie earned 200 total points
Comment Utility
Okay, I've got it now. And I can't think of any way you can make that work. Regardless of what you do with the routing tables both the ppp device and the NIC will be 'directly connected' as far as the OS is concerned. Therefore any connections that originate from the Linux box and are destined for the IP of the local ppp endpoint will never be routed out the NIC. I think that you need a third box for the test that has no knowledge of the ppp endpoint, but can be told via a static route that the endpoint is accessible via the 'gateway IP' of the other PPP server.
0
 
LVL 4

Author Comment

by:MFCRich
Comment Utility
I am beginning to fear that you are right. My one hope of salvation at this time is iptables with its pre and post routing features but I am unfamiliar with iptables. I do use ipchains but it certainly isn't up to the job.

Do you see any hope in this? Can you point me to any info sources for iptables?
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
Let me think about iptables... I had considered it earlier, but couldn't visualize a way to make the Linux box think that ppp0 wasn't local and yet still be able to pass packets over it.
0
 
LVL 4

Author Comment

by:MFCRich
Comment Utility
OOOPs. I had forgotten that I had this question sitting out here. All my efforts seem to confirm that this is a no go so you get the points.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now