@hongbin, I can reproduce this problem, I find the problem is when run "iface.add_ip('fd34:d27c:33d3:0:f816:3eff:fe3f:8693', 64)"
If I only run iface.add_ip IPV4, it works: >>> import pyroute2 >>> >>> ip = pyroute2.IPDB() >>> with ip.interfaces['tap1e510214-51'] as iface: ... iface.add_ip('10.0.0.8', 26) ... {'family': 0, 'txqlen': 1000, 'ipdb_scope': 'system', 'index': 20, 'operstate': 'LOWERLAYERDOWN', 'num_tx_queues': 1, 'group': 0, 'carrier_changes': 3, 'ipaddr': (('fe80::fcda:a6ff:fe93:e328', 64), ('10.0.0.8', 26)), 'neighbours': (), 'ifname': 'tap1e510214-51', 'promiscuity': 0, 'linkmode': 0, 'broadcast': 'ff:ff:ff:ff:ff:ff', 'link': 19, 'address': 'fe:da:a6:93:e3:28', 'vlans': (), 'ipdb_priority': 0, 'kind': 'veth', 'qdisc': 'noqueue', 'mtu': 1500, 'num_rx_queues': 1, 'carrier': 0, 'flags': 3, 'ifi_type': 1, 'proto_down': 0, 'ports': ()} >>>
If I add IPV6, it failed
>>> import pyroute2 >>> >>> ip = pyroute2.IPDB() >>> with ip.interfaces['tap1e510214-51'] as iface: ... #iface.add_ip('10.0.0.8', 26) ... iface.add_ip('fd34:d27c:33d3:0:f816:3eff:fe3f:8693', 64) ... {'family': 0, 'txqlen': 1000, 'ipdb_scope': 'system', 'index': 20, 'operstate': 'LOWERLAYERDOWN', 'num_tx_queues': 1, 'group': 0, 'carrier_changes': 3, 'ipaddr': (('fe80::fcda:a6ff:fe93:e328', 64), ('10.0.0.8', 26)), 'neighbours': (), 'ifname': 'tap1e510214-51', 'promiscuity': 0, 'linkmode': 0, 'broadcast': 'ff:ff:ff:ff:ff:ff', 'link': 19, 'address': 'fe:da:a6:93:e3:28', 'vlans': (), 'ipdb_priority': 0, 'kind': 'veth', 'qdisc': 'noqueue', 'mtu': 1500, 'num_rx_queues': 1, 'carrier': 0, 'flags': 3, 'ifi_type': 1, 'proto_down': 0, 'ports': ()} Traceback (most recent call last): File "<stdin>", line 3, in <module> File "/usr/lib/python2.7/site-packages/pyroute2/ipdb/transactional.py", line 209, in __exit__ self.commit() File "/usr/lib/python2.7/site-packages/pyroute2/ipdb/interfaces.py", line 1057, in commit raise error pyroute2.ipdb.exceptions.CommitException: ipaddr target is not set
@hongbin, I can reproduce this problem, I find the problem is when run "iface. add_ip( 'fd34:d27c: 33d3:0: f816:3eff: fe3f:8693' , 64)"
If I only run iface.add_ip IPV4, it works: 'tap1e510214- 51'] as iface: ip('10. 0.0.8', 26) :fcda:a6ff: fe93:e328' , 64), ('10.0.0.8', 26)), 'neighbours': (), 'ifname': 'tap1e510214-51', 'promiscuity': 0, 'linkmode': 0, 'broadcast': 'ff:ff: ff:ff:ff: ff', 'link': 19, 'address': 'fe:da: a6:93:e3: 28', 'vlans': (), 'ipdb_priority': 0, 'kind': 'veth', 'qdisc': 'noqueue', 'mtu': 1500, 'num_rx_queues': 1, 'carrier': 0, 'flags': 3, 'ifi_type': 1, 'proto_down': 0, 'ports': ()}
>>> import pyroute2
>>>
>>> ip = pyroute2.IPDB()
>>> with ip.interfaces[
... iface.add_
...
{'family': 0, 'txqlen': 1000, 'ipdb_scope': 'system', 'index': 20, 'operstate': 'LOWERLAYERDOWN', 'num_tx_queues': 1, 'group': 0, 'carrier_changes': 3, 'ipaddr': (('fe80:
>>>
If I add IPV6, it failed
>>> import pyroute2 'tap1e510214- 51'] as iface: add_ip( '10.0.0. 8', 26) ip('fd34: d27c:33d3: 0:f816: 3eff:fe3f: 8693', 64) :fcda:a6ff: fe93:e328' , 64), ('10.0.0.8', 26)), 'neighbours': (), 'ifname': 'tap1e510214-51', 'promiscuity': 0, 'linkmode': 0, 'broadcast': 'ff:ff: ff:ff:ff: ff', 'link': 19, 'address': 'fe:da: a6:93:e3: 28', 'vlans': (), 'ipdb_priority': 0, 'kind': 'veth', 'qdisc': 'noqueue', 'mtu': 1500, 'num_rx_queues': 1, 'carrier': 0, 'flags': 3, 'ifi_type': 1, 'proto_down': 0, 'ports': ()} python2. 7/site- packages/ pyroute2/ ipdb/transactio nal.py" , line 209, in __exit__ python2. 7/site- packages/ pyroute2/ ipdb/interfaces .py", line 1057, in commit ipdb.exceptions .CommitExceptio n: ipaddr target is not set
>>>
>>> ip = pyroute2.IPDB()
>>> with ip.interfaces[
... #iface.
... iface.add_
...
{'family': 0, 'txqlen': 1000, 'ipdb_scope': 'system', 'index': 20, 'operstate': 'LOWERLAYERDOWN', 'num_tx_queues': 1, 'group': 0, 'carrier_changes': 3, 'ipaddr': (('fe80:
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
File "/usr/lib/
self.commit()
File "/usr/lib/
raise error
pyroute2.