Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about set_ping() #9

Open
zxm-bupt opened this issue Dec 16, 2023 · 0 comments
Open

Question about set_ping() #9

zxm-bupt opened this issue Dec 16, 2023 · 0 comments

Comments

@zxm-bupt
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant