Courseiva
Advanced Networking ConfigurationeasyMultiple ChoiceObjective-mapped

LPIC-2 Advanced Networking Configuration Practice Question

Which of the following is the correct command to add an IPv6 address 2001:db8::1/64 to interface eth0?

⚠ Common exam trap

The trap here is that candidates often forget the `-6` flag or the prefix length, assuming the `ip` command can infer IPv6 context automatically, or they mistakenly use deprecated `ifconfig` syntax from older Linux distributions.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

ip -6 addr add 2001:db8::1/64 dev eth0

The `ip -6 addr add` command is the proper way to add an IPv6 address to an interface using the `ip` tool from the iproute2 suite. The `-6` option restricts the operation to IPv6, and the address must include the prefix length (`/64`) to define the subnet. The `dev eth0` parameter specifies the target interface.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ip -6 addr add 2001:db8::1/64 dev eth0

    Why this is correct

    Correct syntax with -6 flag and prefix length.

  • ip addr add 2001:db8::1/64 dev eth0

    Why it's wrong here

    Missing -6 flag; treats address as IPv4 by default.

  • ip -6 addr add 2001:db8::1 dev eth0

    Why it's wrong here

    Missing prefix length.

  • ip link set eth0 ipv6 2001:db8::1/64

    Why it's wrong here

    Wrong command; ip link set does not set IP addresses.

  • ifconfig eth0 inet6 add 2001:db8::1/64

    Why it's wrong here

    ifconfig is deprecated and may not support /64 notation.

Visual reference

192.168.1.0 /24 256 addresses (254 usable) 192.168.1.0 /25 Subnet A 128 addr (126 usable) 192.168.1.128 /25 Subnet B 128 addr (126 usable) Borrowing 1 bit from host portion creates 2 subnets (/25)

About these practice questions

One of 507 original LPIC-2 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LPIC-2 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-2 exam.