Skip to content

Commit

Permalink
update Configuration.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bradh352 committed Dec 24, 2024
1 parent da11b4c commit a5d8205
Showing 1 changed file with 91 additions and 67 deletions.
158 changes: 91 additions & 67 deletions src/sonic-yang-models/doc/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
* [Console](#console)
* [CRM](#crm)
* [CRM DASH](#crm-dash)
* [Data Plane L3 Interfaces](#data-plane-l3-interfaces)
* [DEFAULT_LOSSLESS_BUFFER_PARAMETER](#DEFAULT_LOSSLESS_BUFFER_PARAMETER)
* [Device Metadata](#device-metadata)
* [Device neighbor metada](#device-neighbor-metada)
Expand All @@ -40,10 +39,10 @@
* [FLEX_COUNTER_TABLE](#flex_counter_table)
* [GRPCCLIENT](#grpcclient)
* [Hash](#hash)
* [IPv6 Link-local] (#ipv6-link-local)
* [KDUMP](#kdump)
* [Kubernetes Master](#kubernetes-master)
* [L2 Neighbors](#l2-neighbors)
* [L3 Interfaces](#l3-interfaces)
* [Loopback Interface](#loopback-interface)
* [LOSSLESS_TRAFFIC_PATTERN](#LOSSLESS_TRAFFIC_PATTERN)
* [Memory Statistics](#memory-statistics)
Expand Down Expand Up @@ -923,47 +922,6 @@ It currently allows user to administratively bring down a line-card or fabric-ca
}
```

### Data Plane L3 Interfaces

IP configuration for data plane are defined in **INTERFACE**, **VLAN_SUB_INTERFACE**,
**PORTCHANNEL_INTERFACE** and **VLAN_INTERFACE** table. The objects
in all four tables have the interface (could be physical port, port
channel, vlan or vlan sub interface) that IP address is attached to as first-level key, and
IP prefix as second-level key. IP interface address objects don't have any attributes.
IP interface attributes, resides in those tables as well, key is the interface name
and value is a list of field-values representing the interface attributes, e.g. loopback action.

```
{
"INTERFACE": {
"Ethernet0|10.0.0.0/31": {},
"Ethernet4|10.0.0.2/31": {},
"Ethernet8|10.0.0.4/31": {}
"Ethernet8": {
"loopback_action": "drop"
}
},

"PORTCHANNEL_INTERFACE": {
"PortChannel01|10.0.0.56/31": {},
"PortChannel01|FC00::71/126": {},
"PortChannel02|10.0.0.58/31": {},
"PortChannel02|FC00::75/126": {}
},

"VLAN_INTERFACE": {
"Vlan1000|192.168.0.1/27": {}
},

"VLAN_SUB_INTERFACE": {
"Ethernet4.1|10.0.0.2/31": {},
"Ethernet4.1": {
"loopback_action": "drop"
}
}
}
```


### DEFAULT_LOSSLESS_BUFFER_PARAMETER

Expand Down Expand Up @@ -1334,30 +1292,6 @@ The configuration is applied globally for each ECMP and LAG on a switch.
}
```

### IPv6 Link-local
```
{
"INTERFACE": {
"Ethernet8": {
"ipv6_use_link_local_only": "disable"
}
},

"PORTCHANNEL_INTERFACE": {
"PortChannel01": {
"ipv6_use_link_local_only": "enable"
}
},

"VLAN_INTERFACE": {
"Vlan1000": {
"ipv6_use_link_local_only": "enable"
}
}
}

```

### KDUMP

```
Expand Down Expand Up @@ -1442,6 +1376,96 @@ loopback address can also be defined.
}
```

### L3 Interfaces

Configuration for L3 data plane interfaces are defined in the `INTERFACE`,
`VLAN_INTERFACE`, `VLAN_SUB_INTERFACE` and `PORTCHANNEL_INTERFACE` tables,
respectively.

The objects in all four tables have the interface as the key with the following
required patterns:
- `INTERFACE`: Any valid port name from the `PORT` table. Typically `Ethernet{0-999}`.
- `VLAN_INTERFACE`: `Vlan{1-4095}`
- `PORTCHANNEL_INTERFACE`: `PortChannel{0-9999}`
- `VLAN_SUB_INTERFACE`: Any valid `INTERFACE` or `PORTCHANNEL_INTERFACE` name followed by a `.` and a number between 1 and 4094. E.g. `Ethernet1.4`


These tables have a number of shared attributes as described below:
* `vrf_name`: Valid VRF name from the `VRF` table. Default: `default`
* `nat_zone`: NAT Zone for this interface. `0..3`
* `mpls`: Enable/disable MPLS routing for the interface. `enable` or `disable`. Default `disable`.
* `ipv6_use_link_local_only`: Enable/Disable IPv6 link local address on interface. `enable` or `disable`. Default `disable`.
* `mac_addr`: Assign administrator-provided MAC address to Interface. If not specified will use the system MAC (same for all interfaces). Not applicable to `VLAN_SUB_INTERFACE` as it will use the parent interface's mac address.
* `loopback_action`: Packet action when a packet ingress and gets routed on the same IP interface. `drop` or `forward`.


```json

{
"INTERFACE": {
"Ethernet0": {
"ipv6_use_link_local_only": "enable",
"mac_addr": "12:34:56:78:90:ab"
},
"Ethernet1": {
"loopback_action": "drop"
}
},
"VLAN_INTERFACE": {
"Vlan201": {
"vrf_name": "red",
"mac_addr": "AB:CD:EF:12:34:56"
}
},
"PORTCHANNEL_INTERFACE": {
"PortChannel101": {
"mac_addr": "1c:23:a8:56:de:2f"
}
},
"VLAN_SUB_INTERFACE": {
"Ethernet0.555": {
"vrf_name": "Blue",
"vlan": "555"
}
}
}
```

#### Assigning IP addresses to L3 Interfaces

The interface name and IP prefix act as multi-level key for the interface
objects. The IP prefixes are stored in the same tables as the interface
attributes: `INTERFACE`, `VLAN_INTERFACE`, `VLAN_SUB_INTERFACE` and `PORTCHANNEL_INTERFACE`.

In the example below we will show one interface with attributes for clarity,
but otherwise this is simply an example of how IP addresses may be configured.

```json
{
"INTERFACE": {
"Ethernet0": {
"ipv6_use_link_local_only": "enable",
"mac_addr": "12:34:56:78:90:ab"
},
"Ethernet0|10.0.0.0/31": {},
"Ethernet4|10.0.0.2/31": {},
"Ethernet8|10.0.0.4/31": {},
},
"PORTCHANNEL_INTERFACE": {
"PortChannel01|10.0.0.56/31": {},
"PortChannel01|FC00::71/126": {},
"PortChannel02|10.0.0.58/31": {},
"PortChannel02|FC00::75/126": {}
},
"VLAN_INTERFACE": {
"Vlan1000|192.168.0.1/27": {}
},
"VLAN_SUB_INTERFACE": {
"Ethernet4.1|10.0.0.2/31": {}
}
}
```

### Loopback Interface

Loopback interface configuration lies in **LOOPBACK_INTERFACE** table
Expand Down

0 comments on commit a5d8205

Please sign in to comment.