Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
What I want to do is conceptually very simple, but I can't find any information or help about how to go about doing this.
Basically, I want to configure my networking to use source routing (LSRR). Now I know there are "security concerns" with this and hence it is generally blocked in the public Internet and so the tutorials reach dead ends. However I have a totally private network, and need to do this for some engineering reasons. [Basically, I'm doing some experiments where I want to "simulate" a hop by hop routing protocol]
So, I want to send traffic from (machine with IP address) A to (machine with IP address) X. But I want the traffic to follow a specific route via intermediate nodes B, C, then D i.e A -> B -> C -> D -> X. These are all private IP addresses and I have configured the proper ip_forwarding etc .
Ping actually allows you to use a LSRR, so I can ping from A to X via these intermediate nodes (using that route I specified) and can verify that it is actually happening with wireshack traces, and it works fine.
The question then is how can I use some features of iptables, or tun interfaces (or other - VPN?) etc to redirect all my normal traffic along this route using loose source routing? Basically, I would like to implement something at A, so that when I try to send traffic from A to X it intercepts those IP packets and adds the LSRR to them so that it forwards on via the specified intermediate points.
If anyone can help me, I would be extremely grateful as I can't seem to work out how to do this?
You can use ip route or ip rule to implement source routing.
Thanks for the nini09! Would you mind if I asked if it was at all possible for you to drop to the next level of detail to help me out with the "how" question? :-)
There are a bewildering number of command line options for the ip route ip rule stuff, and it is not obvious to me where to begin. I can see the "via" option but that seems to indicate it is only the next hop rather than a full multi-hop source route.