How to manually configure eth0 in Ubuntu?I don't have any DHCP server. Do I need IP address when I am just going to capture packets?

Need either 'auto eth0' or 'allow-hotplug eth0' in your original interfaces file otherwise the network device won't be brought up automatically unless specfied manually. Allow-hotplug eth0 iface eth0 inet dhcp Should fix the problem. # Eth0 auto eth0 iface eth0 inet manual pre-up modprobe 8021q pre-up ifconfig eth0 up post-down ifconfig eth0 down # Vlan Interface auto vlan10 iface vlan10 inet static address 10.0.0.1 netmask 255.255.255.0 gateway 10.0.0.254 vlan-raw-device eth0 iprpfilter 0.
Jorge Castromigrated from serverfault.comMar 19 '11 at 9:02
This question came from our site for system and network administrators.
4 Answers
Mac Eth0 Won't Allow Manual Free
I am not sure what you exactly mean by your question. The real manual method has been described above, but since you write you don't have DHCP, I think you rather would like to know what to do to give your box a static IP address and assign this IP address at boot time automatically. Well, here is how:
There should be a file /etc/network/interfaces. This file is read by the Ubuntu boot scripts which in turn configure the network according to that file. If you would like to know what should / could go into that file, then please type 'man interfaces'.
For example, my /etc/network/interfaces looks like this (comments are cut out):
The first two lines are standard and may already look similar on your box. You may be interested especially in the rest of the file: These lines define a static network configuration to eth0 (without DHCP), and this static configuration gets active automatically on every boot.
BinarusBinarusMac Eth0 Won't Allow Manual Update
You may want to try this as well:
sudo -H gedit /etc/network/interfacesEdit the eth0
Save and Exit
Run
sudo /etc/init.d/networking restart.
Mac Eth0 Won't Allow Manual Pdf
You don't need IP address for capturing packets in promiscuous mode (when you want to capture all traffic, not just traffic destined to your computer). You can put that interface up using command
This do not assign IPv4 address to interface (IPv6 local-link address is automatically assigned, if you have IPv6 enabled).
OlliOlli