The module for implementing DHCP protocol
Version: 2014-12-18
module dhcp-client { yang-version 1; namespace "urn:ietf:params:xml:ns:yang:dhcp-client"; prefix dhcp; import ietf-inet-types { prefix inet; } description "The module for implementing DHCP protocol"; revision "2014-12-18"; container relayv4 { container dhcpRelayIfCfgs { list dhcpRelayIfCfg { key "ifName"; leaf ifName { type string; description "Specify the interface name that dhcp relay configured on"; } leaf enable { type boolean; default "false"; description "Enable or disable dhcp relay function"; } leaf serverGroupName { type string; description "Server Group Name"; } leaf-list serverAddress { type inet:ipv4-address; description "DHCP relay destination server IP address"; } } // list dhcpRelayIfCfg } // container dhcpRelayIfCfgs container dhcpRelayServerGroups { list dhcpRelayServerGroup { key "serverGroupName"; description "DHCP relay server group "; leaf serverGroupName { type string; description "name of server group"; } leaf vpnName { type string; description "VPN name for server group"; } leaf gateway { type inet:ipv4-address; description "gateway for server group"; } leaf-list serverAddress { type inet:ipv4-address; description "DHCP relay destination server IP address"; } container dhcpRelaySerGrpStats { list dhcpRelaySerGrpStats { key "serverIpAddr"; description "DHCP relay server group packet statistics "; leaf serverIpAddr { type inet:ipv4-address; } leaf pktsReceiveFromClient { type uint32; config false; } leaf discoverPktsReceive { type uint32; config false; } leaf requestPktsReceive { type uint32; config false; } leaf releasePktsReceive { type uint32; config false; } leaf informPktsRecevie { type uint32; config false; } leaf declinePktsReceive { type uint32; config false; } leaf pktsReceiveFromServers { type uint32; config false; } leaf offerPktsReceive { type uint32; config false; } leaf ackPktsReceive { type uint32; config false; } leaf nakPktsReceive { type uint32; config false; } leaf pktsSentToServers { type uint32; config false; } leaf pktsSentToClients { type uint32; config false; } leaf unicastPktsSentToClients { type uint32; config false; } leaf broadcastPktsSentToClients { type uint32; config false; } } // list dhcpRelaySerGrpStats } // container dhcpRelaySerGrpStats } // list dhcpRelayServerGroup } // container dhcpRelayServerGroups container dhcpRelayStatistics { leaf badPacketsRecvd { type uint32; config false; } leaf packetsRecvdFromClient { type uint32; config false; } leaf discoverPacketsRecvd { type uint32; config false; } leaf requestPacketsRecvd { type uint32; config false; } leaf informPacketsRecvd { type uint32; config false; } leaf declinePacketsRecvd { type uint32; config false; } leaf releasePacketsRecvd { type uint32; config false; } leaf packetsRecvdFromServers { type uint32; config false; } leaf offerPacketsRecvd { type uint32; config false; } leaf ackPacketsRecvd { type uint32; config false; } leaf nakPacketsRecvd { type uint32; config false; } leaf packetsSentToServers { type uint32; config false; } leaf packetsSentToClients { type uint32; config false; } leaf unicastPacketsSentToClients { type uint32; config false; } leaf broadcastPacketsSentToClients { type uint32; config false; } leaf releasePacketsSentToServers { type uint32; config false; } leaf sendRenewPacket { type uint32; config false; } } // container dhcpRelayStatistics } // container relayv4 container serverv4 { container common { leaf pingPacketNumber { type uint8 { range "0..10"; } default "0"; description "Ping packet number"; } leaf pingPacketTimeOut { type uint16 { range "0..10000"; } default "500"; description "Ping packet timeout"; } } // container common container globalIpPool { list globalIpPool { key "ipPoolName"; leaf ipPoolName { type string { length "1..64"; } description "IP pool name"; } leaf vpnInstance { type string { length "1..31"; } description "VPN name"; } container gatewayIp { leaf gatewayIp { type inet:ipv4-address; description "Gateway IP Address"; } leaf gatewayMask { type inet:ipv4-address; description "Gateway IP Address Mask"; } } // container gatewayIp container sections { list section { key "sectionIndex"; leaf sectionIndex { type uint16 { range "0..255"; } description "Section Index"; } leaf sectionStartIp { type inet:ipv4-address; mandatory true; description "IP Address"; } leaf sectionEndIp { type inet:ipv4-address; description "IP Address"; } container ipPoolSectionStat { leaf usedIpCount { type uint32; config false; description "Used Ip Count"; } leaf idleIpCount { type uint32; config false; description "Idle Ip Count"; } leaf conflictIpCount { type uint32; config false; description "Conflict Ip Count"; } leaf totalIpCount { type uint32; config false; description "Total Ip Count"; } } // container ipPoolSectionStat } // list section } // container sections container leaseTime { description "Specifies the lease time, option code is 51."; leaf day { type uint16 { range "0..49710"; } default "1"; description "Day"; } leaf hour { type uint8 { range "0..23"; } default "0"; description "Hour"; } leaf minute { type uint8 { range "0..59"; } default "0"; description "Minute"; } } // container leaseTime leaf-list domainNameServer { type inet:ipv4-address; description "Specifies the domain name server, option code is 5."; } leaf domainName { type string { length "1..255"; } description "Specifies the domain name, option code is 15."; } leaf-list NbnsServer { type inet:ipv4-address; description "Specifies the NetBIOS name server, option code is 44."; } leaf NbNodeType { type enumeration { enum "B-node" { value 1; } enum "P-node" { value 2; } enum "M-node" { value 4; } enum "H-node" { value 8; } } description "Specifies the NetBIOS node type, option code is 46."; } container UserDefOptions { list UserDefOption { key "optionCode"; description "Specifieds the user defined DHCP options"; leaf optionCode { type uint8 { range "2 | 4..5 | 7..14 | 16..43 | 47..49 | 56 | 62..81 | 83..254"; } description "The option code of the user defined option"; } leaf-list ipAddress { type inet:ipv4-address; description "IP address list"; } leaf optionString { type string { length "1..254"; } description "User defined option string"; } leaf optionHex { type string { length "2..508"; } description "User defined option HEX string"; } } // list UserDefOption } // container UserDefOptions container ipPoolStat { leaf usedIpCount { type uint32; config false; description "Used Ip Count"; } leaf idleIpCount { type uint32; config false; description "Idle Ip Count"; } leaf conflictIpCount { type uint32; config false; description "Conflict Ip Count"; } leaf totalIpCount { type uint32; config false; description "Total Ip Count"; } } // container ipPoolStat } // list globalIpPool } // container globalIpPool container packetStatistics { leaf clientRequestCount { type uint32; config false; description "Client Request Count"; } leaf discoverCount { type uint32; config false; description "Discover Count"; } leaf requestCount { type uint32; config false; description "Request Count"; } leaf declineCount { type uint32; config false; description "Decline Count"; } leaf releaseCount { type uint32; config false; description "Release Count"; } leaf informCount { type uint32; config false; description "Inform Count"; } leaf serverReplyCount { type uint32; config false; description "Server Reply Count"; } leaf offerCount { type uint32; config false; description "Offer Count"; } leaf ackCount { type uint32; config false; description "Ack Count"; } leaf nakCount { type uint32; config false; description "Nak Count"; } } // container packetStatistics } // container serverv4 container clientv4 { description "dhcpv4 client portion"; list client-if { key "ifName"; leaf ifName { type string; description "Specify the interface name that dhcp client configured on"; } leaf enable { type boolean; default "false"; description "Enable or disable dhcp client function"; } container dhcpClientStatus { description "Specify the status of DHCP client on the interface"; leaf status { type enumeration { enum "Init" { value 0; } enum "Discoverying" { value 1; } enum "Offered" { value 2; } enum "Requesting" { value 3; } enum "Acked" { value 4; } } config false; description "Specify the status of DHCP client on the interface"; } leaf clientIpAddr { type inet:ipv4-address; config false; description "Specify the IP address obtained from DHCP server on the interface"; } leaf-list dnsServerIpAddr { type inet:ipv4-address; config false; description "Specify the DNS server IP address obtained from DHCP server on the interface"; } } // container dhcpClientStatus container dhcpClientIfStatistics { description "Specify the statistics of DHCP client send or receive packets on the interface"; leaf discoverCount { type uint32; config false; description "Discover Count"; } leaf requestCount { type uint32; config false; description "Request Count"; } leaf declineCount { type uint32; config false; description "Decline Count"; } leaf releaseCount { type uint32; config false; description "Release Count"; } leaf informCount { type uint32; config false; description "Inform Count"; } leaf offerCount { type uint32; config false; description "Offer Count"; } leaf ackCount { type uint32; config false; description "Ack Count"; } leaf nakCount { type uint32; config false; description "Nak Count"; } } // container dhcpClientIfStatistics } // list client-if } // container clientv4 } // module dhcp-client
© 2023 YumaWorks, Inc. All rights reserved.