SONiC: Software for Open Networking in the...

25
SONiC: Software for Open Networking in the Cloud Lihua Yuan Microsoft Azure Network Team for the SONiC Community

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

Page 1: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

SONiC: Software for Open Networking in the Cloud

Lihua Yuan

Microsoft Azure Network Team

for

the SONiC Community

Page 2: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

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

Page 3: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

Microsoft Cloud Network - 15 Billion Dollar Bet

Page 4: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

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

Page 5: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

Goals of SONiC

Faster

Technology

Evolution

Reduce

Operational

Burden

Open &

Modular

Software

Choices of Vendors & Platforms

Disaggregation with

SONiC

Page 6: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

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

Page 7: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

مرحبا 你好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

नमस्ते

Page 8: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

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

Page 9: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

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

Page 10: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

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

Page 11: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

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

Page 12: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

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

Page 13: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

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

Page 14: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

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

Page 15: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

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

Page 16: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

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

Page 17: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

SONiC Containerization

Container Strength

• Clean isolation

• Easy deployment

• Transactional

• Run universal

SONiC Benefits

• Serviceability

• Extensibility

• Development agility

• Cross-platform

Page 18: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

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

Page 19: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

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

Page 20: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface
Page 21: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

Before they fly the space shuttle ….

Page 22: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

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

Page 23: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

25

SONiC Container Soft Switch

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

Page 24: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface

• 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: [email protected]

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

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

Open Invitation

Page 25: SONiC: Software for Open Networking in the Cloudzoo.cs.yale.edu/classes/cs434/cs434-2019-spring/readings/sonic-slid… · create_next_hop get_switch_attribute create_host_interface