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

Setting Host IP Not Working #91

Open
christnp opened this issue Jan 18, 2023 · 0 comments
Open

Setting Host IP Not Working #91

christnp opened this issue Jan 18, 2023 · 0 comments

Comments

@christnp
Copy link

I've tried reverse engineering some of the p4app.json files to figure out how one might set the host IP addresses, but I can't seem to get it right. Looking at the source_routing.p4 example, I believe I can just add in the ip dictionary key, but it has no affect. Here is my p4app.json file:

{
  "program": "basic_fwd.p4",
  "language": "p4-16",
  "targets": {
    "multiswitch": {
        "auto-control-plane": false,
        "cli": true,
        "pcap_dump": true,
        "enable_log": true,
        "links": [["h1", "s1"], ["s1", "h2"]],
        "hosts": {
          "h1": {
            "ip": "10.0.1.10",
            "cmd": "python test.py $echo_msg"
          },
          "h2": {
            "ip": "10.0.2.10",
            "cmd": "python test.py $echo_msg"
          }
        },
        "switches": {
          "s1": {
              "entries": "basic_fwd_switch.config"
          }
        },
        "parameters": {
          "echo_msg": "\nfoobar\n"
        }
      }
  }
}
  • I do not see the IP address change (no matter what)
  • The test.py is just a simple script that prints the argument that is input. This also does not execute on startup, but I can manually run it (i.e., `h1 python test.py "test" ' outputs what I'd expect)
  • Changing other parameters, e.g. links, does affect the network as expected

So I must just not understand how to properly set the host IPs and/or run the host scrips.

Appreciate the help.

R/

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