LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-06-2015, 04:20 PM   #1
ia_nasir
LQ Newbie
 
Registered: Oct 2015
Posts: 2

Rep: Reputation: Disabled
ipv6 address getting deleted when interface goes down


Hi

This is on Ubuntu 14.04

I assign ipv6 address statically using ip -6 addr add
When I bring the interface down using ip link set
or ifconfig, the ipv6 address gets deleted. After setting
the interface back up, the ipv6 address is not restored.
Who is deleting the ipv6 address and why and How can I stop it?

I've tried this after stopping network-manager also, but the same behavior
persists

root@nasir-VirtualBox:~# stop network-manager
network-manager stop/waiting
root@nasir-VirtualBox:~#
root@nasir-VirtualBox:~# ip addr show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:8e:9b:ec brd ff:ff:ff:ff:ff:ff
inet6 fe80::a00:27ff:fe8e:9bec/64 scope link
valid_lft forever preferred_lft forever
root@nasir-VirtualBox:~#
root@nasir-VirtualBox:~# ip -6 addr add 4455::1/64 dev eth1
root@nasir-VirtualBox:~#
root@nasir-VirtualBox:~# ip addr show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:8e:9b:ec brd ff:ff:ff:ff:ff:ff
inet6 4455::1/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe8e:9bec/64 scope link
valid_lft forever preferred_lft forever
root@nasir-VirtualBox:~#
root@nasir-VirtualBox:~# ip link set eth1 down
root@nasir-VirtualBox:~#
root@nasir-VirtualBox:~#
root@nasir-VirtualBox:~# ip addr show eth1
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 08:00:27:8e:9b:ec brd ff:ff:ff:ff:ff:ff
root@nasir-VirtualBox:~#
root@nasir-VirtualBox:~# start network-manager
network-manager start/running, process 8463
root@nasir-VirtualBox:~# ip addr show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:8e:9b:ec brd ff:ff:ff:ff:ff:ff
inet 10.0.3.15/24 brd 10.0.3.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe8e:9bec/64 scope link
valid_lft forever preferred_lft forever
root@nasir-VirtualBox:~# uname -a
Linux nasir-VirtualBox 3.16.0-41-generic #55~14.04.1-Ubuntu SMP Sun Jun 14 18:43:36 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
root@nasir-VirtualBox:~#

root@nasir-VirtualBox:/home/nasir/tools# ip addr show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 08:00:27:8e:9b:ec brd ff:ff:ff:ff:ff:ff
inet 10.0.3.15/24 brd 10.0.3.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::a00:27ff:fe8e:9bec/64 scope link
valid_lft forever preferred_lft forever
root@nasir-VirtualBox:/home/nasir/tools#

Last edited by ia_nasir; 10-06-2015 at 05:52 PM.
 
Old 10-07-2015, 07:30 AM   #2
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
If you want your IPv6 address to remain then you need to edit the config file for the interface and add it. It is being deleted because every time you start the network the config file is read and applied. If the IPv6 address isn't there it doesn't get applied.
 
Old 10-07-2015, 10:18 AM   #3
ia_nasir
LQ Newbie
 
Registered: Oct 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks Robert for the reply. Is there anyway the config file mechanism can be disabled. I want my software to provision and deprovision the IPv6 addresses based on
user CLI
 
Old 10-10-2015, 10:44 PM   #4
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
It's going to have to be configured somewhere. So if you are manually setting it then you have to manully set it everytime you restart the interface.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] IP Address deleted from Interface sheelavantar Linux - Networking 5 10-28-2012 08:23 PM
Why ipv6 route are deleted while interface make down and up ukkreddy Linux - Enterprise 1 05-25-2012 08:56 AM
unable to set ipv6 address to aliased interface adevendra Linux - Networking 0 11-04-2010 10:53 AM
static ipv6 address not showing on eth0 interface gitecravirs Linux - Newbie 0 06-10-2009 09:01 AM
Assigning site-local ipv6 address to an interface goto Linux - Networking 0 03-24-2003 04:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:04 PM.

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