[Click] using DelayShaper
Lan Xue
lanxue at soe.ucsc.edu
Fri Sep 17 00:37:56 EDT 2004
Eddie,
Sorry I didn't explain my question clearly, let me try again: I was trying
to use Click to simulate a WAN environment. I used DelayShaper to inject
the latency desired between machines. Say, by specifying 128ms latency
between A and B, I expected to observe the ping time between A and B would be 128ms. The
places I placed DelayShaper were before ToDevice to the adapter of A and
after FromDevice of the adapter of B.
Most of the time, such configuration has no problem. But occasionally, the
ping time between A and B was out of control: sometimes very small,
sometimes very large, it's just not the time expected by specifying the
network latency. I suspect there's something wrong with DelayShaper
although I have no idea what's really going on. There has never been such
problem if DelayShaper is not used. My silly solution is to reboot the
machine and the problem will be gone. By the way, I was using user-level Click.
I didn't try kernel Click that much, so I'm not sure it happens or not.
Thanks,
Lan
On Wed, 15 Sep 2004, Eddie Kohler wrote:
> Hi Lan,
>
> Sorry for not replying to you earlier. Did you ever analyze this
> problem further?
>
> I think that 128ms latencies might be due to ARP queries. Machine A
> sends a ping; to get the right Ethernet address, it sends an ARP query;
> the "router" delays that ARP query by 64ms, then responds; so after
> 64ms, the ping packet is sent; it is delayed an additional 64ms, for a
> total of 128ms; and there you go. You could avoid this by moving the
> DelayShaper inside the IP path.
>
> But I don't immediately see why you'd ever see a latency lower than
> 64ms.
>
> Eddie
>
>
> On Aug 17, 2004, at 12:19 AM, Lan Xue wrote:
>
> > Hi,
> >
> > I found this very confusing problem regarding to DelayShaper element. I
> > used it to inject latencies to traffic passing through the router.
> > Please
> > see the click configuration file below. Most of the time, ping-ing two
> > machines interconnected by click gives response time as desired.
> > However,
> > it happens(not very rarely) that the response time is far away
> > different
> > from what is set. For example, I set a 64ms latency injected into all
> > packets receiving from eth0, which connected to machine A, and no
> > latency to traffic from eth1. NOrmally, ping
> > machine A and B would return 64ms roundtrip time. But it does happen
> > that
> > ping time is just a few ms(2.xms, or sometimes 128ms) between A and B
> > with
> > the same config file.
> >
> > Please help, thanks!
> >
> > Lan
> >
> > ================= CONFIG FILE
> > // eth0 connects to 10.1.4.10
> > // eth1 connects to 10.1.3.10
> >
> > tol :: Discard;
> >
> > rt :: StaticIPLookup(10.1.4.10/32 10.1.4.1 1,
> > 10.1.3.10/32 10.1.3.1 2,
> > 10.1.4.255/32 0,
> > 10.1.3.255/32 0,
> > 10.1.4.1/24 10.1.4.1 0,
> > 10.1.3.1/24 10.1.3.1 0,
> > 0.0.0.0/0 10.1.1.1 0);
> >
> > ip :: Strip(14)
> > //-> CheckIPHeader(0.0.0.0 255.255.255.255 127.0.0.0, VERBOSE
> > true,
> > DETAILS true) -> [0]rt;
> > -> CheckIPHeader(0.0.0.0 255.255.255.255 127.0.0.0) -> [0]rt;
> >
> > input0 :: FromDevice(eth0, FORCE_IP true)
> > input1 :: FromDevice(eth1, FORCE_IP true)
> >
> >
> > arp0 :: EtherEncap(0x0800, 00:02:55:C6:00:A8, 00:02:55:C6:A6:C2)
> > arp1 :: EtherEncap(0x0800, 00:02:55:C6:00:A9, 00:02:55:C6:A9:CC)
> >
> > pt0 :: PullTee()
> > pt1 :: PullTee()
> >
> > pt0[0] -> Discard;
> > pt1[0] -> Discard;
> >
> > input0 -> Paint(1) -> SimpleQueue(200) -> DelayShaper(0.064) ->
> > [0]pt0[1]
> > -> ip;
> > input1 -> Paint(2) -> SimpleQueue(200) -> DelayShaper(0) -> [0]pt1[1]
> > ->
> > ip;
> > //input1 -> Paint(2) -> ip;
> >
> >
> > //discard the packets to the machine itself
> > rt[0] -> tol;
> >
> > rt[1] -> DropBroadcasts
> > -> cp1 :: PaintTee(1)
> > -> dt1 :: DecIPTTL
> > -> arp0 //add the ARP header
> >
> > arp0 -> ToDevice(eth0);
> >
> > rt[2] -> DropBroadcasts
> > -> cp2 :: PaintTee(2)
> > -> dt2 :: DecIPTTL
> > -> arp1
> >
> > arp1 -> ToDevice(eth1);
> >
> > ...
> > ...
> >
> > _______________________________________________
> > click mailing list
> > click at amsterdam.lcs.mit.edu
> > https://amsterdam.lcs.mit.edu/mailman/listinfo/click
>
More information about the click
mailing list