Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
TrellisTutorialAnOpen-Source,White-Box,SDNBasedLeaf-SpineNetworkFabric
CharlesChanOpenNetworkingFoundation
TrellisMulti-purposeleaf-spinefabricdesignedforNFV
WhiteBoxHardware
OpenSourceSoftware
SDNBased
DualHoming
RoutingBridging
vRouter IPv6
VLAN L3DHCPRelay
andmore…
TrellisFeatures
MininetONOSQuagga
&BGP
DHCPServer
Prerequisite
DemoTopology
Q:Quagga,R:UpstreamRouter,D:DHCPServer
Q
R
D
of:226 of:227
of:204 of:205
h1 h2h3
rh1
10.0.2.1VLAN None
10.0.2.2VLAN 20 10.0.3.1
VLAN 30
10.0.1.1
10.0.1.2
10.0.3.253
10.0.99.210.0.99.1
10.0.2.254 10.0.2.254 10.0.3.25410.0.4.254
10.0.1.254
3 43
4 56
10.0.4.1VLAN None
h4
Device
{"devices" : {
"of:0000000000000204" : {“segmentrouting” : {
"name" : "s204","ipv4NodeSid" : 204,"ipv4Loopback" : "192.168.0.204","routerMac" : "00:00:00:00:02:04","isEdgeRouter" : true,"adjacencySids" : []
},"basic" : {
"name": "s204","driver" : "ofdpa-ovs”
}}
}
DataPathID(DPID)oftheswitch
Device
{"devices" : {
"of:0000000000000204" : {“segmentrouting” : {
"name" : "s204","ipv4NodeSid" : 204,"ipv4Loopback" : "192.168.0.204","routerMac" : "00:00:00:00:02:04","isEdgeRouter" : true,"adjacencySids" : []
},"basic" : {
"name": "s204","driver" : "ofdpa-ovs”
}}
}
Unused.Thisnamedoesn’treallymatter.Willbedeprecated.
Device
{"devices" : {
"of:0000000000000204" : {“segmentrouting” : {
"name" : "s204","ipv4NodeSid" : 204,"ipv4Loopback" : "192.168.0.204","routerMac" : "00:00:00:00:02:04","isEdgeRouter" : true,"adjacencySids" : []
},"basic" : {
"name": "s204","driver" : "ofdpa-ovs”
}}
}
SegmentID.Canbeanarbitraryvaluebutneedtobeuniqueinthesystem.AlsousedastheMPLSlabelwhendoingsegmentrouting.DonotusereservedMPLSlabels(i.e.<=16).
Device
{"devices" : {
"of:0000000000000204" : {“segmentrouting” : {
"name" : "s204","ipv4NodeSid" : 204,"ipv4Loopback" : "192.168.0.204","routerMac" : "00:00:00:00:02:04","isEdgeRouter" : true,"adjacencySids" : []
},"basic" : {
"name": "s204","driver" : "ofdpa-ovs”
}}
}
Loopbackaddressoftheswitch.Canbeanarbitraryvalue(e.g.themanagementIP)butneedtobeuniqueinthesystem.
Device
{"devices" : {
"of:0000000000000204" : {“segmentrouting” : {
"name" : "s204","ipv4NodeSid" : 204,"ipv4Loopback" : "192.168.0.204","routerMac" : "00:00:00:00:02:04","isEdgeRouter" : true,"adjacencySids" : []
},"basic" : {
"name": "s204","driver" : "ofdpa-ovs”
}}
}
UseforARPreplywhenhostARPsitsgateway.Canbeanarbitraryvalue(e.g.themanagementMAC)butneedtobeuniqueinthesystem.
Device
{"devices" : {
"of:0000000000000204" : {“segmentrouting” : {
"name" : "s204","ipv4NodeSid" : 204,"ipv4Loopback" : "192.168.0.204","routerMac" : "00:00:00:00:02:04","isEdgeRouter" : true,"adjacencySids" : []
},"basic" : {
"name": "s204","driver" : "ofdpa-ovs”
}}
}
Trueforleaves.Falseforspines.
Device
{"devices" : {
"of:0000000000000204" : {“segmentrouting” : {
"name" : "s204","ipv4NodeSid" : 204,"ipv4Loopback" : "192.168.0.204","routerMac" : "00:00:00:00:02:04","isEdgeRouter" : true,"adjacencySids" : []
},"basic" : {
"name": "s204","driver" : "ofdpa-ovs”
}}
}
Unused.Willbedeprecated.
Device
{"devices" : {
"of:0000000000000204" : {“segmentrouting” : {
"name" : "s204","ipv4NodeSid" : 204,"ipv4Loopback" : "192.168.0.204","routerMac" : "00:00:00:00:02:04","isEdgeRouter" : true,"adjacencySids" : []
},"basic" : {
"name": "s204","driver" : "ofdpa-ovs”
}}
}
Thisisthenamethatdoesmatter.WillbedisplayedinGUI
Device
{"devices" : {
"of:0000000000000204" : {“segmentrouting” : {
"name" : "s204","ipv4NodeSid" : 204,"ipv4Loopback" : "192.168.0.204","routerMac" : "00:00:00:00:02:04","isEdgeRouter" : true,"adjacencySids" : []
},"basic" : {
"name": "s204","driver" : "ofdpa-ovs”
}}
}
Driver.ofdpa-ovs forOpenvSwitch.ofdpa3 forBroadcomXGS(Trident2,Tomahawk)qmx-ofdpa3 forBroadcomQMX
Port- VLANUntagged
{"ports" : {
"of:0000000000000204/3" : { "interfaces" : [
{"ips" : ["10.0.2.254/24"], "vlan-untagged": 20
}]
}}
}
DPID/portnumber
Equivalenttoaccessport.ExpectinguntaggedpacketandwillpushVLAN20
of:204
h1 h2
10.0.2.1VLAN None
10.0.2.2VLAN 20
10.0.2.254 10.0.2.2543 4
Port- VLANTagged
{"ports" : {
"of:0000000000000204/4" : { "interfaces" : [
{ "ips" : ["10.0.2.254/24"],"vlan-tagged": [20]
}]
}}
}
Equivalenttotrunkport.ExpectingVLAN20taggedpacketandwillkeepthetag.ItispossibletohavemorethanonetrunkVLAN.
of:204
h1 h2
10.0.2.1VLAN None
10.0.2.2VLAN 20
10.0.2.254 10.0.2.2543 4
Port- VLANTaggedwithNative
{"ports" : {
"of:0000000000000205/3" : { "interfaces" : [
{ "ips" : ["10.0.3.254/24", "10.0.4.254/24"]"vlan-tagged" : [30],”vlan-native" : 40
}]
}}
}
EquivalenttotrunkportwithnativeVLAN.ExpectingVLAN30taggedpacketandwillkeepthetag.AlsoexpectinguntaggedpacketandwillpushVLAN40
Q
R
D
of:205
h3
10.0.3.1VLAN 30
10.0.1.1
10.0.1.2
10.0.3.253
10.0.3.25410.0.4.254
10.0.1.254
34 56
10.0.4.1VLAN None
h4
Port- Subnet
Twoinformationcanbederivedfromthesubnetconfig:(1)TheinterfaceIPontheswitchis10.0.3.254(2)Thesubnetonthisinterfaceis10.0.3.0/24
Currentlywedon’tmapbetweensubnetandVLAN.VLANinformationissolelyusedfordefiningbridgingdomain.Subnetinformationissolelyusedforrouting.Therearesomeconfusions.Willhave1-to-1mappinginthefuture.
{"ports" : {
"of:0000000000000205/3" : { "interfaces" : [
{ "ips" : ["10.0.3.254/24", "10.0.4.254/24"]"vlan-tagged" : [30],”vlan-native" : 40
}]
}}
}
Q
R
D
of:205
h3
10.0.3.1VLAN 30
10.0.1.1
10.0.1.2
10.0.3.253
10.0.3.25410.0.4.254
10.0.1.254
34 56
10.0.4.1VLAN None
h4
L3DHCPRelay
Q
R
D
L3DHCPRelay
{"apps" : {
"org.onosproject.dhcprelay" : {"default": [
{ "dhcpServerConnectPoint": "of:0000000000000205/6","serverIps": ["10.0.3.253"]
}]
}}
}
ThelocationwheretheDHCPserverisattachedto
L3DHCPRelay
{"apps" : {
"org.onosproject.dhcprelay" : {"default": [
{ "dhcpServerConnectPoint": "of:0000000000000205/6","serverIps": ["10.0.3.253"]
}]
}}
}
TheIPaddressofDHCPserver
dhcpd.conf
subnet 10.0.2.0 netmask 255.255.255.0 {range 10.0.2.100 10.0.2.240;option routers 10.0.2.254;
}
subnet 10.0.3.0 netmask 255.255.255.0 {range 10.0.3.100 10.0.3.240;option routers 10.0.3.254;
}
subnet 10.0.4.0 netmask 255.255.255.0 {range 10.0.4.100 10.0.4.240;option routers 10.0.4.254;
}
host h1 {hardware ethernet 00:aa:00:00:00:01;fixed-address 10.0.2.1;
}
Subnetswewanttoassign
dhcpd.conf
IPrangethatwillbeusedforthissubnet
subnet 10.0.2.0 netmask 255.255.255.0 {range 10.0.2.100 10.0.2.240;option routers 10.0.2.254;
}
subnet 10.0.3.0 netmask 255.255.255.0 {range 10.0.3.100 10.0.3.240;option routers 10.0.3.254;
}
subnet 10.0.4.0 netmask 255.255.255.0 {range 10.0.4.100 10.0.4.240;option routers 10.0.4.254;
}
host h1 {hardware ethernet 00:aa:00:00:00:01;fixed-address 10.0.2.1;
}
dhcpd.conf
Defaultgatewaywewanttoassign,whichistheinterfaceIPoftheleafswitch
subnet 10.0.2.0 netmask 255.255.255.0 {range 10.0.2.100 10.0.2.240;option routers 10.0.2.254;
}
subnet 10.0.3.0 netmask 255.255.255.0 {range 10.0.3.100 10.0.3.240;option routers 10.0.3.254;
}
subnet 10.0.4.0 netmask 255.255.255.0 {range 10.0.4.100 10.0.4.240;option routers 10.0.4.254;
}
host h1 {hardware ethernet 00:aa:00:00:00:01;fixed-address 10.0.2.1;
}
dhcpd.conf
WecanalsohavestaticIPassignment
subnet 10.0.2.0 netmask 255.255.255.0 {range 10.0.2.100 10.0.2.240;option routers 10.0.2.254;
}
subnet 10.0.3.0 netmask 255.255.255.0 {range 10.0.3.100 10.0.3.240;option routers 10.0.3.254;
}
subnet 10.0.4.0 netmask 255.255.255.0 {range 10.0.4.100 10.0.4.240;option routers 10.0.4.254;
}
host h1 {hardware ethernet 00:aa:00:00:00:01;fixed-address 10.0.2.1;
}
vRouter
{"ports" : {
"of:0000000000000205/6" : { "interfaces" : [
{ "ips" : ["10.0.1.254/24”]"vlan-untagged": 10
}]
},"of:0000000000000205/7" : {
"interfaces" : [{ "ips" : ["10.0.1.254/24”]"vlan-untagged": 10
}]
}}
}
QuaggaandupstreamrouterneedtobeinthesameVLANandsubnetonthesameleaf.
Weneed3IPsinthesubnet.1forQuagga,1forupstreamrouter,1forleafswitchinterface./29istheminimumsubnet.
• Quaggaannouncesleafswitch,insteadofquaggaitself,asthenexthop totheinternalnetwork
RouteMap
Q
R
10.0.1.254/24
10.0.1.254/24
10.0.1.1/24
10.0.1.2/24
BridgedBGPtraffic
Routeddatatraffic
Quagga- bgpd.conf
ip prefix-list 1 seq 10 permit 10.0.2.0/24ip prefix-list 1 seq 20 permit 10.0.3.0/24
route-map NEXTHOP41 permit 10match ip address prefix-list 1set ip next-hop 10.0.1.254
neighbor 10.0.1.1remote-as 65001neighbor 10.0.1.1 ebgp-multihopneighbor 10.0.1.1 timers connect 5neighbor 10.0.1.1 advertisement-interval 5neighbor 10.0.1.1 route-map NEXTHOP41 out
network 10.0.2.0/24network 10.0.3.0/24
Listofprefixeswewanttoannounce
Quagga- bgpd.conf
ip prefix-list 1 seq 10 permit 10.0.2.0/24ip prefix-list 1 seq 20 permit 10.0.3.0/24
route-map NEXTHOP41 permit 10match ip address prefix-list 1set ip next-hop 10.0.1.254
neighbor 10.0.1.1remote-as 65001neighbor 10.0.1.1 ebgp-multihopneighbor 10.0.1.1 timers connect 5neighbor 10.0.1.1 advertisement-interval 5neighbor 10.0.1.1 route-map NEXTHOP41 out
network 10.0.2.0/24network 10.0.3.0/24
Definetheroutemapanditsname
Quagga- bgpd.conf
ip prefix-list 1 seq 10 permit 10.0.2.0/24ip prefix-list 1 seq 20 permit 10.0.3.0/24
route-map NEXTHOP41 permit 10match ip address prefix-list 1set ip next-hop 10.0.1.254
neighbor 10.0.1.1remote-as 65001neighbor 10.0.1.1 ebgp-multihopneighbor 10.0.1.1 timers connect 5neighbor 10.0.1.1 advertisement-interval 5neighbor 10.0.1.1 route-map NEXTHOP41 out
network 10.0.2.0/24network 10.0.3.0/24
Applytheroutemaptotheprefixesinprefix-list1
Quagga- bgpd.conf
ip prefix-list 1 seq 10 permit 10.0.2.0/24ip prefix-list 1 seq 20 permit 10.0.3.0/24
route-map NEXTHOP41 permit 10match ip address prefix-list 1set ip next-hop 10.0.1.254
neighbor 10.0.1.1remote-as 65001neighbor 10.0.1.1 ebgp-multihopneighbor 10.0.1.1 timers connect 5neighbor 10.0.1.1 advertisement-interval 5neighbor 10.0.1.1 route-map NEXTHOP41 out
network 10.0.2.0/24network 10.0.3.0/24
Settheleafswitch,insteadofQuaggaitself,asthenexthopfortheseprefixes
Quagga- bgpd.conf
ip prefix-list 1 seq 10 permit 10.0.2.0/24ip prefix-list 1 seq 20 permit 10.0.3.0/24
route-map NEXTHOP41 permit 10match ip address prefix-list 1set ip next-hop 10.0.1.254
neighbor 10.0.1.1remote-as 65001neighbor 10.0.1.1 ebgp-multihopneighbor 10.0.1.1 timers connect 5neighbor 10.0.1.1 advertisement-interval 5neighbor 10.0.1.1 route-map NEXTHOP41 out
network 10.0.2.0/24network 10.0.3.0/24
BGPpeerinformation
Quagga- bgpd.conf
ip prefix-list 1 seq 10 permit 10.0.2.0/24ip prefix-list 1 seq 20 permit 10.0.3.0/24
route-map NEXTHOP41 permit 10match ip address prefix-list 1set ip next-hop 10.0.1.254
neighbor 10.0.1.1remote-as 65001neighbor 10.0.1.1 ebgp-multihopneighbor 10.0.1.1 timers connect 5neighbor 10.0.1.1 advertisement-interval 5neighbor 10.0.1.1 route-map NEXTHOP41 out
network 10.0.2.0/24network 10.0.3.0/24
Announcetheroutemaptotheneighbor
Quagga- bgpd.conf
ip prefix-list 1 seq 10 permit 10.0.2.0/24ip prefix-list 1 seq 20 permit 10.0.3.0/24
route-map NEXTHOP41 permit 10match ip address prefix-list 1set ip next-hop 10.0.1.254
neighbor 10.0.1.1remote-as 65001neighbor 10.0.1.1 ebgp-multihopneighbor 10.0.1.1 timers connect 5neighbor 10.0.1.1 advertisement-interval 5neighbor 10.0.1.1 route-map NEXTHOP41 out
network 10.0.2.0/24network 10.0.3.0/24
NetworksthatarereachablefromQuagga
FPM(ForwardingPlaneManager)
Q
R
D
BGP
FPM
OF
Quagga- zebrad.conf
ip route 0.0.0.0/0 172.16.0.1
fpm connection ip 192.168.56.11 port 2620
(Optional)Pointdefaultroutetomanagementnetwork
FPMconnectiontoONOSIP.NeedtobereachablefromQuagga
DemoTopology
Q:Quagga,R:UpstreamRouter,D:DHCPServer
Q
R
D
of:226 of:227
of:204 of:205
h1 h2h3
rh1
h4
VLAN: 30Src mac: h3Dst mac: routerMac of of:205Src IP: h3Dst IP: h1
10.0.2.1VLAN None
10.0.2.2VLAN 20 10.0.3.1
VLAN 30
10.0.1.1
10.0.1.2
10.0.3.253
10.0.99.210.0.99.1
10.0.2.254 10.0.2.254 10.0.3.25410.0.4.254
10.0.1.254
3 43
4 56
10.0.4.1VLAN None
DemoTopology
Q:Quagga,R:UpstreamRouter,D:DHCPServer
Q
R
D
of:226 of:227
of:204 of:205
h1 h2h3
rh1
h4
Src mac: routerMac of of:205Dst mac: routerMac of of:226MPLS label: 204Src IP: h3Dst IP: h1
10.0.2.1VLAN None
10.0.2.2VLAN 20 10.0.3.1
VLAN 30
10.0.1.1
10.0.1.2
10.0.3.253
10.0.99.210.0.99.1
10.0.2.254 10.0.2.254 10.0.3.25410.0.4.254
10.0.1.254
3 43
4 56
10.0.4.1VLAN None
DemoTopology
Q:Quagga,R:UpstreamRouter,D:DHCPServer
Q
R
D
of:226 of:227
of:204 of:205
h1 h2h3
rh1
h4
Src mac: routerMac of of:226Dst mac: routerMac of of:204Src IP: h3Dst IP: h1
10.0.2.1VLAN None
10.0.2.2VLAN 20 10.0.3.1
VLAN 30
10.0.1.1
10.0.1.2
10.0.3.253
10.0.99.210.0.99.1
10.0.2.254 10.0.2.254 10.0.3.25410.0.4.254
10.0.1.254
3 43
4 56
10.0.4.1VLAN None
DemoTopology
Q:Quagga,R:UpstreamRouter,D:DHCPServer
Q
R
D
of:226 of:227
of:204 of:205
h1 h2h3
rh1
h4
Src mac: routerMac of of:204Dst mac: h1Src IP: h3Dst IP: h1
10.0.2.1VLAN None
10.0.2.2VLAN 20 10.0.3.1
VLAN 30
10.0.1.1
10.0.1.2
10.0.3.253
10.0.99.210.0.99.1
10.0.2.254 10.0.2.254 10.0.3.25410.0.4.254
10.0.1.254
3 43
4 56
10.0.4.1VLAN None
DemoScriptsandconfigurationswillbeavailableathttps://github.com/opennetworkinglab/routing/tree/master/trellisafterthisevent
Thankyou!Visithttp://wiki.opencord.orgformoreinformation