...
In Trellis, we run every switch as router, each router needs a mac address and multiple interface configurations.
Interface config:
Code Block | ||
---|---|---|
| ||
"Device-id/port-number" : {
"interfaces" : [
{
"name": "interface name",
"ips" : [ "10.0.1.254/24" ],
"vlan-untagged": 10
}
]
} |
Name: Interface name, can be empty or unset;
ips: List of IP addresses for this interface, it can be the default gateway of the host;
VLAN config, it can be: vlan-untagged only, vlan-tagged only or vlan-tagged + vlan-native.
vlan-untagged (integer): this interface consumes untagged packet only and it belongs to a specific vlan;
vlan-tagged (integer array): this interface can consumes specific tagged vlans;
vlan-native (integer): if an untagged consumes by this port, and this is an interface with vlan-tagged setup, device will use this vlan for internal use;
Example of Segment Routing device settingsSegment routing device setting:
Code Block | ||||
---|---|---|---|---|
| ||||
"Device-id" : { "segmentrouting" : { "name" : "Device name", "ipv4NodeSid" : 123, "ipv4Loopback" : "192.168.0.123", "ipv6NodeSid" : 223, "ipv6Loopback" : "2000::c0a8:0223", "routerMac" : "00:00:00:00:01:23", "isEdgeRouter" : true, "adjacencySids" : [] } } |
...
Name:
...
Name
...
for segment routing device;
ipv4(6)NodeSid:
...
Global unique id for IP loopback,
...
it is used
...
as MPLS
...
label in forwarding;
ipv4(6)Loopback: Router loopback IP address, it should not be part of same same subnet defined on
...
dataplane interface;
routerMac: Globally unique
...
Mac address. It will be used to reply ARP
...
requests for router IP or interface IP;
isEdgeRouter: true if this device is edge/leaf, otherwise false;
adjacencySids: Reserved, put empty array for now
...
Interface config:
...
title | Interface config |
---|
...
.
...
In interface config:
...
...
ips: IP address for this interface, can be the default gateway of the host
...
VLAN config:
vlan-untagged (integer): this interface consumes untagged packet only, and this interface belongs to specific vlan
vlan-tagged (integer array): this interface can consumes specific tagged vlans
vlan-native (integer): if an untagged consumes by this port, and this is an interface with vlan-tagged setup, device will use this vlan for internal use
vlan config can be: vlan-untagged only, vlan-tagged only or vlan-tagged + vlan-native
Topology:
Host view:
In demo mininet topology, we set IP from interface as default gateway of hoststhe gateway of the hosts to the IP of the interface of the leaf switch.
Steps:
In this tutorial, we need to create 3 terminal window for:
...