0

Whenever I am trying to assign a Ipv6 address to the interface I get the following error:

If Don't use "via" option then it works fine.

vk8-2-ext-rtr:~$ sudo ip -6 addr add 2002:2:1:1::/64 via fe80::5054:ff:feec:4d7b dev eth1
Error: either "local" is duplicate, or "via" is a garbage.

 ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 52:54:00:ec:4d:7b  
          inet addr:1.212.1.1  Bcast:1.212.1.255  Mask:255.255.255.0
          inet6 addr: 2001::5054:ff:feec:4d7b/64 Scope:Global
          inet6 addr: fe80::5054:ff:feec:4d7b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11672128 errors:0 dropped:454806 overruns:0 frame:0
          TX packets:150701 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:797480601 (797.4 MB)  TX bytes:55218888 (55.2 MB)

Please, let me know whats wrong?? Is it that I can't give via in Ipv6 address assignment if not then how would I assign it a via.

Invictus
  • 111
  • 2

1 Answers1

2

IP address assignment and route assignment are two separate operations.

One needs to use ip -6 add add to assign an IP address to an interface.

ip -6 route add is used to routes to the network stack, and that command uses the via keyword to indicate the router used to route traffic for a particular destination.

Tero Kilkanen
  • 34,499
  • 3
  • 38
  • 58