P4 Developer Day Spring 2019
Advanced Track��Building an SRv6-enabled fabric
with P4 and ONOS
These slides:
http://bit.ly/onos-p4-srv6
Exercises and VM:�http://bit.ly/onos-p4-srv6-repo
Copyright © 2018 - Open Networking Foundation
Instructors
Yi Tseng 曾毅�ONF
Brian O’Connor�ONF
Carmelo Cascone�ONF
Copyright © 2018 - Open Networking Foundation
Before we start...
Copyright © 2018 - Open Networking Foundation
Why SDN?
All of the exercises could be completed with a traditional, embedded control plane, but SDN:
Copyright © 2018 - Open Networking Foundation
Why SRv6?
SRv6 is a good example of an up and coming protocol that is easy to implement quickly and iterate on in P4.
Copyright © 2018 - Open Networking Foundation
Goal of this session
ONOS
Your P4 program
Your App
P4 switch
P4Runtime
Runtime control
SDN control plane
SDN apps
Copyright © 2018 - Open Networking Foundation
Exercise 1: Packet I/O
Goal: Enable the control plane to do link and host discovery
Exercise: Add support for packet-ins from the switch to the control plane and packet-outs from the control plane to the switch
ONOS (Control Plane)
switch
Copyright © 2018 - Open Networking Foundation
Exercise 2: Bridging
Goal: Enable hosts on the same IPv6 subnet that are connected to the same switch (leaf) to send and receive Ethernet frames to each other
Exercise: Add support for Ethernet bridging in the P4 program, then populate bridging entries using the control plane
h1a
h1b
leaf1
h1c
Copyright © 2018 - Open Networking Foundation
Exercise 3: Routing
Goal: Enable hosts connected to different leaves in the leaf-spine topology to send IPv6 packets to each other using multiple paths
Exercise: Add support for IPv6 routing to the P4 program, then insert static ECMP-based routing rules using static routes from the topology
leaf1
leaf2
spine1
spine2
Copyright © 2018 - Open Networking Foundation
Exercise 4: Segment Routing
Goal: Steer traffic between hosts to use a specific path that is defined at the source node using an SRv6 policy
Exercise: Add support for part of the SRv6 draft standard, then insert SRv6 policies using the ONOS CLI
h2
leaf1
leaf2
spine1
spine2
h4
Copyright © 2018 - Open Networking Foundation
Tutorial Topology
h1a
MAC: 00:00:00:00:00:1a
IP: 2001:1:1::a/64
ONOS (Control Plane)
spine1
MAC: 00:bb:00:00:00:00:01
SID: 3:201:2::
spine1
MAC: 00:bb:00:00:00:00:02
SID: 3:202:2::
leaf1
MAC: 00:aa:00:00:00:00:01
SID: 3:101:2::
leaf2
MAC: 00:aa:00:00:00:00:01
SID: 3:102:2::
h1b
MAC: ...:00:1b
IP: 2001:1:1::b/64
h1c
MAC: ...:00:1c
IP: 2001:1:1::c/64
h2
MAC: 00:00:00:00:00:20
IP: 2001:1:2::1/64
h3
MAC: 00:00:00:00:00:30
IP: 2001:2:3::1/64
h4
MAC: 00:00:00:00:00:40
IP: 2001:2:4::1/64
IPv6 Gateway Addresses on leaf interfaces are in the same subnet as the host with address ending with …::ff
Copyright © 2018 - Open Networking Foundation
Software tools introduction
Copyright © 2018 - Open Networking Foundation
Next:
Copyright © 2018 - Open Networking Foundation
P4Runtime�Runtime control API for P4-defined data planes
Copyright © 2018 - Open Networking Foundation
P4Runtime v1.0
Copyright © 2018 - Open Networking Foundation
P4Runtime overview
16
P4Runtime client�(ONOS)
p4runtime.proto (API)
P4Runtime server
(e.g. Stratum)
Target driver
P4 target
Copyright © 2018 - Open Networking Foundation
P4Runtime main features
Copyright © 2018 - Open Networking Foundation
P4 compiler workflow
P4 compiler generates 2 outputs:
18
test.p4
test.json
P4Runtime client
p4runtime.proto
P4Runtime server
Target driver
BMv2 simple_switch
p4c-bm2-ss�(compiler)
test.p4info
Full P4Info protobuf specification:
https://github.com/p4lang/p4runtime/blob/master/proto/p4/config/v1/p4info.proto
Copyright © 2018 - Open Networking Foundation
P4Info example
19
...
action ipv4_forward(bit<48> dstAddr,
bit<9> port) {
eth.dstAddr = dstAddr;
metadata.egress_spec = port;
ipv4.ttl = ipv4.ttl - 1;
}
...
�table ipv4_lpm {
key = {
hdr.ipv4.dstAddr: lpm;
}
actions = {
ipv4_forward;
...
}
...
}
basic_router.p4
actions {
id: 16786453
name: "ipv4_forward"
params {
id: 1
name: "dstAddr"
bitwidth: 48
...
id: 2
name: "port"
bitwidth: 9
}
}
...
tables {
id: 33581985
name: "ipv4_lpm"
match_fields {
id: 1
name: "hdr.ipv4.dstAddr"
bitwidth: 32
match_type: LPM
}
action_ref_id: 16786453
}
basic_router.p4info
P4 compiler
Copyright © 2018 - Open Networking Foundation
P4Runtime table entry WriteRequest example
20
device_id: 1
election_id { … }
updates {
type: INSERT
entity {
table_entry {
table_id: 33581985
match {
field_id: 1
lpm {
value: "\n\000\001\001"
prefix_len: 32
}
}
action {
action_id: 16786453
params {
param_id: 1
value: "\000\000\000\000\000\n"
}
params {
param_id: 2
value: "\000\007"
…
action ipv4_forward(bit<48> dstAddr,
bit<9> port) {
/* Action implementation */
}�table ipv4_lpm {
key = {
hdr.ipv4.dstAddr: lpm;
}
actions = {
ipv4_forward;
...
}
...
}
hdr.ipv4.dstAddr=10.0.1.1/32� -> ipv4_forward(00:00:00:00:00:10, 7)
basic_router.p4
Logical view of table entry
WriteRequest message (protobuf text format)
Control plane�generates
Copyright © 2018 - Open Networking Foundation
Stratum
Production-grade reference implementation of P4Runtime server
Copyright © 2018 - Open Networking Foundation
Stratum overview
Multi-vendor switch implementation of 3 open APIs
Copyright © 2018 - Open Networking Foundation
Stratum architecture with HW switches
kernel
hardware
user
Common (HW agnostic)
Chip specific
Platform specific
Chip and Platform specific
P4Runtime
gNMI
gNOI
Switch Broker Interface
Table Manager
Node/Chip Manager
Chassis Manager
Chip Abstraction Managers
Platform Manager
Remote or Local Controller(s)
Switch SDK
Platform API
Switch Chip Drivers
Platform Drivers
Switch Chip(s)
Peripheral(s)
p4lang/PI and fpm-based implementations
Stratum switch agent
ONLP
Copyright © 2019 - Open Networking Foundation
Stratum-BMv2
kernel
user
Common (HW agnostic)
Chip specific
Platform specific
Chip and Platform specific
P4Runtime
gNMI
gNOI
Switch Broker Interface
Table Manager
Node/Chip Manager
Chassis Manager
Chip Abstraction Managers
Platform Manager
Remote or Local Controller(s)
BMv2 simple_switch
p4lang/PI
Stratum switch agent
veth
veth
veth
...
Copyright © 2019 - Open Networking Foundation
ONOS
A control plane for P4Runtime devices
Copyright © 2018 - Open Networking Foundation
What is ONOS?
26
Copyright © 2018 - Open Networking Foundation
ONOS releases
4-month release cycles
Avocet (1.0.0) 2014-12
…
Loon (1.11.0) 2017-08 (Initial P4Runtime support)
…
Raven (2.1.0) 2019-04 (latest release - used today)
27
Copyright © 2018 - Open Networking Foundation
ONOS architecture
28
OpenFlow
gNMI
P4Runtime
...more
OVS
BMv2
Barefoot
Cavium
Mellanox
Ciena
Cisco
Corsa
Fujitsu
HP
Huawei
Juniper
Lumentum
Microsemi
Polatis
...
FlowRule API
Topology API
FlowObjective API
Intent API
Packet API
...
Distributed core
State management, notifications, high-availability & scale-out
Northbound API
Device/protocol-agnostic
Java, REST, CLI, gRPC
Device driver
Allow device-specific variants of standard protocols
Shared protocol libraries
Apps
Apps
Apps
Control and configure the network
using a global topology view�and independently of the device-specific details
Copyright © 2018 - Open Networking Foundation
Network programming API
29
OpenFlow
P4Runtime
Netconf
...
Flow Rule
OF-DPA Pipeline
Single Table Pipeline
P4 Program
Defined Pipeline
Flow Objective
Host-Host
Single-Point to Multi-point
Protected
Intent
Intent
Abstract
to
concrete
Mapping through drivers
Copyright © 2018 - Open Networking Foundation
Flow objective example
30
BRCM OF-DPA OpenFlow 1.3 Pipeline
HP OpenFlow 1.3 Pipeline
Peering Router
Match on Switch port, MAC address, VLAN, IP
FlowObjective Service
HP Pipeliner
BRCM OF-DPA Pipeliner
Copyright © 2018 - Open Networking Foundation
Driver behaviors in ONOS
31
Driver 1
P4Runtime
App
ONOS
Driver 2
OpenFlow
Copyright © 2018 - Open Networking Foundation
ONOS key takeaways
32
Copyright © 2018 - Open Networking Foundation
P4 and P4Runtime support in ONOS
Copyright © 2018 - Open Networking Foundation
P4 and P4Runtime support in ONOS
ONOS originally designed to work with OpenFlow and fixed-function switches.
Extended it to:
Copyright © 2018 - Open Networking Foundation
Pipeconf - Bring your own pipeline!
35
pipeconf.oar
Copyright © 2018 - Open Networking Foundation
Pipeconf support in ONOS
36
Pipeline-agnostic�app
Stratum
Pipeline-specific�FlowRules, Groups, Meters, etc
Translation services�Uses pipeconf’s pipeline drivers
Protocol
Core
Events�(packet, topology, etc.)
P4Runtime
Pipeline-aware�app
Pipeconf Store
Pipeconf
(.oar)
FlowObjectives
gRPC
ONOS
Device drivers
stratum-tofino
stratum-bmv2
gNMI
gNOI
Copyright © 2018 - Open Networking Foundation
Device discovery and pipeconf deploy
37
Device Provider
Pipeconf Service
Device Handshaker
ONOS core
Device/protocol driver
Pipeconf
Pipeline Programmable
my-pipeconf.oar
Extensions:
BMV2_JSON
P4INFO
REGISTER
1
Get pipeconf
Bind pipeconf+device driver
DeviceID: bmv2:1
Management address
- grpc://192.168.56.1:5001
Pipeconf: my-pipeconf
Driver: stratum-bmv2
PUSH
netcfg.json
2
ONOS
Device bmv2:1
Connect device
Open connection to gRPC server
3
Deploy pipeconf
SetPipelineConfig
4
Copyright © 2018 - Open Networking Foundation
Flow operations
38
Flow Rule
Translation Serv.
P4Runtime Client
Pipeliner
Pipeline-agnostic�App
Flow Objective API
P4Runtime Flow Rule Behaviour
Pipeconf-based 3 phase translation:�
1. Flow Objective → Flow Rule
2. Flow Rule → Table entry
3. Table Entry → P4Runtime message
Flow Rules�(many)
Table Entry
Pipeline Interpreter
ONOS Core
Device/protocol driver
Pipeconf driver
Pipeline-aware App
Flow Rule API
Flow Objective
P4Runtime protobuf messages
P4Info
Define flow rules using same headers/action names as in the P4 program. E.g match on “hdr.my_protocol.my_field”
Copyright © 2018 - Open Networking Foundation
P4Runtime support in ONOS 2.1.0 (Raven)
39
P4Runtime control entity | ONOS API |
Table entry | Flow Rule Service, Flow Objective Service Intent Service |
Packet-in/out | Packet Service |
Action profile group/members, PRE multicast groups, clone sessions | Group Service |
Meter | Meter Service (indirect meters only) |
Counters | Flow Rule Service (direct counters) P4Runtime Client (indirect counters) |
Pipeline Config | Pipeconf |
Unsupported features - community help needed!�Parser value sets, registers, digests
Copyright © 2018 - Open Networking Foundation
ONOS+P4 workflow recap
40
Copyright © 2018 - Open Networking Foundation
Packet Test Framework (PTF)
Copyright © 2018 - Open Networking Foundation
PTF overview
PTF-based test
P4Runtime
Bmv2.json, P4Info
Table entries
Produce input (packet)
Verifies output
Stratum
BMv2 simple_switch
veth
veth
veth
veth
Copyright © 2018 - Open Networking Foundation
Exercise 1
Copyright © 2018 - Open Networking Foundation
Environment overview
ONOS
single instance
LLDP Provider�(link discovery)
Host Provider�(host discovery)
SRv6�App
SRv6�Pipeconf
REGISTER
Mininet script
topo.py
BMv2’s simple_switch_target
BMv2’s simple_switch_target
stratum_bmv2
BMv2/Stratum Driver
P4Runtime, gNMI
netcfg.json
Pipeline-agnostic apps�use FlowObjective API
Pipeline-aware app�use FlowRule API
IPv6 hosts�(Linux net namespace)
IPv6 hosts�(Linux net namespace)
IPv6 hosts�(Linux net namespace)
Copyright © 2018 - Open Networking Foundation
LLDP Provider App
Copyright © 2018 - Open Networking Foundation
Host Provider App
Copyright © 2018 - Open Networking Foundation
SRv6 pipeconf
Copyright © 2018 - Open Networking Foundation
netcfg.json (devices)
{
"devices": {
"device:leaf1": {
"basic": {
"managementAddress": "grpc://127.0.0.1:50001?device_id=1",
"driver": "stratum-bmv2",
"pipeconf": "org.p4.srv6-tutorial"
},
"srv6DeviceConfig": {
"myStationMac": "00:aa:00:00:00:01",
"mySid": "3:101:2::",
"isSpine": false
}
},
...
Copyright © 2018 - Open Networking Foundation
ONOS terminology
Copyright © 2018 - Open Networking Foundation
Exercise 1: Software tools basics and packet I/O
Goal: Enable ONOS to do link and host discovery using built-in apps
Exercise:
Copyright © 2018 - Open Networking Foundation
Exercise 1: Get Started
Open:
~/tutorial/README.md
~/tutorial/EXERCISE-1.md
Or use GitHub markdown preview:
http://bit.ly/onos-p4-srv6-repo
Solution:
~/tutorial/solution
You can work on your own using the instructions.�Ask for instructors help when needed.
Slides: http://bit.ly/onos-p4-srv6
Update tutorial repo�(requires Internet access)
cd ~/tutorial
git pull origin master
make onos-upgrade
make app-build
P4 language cheat sheet:
http://bit.ly/p4-cs
Copyright © 2018 - Open Networking Foundation
Exercise 2 - Bridging
Copyright © 2018 - Open Networking Foundation
Exercise 2: Overview
Add basic L2 bridging functionality to leaf switches
Copyright © 2018 - Open Networking Foundation
Exercise topology overview
h1a
h1b
h1c
ONOS
leaf1
Copyright © 2018 - Open Networking Foundation
Host discovery (NDP NS)
h1a
h1b
h1c
leaf1
Multicast replication + CPU clone session
NDP NS message
(e.g. who has h1b MAC addr)
ONOS
Learn h1a
Insert L2 unicast entry for h1a
2
1
3
Copyright © 2018 - Open Networking Foundation
Host discovery (NDP NA)
h1a
h1b
h1c
leaf1
Unicast forwarding + clone session
NDP NA message
(e.g. h1b is at 00:00:...)
ONOS
Insert L2 unicast entry for h1b
1
2
3
Copyright © 2018 - Open Networking Foundation
Unicast forwarding
h1a
h1b
h1c
leaf1
Unicast forwarding
Unicast ethernet frame
ONOS
Copyright © 2018 - Open Networking Foundation
Exercise 2 Goal
Copyright © 2018 - Open Networking Foundation
Exercise 2: Get Started
Open:
~/tutorial/EXERCISE-2.md
Or use GitHub markdown preview:
http://bit.ly/onos-p4-srv6-repo
Solution:
~/tutorial/solution
Extra Credit Ideas:
You can work on your own using the instructions.�Ask for instructors help when needed.
Slides: http://bit.ly/onos-p4-srv6
Update tutorial repo�(requires Internet access)
cd ~/tutorial
git pull origin master
make onos-upgrade
make app-build
P4 language cheat sheet:
http://bit.ly/p4-cs
Copyright © 2018 - Open Networking Foundation
Exercise 3 - IPv6 routing
Copyright © 2018 - Open Networking Foundation
Exercise 3: Overview
Make the topology behave like a standard IPv6 fabric.
Copyright © 2018 - Open Networking Foundation
IP unicast routing
Host 1
Router 1
Host 2
2001:1::/64
2001:3::/64
Packet
Eth Src: Host 1
Eth Dst: Router 1
IP Src: Host 1
IP Dst: Host 2
Router 2
Copyright © 2018 - Open Networking Foundation
IP unicast routing
Host 1
Router 1
Host 2
2001:1::/64
2001:3::/64
Router 2
Packet
Eth Src: Router 1
Eth Dst: Router 2
IP Src: Host 1
IP DSt: Host 2
Copyright © 2018 - Open Networking Foundation
IP unicast routing
Host 1
Router 1
Host 2
2001:1::/64
2001:3::/64
Packet
Eth Src: Router 2
Eth Dst: Host 2
IP Src: Host 1
IP DSt: Host 2
Router 2
Copyright © 2018 - Open Networking Foundation
Neighbor Discovery Protocol
Host 1
Router 1
2001:1::ff/64
2001:1::1a/64
Default gateway is 2001:1:ff
Copyright © 2018 - Open Networking Foundation
Neighbor Discovery Protocol
Host 1
Router 1
2001:1::ff/64
2001:1::1a/64
Router/Neighbor Solicitation
Who has MAC of 2001:1::ff?
NDP
Copyright © 2018 - Open Networking Foundation
Neighbor Discovery Protocol
Host 1
Router 1
2001:1::ff/64
2001:1::1a/64
Router/Neighbor Advertisement
2001:1::ff is at 00:c0:ff:ee:00
NDP
Generated by the P4 program!
Copyright © 2018 - Open Networking Foundation
Same-leaf routing
h1a
h1b
h1c
h2
h3
h4
leaf1
leaf2
spine1
spine2
2001:1:1::/64
2001:1:2::/64
2001:2:3::/64
2001:2:4::/64
Copyright © 2018 - Open Networking Foundation
Same-leaf routing
h1a
h1b
h1c
h2
h3
h4
leaf1
leaf2
spine1
spine2
2001:1:1::/64
2001:1:2::ff
2001:2:3::/64
2001:2:4::/64
IP unicast on same leaf
Copyright © 2018 - Open Networking Foundation
ECMP
h1a
h1b
h1c
h2
h3
h4
leaf1
leaf2
spine1
spine2
2001:1:1::/64
2001:1:2::/64
2001:2:3::/64
2001:2:4::/64
Route to other leaves via ECMP
Copyright © 2018 - Open Networking Foundation
Exercise 3: Overview
Add tables to P4 program to handle routing of IPv6 packets
Use P4 action selector groups to provide ECMP
Use PTF to verify your P4 code
Modify the ONOS IPv6 routing app
Test on Mininet
Copyright © 2018 - Open Networking Foundation
Exercise 3: Get Started
Open:
~/tutorial/EXERCISE-3.md
Or use GitHub markdown preview:
http://bit.ly/onos-p4-srv6-repo
Solution:
~/tutorial/solution
Extra Credit:
You can work on your own using the instructions.�Ask for instructors help when needed.
Slides: http://bit.ly/onos-p4-srv6
Update tutorial repo�(requires Internet access)
cd ~/tutorial
git pull origin master
make onos-upgrade
make app-build
P4 language cheat sheet:
http://bit.ly/p4-cs
Copyright © 2018 - Open Networking Foundation
Exercise 4: Segment Routing v6
Copyright © 2018 - Open Networking Foundation
Segment Routing Primer
Typically, MPLS labels are used to define segments, and the source routing policy is encoded as an MPLS label stack for each packet.
Copyright © 2018 - Open Networking Foundation
SRv6: What and Why?
SRv6 packets use IPv6 routing tables to forward packets to the next segment, which means there isn’t another forwarding database (as is the case for MPLS) and non-SRv6 aware switches can participate in traffic forwarding (between segments).
Copyright © 2018 - Open Networking Foundation
SRv6 Segment Identifier (SID)
Locator: used to route packet to the endpoint (waypoint)
Function ID: specifies type of processing to be performed by the endpoint
Function Args: (optionally) specified parameters to be interpreted by the function (e.g. VRF ID, customer ID, QoS policy)
The network operator can determine the bit-length for each of these fields in the SID.
Locator
Function ID
Function Args
Copyright © 2018 - Open Networking Foundation
SRv6-aware Nodes
Copyright © 2018 - Open Networking Foundation
Sending a ping from one host to another
Switch 1
C:1::
Source Host
A::
Switch 2
C:2::
Switch 4
C:4::
Destination Host
B::
Next Header: ICMPv6 (58)
Hop Limit: 64
Source: A::
Destination: B::
IPv6 Header
Switch 3
No SID
Copyright © 2018 - Open Networking Foundation
Switch 1 inserts SRv6 policy (T.Insert)
Source Host
A::
Next Header: Routing (43)
Hop Limit: 63
Source: A::
Destination: C:2:F::
Next Header: ICMPv6 (58)
Type: Segment Routing (4)
Segments Left: 2
Last Entry: 2
Segments[0]: B::
Segments[1]: C:4:F::
Segments[2]: C:2:F::
IPv6 Header
SRv6 Header
Destination Host
B::
Switch 1
C:1::
Switch 2
C:2::
Switch 4
C:4::
Switch 3
No SID
SRv6 Policy: Send traffic to B:: through C:2:: (function F) and then C:4:: (function F)
Copyright © 2018 - Open Networking Foundation
Switch 2 performs End function
Source Host
A::
Next Header: Routing (43)
Hop Limit: 62
Source: A::
Destination: C:4:F::
Next Header: ICMPv6 (58)
Type: Segment Routing (4)
Segments Left: 1
Last Entry: 2
Segments[0]: B::
Segments[1]: C:4:F::
Segments[2]: C:2:F::
IPv6 Header
SRv6 Header
Destination Host
B::
Switch 1
C:1::
Switch 2
C:2::
Switch 4
C:4::
Switch 3
No SID
Switch 2 (C:2::, function F) modifies the SRv6 and IPv6 headers, and then forwards the packet
Copyright © 2018 - Open Networking Foundation
Switch 3 forwards packet normally
Source Host
A::
Next Header: Routing (43)
Hop Limit: 61
Source: A::
Destination: C:4:F::
Next Header: ICMPv6 (58)
Type: Segment Routing (4)
Segments Left: 1
Last Entry: 2
Segments[0]: B::
Segments[1]: C:4:F::
Segments[2]: C:2:F::
IPv6 Header
SRv6 Header
Destination Host
B::
Switch 1
C:1::
Switch 2
C:2::
Switch 4
C:4::
Switch 3
No SID
Switch 3 simply forwards the packet
Copyright © 2018 - Open Networking Foundation
Switch 4 performs End function with PSP
Switch 1
C:1::
Source Host
A::
Switch 2
C:2::
Switch 4
C:4::
Destination Host
B::
Next Header: ICMPv6 (58)
Hop Limit: 60
Source: A::
Destination: B::
IPv6 Header
Switch 3
No SID
SRv6 Header Removed
Switch 4 (C:4::, function F) modifies the SRv6 and IPv6 headers, pops the SRv6 header, and then forwards the packet
Copyright © 2018 - Open Networking Foundation
Tutorial Topology
h1a
MAC: 00:00:00:00:00:1a
IP: 2001:1:1::a/64
ONOS (Control Plane)
spine1
MAC: 00:bb:00:00:00:00:01
SID: 3:201:2::
spine1
MAC: 00:bb:00:00:00:00:02
SID: 3:202:2::
leaf1
MAC: 00:aa:00:00:00:00:01
SID: 3:101:2::
leaf2
MAC: 00:aa:00:00:00:00:01
SID: 3:102:2::
h1b
MAC: ...:00:1b
IP: 2001:1:1::b/64
h1c
MAC: ...:00:1c
IP: 2001:1:1::c/64
h2
MAC: 00:00:00:00:00:20
IP: 2001:1:2::1/64
h3
MAC: 00:00:00:00:00:30
IP: 2001:2:3::1/64
h4
MAC: 00:00:00:00:00:40
IP: 2001:2:4::1/64
IPv6 Gateway Addresses on leaf interfaces are in the same subnet as the host with address ending with …::ff
Copyright © 2018 - Open Networking Foundation
Exercise 4: Overview
Add support for SRv6 endpoint and transit functionality in the P4 program
Populate the endpoint (srv6_my_sid) table with an entry that matches the switch’s SID
Complete the function that creates SRv6 policy rules in the transit table so that you can insert new policies using the ONOS CLI
Verify that traffic is being forwarded via the SRv6 policy using the ONOS UI and Wireshark
Copyright © 2018 - Open Networking Foundation
Exercise 4: Get Started
Open:
~/tutorial/EXERCISE-4.md
Or use GitHub markdown preview:
http://bit.ly/onos-p4-srv6-repo
Solution:
~/tutorial/solution
You can work on your own using the instructions.�Ask for instructors help when needed.
Slides: http://bit.ly/onos-p4-srv6
Update tutorial repo�(requires Internet access)
cd ~/tutorial
git pull origin master
make onos-upgrade
make app-build
P4 language cheat sheet:
http://bit.ly/p4-cs
Copyright © 2018 - Open Networking Foundation
Summary
What we did:
Have ideas about improving / extending the tutorial?
Send pull requests!
Copyright © 2018 - Open Networking Foundation