I have a question about the set_ping() function.
The destination address in the argument of this function is the number of the node and not the IP address.
The IP address of the destination node is obtained in the following way.
ifconfig_output = sn_remote_cmd(
remote_ssh, "docker exec -it " + str(container_id_list[des - 1]) +
" ifconfig | sed 's/[ \t].*//;/^\(eth0\|\)\(lo\|\)$/d'")
des_IP = sn_remote_cmd(
remote_ssh, "docker exec -it " + str(container_id_list[des - 1]) +
" ifconfig " + ifconfig_output[0][:-1] +
"|awk -F '[ :]+' 'NR==2{print $4}'")
But getting it this way will only get a top IP address, not necessarily one that is on the same subnet as the source node.
I did a simple test, in example.py, node 4 is adjacent to node 5, but node 4 doesn't ping node 5.
I may need to wait until OSPF converges to ping through. But I waited for 200s and still didn't observe any change in the routing table from the beginning.
I have a question about the set_ping() function.
The destination address in the argument of this function is the number of the node and not the IP address.
The IP address of the destination node is obtained in the following way.
But getting it this way will only get a top IP address, not necessarily one that is on the same subnet as the source node.
I did a simple test, in example.py, node 4 is adjacent to node 5, but node 4 doesn't ping node 5.
I may need to wait until OSPF converges to ping through. But I waited for 200s and still didn't observe any change in the routing table from the beginning.