I am working on ubuntu 12.04 lts server on vmware workstation. I need to configure my network interface to work in promiscuous mode.
This is my configuration
auto eth1
iface eth1 inet manual
up ip address add 0/0 dev $IFACE
up ip link set $IFACE up
up ip link set $IFACE promisc on
down ip link set $IFACE promisc off
down ip link set $IFACE downand when i execute
netstat -ithe flag is BMRU
Is my configuration correct or do i need to execute some extra commands.
33 Answers
Your interface is not in promiscous mode. Use:
ip link set eth1 promisc onThe flag will be updated to BMPRU. Flag details are as follows:
Bflag is for broadcastMflag is for multicastPflag is for promisc modeRis for runningUis for up
Well the problem is not in the network card because VMware always enables promiscuous mode for virtual interface. But the problem is within the configuration. It is not enough to enable promiscuous mode in the interface file. I had to add this line:
ifconfig eth1 up
ifconfig eth1 promiscin the /etc/rc.local file because when i restart the network service, eth1 is set down. So adding this lines would tell the os to not shutdown eth1.
enable promiscuous mode
vikram@vikram-Lenovo-G580:~$ sudo ifconfig eth0 promisc
vikram@vikram-Lenovo-G580:~$ netstat -i
Kernel Interface table
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0 1500 0 26631 0 0 0 27143 0 0 0 BMPRUdisable promiscuous mode
sudo ifconfig eth0 -promisc
sudo tail -f /var/log/syslog
kernel: [ 2155.176013] device eth0 left promiscuous mode
netstat -i
Kernel Interface table
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0 1500 0 29172 0 0 0 29850 0 0 0 BMRU