Home › Forums › FABRIC General Questions and Discussion › IPV6 EXT network service
Tagged: ipv6
- This topic has 4 replies, 2 voices, and was last updated 1 year, 9 months ago by Fengping Hu.
-
AuthorPosts
-
March 23, 2023 at 11:43 am #3981
How can we add an external IPV6 network service to a slice?
At slice creation time, the Slice.add_l3network method takes 2 network types IPv4 and IPv6. There’s no distinguish between external and internal and it appears it creates internal service.
I tried another route — to modify an existing slice with the following code. The add_network_service method does take the ServiceType.FABNetv6Ext parameter. Even though the code and the subsequent slice modify functions runs without error, it doesn’t actually create the network on the slice. It does create interfaces on nodes but on an existing devices instead of adding new devices. Any advice?
ifs = []
existing_topology.nodes[“node1″].add_component(model=’NIC_Basic’, model_type=ComponentModelType.SharedNIC_ConnectX_6, name=”node1-NIC3”)
existing_topology.nodes[“node2″].add_component(model=’NIC_Basic’, model_type=ComponentModelType.SharedNIC_ConnectX_6, name=”node2-NIC3”)
ifs.append(next(item for item in existing_topology.nodes[“node1”].interface_list if item.name == “node1-NIC3-p1”))
ifs.append(next(item for item in existing_topology.nodes[“node2”].interface_list if item.name == “node2-NIC3-p1”))
existing_topology.add_network_service(name=’l3-ext’, nstype=ServiceType.FABNetv6Ext, interfaces=ifs)Thanks,
Fengping
March 23, 2023 at 12:39 pm #3982Hi,
There is a good tutorial for this here. There are a couple of things to note:
- As of right now, you will need to copy the plugins.py file from the parent directory of this file into your experiment’s directory. This will allow the “from plugins import Plugins” to work (this will be ported to fablib in a future release to avoid this step).
- You will need the proper permissions in your FABRIC project to use external networking.
- All routes (even to the public internet) will need to be added manually once the slice is up and running.
Hope this helps!
March 23, 2023 at 5:20 pm #3983Hi Devin,
Thanks for the tutorial. I was able to create a slice with FABNetv6Ext network type. However, it seems I can’t ping the gateway of the network type FABNetv6Ext from the node. Though the gateway of the type FABNetv6 is responding to pings. Any ideas?
Thanks,
Fengping
root@b96eb96e-3929-4c17-a117-9b8ee0660eeb-node1:/home/ubuntu# ip -6 a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 state UP qlen 1000
inet6 2001:400:a100:3090:f816:3eff:fec3:4d0f/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 86337sec preferred_lft 14337sec
inet6 fe80::f816:3eff:fec3:4d0f/64 scope link
valid_lft forever preferred_lft forever
3: ens8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 2602:fcfb:1d:2::6/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::e1:a2ff:fe04:48a3/64 scope link
valid_lft forever preferred_lft forever
4: ens7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 fe80::4d3:95ff:fe0b:4481/64 scope link
valid_lft forever preferred_lft forever
5: ens9: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
inet6 2602:fcfb:1d:1::2/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::8df:cfff:fec5:fdf5/64 scope link
valid_lft forever preferred_lft forever
root@b96eb96e-3929-4c17-a117-9b8ee0660eeb-node1:/home/ubuntu# ip -6 route
::1 dev lo proto kernel metric 256 pref medium
2001:400:a100:3090::/64 dev ens3 proto ra metric 100 expires 86331sec pref medium
2602:fcfb:1d:1::/64 dev ens9 proto kernel metric 256 pref medium
2602:fcfb:1d:2::/64 dev ens8 proto kernel metric 256 pref medium
2605:9a00:10:200a::/64 via 2602:fcfb:1d:1::1 dev ens9 metric 1024 pref medium
fe80::a9fe:a9fe via fe80::f816:3eff:feac:1ca0 dev ens3 proto ra metric 1024 expires 231sec pref medium
fe80::/64 dev ens3 proto kernel metric 256 pref medium
fe80::/64 dev ens7 proto kernel metric 256 pref medium
fe80::/64 dev ens8 proto kernel metric 256 pref medium
fe80::/64 dev ens9 proto kernel metric 256 pref medium
default via fe80::f816:3eff:feac:1ca0 dev ens3 proto ra metric 100 expires 231sec mtu 9000 pref medium
root@b96eb96e-3929-4c17-a117-9b8ee0660eeb-node1:/home/ubuntu# ping 2602:fcfb:1d:2::1
PING 2602:fcfb:1d:2::1(2602:fcfb:1d:2::1) 56 data bytes
64 bytes from 2602:fcfb:1d:2::1: icmp_seq=1 ttl=64 time=1.08 ms
64 bytes from 2602:fcfb:1d:2::1: icmp_seq=2 ttl=64 time=0.882 ms
64 bytes from 2602:fcfb:1d:2::1: icmp_seq=3 ttl=64 time=1.04 ms
64 bytes from 2602:fcfb:1d:2::1: icmp_seq=4 ttl=64 time=0.641 ms
^C
— 2602:fcfb:1d:2::1 ping statistics —
4 packets transmitted, 4 received, 0% packet loss, time 3010ms
rtt min/avg/max/mdev = 0.641/0.911/1.080/0.172 ms
root@b96eb96e-3929-4c17-a117-9b8ee0660eeb-node1:/home/ubuntu# ping 2602:fcfb:1d:1::1
PING 2602:fcfb:1d:1::1(2602:fcfb:1d:1::1) 56 data bytes
^C
— 2602:fcfb:1d:1::1 ping statistics —
3 packets transmitted, 0 received, 100% packet loss, time 2049ms- This reply was modified 1 year, 9 months ago by Fengping Hu.
March 24, 2023 at 12:31 pm #3985You need to add a route to whatever you are trying to reach via the external gateway once all your interfaces are up and the IPs are made publicly routable. The interface for the gateway should be ens7, but it might be something else. Here is a modified version of the cell under “Configure Node1 – FABnetv6” in the example notebook I shared. Note that adding 0.0.0.0/1 exposes the node to the entire internet; it might be a better idea to only add a route to your specific public network (home internet, school, etc…). Hope this helps!
try: # Get Node node1 = slice.get_node(name=node1_name) # Get Network node1_network = slice.get_network(name=network1_name) # Get Interface node1_iface = node1.get_interface(network_name=network1_name) # Configure first IP from the subnet node1_addr = network1_available_ips.pop(0) node1_iface.ip_addr_add(addr=node1_addr, subnet=network1.get_subnet()) node1.execute(f'sudo ip route add {node1_network.get_gateway()} dev ens7'); node1.execute(f'sudo ip route add 0.0.0.0/1 via {node1_network.get_gateway()}') stdout, stderr = node1.execute(f'ip addr show {node1_iface.get_os_interface()}') stdout, stderr = node1.execute(f'ip route list') except Exception as e: print(f"Exception: {e}")
March 24, 2023 at 1:47 pm #3989I did add a route. Though I can’t even reach the gateway from the FABRIC node itself. It appears the gateway can’t be discovered as a neighbor. Also in my case the interface is actually ens9. ens7 and ens8 are for other purposes.
Here are the route entries on the node.
2602:fcfb:1d:1::/64 dev ens9 proto kernel metric 256 pref medium
2605:9a00:10:200a::/64 via 2602:fcfb:1d:1::1 dev ens9 metric 1024 pref mediumHere’s the ndp table — the gateway is in failed state.
# ip -6 neighbor
2602:fcfb:1d:2::3 dev ens8 lladdr 06:7b:c6:c7:1a:66 STALE
fe80::f816:3eff:feac:1ca0 dev ens3 lladdr fa:16:3e:ac:1c:a0 router REACHABLE
fe80::2204:fff:fec5:4648 dev ens3 lladdr 20:04:0f:c5:46:48 router STALE
fe80::40:fcff:fe51:8b17 dev ens9 lladdr 02:40:fc:51:8b:17 STALE
2602:fcfb:1d:1::3 dev ens9 lladdr 02:40:fc:51:8b:17 STALE
2602:fcfb:1d:2::1 dev ens8 lladdr 82:31:bd:61:8f:dc router STALE
fe80::8031:bdff:fe61:8fe8 dev ens8 lladdr 82:31:bd:61:8f:e8 router STALE
fe80::8031:bdff:fe61:8fe9 dev ens9 lladdr 82:31:bd:61:8f:e9 router STALE
2602:fcfb:1d:1::1 dev ens9 FAILED
fe80::8031:bdff:fe61:8fdc dev ens8 lladdr 82:31:bd:61:8f:dc router STALE
fe80::47b:c6ff:fec7:1a66 dev ens8 lladdr 06:7b:c6:c7:1a:66 STALE -
AuthorPosts
- You must be logged in to reply to this topic.