Ticket #5153 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Network sniffing script

Reported by: kimquirk Owned by: bernie
Priority: high Milestone: Update.1
Component: distro Version:
Keywords: Cc: dwmw2, carrano, mbletsas, yani
Action Needed: Verified: no
Deployments affected: Blocked By:
Blocking:

Description

Add a network sniffing script to ship.2 to allow us to better debug networking problems. We also need to add tcpdump to the build.

Change History

  Changed 7 years ago by jcardona

A simple bash script was given here: http://dev.laptop.org/ticket/4805#comment:22

  Changed 7 years ago by cscott

It was added to the ship.2 build Wed Nov 28 01:22:43 2007 -0500; it should be moved to olpc-utils for update.1. I haven't actually tested the script yet to confirm that it works.

  Changed 7 years ago by kimquirk

  • priority changed from normal to high
  • component changed from distro to wireless
  • milestone changed from Ship.2 to Update.1

  Changed 7 years ago by bernie

Looks like a good task for an intern. Could we assign this to Yiannis?

Also, adding tcpdump is easly done with "yum install tcpdump". Please, let's not add even more developer tools to the builds.

  Changed 7 years ago by cscott

  • owner changed from cscott to bernie

Bernie, could you add olpc-network-capture from:

http://dev.laptop.org/git?p=users/cscott/pilgrim;a=blob;f=streams.d/olpc-development.stream;hb=ship.2#l499

to olpc-utils for update.1? Network-diagnostic scripts are an exception to the rule 'you can download it later' -- because if you could, you probably wouldn't need to network diagnostic tool.

  Changed 7 years ago by cscott

Bernie, you'll also need to add tcpdump as a dependency of olpc-utils at the same time, since it's not in the joyride/update.1 package list.

  Changed 7 years ago by bernie

  • status changed from new to closed
  • resolution set to fixed

Done in olpc-utils-0.59-1.olpc2, building in Koji right now.

  Changed 7 years ago by bernie

  • status changed from closed to reopened
  • resolution deleted

Oh, I mean. Ok for Update.1?

  Changed 7 years ago by bernie

  • owner changed from bernie to ApprovalForUpdate
  • status changed from reopened to new

  Changed 7 years ago by jg

  • owner changed from ApprovalForUpdate to dgilmore

  Changed 7 years ago by dgilmore

  • owner changed from dgilmore to kimquirk

please test build 666

follow-up: ↓ 16   Changed 7 years ago by bernie

  • owner changed from kimquirk to yani

Problems:

  • olpc-netstatus requires ethtool. Can we do without? Do we need to add a dependency in olpc-utils?
  • olpc-netlog does not like the sudo environment where sbin is not in the path

Proposal: let's add /usr/sbin and /sbin to the path of all users. Is there anyone who actually *likes* the bin vs sbin distintion?

  Changed 7 years ago by dwmw2

  • cc dwmw2 added
  • component changed from wireless to distro

  Changed 7 years ago by dwmw2

It's

echo $TRAFFIC_MASK > /sys/class/net/eth0/lbs_rtap

(note: eth0 not msh0, not in the device/ subdir, and 'lbs' not 'libertas') and you can't do it while the eth0 or msh0 devices are running, so bring them down first.

  Changed 7 years ago by carrano

  • cc carrano, mbletsas added

This change breaks olpc-netcapture. Who keeps this? Yani?

I updated some wiki pages on sniffing.

Even with this corrections, msh0_rename (#5746) will render some wiki pages wrong and some scripts broken.

in reply to: ↑ 12   Changed 7 years ago by carrano

Proposal: let's add /usr/sbin and /sbin to the path of all users. Is there anyone who actually *likes* the bin vs sbin distintion?

I think the correct approach would be put the command paths inside the scripts. Instead of

ifconfig eth0 ...

use:

/sbin/ifconfig eth0 ...

or:

ifconfig="/sbin/ifconfig"

...

$ifconfig eth0 ...

  Changed 7 years ago by jg

Yani, without an updated script, this is going nowhere for update.1...

  Changed 7 years ago by jg

  • blockedby 5746 added

follow-up: ↓ 21   Changed 7 years ago by yani

  • cc yani added
  • blockedby 5746 removed

I dont think this is related to msh0/msh0_rename (5746)

When applying david's patch

ifconfig eth0 down
echo $TRAFFIC_MASK > /sys/class/net/eth0/lbs_rtap

everything works fine.

But, still ifconfig eth0 down, sometimes takes forever to complete.

Ricardo can you give some hints here? so we can finally update the script

  Changed 7 years ago by dwmw2

Dunno why ifconfig down would take time -- it does nothing with the hardware directly, and just stops the network TX queue. Please show SysRq-T and/or SysRq-P output while you're waiting for it.

in reply to: ↑ 19   Changed 7 years ago by carrano

Replying to yani:

I dont think this is related to msh0/msh0_rename (5746) When applying david's patch {{{ ifconfig eth0 down echo $TRAFFIC_MASK > /sys/class/net/eth0/lbs_rtap }}} everything works fine.

Yani, that's what I meant. The script was broken because of the changing in activating rtap0. An easy fix.

Other scripts, though, use hardcoded 'msh0' (which I think it's ok) and they were broken until the udev fix.

  Changed 7 years ago by bernie

Fixed in olpc-utils-0.66.

  Changed 7 years ago by bernie

  • owner changed from yani to ApprovalForUpdate

Please use olpc-utils-0.67-1 instead.

  Changed 7 years ago by jg

  • owner changed from ApprovalForUpdate to dgilmore

approved...

  Changed 7 years ago by dgilmore

  • owner changed from dgilmore to bernie

Please test build 690

  Changed 7 years ago by jg

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.