LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Containers
User Name
Password
Linux - Containers This forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.

Notices


Reply
  Search this Thread
Old 09-18-2018, 03:30 AM   #1
gnourt
LQ Newbie
 
Registered: Mar 2018
Posts: 13

Rep: Reputation: Disabled
Set an IPv6 Address on a virtual interface [error]


Hi,

I'm trying to set an IPv6 Address on an virtual interface veth0:
Here is the current config :
Code:
root@vxq:~# ip netn add net_ns0
root@vxq:~# ip netns exec net_ns0 ip link add veth0 type veth peer name veth1
root@vxq:~# ip netns exec tst_net_ns0 ifconfig veth0 inet6 add fd00::2/64
I get an error :
Code:
ifconfig: bad address 'inet6'
Can anyone tell me what is wrong with this address?
 
Old 09-18-2018, 04:07 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,160

Rep: Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266Reputation: 1266
Can you try:

Code:
ip netns exec tst_net_ns0 ip addr add fd00::2/64 dev veth0
 
Old 09-21-2018, 03:22 AM   #3
gnourt
LQ Newbie
 
Registered: Mar 2018
Posts: 13

Original Poster
Rep: Reputation: Disabled
I tried it and it works.
In this case, In this case, I guess that ifconfig did not support 'inet6'.
Code:
root@vxq:~# ifconfig --help
BusyBox v1.24.1 (2018-09-06 07:51:52 IST) multi-call binary.

Usage: ifconfig [-a] interface [address]

Configure a network interface

        [add ADDRESS[/PREFIXLEN]]
        [del ADDRESS[/PREFIXLEN]]
        [[-]broadcast [ADDRESS]] [[-]pointopoint [ADDRESS]]
        [netmask ADDRESS] [dstaddr ADDRESS]
        [hw ether|infiniband ADDRESS] [metric NN] [mtu NN]
        [[-]trailers] [[-]arp] [[-]allmulti]
        [multicast] [[-]promisc] [txqueuelen NN] [[-]dynamic]
        [up|down] ...
root@vxq:~#
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ipv6 address getting deleted when interface goes down ia_nasir Linux - Networking 3 10-10-2015 10:44 PM
unable to set ipv6 address to aliased interface adevendra Linux - Networking 0 11-04-2010 10:53 AM
Outgoing local trafic over virtual interface has not virtual ip address :-( tkmbe Linux - Networking 3 08-25-2009 08:03 PM
How to set IPv6 address on IPv6 router tlemons Linux - Networking 3 09-17-2007 01:25 PM
Assigning site-local ipv6 address to an interface goto Linux - Networking 0 03-24-2003 04:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Containers

All times are GMT -5. The time now is 01:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration