Backtrack:  
 
by lunarg on September 13th 2022, at 12:26

It is possible to automatically bring up a network interface without any IP address configuration in Debian. This can be useful for e.g. traffic flow monitoring where the interface is subsequently placed in promiscuous mode by software such as tcpdump.

Like always, all network interface configuration is stored in the file /etc/network/interfaces. For the interface you want to bring up without an IP address, add these lines:

iface eth0 inet manual
pre-up ifconfig $IFACE up
post-down ifconfig $IFACE down

If the interface is a VLAN interface, the up/down commands must be executed after/before the VLAN hooks, so it should then read:

iface eth0.2 inet manual
post-up ifconfig $IFACE up
pre-down ifconfig $IFACE down

If you should wish to perform a one-time manual bring-up, you can simply use the ip command (as root):

ip link set eth0 up
 
 
« April 2024»
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
282930    
 
Links
 
Quote
« Debating Windows vs. Linux vs. Mac is pointless: they all have their merits and flaws, and it ultimately comes to down to personal preference. »
Me