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.
I have a PC that is connected to a switch together with other PCs. The subnet is 192.168.10.0/24. I want to direct the traffic of, say PC_A, to PC_X using iproute. The destination of the traffic from PC_A is PC_B. The traffic has to go through PC-X before going to PC-B. HOw can i do that?
To get from PC-A to PC-B you want to go through PC-X? And all three PC's are in the same subnet 192.168.10.0?
If all three PC's are in the same switch and the same subnet then they don't require routes to talk to each other, that is handled by ARP.
If PC-X is connected to another subnet and you want PC-A and PC-B to get to that subnet then you need to configure PC-X as the default gateway on PC-A and B.
Otherwise you need to clarrify your topology as it sounds somewhat confused from your description.
actually the topology is as I described it and as you understood it..Yes the three PCs are on the same subnet and connected to the same switch. Normally if PC_A and PC_B want to communicate, a virtual circuit is created between them by the switch. They speak directly to each othr. I don't want that. I want PC_A to communicate with PC_B through PC_X, all of which are found on the same subnet and connected to the same switch. PC_X has to do some processing on the traffic from PC_A to PC_B. Is that achievable using iproute?
If I want PC_A to talk to each other member of the subnet that is connected to the same switch (i.e the whole cluster) through PC_X, will it be sth like this:
ip route add 192.168.10.0/24 via 192.168.10.10
2)
If I have to load balance the traffic from PC_A to any other member of the cluster (192.168.10.0) through PC_X and PC_Y, what will the rule be like? I know we have to use the "equalize" and "weight" keywords. I having problems with the syntax.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.