Skip to contentSkip to conversation

control packet flow

Bridge hell know 2 participants 2 messages Jun 21, 2004 Ethernet bridge

lore
Share & tools
lore

hell know

author
#0 lore raw

Greetings all.

I need a transparent way of selectively controlling packet flow between two network devices such that for example I can "see" [e.g. tcpdump] a packet coming into eth0, queue it, and then manually release it out eth1, one packet at a time. See diagram below. (Reason for doing this is to watch the behavior of the device under test to certain packets but I cannot control the speed of the packets from the traffic source so I need an intermediary to do that).

[PC/traffic initiator] -- [bridge] -- [device under test]

I've looked at nistnet, but that would only work for IP packets, and requires you to use it as a router as I understand it, which wouldn't work here. I've also looked at IET which seemed to be what I need, but unless I'm doing something wrong it crashes very badly under RHAT 9.0 and SuSE 9.0.

Is there any simple way to write a 'hook' into bridge-utils or the kernel to do this? Are there any other utilities anyone can point me to?

Any help would be greatly appreciated! Thanks in advance!!!

---------------------------------
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!

#1 lore raw
Quoted 11 lines · On Mon, 21 Jun 2004 10:06:32 -0700 (PDT) hell know <[email protected]> wrote:

Greetings all.

I need a transparent way of selectively controlling packet flow between two network devices such that for example I can "see" [e.g. tcpdump] a packet coming into eth0, queue it, and then manually release it out eth1, one packet at a time. See diagram below. (Reason for doing this is to watch the behavior of the device under test to certain packets but I cannot control the speed of the packets from the traffic source so I need an intermediary to do that).

[PC/traffic initiator] -- [bridge] -- [device under test]

I've looked at nistnet, but that would only work for IP packets, and requires you to use it as a router as I understand it, which wouldn't work here. I've also looked at IET which seemed to be what I need, but unless I'm doing something wrong it crashes very badly under RHAT 9.0 and SuSE 9.0.

Is there any simple way to write a 'hook' into bridge-utils or the kernel to do this? Are there any other utilities anyone can point me to?

Any help would be greatly appreciated! Thanks in advance!!!

Two ways I have used are using netfilter bridge tables (ebtables) to label or control what goes through. You could route it out to your application then re-inject it. Of course if your doing only that you probably want to use something like tun or tap .

If you want to do things that change packet speed, you need to look at the QoS scheduling methods for devices.