On Tue, May 19, 2009 at 01:03:40PM -0700, Philip Guenther wrote: > On Tue, May 19, 2009 at 11:51 AM, Fortunato > <fortunato.montre...@earthlink.net> wrote: > ... > > Is there a way to set the flags to PROMISC for an interface? > > What problem are you trying to solve?
Although not the original poster, and this is not his problem, I had a need to set an interface to PROMISC and I used tcpdump fxp0 host 1.1.1.1 to accomplish it which seemed a kludge. I was testing some point to mulit-point wireless bridges. We ended up being able to load test 7 clients from one laptop, and could scale it further but ran out of places to mount the client equipment. Setup is like this: Iperf endpoint & DHCP server Switch AP Wireless Links Multiple Clients Switch (with vlans) OpenBSD Laptop to Trunk port on switch So, I did something like this to create vlans for the number of clients I want to test: local _count=3 local _start=1 for _v in `jot $_count $(( $_start + 100 ))`; do echo Start vlan$_v _lladdr="lladdr 00:11:22`echo $_v | sed -e 's/\(.\)/:0\1/g'`" ifconfig vlan$_v vlandev $_vlandev $_lladdr dhclient vlan$_v & done The lladdr change is because the DHCP server will not hand out multiple addresses if the vlans have the same MAC. The switch with vlans is configured as such: interface FastEthernet0/1 switchport access vlan 101 ! interface FastEthernet0/2 switchport access vlan 102 ! ... ! interface GigabitEthernet0/1 switchport mode trunk ! The laptop is plugged into the gigabit port on the switch, the different pieces of client equipment are plugged into the different FastEthernet ports. Then I run iperf simultaneously, bound to each vlan with an IP. #!/bin/sh local _host=iperf.server for _int in `ifconfig vlan 2>/dev/null | awk '/^vlan/ { sub(":","",$1); print $1 }' | sort`; do local _ip=`ifconfig $_int | awk '/inet / { print $2 }'` local _last=`echo $_int | sed -e 's/^.*\(..\)$/\1/'` local _port=$(( $_last + 5000 )) if [ ! -z $_ip ]; then iperf -B $_ip -p $_port -c $_host $@ | { local _line while read _line; do echo $_int: $_line done } & fi done wait l8rZ, -- andrew - ICQ# 253198 - Jabber: and...@rraz.net BOFH excuse of the day: A plumber is needed, the network drain is clogged