Giter Site home page Giter Site logo

p4-srv6's Introduction

IPv6 Segment Routing SRv6

SRv6 is a network architecture that encodes a list of instructions in the IPv6 packet header to define a network wide packet processing program.
Each instruction defines a node to process the packet and the behavior to be applied to that packet by that node.
The SRv6 network programming framework is being defined in IETF.

Implementation

In the project we provide an open source data plane of SRv6 in P4. We Leverage the Open Network Operating System (ONOS) for the control plane.
We augmented ONOS implementation with the necessary extensions to support SRv6.

This work is done as part of the Research on Open SRv6 Ecosystem (ROSE) project.

This work is based on the P4 tutorial by the Open Networking Foundation. For more information about the above listed software modules you can visit the Open Networking Foundation original repository.

There you can also find useful material like the slides explaining the tutorial and a prepared Ubuntu virtual machine with all the software installed. It is strongly recommended to download the prepared VM and run the DEMO inside it, as it contains the several dependencies needed to run the software.

Repository structure

This repository is structured as follows:

  • app/ ONOS app Java implementation
  • config/ configuration files
  • mininet/ Mininet script to emulate a topology of stratum_bmv2 devices
  • p4src/ P4 implementation
  • test/ test packets
  • utils/ utilities include docker file

Usage

TBD

p4-srv6's People

Contributors

ahsalam avatar angelotulumello avatar microsiddemo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

p4-srv6's Issues

Routing Tables Setup Fails

When running "onos-cli> source /config/routing_tables.txt" all commands inside the file fail with the same warning.

An example:
"route-insert device:r1 2001:1:1::1 128 00:00:00:00:00:10" created log =>

onos | 16:46:41.439 WARN [WriteResponseImpl] Unable to INSERT table entry on device:r1: OTHER_ERROR INVALID_ARGUMENT Cannot provide direct action for indirect table 33612857 (:3) [PiTableEntry{tableId=IngressPipeImpl.routing_v6, matchKey={hdr.ipv6.dst_addr=0x20010001000100000000000000000001/128}, tableAction=IngressPipeImpl.set_next_hop(next_hop=0x10), priority=N/A, timeout=PERMANENT}]

end function on last host with inline srv6 option

Hi,

I have four hosts with a srv6 inline route.
Host 1 (RAN) -> ip -6 route add fc00::4 encap seg6 mode inline segs fcf0:12::100,fcf0:23::6006 dev enp0s8
Host 2 (NVF1) -> ip -6 route add fcf0:12::100 encap seg6local action End dev enp0s8
Host 3 (NVF2) -> ip -6 route add fcf0:23::6006 encap seg6local action End dev enp0s8
Host 4 (UPF) -> ip -6 route add fc00::4 encap seg6local action ???

If i ping host 4 from host 1, this packet pass through host 2 and 3, and then stop at host 4 with segment left=0 and destination address = fc00::4, that is correct. But I dont know how to desencapsute this packet. .

Below, the complete settings.

#######################
host_1 (RAN)#####

#######################
ip link set dev lo up
ip -6 addr add fc00::1/64 dev enp0s8
ip link set dev enp0s8 up
ip -6 neigh add fc00::2 lladdr 00:00:00:00:00:02 nud permanent dev enp0s8
ip -6 neigh add fc00::3 lladdr 00:00:00:00:00:03 nud permanent dev enp0s8
ip -6 neigh add fc00::4 lladdr 00:00:00:00:00:04 nud permanent dev enp0s8
sudo sysctl -w net.ipv6.conf.all.seg6_require_hmac=-1
sudo sysctl -w net.ipv6.conf.all.accept_source_route=1
sudo sysctl -w net.ipv6.conf.all.forwarding=1
sudo sysctl -w net.ipv6.conf.enp0s8.seg6_require_hmac=-1
sudo sysctl -w net.ipv6.conf.enp0s8.seg6_enabled=1
sudo sysctl -p

ip -6 route add fcf0:12::100 via fc00::2
ip -6 route add fc00::4 encap seg6 mode inline segs fcf0:12::100,fcf0:23::6006 dev enp0s8

##################
host_2

##################
ip link set dev lo up
ip -6 addr add fc00::2/64 dev enp0s8
ip link set dev enp0s8 up
ip -6 neigh add fc00::1 lladdr 00:00:00:00:00:01 nud permanent dev enp0s8
ip -6 neigh add fc00::3 lladdr 00:00:00:00:00:03 nud permanent dev enp0s8
ip -6 neigh add fc00::4 lladdr 00:00:00:00:00:04 nud permanent dev enp0s8
sudo sysctl -w net.ipv6.conf.all.seg6_require_hmac=-1
sudo sysctl -w net.ipv6.conf.all.accept_source_route=1
sudo sysctl -w net.ipv6.conf.all.forwarding=1
sudo sysctl -w net.ipv6.conf.enp0s8.seg6_require_hmac=-1
sudo sysctl -w net.ipv6.conf.enp0s8.seg6_enabled=1
sudo sysctl -p
ip -6 route add fcf0:23::6006 via fc00::3
ip -6 route add fcf0:12::100 encap seg6local action End dev enp0s8

##################
host_3

##################
ip link set dev lo up
ip -6 addr add fc00::3/64 dev enp0s8
ip link set dev enp0s8 up
ip -6 neigh add fc00::1 lladdr 00:00:00:00:00:01 nud permanent dev enp0s8
ip -6 neigh add fc00::2 lladdr 00:00:00:00:00:02 nud permanent dev enp0s8
ip -6 neigh add fc00::4 lladdr 00:00:00:00:00:04 nud permanent dev enp0s8
sudo sysctl -w net.ipv6.conf.all.seg6_require_hmac=-1
sudo sysctl -w net.ipv6.conf.all.accept_source_route=1
sudo sysctl -w net.ipv6.conf.all.forwarding=1
sudo sysctl -w net.ipv6.conf.enp0s8.seg6_require_hmac=-1
sudo sysctl -w net.ipv6.conf.enp0s8.seg6_enabled=1
sudo sysctl -p
ip -6 route add fcf0:23::6006 encap seg6local action End dev enp0s8
ip6tables -t mangle -A POSTROUTING -p icmpv6 --icmpv6-type redirect -j DROP

##################
host_4

##################
ip link set dev lo up
ip -6 addr add fc00::4/64 dev enp0s8
ip link set dev enp0s8 up
ip -6 neigh add fc00::1 lladdr 00:00:00:00:00:01 nud permanent dev enp0s8
ip -6 neigh add fc00::2 lladdr 00:00:00:00:00:02 nud permanent dev enp0s8
ip -6 neigh add fc00::3 lladdr 00:00:00:00:00:03 nud permanent dev enp0s8
sudo sysctl -w net.ipv6.conf.all.seg6_require_hmac=-1
sudo sysctl -w net.ipv6.conf.all.accept_source_route=1
sudo sysctl -w net.ipv6.conf.all.forwarding=1
sudo sysctl -w net.ipv6.conf.enp0s8.seg6_require_hmac=-1
sudo sysctl -w net.ipv6.conf.enp0s8.seg6_enabled=1
sudo sysctl -p

ip -6 route add fc00::4 encap seg6local action ???

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.