1 |
Am Dienstag, 14. März 2006 18:08 schrieb Timothy A. Holmes: |
2 |
> Hans -- Thank you, I realize that I can make it blink with network |
3 |
> traffic, the problem is that basically all the ports on the switches |
4 |
> have traffic running constantly on them, so I need to find a way to make |
5 |
> it distinctive enough so it can be picked out from the rest of the |
6 |
> noise. |
7 |
|
8 |
Save the following script as floodping.sh, and try it, you should be able to |
9 |
notice the traffic from your regular traffic: |
10 |
|
11 |
#!/bin/sh |
12 |
ifconfig $1 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.0.255 |
13 |
while true |
14 |
do |
15 |
ping -f -w $2 -b 10.0.0.255 |
16 |
sleep $2 |
17 |
done |
18 |
|
19 |
./floodping.sh eth0 5 |
20 |
|
21 |
would mean that it does five seconds of intensive traffic (which has packets |
22 |
going to the switch in the order of <20ms or so, depending on your laptop, |
23 |
and the lamp should blink very frequently), then does five seconds of data |
24 |
sleep, which should be almost completely quiet on the switch (except for that |
25 |
occasional broadcast packet from another computer directed at yours). |
26 |
|
27 |
Be sure to use a network that isn't on your local net for testing, as my |
28 |
network is 192.*, I've used 10.* in the example. If you use a network that's |
29 |
regularily used on your network, you might get problems discerning the sleep |
30 |
phase, as the arp address of your laptop propagates to all other endpoints on |
31 |
your net due to the use of a regular network, and this might mean a lot of |
32 |
ARP queries, depending on your network size. |
33 |
|
34 |
I've used a technique like this to check the cabling in a building, and it |
35 |
worked just fine. |
36 |
|
37 |
HTH! |
38 |
|
39 |
-- |
40 |
--- Heiko. |
41 |
|
42 |
-- |
43 |
gentoo-user@g.o mailing list |