6

Since ip is set to replace ifconfig, I'm trying to get myself used to using the ip suite of commands. I'm trying to enable my NIC with

 ip link set eth3 up 

That doesn't assign an IPv4 address correctly. However, if I run

 ifup eth3

it works fine. I'm not sure what exactly the issue is or where to start with this.

6

ifup is a command that reads the /etc/network/interfaces (or other files depending on distro) brings the link up and correctly configures the interfaces as specified.

Running ip link only changes or shows the link status. It does not read the configuration file, it does not make any other changes.

As far as I can tell the only issue here is that you have an incorrect expectation of what should happen.

To put it differently. The ip command is the underlying command that does the raw configuration. The ifup command can/does the ip command to perform the actual configuration.

5

ip link just manages the physical link layer. It has nothing to do with addresses.

To manage your addresses, use ip address. For instance:

ip addr add 198.51.100.206/24 dev eth3
ip addr add 2001:db8:64ce:c633::2/64 dev eth3

And similarly for routes:

ip route add default via 198.51.100.1 dev eth3
ip route add default via 2001:db8:64c3:c633::1 dev eth3

You will find, on close inspection, that these are the commands your distribution's networking scripts are using.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.