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. 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.
Ubuntu Community Ask! Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Learn more. How to configure eth0 manually? Ask Question. Asked 10 years, 10 months ago. Active 3 years, 7 months ago. Viewed k times. Improve this question.
Jorge Castro Dhinesh Dhinesh. Mixing manual and automatic configuration is also possible, e. If you turn off autonegotiation and set speed and duplex manually then the partner interface at the other end of the cable will assume that the absence of autonegotiation indicates a speed of 10Mbps and a duplex of half. For error-free operation if you set speed and duplex manually you must ensure that exactly the same speed and duplex are configured on the partner interface. If you set your interface's speed and duplex by hand, then some trial and error may be required.
Here are the basic steps: Install the ethtool and net-tools packages, so that you have the ethtool and mii-tool programs. One or both of these might work for your interface. Make sure you have a way to login to the system in case the network interface becomes nonfunctional. An SSH connection could be disrupted, so you should have a fallback strategy.
Identify the interface in question it will often be eth0. Adjust the remainder of these instructions accordingly. Try to determine what its current speed and duplex settings are. This is where it gets fun: As root, try ethtool eth0 first, and see whether the "Speed:" and "Duplex:" lines look valid. If not, the ethtool may not be supported by your device. As root, try mii-tool -v eth0 and see whether its output looks correct. If not, them mii-tool may not be supported by your device.
If neither one is supported, you may have to set parameters directly on the kernel driver module. Identify which driver module you're using by reading the output of dmesg and lsmod.
You can use modinfo even on modules that are not loaded, for comparison. ToDo : where does one set kernel module parameters? Next, try to change the settings of the interface while it's operating. You'll need to be root, of course. Either: ethtool -s eth0 speed duplex full autoneg off assuming Mbps and full duplex mii-tool -F baseTx-FD eth0 same assumption In each case, re-check to see whether the interface settings actually changed, and then try sending some data in and out of the system to see whether the NIC is operating correctly.
However, before you do that, you should understand that some drivers and devices behave differently than others. When the driver module is loaded, the NIC may begin autonegotiation without any way to stop it particularly with drivers that do not accept parameters. The settings from interfaces are applied at some point after that, which may be right in the middle of the negotiation. So, some people find it necessary to delay the ethtool or mii-tool command by a few seconds.
Thus: iface eth0 inet static address Or the analogous mii-tool command. Reboot the machine to make sure it comes up correctly, and be prepared to intervene manually e. Bringing up an interface without an IP address To create a network interface without an IP address at all use the manual method and use pre-up and post-down commands to bring the interface up and down.
You also have to install the vlan package. Just configure the bridge, and the VLAN interface will be created automatically when creating the bridge see below.
Defining the DNS Nameservers Before a computer can connect to an external network resource say, for example, a web server , it must have a means of converting any alpha-numeric names e. The Internet uses these structured numeric IP addresses as network addresses. In the simplest case, that is the file to edit to set the list of name servers.
But note that various other programs for dynamic configuration will be happy to overwrite your settings: The resolvconf program The network-manager daemon DHCP clients In most situations, the file to edit is the configuration file for such a program.
There are two commands to enable and disable an interface, manually. The image below shows the default output when enabling an interface. It is possible to add further action in case an interface is activated or deactivated.
These scripts are called if-pre-up and if-post-down scripts and come into play before enabling and after disabling an interface. The next example demonstrates this in combination with a firewall that is active in case the interface is active, too. For more information regarding additional options you may have a look at the resources given below.
The author would like to thank Axel Beckert for his help and critical comments while preparing this article. Co-author of the Debian Package Management Book available from dpmb. In this article we explain to you where to find the appropriate information, and how to set it up for IPv4 IPv4 [2] and IPv6 [3].
The number of options is quite long but gives you a lot of flexibility for your specific situation.
0コメント