[P4-dev] Two questions from a rookie
p4 at paulidav.org
Wed Jun 24 15:29:20 EDT 2015
First of all, thank you for your interest in P4!
On 6/23/15 6:30 PM, Sergio Gutierrez wrote:
> - Is there any process/daemon/service that I need to start previous to
> run the behavioral models? I am trying to run the built in tests and I
> receive an error of connection refused.
It would have definitely been very helpful if you attached your session
logs, but in the absence of those, here are some things to check:
1. In order to run the behavioral model and the tests, you need to
setup Virtual Ethernet interfaces. This needs to be done once and
you can do it by running the following command from the root of your
2. Also, because the model and the tests need full access to the raw
sockets, representing the veth interfaces, you need to run both as
root (from the targets/switch or similar directory)
1. For the model: *sudo* ./behavioral-model &
2. For the tests: *sudo* ./run_tests.py --test-dir
I hope that one of these suggestions would help.
> - I am trying to extend the simple_router example to use two switches.
> Is there any advice about how to do it?
This is a very loaded question, so an answer would depend on what
exactly would you like to achieve. Would you like to simply run two
independent instances of the model? This can certainly be done by asking
the model to listen on a different port, for example. You can use
"./behavioral-model --help" to get the list of options. Alternatively,
you might be interested in modifying the example to allow two switches
to behave like one big entity. This is possible too, but you will need
to decide what metadata to pass from one device to another and it can be
done in multiple ways.
Hope this helps.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the P4-dev