Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/sonic-yang-models/doc/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1544,7 +1544,8 @@ These tables have a number of shared attributes as described below:
"VLAN_SUB_INTERFACE": {
"Ethernet0.555": {
"vrf_name": "Blue",
"vlan": "555"
"vlan": "555",
"ipv6_use_link_local_only": "enable"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,8 @@
"VLAN_SUB_INTERFACE": {
"Ethernet12.10": {
"admin_status": "up",
"loopback_action": "drop"
"loopback_action": "drop",
"ipv6_use_link_local_only": "enable"
},
"Ethernet12.10|10.0.1.56/31": {},
"Ethernet12.10|fc00::1:71/126": {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,14 @@
"desc": "Configure PortChannel VLAN sub interface with VNET reference."
},
"VLAN_SUB_INTERFACE_WITH_MISSING_VNET": {
"desc": "Configure VLAN sub interface with VNET reference but no VNET exsiting.",
"desc": "Configure VLAN sub interface with VNET reference but no VNET existing.",
"eStrKey": "LeafRef"
},
"VLAN_SUB_INTERFACE_ENABLE_IPV6_LINK_LOCAL": {
"desc": "Configure VLAN sub interface with ipv6_use_link_local_only enabled."
},
"VLAN_SUB_INTERFACE_INVALID_IPV6_LINK_LOCAL": {
"desc": "Configure VLAN sub interface with an invalid ipv6_use_link_local_only value.",
"eStr": "Invalid value \"true\" in \"ipv6_use_link_local_only\" element."
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -779,5 +779,59 @@
]
}
}
},
"VLAN_SUB_INTERFACE_ENABLE_IPV6_LINK_LOCAL": {
"sonic-vlan-sub-interface:sonic-vlan-sub-interface": {
"sonic-vlan-sub-interface:VLAN_SUB_INTERFACE": {
"VLAN_SUB_INTERFACE_LIST": [
{
"name": "Ethernet8.10",
"ipv6_use_link_local_only": "enable"
}
]
}
},
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"name": "Ethernet8",
"admin_status": "up",
"alias": "Ethernet8/1",
"description": "Ethernet8",
"lanes": "45,46,47,48",
"mtu": 9000,
"speed": 100000
}
]
}
}
},
"VLAN_SUB_INTERFACE_INVALID_IPV6_LINK_LOCAL": {
"sonic-vlan-sub-interface:sonic-vlan-sub-interface": {
"sonic-vlan-sub-interface:VLAN_SUB_INTERFACE": {
"VLAN_SUB_INTERFACE_LIST": [
{
"name": "Ethernet8.10",
"ipv6_use_link_local_only": "true"
}
]
}
},
"sonic-port:sonic-port": {
"sonic-port:PORT": {
"PORT_LIST": [
{
"name": "Ethernet8",
"admin_status": "up",
"alias": "Ethernet8/1",
"description": "Ethernet8",
"lanes": "45,46,47,48",
"mtu": 9000,
"speed": 100000
}
]
}
}
}
}
16 changes: 13 additions & 3 deletions src/sonic-yang-models/yang-models/sonic-vlan-sub-interface.yang
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ module sonic-vlan-sub-interface {

description "VLAN sub interface for SONiC OS";

revision 2025-03-06 {
description "Add leaf vnet_name";
}
revision 2026-07-20 {
description "Add leaf ipv6_use_link_local_only";
}

revision 2025-03-06 {
description "Add leaf vnet_name";
}

revision 2021-11-11 {
description "Initial version";
Expand Down Expand Up @@ -89,6 +93,12 @@ module sonic-vlan-sub-interface {
}
}

leaf ipv6_use_link_local_only {
description "Enable/Disable IPv6 link local address on vlan sub-interface";
type stypes:mode-status;
default disable;
}

leaf loopback_action {
description "Packet action when a packet ingress and gets routed on the same IP interface";
type stypes:loopback_action;
Expand Down
Loading