i have been struggling with this for 2 days ..cannot figure out whats going on i have a script that creates a directory and socket in that directory ..when i boot the machine ..one instance of the program works file ..ie /tmp/dir101/ gets created with the correct user permissions .. then the next instance fails .. it creates the /tmp/dir102 as root:root ..but here is the part that is inexplainable .. i remove /tmp/dir* and run it again ..and it works

666 is the pseudo IOU instance ID, hostname is the host where IOU and the script runs at. When starting the script, use -p 666 then. After launching the IOU router instance #1, use interface 2/1 for external connectivity. The Interface 1/0 at the pseudo instance does not have any practical meaning for router configuration.

-t interface (TAP mode) Specify the tap interface you want to attach to. This makes the script to run in TAP mode. If the interface does not exist, the script will create it, otherwise it will attach to it. You are responsible to have the interface in an "up" state and for any additional bridging that may be required.

The first variant is used for UDP communication at the local host only (target runs at the same host). The second variant allows to communicate with a target that runs at a remote system. <remote_host> must be an IP address or a resolveable hostname/FQDN. Port numbers are always from a local (IOU) perspective, therefore they are the reverse of what gets defined at the target system.

-m <MAC address> (PCAP mode only) If <MAC address> is supplied, this address is used to build the capture filter. If <MAC address> is not specified, no capture filter will applied. This option should only be used for testing/debugging, because the default capture filter should work for any l3/l2iou instance out of the box.

CAVEATS: For now, you need to use x/y interface format in the NETMAP file, at least for the mapping this script requires. Also, for bridging multiple router interfaces, separate instances of this script must be launched, and you need an unique pseudo IOU ID per instance.

# socket directory is a directory below $TMPDIR (/tmp), composed of "netio" plus # uid of the user that runs the iou binary # since we assume this script gets invoked with sudo by most people: # try to be smart about getting real UID, $< does not (always?) return real uid when using sudo

# walk through NETMAP file and try to determine the source IOU instance while (<netmap_handle>) {

# stop when there is a match for our pseudo instance ID as the destination next if !( $_ =~ m/^\d+:\d+\/\d+@[\w-]+[ \t]+$pseudo_instance:\d+\/\d+@[\w-]+(\s|\t)*$/ ); my $inputline = $_; chomp($inputline);

# build a capture filter for IOU interface MAC address # this will match only what is destined to $macstring, plus multicasts # and broadcoasts # for L2IOU, traffic destined to OIDs 02:<UID>:<UID> and AA:BB:CC is # included in the filter, too