Forum Replies Created
-
AuthorPosts
-
The output of the command is the following:
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
ServerAliveInterval 120
Host bastion-?.fabric-testbed.net
User <Update Bastion User Name>
ForwardAgent yes
Hostname %h
IdentityFile /home/fabric/work/fabric_config/fabric-bastion-key
IdentitiesOnly yes
Host * !bastion-?.fabric-testbed.net
ProxyJump <Update Bastion User Name>@bastion.fabric-testbed.net:22Hi Komal,
I now have an issue SSH’ing into my nodes (error in attachment) because of a bad configuration. Can this be because of the issue we just discussed?
Kind regards,
Robin
I ran the notebook without any problems. Everything works as expected now. Thank you Komal!
Kind regards,
Robin
Hi Komal,
Thank you for your quick response. In the meantime I have restarted my server via the control panel, now I have a new error (screenshot attached).
You said to run the
jupyter-examples-rel1.6.1/configure_and_validate.ipynb
notebook, does it matter that my files are all in jupyter-examples-rel1.5.4?Thanks,
Robin
February 16, 2024 at 11:06 am in reply to: Unable to create Slice, Errors at all ticketed nodes #6575Thank you!!
Hi Komal,
It works, thank you for your help!
Hi Acheme,
I am able to ping every node from every other node, so I didn’t think it was necessary to allocate network resources. Maybe it could help with my problem, do you know how I could reserve for IPv6 connections using code?
And did you use iperf with other kinds of IPs on this testbed? If yes, which kinds?
Kind regards,
Robin
- This reply was modified 9 months, 3 weeks ago by Robin Schelstraete.
Yes, the contents of my notebook:
Show Slice
Show FABlib Config, slice and nodes
from fabrictestbed_extensions.fablib.fablib import FablibManager as fablib_manager
fablib = fablib_manager()
fablib.show_config();
Set Up ExperimentSlice
Setup slice to experiment on, consisting of five nodes located on the same site running Ubuntu 22 OS Images.
slice_name=”Experiment Slice”
node1_name=”Node1″
node2_name=”Node2″
# This will be the router node
node3_name=”SR-ingress-node”
node4_name=”Source-Node”
node5_name=”Destination-Node”# Create a slice
slice = fablib.new_slice(name=slice_name)# Add a node
slice.add_node(name=node1_name, site=”AMST”, image=”default_ubuntu_22″)node1 = slice.get_node(name=node1_name)
# node_location = node1.get_site()
node_location = “AMST”slice.add_node(name=node2_name, site=node_location, image=”default_ubuntu_22″)
slice.add_node(name=node3_name, site=node_location, image=”default_ubuntu_22″)
slice.add_node(name=node4_name, site=node_location, image=”default_ubuntu_22″)
slice.add_node(name=node5_name, site=node_location, image=”default_ubuntu_22″)# Submit the slice
slice.submit();List the slices and their data
fablib.list_slices();
slice = fablib.get_slice(slice_name)
slice.show()node1 = slice.get_node(name=node1_name)
node1.show()node2 = slice.get_node(name=node2_name)
node2.show();node3 = slice.get_node(name=node3_name)
node3.show();node4 = slice.get_node(name=node4_name)
node4.show();node5 = slice.get_node(name=node5_name)
node5.show();Enable SR on all Nodes
Enable SR on Src Node
###### Enable Segment Routing ######
# Check the kernel version, this has to be at least version 4.9
stdout, stderr = node4.execute(‘uname -r’)# Check if iproute2 is installed
stdout, stderr = node4.execute(‘ip -V’)# Install packages
stdout, stderr = node4.execute(‘sudo apt update && sudo apt upgrade | y’)
stdout, stderr = node4.execute(‘sudo apt install -y iproute2’)###### Enable IPv6 forwarding and Seg6 ######
stdout, stderr = node4.execute(‘echo “net.ipv6.conf.all.forwarding=1” | sudo tee -a /etc/sysctl.conf’)
stdout, stderr = node3.execute(‘echo “net.ipv6.conf.*.seg6_enabled=1” | sudo tee -a /etc/sysctl.conf’)stdout, stderr = node4.execute(‘sudo sysctl -p’)
stdout, stderr = node4.execute(‘cat /etc/sysctl.conf’)Setup SR on SR ingress node
###### Enable Segment Routing ######
# Check the kernel version, this has to be at least version 4.9
stdout, stderr = node3.execute(‘uname -r’)# Check if iproute2 is installed
stdout, stderr = node3.execute(‘ip -V’)# Install packages
stdout, stderr = node3.execute(‘sudo apt update && sudo apt upgrade | y’)
stdout, stderr = node3.execute(‘sudo apt install -y iproute2’)###### Enable IPv6 forwarding ######
stdout, stderr = node3.execute(‘echo “net.ipv6.conf.all.forwarding=1” | sudo tee -a /etc/sysctl.conf’)
stdout, stderr = node3.execute(‘echo “net.ipv6.conf.*.seg6_enabled=1” | sudo tee -a /etc/sysctl.conf’)stdout, stderr = node3.execute(‘sudo sysctl -p’)
stdout, stderr = node3.execute(‘cat /etc/sysctl.conf’)Setup SR on Node 1
###### Enable Segment Routing ######
# Check the kernel version, this has to be at least version 4.9
stdout, stderr = node1.execute(‘uname -r’)# Check if iproute2 is installed
stdout, stderr = node1.execute(‘ip -V’)# Install packages
stdout, stderr = node1.execute(‘sudo apt update && sudo apt upgrade | y’)
stdout, stderr = node1.execute(‘sudo apt install -y iproute2’)###### Enable IPv6 forwarding ######
stdout, stderr = node1.execute(‘echo “net.ipv6.conf.all.forwarding=1” | sudo tee -a /etc/sysctl.conf’)
stdout, stderr = node1.execute(‘echo “net.ipv6.conf.*.seg6_enabled=1” | sudo tee -a /etc/sysctl.conf’)stdout, stderr = node1.execute(‘sudo sysctl -p’)
stdout, stderr = node1.execute(‘cat /etc/sysctl.conf’)Setup SR on Node 2
###### Enable Segment Routing ######
# Check the kernel version, this has to be at least version 4.9
stdout, stderr = node2.execute(‘uname -r’)# Check if iproute2 is installed
stdout, stderr = node2.execute(‘ip -V’)# Install packages
stdout, stderr = node2.execute(‘sudo apt update && sudo apt upgrade | y’)
stdout, stderr = node2.execute(‘sudo apt install -y iproute2’)###### Enable IPv6 forwarding ######
stdout, stderr = node2.execute(‘echo “net.ipv6.conf.all.forwarding=1” | sudo tee -a /etc/sysctl.conf’)
stdout, stderr = node2.execute(‘echo “net.ipv6.conf.*.seg6_enabled=1” | sudo tee -a /etc/sysctl.conf’)stdout, stderr = node2.execute(‘sudo sysctl -p’)
stdout, stderr = node2.execute(‘cat /etc/sysctl.conf’)Setup SR on Dst Node
###### Enable Segment Routing ######
# Check the kernel version, this has to be at least version 4.9
stdout, stderr = node5.execute(‘uname -r’)# Check if iproute2 is installed
stdout, stderr = node5.execute(‘ip -V’)# Install packages
stdout, stderr = node5.execute(‘sudo apt update && sudo apt upgrade | y’)
stdout, stderr = node5.execute(‘sudo apt install -y iproute2’)###### Enable IPv6 forwarding ######
stdout, stderr = node5.execute(‘echo “net.ipv6.conf.all.forwarding=1” | sudo tee -a /etc/sysctl.conf’)
stdout, stderr = node5.execute(‘echo “net.ipv6.conf.*.seg6_enabled=1” | sudo tee -a /etc/sysctl.conf’)stdout, stderr = node5.execute(‘sudo sysctl -p’)
stdout, stderr = node5.execute(‘cat /etc/sysctl.conf’)Execute Experiment
Configure SR ingress node
Segment Routing is enabled. Now, the local SID table is created, active segments are mapped to functions (with this, the packet route is specified), the source address is set and the SRH is added onto the packet, which is then also encapsulated as SRv6 packet within the same command.
# Print addresses of the nodes
for node in slice.get_nodes():
stdout, stderr = node.execute(f’echohostname -s
: Hello! My IP is {node.get_management_ip()} :P’)# Create localSID table
stdout, stderr = node3.execute(‘echo Create localSID table’)
stdout, stderr = node3.execute(‘echo 100 localsid | sudo tee -a /etc/iproute2/rt_tables’)
stdout, stderr = node3.execute(‘sudo ip -6 rule add to 2001:610:2d0:fabc:f816:3eff::/64 lookup localsid’)
stdout, stderr = node3.execute(‘sudo ip -6 route add blackhole default table localsid’)
stdout, stderr = node3.execute(‘echo ……………………….’)# Map active segments to functions and add them to table 100, the localsid table
# using ip -6 route add <segment> encap seg6local action <action> <params> dev <device> table localsid
# segment node3-node1
stdout, stderr = node3.execute(‘echo Adding Node1 nexthop Node2′)
stdout, stderr = node3.execute(f’sudo ip -6 route add {node1.get_management_ip()} encap seg6local action End.X nh6 {node2.get_management_ip()} dev enp3s0 table localsid’)
stdout, stderr = node3.execute(‘echo ……………………….’)## segment node1-node2
stdout, stderr = node3.execute(‘echo Adding Node2 nexthop DstNode’)
stdout, stderr = node3.execute(‘sudo ip -6 route add 2001:610:2d0:fabc:f816:3eff:fe4d:4924 encap seg6local action End.X nh6 2001:610:2d0:fabc:f816:3eff:fe1a:8910 dev enp3s0 table localsid’)
stdout, stderr = node3.execute(‘echo ……………………….’)## segment node2-node5
stdout, stderr = node3.execute(‘echo Adding End on DstNode’)
stdout, stderr = node3.execute(‘sudo ip -6 route add 2001:610:2d0:fabc:f816:3eff:fe1a:8910 encap seg6local action End dev enp3s0 table localsid’)
stdout, stderr = node3.execute(‘echo ……………………….’)# Set source address (address of Source Node)
stdout, stderr = node3.execute(‘echo Set Source Address’)
stdout, stderr = node3.execute(‘sudo ip sr tunsrc set 2001:610:2d0:fabc:f816:3eff:feaa:fbf8’)
stdout, stderr = node3.execute(‘echo ……………………….’)# SR encapsulation and insertion
stdout, stderr = node3.execute(‘echo Adding segments to the route’)
stdout, stderr = node3.execute(‘sudo ip -6 route add 2001:400:a100:3090:f816:3eff::/64 encap seg6 mode inline segs 2001:610:2d0:fabc:f816:3eff:fed2:af83,2001:610:2d0:fabc:f816:3eff:fe4d:4924,2001:610:2d0:fabc:f816:3eff:fe1a:8910 dev enp3s0’)
stdout, stderr = node3.execute(‘echo ……………………….’)Check SR-ingress-node if Something Has Changed
# stdout, stderr = node3.execute(”)
stdout, stderr = node3.execute(‘echo Check if localsid is added as table 100:’)
stdout, stderr = node3.execute(‘sudo cat /etc/iproute2/rt_tables’)
stdout, stderr = node3.execute(‘echo ……………………….’)stdout, stderr = node3.execute(‘echo Show the contents of localsid:’)
stdout, stderr = node3.execute(‘sudo ip -6 route show table 100’)
stdout, stderr = node3.execute(‘echo ……………………….’)stdout, stderr = node3.execute(‘echo Show rules associated with the table:’)
stdout, stderr = node3.execute(‘sudo ip -6 rule show’)
stdout, stderr = node3.execute(‘echo ……………………….’)stdout, stderr = node3.execute(‘echo Show routing table:’)
stdout, stderr = node3.execute(‘ip -6 route show’)
stdout, stderr = node3.execute(‘echo ……………………….’)stdout, stderr = node3.execute(‘echo Show routing table:’)
stdout, stderr = node3.execute(‘ip -6 route’)Delete the Experiment Slice when the experiments are done
slice = fablib.get_slice(name=’Experiment Slice’)
slice.delete()Hi Acheme!
The link to my Jupyter Notebook: https://jupyter.fabric-testbed.net/hub/user-redirect/lab/tree/jupyter-examples-rel1.5.4/SRExperiment.ipynb .
The code I use to install iperf on the SR-ingress-node and start a server via a terminal:
$ <ssh command of SR-ingress-node>
$ sudo apt install iperf
$ iperf -sThe code I use to install iperf on Node2 and start a client in a second terminal:
$ <ssh command of Node2>
$ sudo apt install iperf
$ iperf -c <management IP of SR ingress node>In the attachement I included screenshots of both the outputs of these instructions as well as my network topology as shown in the FABRIC portal after creating it via the Jupyter Notebook.
Hi Komal,
Thank you for your quick response. I fixed the problem about a day after I posted the question by stopping my server via the Control Hub Panel.
Thanks again!
Robin
-
AuthorPosts