-
Notifications
You must be signed in to change notification settings - Fork 59
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
multiswitch.p4app starts and stops just after #34
Comments
Hi, This will execute the commands in the p4app.json file ("cmd") and then terminate. If you want your program to start the Mininet CLI, then you should add "cli": true to the target configuration. If you want more control over the topology, you may want to consider using a custom topology class: https://github.com/p4lang/p4app#custom-topology-class cheers, |
@robertsoule-barefoot could you tell sth wider about adding a CLI into config? I found a CLI section in
after enabled CLI and add
CLI starts. Is it proper way to get it started, with no consequences in further customization? Or there is other, better way to make it work? Another question is whether there is a possibility to connect more than one switch to the host? |
Hi @bakkarol , yes, that should be fine. I'm not sure why we had that line commented out in p4apprunner.py. |
While running some custom topo on |
Unfortunately, it is not easy to run GUI-based applications, like Wireshark, from within the docker container. Online, you may be able to find some solutions such as using SSH forwarding of X11, but I don't have much experience with them: http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/ As an alternative, you can use a command line tool like tcpdump. You can run this from the Wireshark command prompt on one of the hosts (e.g., mininet> h1 tcpdump .... ), or from outside the docker container using a docker exec command. |
Hi @bakkarol, Since p4app runs inside a Docker container, you will not see the interfaces from your host. You must enter the container to see/capture the interfaces. Try the following steps. First, enable CLI mode, by adding
Every time you start a p4app, the container will have a different ID. Use the container ID (in my case, it's
Then, go back to the other terminal and exit the CLI (type exit or ender CTRL+D). When the p4app runs and starts sending packets, you should see them in the wireshark window. I hope this works for you. |
Hello @theojepsen , Thank you for your response. When doing it in your way, with sudo privilages, wireshark starts
but shows error window with info:
and, there si no interfaces in mininet. When I run I'm not sure if I clearly understand your advice because when i stop CLI in first terminal, it stops docker container and then, there is also nothing to measure. |
You are getting the From the output you showed in the first post, it looks like the Also, why are you running p4app with sudo (i.e. |
@theojepsen after adding user into wireshark and group, still not able to see interfaces. To avoid problems with containers, I'm trying to run topo outside the docker, in regular way but I'm doing sth wrong. I'm using code example from source_routing in SIGCOMM2015 tutorial.
Script run correctly in the way shown in
but
@robertsoule-barefoot @theojepsen , may I ask for some advice or tips? |
Just to be clear on what you did: did you implement the logic in the P4 switch to handle ICMP packets? I think the SIGCOMM2015 tutorial sample switch code: https://github.com/p4lang/tutorials/blob/master/SIGCOMM_2015/source_routing/p4src/source_routing.p4 Would not be able to forward ping packets. |
It looks like the multiswitch mininet backend is using ARP - is that why ICMP needs to be supported? Would there be any way to pre-load the arp tables in the hosts to avoid this? |
Hi @duanev, The multiswitch backend does not use ARP messages for configuring the hosts. By default, the multiswitch backend assigns a MAC address and IP address to each interface. Then, on each host, an ARP entry is added so that the host knows how to route packets to adjacent switches. The multiswitch backend then adds l1/l2 table entries to each switch so that they know how to route a packet from one host to another. If you don't want the multiswitch backend to automatically configure the hosts, you can set the
|
Ok, yes, I've set auto-control-plane to false, so I imagine I now need to do my own port routing. In the following output, can I assume the eth number for each switch matches the egress/ingress port number?
Last, is there a way to programmatically know (via metadata maybe?) which ports are active on each switch, and would simulating link up/down events be somewhere in the dev pipe? |
Yes. Also, the port number corresponds to the order in which the links were added when creating the topology.
As far as I know, there is no way to find the state of ports from within your P4 program. You should provide your program with this information from the control plane. This could be done with a table on the switch that is populated by the controller.
What do you mean by the "dev pipe"? Right now there is no way of bringing links up/down. You could specify your own controller in the p4app.json, and have the controller add/remove table entries from the switch, to signal ports being available/unavailable. |
sorry: dev pipe -> developer's list of features to implement Specifying my own controller has helped, but there appears to be some default iface config in P4Host (p4_mininet.py) that I can't override - even with ifconfig commented out in the controller, a 10. ip is still given to each host. |
Hi!
I have problems while running multiswitch.p4app. App starts and and stops just after. Am I able to run it like simple_router.p4app (ping hosts for example) and make some changes in topology? Run on VM of Ubuntu 16.04 LTS.
The text was updated successfully, but these errors were encountered: