LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   iproute (https://www.linuxquestions.org/questions/linux-networking-3/iproute-349188/)

vishamr2000 08-02-2005 08:15 AM

iproute
 
Hi to all,

I'm having problems writing iproute cmds..

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?

Pls help...

Regards,
Visham

baldy3105 08-02-2005 10:28 AM

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.

vishamr2000 08-03-2005 12:50 AM

Hi Pete,

First of all, many thx for your reply...

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?

Regards,
Visham

javaroast 08-03-2005 02:13 AM

ip route
 
Here is an example of the command to use on PC_A

ip route add (PC_B IP Address/32 via PC_X IP Address)

ie ip route add 192.168.10.5/32 via 192.168.10.10

That should do it for you.

vishamr2000 08-04-2005 01:40 AM

Many many thx for the reply Javaroast..

Two things more:

1)

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.

Can you help?

Thx again..

Warm regards,
Visham


All times are GMT -5. The time now is 08:21 PM.