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
23 changes: 23 additions & 0 deletions src/sonic-yang-models/doc/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* [Device Metadata](#device-metadata)
* [Device neighbor metada](#device-neighbor-metada)
* [DHCP_RELAY](#dhcp_relay)
* [DHCPV4_RELAY](#dhcpv4_relay)
* [DHCP Server IPV4](#dhcp_server_ipv4)
* [BMP](#bmp)
* [DSCP_TO_TC_MAP](#dscp_to_tc_map)
Expand Down Expand Up @@ -1138,6 +1139,28 @@ instance is supported in SONiC.

```

### DHCPV4_RELAY

```
{
"DHCPV4_RELAY": {
"Vlan1000": {
"dhcpv4_servers": [
"192.168.0.1",
"192.168.0.2"
],
"server_vrf": "Vrf_RED",
"source_interface": "Loopback0",
"link_selection": "enable",
"vrf_selection": "enable",
"server_id_override": "enable",
"agent_relay_mode": "append",
"max_hop_count": 10
}
}

```

### BMP
BMP related configuration are defined in **bgp_neighbor_table**,**bgp_rib_in_table**, **bgp_rib_out_table** tables.

Expand Down
1 change: 1 addition & 0 deletions src/sonic-yang-models/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
'sonic-device_neighbor.yang',
'sonic-device_neighbor_metadata.yang',
'sonic-dhcp-server.yang',
'sonic-dhcpv4-relay.yang',
'sonic-dhcpv6-relay.yang',
'sonic-dns.yang',
'sonic-events-bgp.yang',
Expand Down
30 changes: 30 additions & 0 deletions src/sonic-yang-models/tests/files/sample_config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -2142,6 +2142,36 @@
"interface_id": "true"
}
},
"DHCPV4_RELAY": {
"Vlan111": {
"dhcpv4_servers": [
"10.222.72.116"
],
"server_vrf": "Vrf_blue",
"source_interface": "Loopback0",
"link_selection": "enable",
"vrf_selection": "enable",
"server_id_override": "enable",
"agent_relay_mode": "forward_untouched",
"max_hop_count": "4"
},
"Vlan222": {
"dhcpv4_servers": [
"10.222.72.116",
"10.222.82.226"
]
},
"Vlan777": {
"dhcpv4_servers": [
"10.222.82.226"
],
"source_interface": "Loopback0",
"link_selection": "enable",
"vrf_selection": "disable",
"server_id_override": "disable",
"agent_relay_mode": "discard"
}
},
"DHCP_SERVER_IPV4": {
"Vlan100": {
"gateway": "100.1.1.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"DHCPv4_RELAY_VALID_FORMAT_BASE": {
"desc": "Add dhcpv4 relay with minimum config."
},
"DHCPv4_RELAY_WITH_MULTIPLE_SERVERS": {
"desc": "Add dhcpv4 relay with multiple servers."
},
"DHCPv4_RELAY_WITH_SERVER_VRF": {
"desc": "Add dhcpv4 relay with server VRF and required options."
},
"DHCPv4_RELAY_WITH_LINK_SELECT": {
"desc": "Add dhcpv4 relay with link-select option enabled."
},
"DHCPv4_RELAY_WITH_AGENT_RELAY_MODE_DISCARD": {
"desc": "Add dhcpv4 relay with minimum config."
},
"DHCPv4_RELAY_WITH_VALID_MAX_HOP_CNT": {
"desc": "Add dhcpv4 relay with valid max_hop_cnt."
},
"DHCPv4_RELAY_WITH_MISSING_SERVER_IP": {
"desc": "Add dhcpv4 relay with missing server_ip.",
"eStrKey": "MinElements"
},
"DHCPv4_RELAY_WITH_SERVER_VRF_AND_MISSING_LINK_SELECT_OPTION": {
"desc": "Add dhcpv4 relay with server_vrf and missing link-selection option.",
"eStrKey": "Must"
},
"DHCPv4_RELAY_WITH_SERVER_VRF_AND_MISSING_VRF_SELECT_OPTION": {
"desc": "Add dhcpv4 relay with server_vrf and missing vrf-selection option.",
"eStrKey": "Must"
},
"DHCPv4_RELAY_WITH_SERVER_VRF_AND_MISSING_SERVER_OVERRIDE_OPTION": {
"desc": "Add dhcpv4 relay with server_vrf and missing lserver-override option.",
"eStrKey": "Must"
},
"DHCPv4_RELAY_WITH_SERVER_VRF_AND_MISSING_SOURCE_INTERFACE_OPTION": {
"desc": "Add dhcpv4 relay with server_vrf and missing source-interface option.",
"eStrKey": "Must"
}
}
Loading
Loading