Welcome to the Linux Foundation Forum!

Knowledge Check Question 3.1

Why is IP the only correct answer when in the Layer 2: Configuration section they use ifconfig, ip and ethtool to alter L2 configuration of an adapter?

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Comments

  • Posts: 14
    edited December 2020

    This is still an issue in December 2020.

    Examples are given under "Layer 2 configuration" using ifconfig & ip to set MTU and ethtool to set link speed, yet only ip is considered a correct answer.

    Layer 2: Configuration

    The following commands are used to change the maximum transmission unit (MTU):

    # ifconfig eth0 mtu 1492
    # ip link set mtu 1492 dev eth0

    The following command is used to change the link speed:
    # ethtool -s eth0 speed 1000 duplex full

  • Posts: 1

    This is still an issue in the end of 2020.

    You can also change an interface MAC address with both ifconfig and ethtool and this is obviously a Layer 2 operation.

    It's really straightforward with ipconfig like

    # ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx

    It's more tricky with ethtool because you'll have to mangle with EEPROM but it's still feasible.
    Google just found me a good write-up about it here: https://blog.kanbach.org/post/how-to-permanently-change-a-mac-address-using-ethtool/

  • Posts: 380

    Hello, eg15,RonaldBarnes and timothyaw,

    Two items today:
    First, all occurrences of the "ifconfig" command have been eradicated from the material.
    The second part is the question 3.1, it has also been removed.

    Without starting a flame war, ifconfig is dead, let me quote the man page:
    "Note:
    This program is obsolete! For replacement check ip addr and ip link. For statistics use ip -s link.:

    The question was removed because "can" do something vs "should" do something made it a poor question. The number of methods to change the IP addresses, MAC addresses and ip parameters is actually quite a long list and declaring one method to be "best" is problematic.

    Regards, Lee

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training