opennetworkinglab / ngsdn-tutorial Goto Github PK
View Code? Open in Web Editor NEWHands-on tutorial to learn the building blocks of the Next-Gen SDN architecture
Home Page: https://www.opennetworking.org/ng-sdn/
License: Apache License 2.0
Hands-on tutorial to learn the building blocks of the Next-Gen SDN architecture
Home Page: https://www.opennetworking.org/ng-sdn/
License: Apache License 2.0
Hello!
I would like some advice I am trying to solve a problem with traffic going through the switch. To do this I would like to see a detailed log to see how the switch is parsing traffic and understand what the problem is.
I read another issue and added the line "'-bmv2_log_level trace'," in stratum.py, then watched the log file /tmp/leaf1/stratum_bmv2.log
The resulting log is not detailed enough, in my opinion, maybe there is some other way?
I apologise for piling up all the questions:
Do I have the option of connecting to the CLI of the bmv2 switch?
Previously I used L2BridgingComponent.java for L2 forwarding and in this case, I could use ONOS to check the number of packets hitting the IngressPipeImpl.l2_exact_table. However, when I created a new table, I was faced with the need to add new entries using P4Runtime sh, in this case, I cannot see the added entries in ONOS and consequently the matches. Is this the correct behaviour?
Thank you very much!
Hi,
I'm going through Exercise 1 and I'm having problems inserting a table entry using the P4runtime shell. I'm getting the following error:
P4Runtime sh >>> te.insert()
---------------------------------------------------------------------------
P4RuntimeWriteException Traceback (most recent call last)
<ipython-input-7-415530895906> in <module>
----> 1 te.insert()
/p4runtime-sh/venv/lib/python3.8/site-packages/p4runtime_shell-0.0.1-py3.8.egg/p4runtime_sh/shell.py in insert(self)
649 raise NotImplementedError("Insert not supported for {}".format(self._entity_type.name))
650 logging.debug("Inserting entry")
--> 651 self._write(p4runtime_pb2.Update.INSERT)
652
653 def delete(self):
/p4runtime-sh/venv/lib/python3.8/site-packages/p4runtime_shell-0.0.1-py3.8.egg/p4runtime_sh/shell.py in _write(self, type_)
643 update.type = type_
644 getattr(update.entity, self._entity_type.name).CopyFrom(self._entry)
--> 645 client.write_update(update)
646
647 def insert(self):
/p4runtime-sh/venv/lib/python3.8/site-packages/p4runtime_shell-0.0.1-py3.8.egg/p4runtime_sh/p4runtime.py in handle(*args, **kwargs)
122 if e.code() != grpc.StatusCode.UNKNOWN:
123 raise e
--> 124 raise P4RuntimeWriteException(e) from None
125 return handle
126
P4RuntimeWriteException: Error(s) during Write:
* At index 0: INVALID_ARGUMENT, 'Invalid bytestring format'
Just to clarify, I'm running directly on my Ubuntu 20.04 laptop instead of the VM. Docker compose creates the network ngsdn-tutorial_default
when I issue make start
. So I changed your script to attach the P4 runtime to that network instead of the host network. Finally, I open the P4runtime shell as follows:
util/p4rt-sh --grpc-addr mininet:50001 --config p4src/build/p4info.txt,p4src/build/bmv2.json --election-id 0,1
I made sure I'm using the latest docker image for the P4runtime shell. I don't know if my changes have messed with something in the setup.
Thanks,
Joaquin
% vagrant up
Installing the 'vagrant-vbguest' plugin. This can take a few minutes...
Fetching micromachine-3.0.0.gem
Fetching vagrant-vbguest-0.25.0.gem
Installed the plugin 'vagrant-vbguest (0.25.0)'!
Installing the 'vagrant-reload' plugin. This can take a few minutes...
Fetching vagrant-reload-0.0.1.gem
Installed the plugin 'vagrant-reload (0.0.1)'!
Installing the 'vagrant-disksize' plugin. This can take a few minutes...
Fetching vagrant-disksize-0.1.3.gem
Installed the plugin 'vagrant-disksize (0.1.3)'!
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'lasp/ubuntu16.04-desktop' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'lasp/ubuntu16.04-desktop' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Vagrant Cloud, please verify you're logged in via
vagrant login
. Also, please double-check the name. The expanded
URL and error message are shown below:
URL: ["https://vagrantcloud.com/lasp/ubuntu16.04-desktop"]
Error: The requested URL returned error: 404 Not Found
ngsdn-tutorial % docker-compose up --build
WARN[0000] The "NGSDN_TOPO_PY" variable is not set. Defaulting to a blank string.
Attaching to mininet, onos
Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/mininet/": permission denied: unknown
I have tried changing permissions running with sudo, this local environment is Mac OSx.
After removing and re-adding the link leaf1-h1a
via Mininet CLI (link leaf1 h1a down
and link leaf1 h1a up
), the configuration of the interface h1a-eth0
is lost. The ping between h1a
and h1b
, then, fails with the following message connect: Network is unreachable
.
Hello,
I have done all the NG-SDN exercises and all of them work. However, I have problems when using wider topologies. In particular, link discovery doesn't work well if the mininet topology consists of more than 10 nodes. I have created a the topo.py file defining the new topology and a netcfg.json file defines the grpc address and port associated with each stratum device (for example, "managementAddress": "grpc://mininet:50001?device_id=1" to "managementAddress": "grpc://mininet:50016?device_id=1"), and finally I have modified the docker-compose.yml file to include the required values in the "ports" field (ports: -"50001-50001" -"50002-50002" ... to -"50016-50016" ).
Using onos cli, it can be checked that all the devices are discovered, but not all the links. I always use the same files but, depending on the execution, sometimes certains links are not discovered and sometimes others.
Are there any limitation on the network size? I would appreciate any help.
Thanks a lot
I followed the exercise documentation, but during compilation an error occurs. Could someone help me with this matter, please?
Exercise 4: Enabling ONOS Built-in Services
https://github.com/opennetworkinglab/ngsdn-tutorial/blob/advanced/EXERCISE-4.md
main.p4
https://github.com/opennetworkinglab/ngsdn-tutorial/blob/advanced/p4src/main.p4
Error during compilation:
*** Building P4 program...
docker run --rm -v /home/sdn/ngsdn-tutorial:/home/sdn/ngsdn-tutorial -w /home/sdn/ngsdn-tutorial opennetworking/p4c:stable
p4c-bm2-ss --arch v1model -o p4src/build/bmv2.json
--p4runtime-files p4src/build/p4info.txt --Wdisable=unsupported
p4src/main.p4
p4src/main.p4(551): [--Werror=not-found] error: cpu_in: Not found declaration
if (cpu_in.ingress == 255) {
^^^^^^
Makefile:98: recipe for target 'p4-build' failed
make: *** [p4-build] Error 1
Thank you to everyone in the group.
--
Regards,
Fernando Henrique Santorsula
This would make the P4 code simpler to read
Hello, would you like to ask if SFC can be added on the basis of exercise 6, that is, service chain. I hope I can get your support
Hi NGSDN folks,
This tutorial has been awesome! I got to use the Trellis app in exercise 7, but not the actual code base (e.g. to see/experiment with components such as segmentrouting, build changes and load the updated app into onos). How can I interact with the trellis code base (or any of the applications listed in ~/onos/apps within the onos container) using the same Intellij setup that ships with the tutorial?
Thanks,
-Syd
The P4info.text file does not have a set_egress_port in the P4info.txt file. Is question 3 on exercise 1 intended to be set_output_port instead?
Hi NGSDN folks,
In exercise 6, it appears that IP mentioned in the text for inserting the SRv6 rules, contains the wrong IP for h4 (i.e. 2001:1:4::1 as opposed to 2001:2:4::1). In particular, please update Section 4 as follows(https://github.com/opennetworkinglab/ngsdn-tutorial/blob/advanced/EXERCISE-6.md#4-inserting-srv6-policies) :
Change:
"""
Insert the SRv6 policy from h2 to h4 on leaf1 (through spine1 and leaf2)
onos> srv6-insert device:leaf1 3:201:2:: 3:102:2:: 2001:1:4::1
"""
To:
'''
srv6-insert device:leaf1 3:201:2:: 3:102:2:: 2001:2:4::1
'''
Cheers!
-Syd
Hi,
is it possible to add externs to the BMV2 switch used in the tutorial simulations ?
if yes, could you provide clear steps on how to change the switch source code and rebuild it.
Thank you so much !
Hello!
I have a problem with xterm not working in mininet. I have spent several days trying to figure it out myself and have tried many instructions on the internet. Eventually, I downloaded VM mininet from http://mininet.org/ and xterm works when I do "sudo -E mn". Thus it can be assumed that I have X11 Forwarding configured correctly. This worked without any further manipulation.
After connecting via SSH via PUTTY with X11 Forwarding enabled, I can run xterm or gedit, all of which work from the VM. However, it doesn't work xterm in mininet.
DISPLAY=192.168.56.1:0.0
- IP of my windows notebook with VcXsrv X;
192.168.56.104
- IP of the VM with ngsdn;
sdn@tutorial-vm:~/ngsdn-tutorial$ cat /etc/ssh/sshd_config |grep X11
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost no
sdn@tutorial-vm:~/ngsdn-tutorial$ cat /etc/ssh/ssh_config |grep X11
ForwardX11 yes
ForwardX11Trusted yes
sdn@tutorial-vm:~/ngsdn-tutorial$
sudo -E make mn-cli
mininet> xterm h1b
Error: Cannot connect to display
mininet>
mininet> h1b echo $DISPLAY $XAUTHORITY
mininet>
It looks as if some parameters are not being passed to the mininet. Could you tell me what to do or check on VM? I understand that this is not directly related to NGSDN, but this functionality may be important for some users.
On a running VM from mininet.org:
mininet> h1 echo $DISPLAY $XAUTHORITY
localhost:10.0
mininet>
Thank you very much, any help would be appreciated!
All exercise can be executed on a system with minimal dependencies:
We should provide a VM with all these dependencies installed plus:
make pull-deps
)However, we should update the README with instructions for those people who prefer to run the exercises without a VM but by running commands directly on their host system, by using Docker.
Hi NGSDN folks,
I'm using the vm image you provided for the tutorial. When I attempt to pull an xterm for any node, I get the following:
mininet> xterm h1a
Error: Cannot connect to display
Is this the expected behavior? In particular, are there other configurations that must be set for xterm to work for this particular vm? If yes, can you kindly point me to the documentation?
BTW. This is a great tutorial!
Thanks!
-Syd
Traceback (most recent call last):
File "./tests/routing.py", line 54, in runTest
self.testPacket(pkt)
File "/ptf/lib/base_test.py", line 551, in handle
return f(*args, **kwargs)
File "./tests/routing.py", line 72, in testPacket
action_name="NoAction"
File "/ptf/lib/helper.py", line 207, in build_table_entry
table_entry.table_id = self.get_tables_id(table_name)
File "/ptf/lib/helper.py", line 94, in
return lambda name: self.get_id(primitive, name)
File "/ptf/lib/helper.py", line 82, in get_id
return self.get(entity_type, name=name).preamble.id
File "/ptf/lib/helper.py", line 76, in get
% (name, entity_type))
AttributeError: Could not find 'IngressPipeImpl.my_station_table' of type tables
I don't know where to add this table. How can I solve this problem,Thank you in advance
请问 这每一个练习是关联的吗,我可不可以直接跳到最后几个?
Hi,
why is it not possible to start a tcpdump?
Error: tcpdump: error while loading shared libraries: libcrypto.so.1.0.2: cannot stat shared object: Permission denied
best regards
sheenB
The advanced
branch now contains a new exercise (#7) about Trellis, but the link to slides in README.md
still refers to the old one used at the Princeton tutorial. It should be updated with the new deck once @charlesmcchan is done adding the Trellis part.
The id in the question below does not exist in the P4info.txt file. As there is no detail on what the ID represents its not possible to attempt to look at another ID to evaluate.
To which P4 entity does the ID 16812802 belong to? A table, an action, or something else? What is the corresponding fully qualified name?
For students to use on the day of the tutorial. Should include:
Hello, I am studying how messages are transferred between switches and the controller within a NGSDN environment, specifically packet in and packet out messages. I have been using wireshark within the virtual machine to collect these packets, but am not sure I am collecting the right ones. My main question is are packet in and packet out messages transferred on the grpc channel or elsewhere within the network? Thanks in advance!
Hello, I am from the old ONOS+P4 tutorial.
My exercise can't get udp packets in srv6 when i use iperf to test within h2 and h4.
I have seen there are packets in srv6_transit, l2 and l3 table for the spine1 port, but packets disappeared in the link of leaf1 and spine1.
ICMP works correctly.
All ptf tests passed, i want to know why.
Thanks!
Hi,
I was trying out this tutorial specifically the one explained in "EXERCISE-1.md"
I was able to send ping packet between the hosts after programming the table entries from P4 Runtime shell.
Then I tried reading the counter values, but I could not seem to do so..
Can you quickly point me how to read the direct/in-direct counter from p4runtime shell?
P4Runtime sh >>> direct_counters
acl_table_counter
l2_exact_table_counter
l2_ternary_table_counter
my_station_table_counter
ndp_reply_table_counter
routing_v6_table_counter
P4Runtime sh >>> direct_counters["acl_table_counter"]
Out[6]:
preamble {
id: 318773822
name: "acl_table_counter"
alias: "acl_table_counter"
}
spec {
unit: BOTH
}
direct_table_id: 33557865 ("IngressPipeImpl.acl_table")
P4Runtime sh >>> direct_counter_entry["acl_table_counter"]
Out[7]:
table_entry {
table_id: 33557865 ("IngressPipeImpl.acl_table")
}
TypeError Traceback (most recent call last)
in
----> 1 for dce in direct_counter_entry["acl_table_counter"].read:
2 print(dce)
3
TypeError: 'method' object is not iterable
P4Runtime sh >>> dce = direct_counter_entry["acl_table_counter"].read()
P4Runtime sh >>> print dce
<p4runtime_sh.shell._EntityBase.read.._EntryIterator object at 0x7f66241b0208>
P4Runtime sh >>>
Hi. I am a beginner and have just started to learn P4. I have completed 4 tasks, however, I have a problem with task 5 and I can't figure out what my error is. I have been struggling with this problem for a week now. I have reread the task and its instructions several times and looked at the answers. However, I still get these errors, I understand what it is about, but I don't understand how to solve it. I've compared it with the solution and I seem to do everything exactly the same. Could you tell me in which direction to look for a solution?
Thank you very much.
sdn@tutorial-vm:~/ngsdn-tutorial$ make p4-build
*** Building P4 program...
docker run --rm -v /home/sdn/ngsdn-tutorial:/workdir -w /workdir opennetworking/p4c:stable \
p4c-bm2-ss --arch v1model -o p4src/build/bmv2.json \
--p4runtime-files p4src/build/p4info.txt --Wdisable=unsupported \
p4src/main.p4
p4src/main.p4(482): [--Wwarn=unused] warning: Table my_station_table is not used; removing
table my_station_table {
^^^^^^^^^^^^^^^^
p4src/main.p4(501): [--Wwarn=unused] warning: Table routing_v6_table is not used; removing
table routing_v6_table {
^^^^^^^^^^^^^^^^
p4src/main.p4(493): [--Wwarn=unused] warning: ecmp_selector: unused instance
action_selector(HashAlgorithm.crc16, 32w1024, 32w16) ecmp_selector;
^^^^^^^^^^^^^
p4src/main.p4(493): warning: Action selector 'IngressPipeImpl.ecmp_selector' is never referenced by a table and cannot be included in bmv2 JSON
action_selector(HashAlgorithm.crc16, 32w1024, 32w16) ecmp_selector;
^^^^^^^^^^^^^
*** P4 program compiled successfully! Output files are in p4src/build
sdn@tutorial-vm:~/ngsdn-tutorial$
The issue is running xterm command through the mininet does not work and keep showing error msg "cannot display". Can you please help?
Hi NGSDN folks,
Is there some standard way of automating the generation of the topology (e.g. topo.py) and netcfg files (e.g. netcfg.json)? Or is the expectation that we do this manually?
Cheers!
-Syd
Hi NGSDN folks,
Exercise 6 suggests that we can use wireshark to view packets traversing the nodes/switches in the mininet container. However, when I run "ifconfig" on the tutorial-vm, I only see the following interfaces (br-fe4ed8b39621, docker0, enp0s3, lo, veth2e7a355, and veth2e7a355), and that's expected. Now I can use the following to list the interfaces on the mininet container (docker exec mininet ifconfig), and the interfaces include leaf1-eth1 etc. How do I go about using a wireshark installation on the host VM to view traffic on the interfaces of the switches in mininet?
Thanks!
-Syd
This exercise should:
Extra activities:
Hi,
this issue regards the Exercise1.md
To which P4 entity does the ID 16812802 belong to? A table, an action, or something else? What is the corresponding fully qualified name?,
I think there's a missing @id
annotation in the main.p4 file. Future releases of the P4Compiler could lead to a mismatch of the ID 16812802, causing some confusion.
If I follow EXERCISE-5.md's 4th section, there will still show "Unreachable". I think it is because the previous exercise has told that we need run make netcfg
first, but I have reboot so that I have that error. After I run make netcfg
, it works.
Would you consider to add some hint in EXERCISE-5.md to remind that we need to run make netcfg
for successfully ping? Thanks!
Hi,
I have observed this ONOS warn in onos logs:
Unable to INSERT table entry on device:leaf2: OTHER_ERROR INVALID_ARGUMENT Invalid representation of 'don't care' ternary match, omit match field instead of using 0 mask (:3) [PiTableEntry{tableId=IngressPipeImpl.l2_ternary_table, matchKey={hdr.ethernet.dst_addr=0x0&&&0x0}, tableAction=IngressPipeImpl.set_multicast_group(gid=0xff), priority=11, timeout=PERMANENT}]
This warn lead me to L2BridgingComponent.java file where we can find criterion that should match any previously unmatched packet (lines 272 - 277). Could you explain me please what is the proper representation of the rule that matches anything? I use onos 2.2.2 and mentioned rule stays in pending add.
@bocon13 @ccascone
Hi,
How can I query a counter defined in the p4 from ONOS? I understand it's from the p4runtime server, but I have not found an example to query the p4runtime server from and ONOS p4runtime client. I didnt not fined a p4runtime api, should I grpc the p4runtime server directly? What am I missing?
In the tutorial, each leaf switch's port 1 and 2 are connected to spine switches. In the netcfg.json file if I write configuration for those 2 ports ONOS fails to configure ports. What's the exact reason of this behavior? Can anyone please explain please?
Such that someone without prior P4 exposure, but with basic coding and networking experience would understand what's going on. Can use this as an example:
https://github.com/opennetworkinglab/onos/blob/master/apps/p4-tutorial/pipeconf/src/main/resources/mytunnel.p4
Hello, I added the basic pipeline IntProgrammableImpl.java to the PipeconfLoader but init() method didn't work .So i want to konw if there is relationship with IntProgrammable behaviour Interface and the Stratum. Must i use bmv2 to INT? Hoping for your answer, thanks!
When I send a packet to the router, the only message I see (regarding packet forwarding) in the log is this:
[11:52:25.183] [bmv2] [E] [thread 55] [5.0] [cxt 0] Checksum 'cksum_1' is not correct
I realised that in this line on the top of the log file
stratum_bmv2 -device_id=1 -chassis_config_file=/tmp/s1/chassis-config.txt -forwarding_pipeline_configs_file=/tmp/s1/pipe.txt -persistent_config_dir=/tmp/s1 -initial_pipeline=/root/dummy.json -cpu_port=255 -external_stratum_urls=0.0.0.0:50001 -local_stratum_url=localhost:41164 -max_num_controllers_per_node=10 -write_req_log_file=/tmp/s1/write-reqs.txt -logtosyslog=false -logtostderr=true
The -logtosyslog=false
and -logtostderr=true
. So maybe that is why I only have error message regarding wrong checksum (intentionally bad written). I changed the parameter in the stratum.py
script in the mininet docker so now I see this in the log output:
stratum_bmv2 -device_id=1 -chassis_config_file=/tmp/s1/chassis-config.txt -forwarding_pipeline_configs_file=/tmp/s1/pipe.txt -persistent_config_dir=/tmp/s1 -initial_pipeline=/root/dummy.json -cpu_port=255 -external_stratum_urls=0.0.0.0:50001 -local_stratum_url=localhost:41164 -max_num_controllers_per_node=10 -write_req_log_file=/tmp/s1/write-reqs.txt -logtosyslog=true -logtostderr=true
But still I only see the error message.
I would like to see full log. Any clues about how to do it?
Thanks in advance!
hi,
I use p4runtime-shell to insert a flow table to leaf1 node, but this flow table cannot be displayed in onos-cli.
I cannot use my own flow table.
On the basis of ngsdn, I want to realize the mri experiment in the p4 exercise.
So, I inserted a flow table in the egresspipeimpl of switch leaf1. I want to implement mri information collection between h1a and h1b.
P4Runtime sh >>> tables EgressPipeImpl.swtrace IngressPipeImpl.acl_table IngressPipeImpl.l2_exact_table IngressPipeImpl.l2_ternary_table IngressPipeImpl.my_station_table IngressPipeImpl.ndp_reply_table IngressPipeImpl.routing_v6_table IngressPipeImpl.srv6_my_sid IngressPipeImpl.srv6_transit
The flow table EgressPipeImpl.swtrace has been inserted in P4Runtime-shell, which is used to implement the mri function.
But I can't find the EgressPipeImpl.swtrace flow table using "onos@root > flows -s any device:leaf1" in onos-cli.
So the mri function can not be realized,
I've been stuck here for a long time and I don't know what to do. Hope to get your answers and help!!
Thanks!
Please,
It has the file topo-v6.py created with the correct permissions and I did the whole procedure without errors, I just can't exchange ICMP packages, the file topo-v6.py is located in this directory:
mininet> h1a ping h1b
PING 2001: 1: 1 :: b (2001: 1: 1 :: b) 56 data bytes
From 2001: 1: 1 :: a icmp_seq = 1 Destination unreachable: Address unreachable
From 2001: 1: 1 :: a icmp_seq = 2 Destination unreachable: Address unreachable
From 2001: 1: 1 :: a icmp_seq = 3 Destination unreachable: Address unreachable
onos@root > hosts -s
id=00:00:00:00:00:1A/None, mac=00:00:00:00:00:1A, locations=[device:leaf1/3], vlan=None, ip(s)=[2001:1:1::a]
id=00:00:00:00:00:1B/None, mac=00:00:00:00:00:1B, locations=[device:leaf1/4], vlan=None, ip(s)=[2001:1:1::b]
onos@root > devices -s
id=device:leaf1, available=true, role=MASTER, type=SWITCH, driver=stratum-bmv2:org.onosproject.ngsdn-tutorial
id=device:leaf2, available=true, role=MASTER, type=SWITCH, driver=stratum-bmv2:org.onosproject.ngsdn-tutorial
id=device:spine1, available=true, role=MASTER, type=SWITCH, driver=stratum-bmv2:org.onosproject.ngsdn-tutorial
id=device:spine2, available=true, role=MASTER, type=SWITCH, driver=stratum-bmv2:org.onosproject.ngsdn-tutorial
Extra activities?
Hi!
For further study, I have to create my own topo.
First I want to create a simple demo just looks like this:
So, I append some codes to the topo-v6.py
and netcfg.json
The result is that the mininet links cmd returns correctly,
but the topo showed by onos is wrong!
I've been stuck here for a long time and don't know what to do.
Hope to get your answers and help!!
Thank you very much!
when I type "make app-reload"in a terminal window,it display some mistakes:
*** Uninstalling app from ONOS (if present)...
curl --fail -sSL --user onos:rocks --noproxy localhost -X DELETE http://localhost:8181/onos/v1/applications/org.onosproject.ngsdn-tutorial
*** Installing and activating app in ONOS...
curl --fail -sSL --user onos:rocks --noproxy localhost -X POST -HContent-Type:application/octet-stream
'http://localhost:8181/onos/v1/applications?activate=true'
--data-binary @app/target/ngsdn-tutorial-1.0-SNAPSHOT.oar
{"name":"org.onosproject.ngsdn-tutorial","id":192,"version":"1.0.SNAPSHOT","category":"Traffic Steering","description":"Provides IPv6 routing capabilities to a leaf-spine network of P4 switches","readme":"Provides IPv6 routing capabilities to a leaf-spine network of P4 switches","origin":"p4.org","url":"http://www.onosproject.org","featuresRepo":"mvn:org.onosproject/ngsdn-tutorial/1.0-SNAPSHOT/xml/features","state":"ACTIVE","features":["ngsdn-tutorial"],"permissions":[],"requiredApps":["org.onosproject.drivers.bmv2","org.onosproject.lldpprovider","org.onosproject.hostprovider"]}
Hi,
I see the following error when i call insert() on a table_enrty object created on p4runtime shell in advanced branch. Any help in this regard is much appreciated.
Please look at the following logs
P4Runtime sh >>> te = table_entry["IngressPipeImpl.l2_exact_table"](action = "IngressPipeImpl.set_egress_port")
P4Runtime sh >>> te.match["hdr.ethernet.dst_addr"] = ("00:00:00:00:00:1B")
field_id: 1
exact {
value: "\033"
}
P4Runtime sh >>> te.action["port_num"] = ("4")
param_id: 1
value: "\004"
P4Runtime sh >>> te
Out[4]:
table_id: 33605373 ("IngressPipeImpl.l2_exact_table")
match {
field_id: 1 ("hdr.ethernet.dst_addr")
exact {
value: "\x1b"
}
}
action {
action {
action_id: 16812802 ("IngressPipeImpl.set_egress_port")
params {
param_id: 1 ("port_num")
value: "\x04"
}
}
}
P4RuntimeWriteException Traceback (most recent call last)
in
----> 1 te.insert() --verbose
/p4runtime-sh/venv/lib/python3.8/site-packages/p4runtime_shell-0.0.2-py3.8.egg/p4runtime_sh/shell.py in insert(self)
680 raise NotImplementedError("Insert not supported for {}".format(self._entity_type.name))
681 logging.debug("Inserting entry")
--> 682 self._write(p4runtime_pb2.Update.INSERT)
683
684 def delete(self):
/p4runtime-sh/venv/lib/python3.8/site-packages/p4runtime_shell-0.0.2-py3.8.egg/p4runtime_sh/shell.py in write(self, type)
674 update.type = type_
675 getattr(update.entity, self._entity_type.name).CopyFrom(self._entry)
--> 676 client.write_update(update)
677
678 def insert(self):
/p4runtime-sh/venv/lib/python3.8/site-packages/p4runtime_shell-0.0.2-py3.8.egg/p4runtime_sh/p4runtime.py in handle(*args, **kwargs)
121 if e.code() != grpc.StatusCode.UNKNOWN:
122 raise e
--> 123 raise P4RuntimeWriteException(e) from None
124 return handle
125
P4RuntimeWriteException: Error(s) during Write:
* At index 0: INVALID_ARGUMENT, 'Invalid bytestring format'
P4Runtime sh >>>
Thank you for your help in advance.
Exercise 2 has a section with this comment:
These models have already been loaded into the yang-tools container in the /models directory.
I'm not sure that the models have been included in the docker container version. Examining the Makefile shows that only a single file is mounted in the /models directory. See:
yang-tools:
docker run --rm -it -v ${curr_dir}/yang/demo-port.yang:/models/demo-port.yang ${YANG_IMG}
This makes the subsequent command in the tutorial fail.
Hi, when running the command make netcfg
in the third exercise the log of ONOS shows many errors that say "Failed to register port" and "Failed to register bandwidth". I haven't modified any file and just followed the instructions. After running netcfg in the ONOS cli I can see the network.
Apparently, first everything goes well and the devices are registered, but then these errors appear.
What could be the cause?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.