SONiC: Software for Open Networking in the...

Post on 23-Jun-2020

0 views 0 download

Transcript of SONiC: Software for Open Networking in the...

SONiC: Software for Open Networking in the Cloud

Lihua Yuan

Microsoft Azure Network Team

for

the SONiC Community

SONiC Community @ OCP Mar 2018

SONiC [Software For Open Networking in the Cloud]

SAI [Switch Abstraction Interface]

Sil

ico

n/A

SIC

Sw

itch

Pla

tfo

rm

Ap

pli

cati

on

& M

an

ag

em

en

t

Microsoft Cloud Network - 15 Billion Dollar Bet

SONiC Is Powering Microsoft Cloud At Scale

T2-1-1 T2-1-2 T2-1-8

T3-1 T3-2 T3-3 T3-4

Tier 1 – Row Leaf

T2-4-1 T2-4-2 T2-4-4Tier 2 - Spine

T1-1 T1-8T1-7…

T1-2

… …

Tier 3 - Regional Spine

T1-1 T1-8T1-7…

T1-2 T1-1 T1-8T1-7…

T1-2

Tier 0 - Rack…

T0-1 T0-2 T0-20

Servers

…T0-1 T0-2 T0-20

…T0-1 T0-2 T0-20

SONIC SONIC SONIC SONIC SONIC SONIC SONIC SONIC SONIC SONIC SONIC SONIC

SONIC SONIC SONIC SONIC SONIC SONICSONIC SONIC SONIC

Servers Servers

Goals of SONiC

Faster

Technology

Evolution

Reduce

Operational

Burden

Open &

Modular

Software

Choices of Vendors & Platforms

Disaggregation with

SONiC

SONiC: Software for Open Networking in the Cloud

• Switch Abstraction Interface (SAI)• Cross-ASIC portability

• Modular Design with Switch State Service (SwSS)• Decoupling software components• Consistent application development model

• Containerization of SONiC• Serviceability• Cross-platform portability

• SONiC Operational Scenarios• Hitless upgrade• Network emulation with CrystalNet

مرحبا 你好Aloha

BonjourHola

Hello

Network Applications Simple, consistent, and

stable network

application stack

Helps consume the

underlying complex,

heterogeneous hardware

easily and faster

Switch Abstraction Interface (SAI)

Network Applications

Switch Abstraction Interface

Network Applications

नमस्ते

Switch Abstraction Interface

• CRUD operation over extensible Entity/Attribute/Value data model

• Reference data-plane behavior model supports various devices

• Significant feature/partner growth since announcement in 2015

• https://github.com/opencomputeproject/SAI

SAI Function Calls & Pipelines in SONiC

create_router_interface

create_neighbor

create_next_hop

get_switch_attributecreate_host_interface

create_route

Port PortRIF RIFRouteNext Hop

Neigh

create_router_interface

get_switch_attributecreate_host_interface

• Register SAI APIs to achieve specific functions and control logging separately• Construct the right order to execute SAI function calls• Refer to SAI Pipelines to create the right packet action flow

SONiC: Software for Open Networking in the Cloud

• Switch Abstraction Interface (SAI)• Cross-ASIC portability

• Modular Design with Switch State Service (SwSS)• Decoupling software components• Consistent application development model

• Containerization of SONiC• Serviceability• Cross-platform portability

• SONiC Operational Scenarios• Hitless upgrade• Network emulation with CrystalNet

SONiC High Level Architecture

Chassis Supplier

ASIC Supplier

Linux

OCP

Various

ASIC

Switch Hardware

TransceiverFan/Power/LED

Network Applications

ASIC SDK

SAI

Ker

nel

Use

r Sp

ace

Switch State Service

Network device drivers

netdevASIC PCI driver

HW Peripheral drivers

PAL - sysfs

Object Library

Linux

Switch State Service (SwSS)

APP DB

SAI DB Ob

ject

Lib

rary

w/

Red

isB

acke

nd

ASIC

SAI

Network Applications

SyncD

Orchestration Agent

SAI DB: persist SAI objects

App DB: persist App objects

DB backend: redis with object library

SyncD: sync SAI objects between software and hardware

Orchestration Agent: translation between apps and SAI objects, resolution of dependency and conflict

Key Goal: Evolve components independently

How SAI Objects are Stored in SAI Database

• APP DB:• Application oriented• Human readable

• SAI DB:• SAI oriented• Query-able and machine parse-able• Snapshot of the current SAI state

• APIs:• sai_create_api• sai_set_api• sai_get_api*• sai_remove_api

*Used only when querying ASIC settings and configurations

SAI DB

13

KEY SAI_OBJECT_TYPE:SAI_OBJECT_IDSAI_OBJECT_ATTR

SAI_OBJECT_ATTR

SAI_OBJECT_ATTR

VALUE

VALUE

VALUE

SAI_OBJECT_TYPE_NEXT_HOP:00000001SAI_NEXT_HOP_ATTR_IP

SAI_NEXT_HOP_ATTR_TYPE

10.0.0.1

SAI_NEXT_HOP_IP

SAI DB

How Routing Works in SONiC

APP DB

SAI DB

SyncD

Orchestration Agent

ASIC

Transceivers

Host Intfnetdev

BGP Neighbor

ZebraBGPd

socket

SAI Route

SAI Redis

fpmsyncd

APP DB

SAI DB

SyncD

Orchestration Agent

ASIC

Transceivers

Host Intfnetdev

LACP Neighbor

teamD

socket

SAI lag

How LAG Works in SONiC

teamDnetdev

SAI Redis

teamsyncd

SONiC Containerization

• TEAMD

• LLDP

• BGP: Quagga or FRR

• SNMP: Net-SNMP + SNMP subagent

• DHCP Relay: isc dhcp

• Platform: sensors

• SWSS: switch state service

• DB: Redis

• Syncd: sairedis + syncd agent

LLDP SNMP BGP

DHCP TEAMD

SYNCD SWSS

Utility Platform

SONiC Base Image

Database

SONiC Containerization

Container Strength

• Clean isolation

• Easy deployment

• Transactional

• Run universal

SONiC Benefits

• Serviceability

• Extensibility

• Development agility

• Cross-platform

SONiC Containerization

Routing

LLDP SNMP

DHCP TEAMD

SYNCD SWSS

Utility Platform

SONiC Base Image

Database

Quagga

FRR

GoBGP

Arista BGP

• Components developed in different environments

• Source code may not be available

• Enables choices on a per-component basis

Hitless Upgrade Through Docker

SPINE SPINE SPINE

LEAF

SONiC

TOR TOR TOR

Server:SWARM

……

……

1 2 16

1 2 16

• Cloud users demand zero-down time, but

• Security patches, bug fixes need to be rolled out in hours

• New features need to be rolled out in days

Before they fly the space shuttle ….

They practice all activities and test all equipment extensively in a high-fidelity simulators

25

SONiC Container Soft Switch

CrystalNet: A high-fidelity, cloud-scale network emulator

• Inviting contributions in all areas

• New ideas on white/open network devices

• New features, applications and tools

• Download it, Test, Deploy!

Website: https://azure.github.io/SONiC/

Mailing list: sonicproject@googlegroups.com

GitHub: https://github.com/Azure/SONiC

Wiki: https://github.com/Azure/SONiC/wiki/

Open Invitation