Sitelet https://github.com/SpaceNetLab/StarryNet/issues/9
Skip to content

Question about set_ping() #9

Description

@zxm-bupt

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions