-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
Hi everyone:
I want to do something about SRv6, specifically using BMV2 to implement SRv6, but I found that the function net.setIntfIp() cannot set the IPv6 address for host. How should I solve it?
Thank you very much!
here is my code:
#! /usr/bin/python3
net = NetworkAPI()
# Network general options
net.setLogLevel('info')
net.enableCli()
# Network definition
net.addSwitch("s1")
net.addHost('h1')
net.addHost('h2')
net.addLink('h1', 's1', port2=1)
net.addLink('s1', 'h2', port1=2)
net.setIntfIp("h1", "s1", "2001:db00::0/24")
# Assignment strategy
# net.l2()
# Nodes general options
net.enableLogAll()
# Start the network
net.startNetwork()And Here is the output after sudo python3 network:
.......
Topology saved to disk!
Programming switches...
Switches programmed correctly!
Programming hosts...
Traceback (most recent call last):
File "network.py", line 39, in <module>
net.startNetwork()
File "/home/ubuntu/p4-tools/p4-utils/p4utils/mininetlib/network_API.py", line 1135, in startNetwork
self.program_hosts()
File "/home/ubuntu/p4-tools/p4-utils/p4utils/mininetlib/network_API.py", line 341, in program_hosts
'{}/{}'.format(intf1.ip, intf1.prefixLen))
File "/usr/lib/python3.6/ipaddress.py", line 119, in ip_interface
address)
ValueError: 'None/24' does not appear to be an IPv4 or IPv6 interfaceMetadata
Metadata
Assignees
Labels
No labels