{"id":27390287,"url":"https://github.com/ailispaw/p4-barge","last_synced_at":"2026-04-30T09:34:59.809Z","repository":{"id":89119762,"uuid":"138219743","full_name":"ailispaw/p4-barge","owner":"ailispaw","description":"P4 Language Tutorials on Barge with Vagrant","archived":false,"fork":false,"pushed_at":"2018-06-23T02:41:33.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T19:51:49.294Z","etag":null,"topics":["barge","p4","vagrant","virtualbox"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ailispaw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-06-21T20:44:06.000Z","updated_at":"2018-10-18T19:26:15.000Z","dependencies_parsed_at":"2023-06-26T01:06:17.111Z","dependency_job_id":null,"html_url":"https://github.com/ailispaw/p4-barge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ailispaw/p4-barge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ailispaw%2Fp4-barge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ailispaw%2Fp4-barge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ailispaw%2Fp4-barge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ailispaw%2Fp4-barge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ailispaw","download_url":"https://codeload.github.com/ailispaw/p4-barge/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ailispaw%2Fp4-barge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32460781,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["barge","p4","vagrant","virtualbox"],"created_at":"2025-04-13T19:39:35.608Z","updated_at":"2026-04-30T09:34:59.801Z","avatar_url":"https://github.com/ailispaw.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# P4 Language Tutorials on Barge with Vagrant\n\nThis repo creates a [P4 Language Tutorials](https://github.com/p4lang/tutorials) Environment in a [Docker](https://www.docker.com/) container on [Barge](https://github.com/bargees/barge-os) with [Vagrant](https://www.vagrantup.com/) instantly.\n\n## Requirements\n\n- [VirtualBox](https://www.virtualbox.org/)\n- [Vagrant](https://www.vagrantup.com/)\n- [Docker Community Edition Client](https://www.docker.com/community-edition#download) (optional)\n\n## Start Up an Environment for the P4 Tutorials\n\n```\n$ vagrant up\n$ vagrant ssh\n[bargee@barge ~]$ docker run -it --rm --privileged -v /lib/modules:/lib/modules:ro -v /vagrant/tutorials:/home/p4/tutorials --name p4-tutorials --hostname p4-barge ailispaw/p4-tutorials:v2\np4@p4-barge:~$ \n```\n\n## Run a Tutorial\n\n```\np4@p4-barge:~$ cd tutorials/exercises/basic\np4@p4-barge:~/tutorials/exercises/basic$ make build\nmkdir -p build pcaps logs\np4c-bm2-ss --p4v 16 --p4runtime-file build/basic.p4info --p4runtime-format text -o build/basic.json basic.p4\np4@p4-barge:~/tutorials/exercises/basic$ make run\nmkdir -p build pcaps logs\nsudo python ../../utils/run_exercise.py -t topology.json -b simple_switch_grpc\nReading topology file.\nBuilding mininet topology.\nSwitch port mapping:\ns1:  1:h1 2:s2  3:s3\ns2:  1:h2 2:s1  3:s3\ns3:  1:h3 2:s1  3:s2\n.\n.\n.\n\nmininet\u003e \n```\n\n### To Login a Mininet Node\n\nBecause it doesn't have a GUI window, we can not use mininet's (g|x)term command.  \nYou can use the `./contrib/term.sh` script in another terminal instead.\n\n- Open another terminal.\n- Then,\n\n```\n$ vagrant ssh\n[bargee@barge ~]$ /vagrant/contrib/term.sh h1\nroot@\u003ch1\u003e:~# \n```\n\n- Or if you have Docker client in your local machine, you can log into the node directly.\n\n```\n$ ./contrib/term.sh h1\nroot@\u003ch1\u003e:~# ifconfig\nh1-eth0   Link encap:Ethernet  HWaddr 00:00:00:00:01:01\n          inet addr:10.0.1.1  Bcast:10.0.1.255  Mask:255.255.255.0\n          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1\n          RX packets:18 errors:0 dropped:0 overruns:0 frame:0\n          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0\n          collisions:0 txqueuelen:1000\n          RX bytes:1416 (1.4 KB)  TX bytes:90 (90.0 B)\n\nlo        Link encap:Local Loopback\n          inet addr:127.0.0.1  Mask:255.0.0.0\n          UP LOOPBACK RUNNING  MTU:65536  Metric:1\n          RX packets:0 errors:0 dropped:0 overruns:0 frame:0\n          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0\n          collisions:0 txqueuelen:1000\n          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Failispaw%2Fp4-barge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Failispaw%2Fp4-barge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Failispaw%2Fp4-barge/lists"}