Which of the following commands adds a static IPv6 address to the network interface eth0?
A. ip add addr 2001:db8::1337/64 dev eth0
B. ip -6 add addr 2001:db8::1337/64 dev eth0
C. ip addr add 2001:db8::1337/64 dev eth0
D. ip -6 addr add new 2001:db8::1337/64 dev eth0
E. ip addr add -6 2001:db8::1337/64 dev eth0
yes its c u dont need an -6.
IP command recognizes ipv6 adresses without -6.
My Source is an LPIC-2 book.
The problem with answer D is not -6, but syntax “new” which is incorrect.
So by elimination, the correct answer is C.
But I can use -6 on command and it will be correct, for example: ip -6 addr add 2001:db8::1337/64 dev eth0
the correct answer is B
ip -6 addr add 2001:0db8:0:f101::1/64 dev eth0
http://tldp.org/HOWTO/Linux+IPv6-HOWTO/ch06s02.html
I just tried it and B is the correct answer!
user@linux:/# ip -6 addr add 2001:0:0::2/62 dev br0
user@linux:/# ip a
<>
4: br0: mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether hi.dd.en.ma.ca.dd brd ff:ff:ff:ff:ff:ff
inet 192.168.2.246/24 brd 192.168.2.255 scope global dynamic noprefixroute br0
valid_lft 53sec preferred_lft 53sec
inet6 2001::2/62 scope global
valid_lft forever preferred_lft forever
there is no “ip -6 addr add new” command
right answer is: C