p4app
p4app copied to clipboard
Setting Host IP Not Working
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/