IPv4 address management.
Version: 2020-02-22
module huawei-bras-ipv4-address-manage { yang-version 1; namespace "urn:huawei:yang:huawei-bras-ipv4-address-manage"; prefix bras-ipv4-address-manage; import huawei-network-instance { prefix ni; } import huawei-pub-type { prefix pub-type; } import ietf-yang-types { prefix yang; } import ietf-inet-types { prefix inet; } import huawei-extension { prefix ext; } import huawei-bras-dhcp-server { prefix bras-dhcp-server; } import huawei-radius { prefix radius; } import huawei-aaa { prefix aaa; } import huawei-l3vpn { prefix l3vpn; } import huawei-bras-cu-controller { prefix bras-cu-controller; } import huawei-ifm { prefix ifm; } import huawei-ip { prefix ip; } organization "Huawei Technologies Co., Ltd."; contact "Huawei Industrial Base Bantian, Longgang Shenzhen 518129 People's Republic of China Website: http://www.huawei.com Email: support@huawei.com"; description "IPv4 address management."; revision "2020-02-22" { description "Description modification."; reference "Huawei private."; } revision "2019-10-17" { description "Second revision."; reference "Huawei private."; } revision "2019-04-09" { description "Initial revision."; reference "Huawei private."; } ext:task-name "ippool"; typedef pool-type { type enumeration { enum "local" { value 0; description "Local type."; } enum "remote" { value 1; description "Remote type."; } enum "dynamic" { value 2; description "Dynamic type."; } } description "IPv4 pool type."; } typedef reserved-ip-address { type enumeration { enum "lease" { value 1; description "Reserve IP address by lease."; } enum "mac" { value 2; description "Reserve IP address by mac."; } } description "IP address reserve type."; } typedef reserved-ip-address-remote { type enumeration { enum "lease" { value 1; description "Reserve IP address by lease."; } } description "IP address reserve type."; } typedef ip-status { type enumeration { enum "conflict" { value 1; description "Set IP status to conflict."; } enum "idle" { value 2; description "Set IP status to idle."; } } description "IP address status."; } typedef ip-address-status { type enumeration { enum "idle" { value 0; description "IP status of idle."; } enum "used" { value 1; description "IP status of used."; } enum "disable" { value 2; description "IP status of disable."; } enum "conflicted-decline" { value 3; description "IP status of conflicted decline."; } enum "static-online" { value 4; description "IP status of static online."; } enum "gateway" { value 5; description "IP status of gateway."; } enum "reserved" { value 6; description "IP status of reserved."; } enum "static-bind" { value 7; description "IP status of static bind."; } enum "conflicted-radius" { value 8; description "IP status of conflicted radius."; } enum "conflicted-inner" { value 9; description "IP status of conflicted inner."; } enum "conflicted-all" { value 10; description "IP status of conflicted all."; } enum "isolate" { value 11; description "IP status of isolate."; } enum "delayed" { value 12; description "IP status of delayed."; } enum "network" { value 13; description "IP status of network."; } enum "broadcast" { value 14; description "IP status of broadcast."; } enum "gateway-can-alloc" { value 15; description "IP status of gateway can alloc."; } } description "IP address status."; } grouping specified-up { description "Configure an IP address pool to be exclusively used by a vBRAS-UP or UP backup policy profile in CU separation multi-instance scenarios."; container occupied-policy { description "Configure a specific policy to specify the address pool to be occupied."; choice occupied-policy { description "Specify a specific policy to specify the address pool to be occupied."; case up-id { description "The specified address pool is exclusive to be used by vBRAS-UP UP ID."; leaf up-id { type uint16 { range "1024..2023 | 2048..3047 | 3072..4071 | 4096..5095"; } must "(../up-id<=(/bras-cu-controller:bras-cu-controller/bras-cu-controller:global-attribute/bras-cu-controller:up-base-id + 999) and ../up-id>=/bras-cu-controller:bras-cu-controller/bras-cu-controller:global-attribute/bras-cu-controller:up-base-id)"; description "Specify the ID of a vBRAS-UP."; } } // case up-id case up-backup-profile { description "The specified address pool is exclusive to be used by vBRAS-UP backup policy profile."; leaf up-backup-profile { type leafref { path "/bras-cu-controller:bras-cu-controller/bras-cu-controller:hot-profiles/bras-cu-controller:hot-profile/bras-cu-controller:name"; } must "/bras-cu-controller:bras-cu-controller/bras-cu-controller:hot-profiles/bras-cu-controller:hot-profile[bras-cu-controller:name=current()]/bras-cu-controller:backup-groups/bras-cu-controller:backup-group/bras-cu-controller:master-interface"; description "Specify the name of a vBRAS-UP backup policy profile."; } } // case up-backup-profile case hot-standby-up-group { description "The specified address pool is exclusive to be used by vBRAS-UP hot backup groups."; leaf master-up { type uint16 { range "1024..2023 | 2048..3047 | 3072..4071 | 4096..5095"; } must "../master-up!=../slave-up"; must "(../master-up<=(/bras-cu-controller:bras-cu-controller/bras-cu-controller:global-attribute/bras-cu-controller:up-base-id + 999) and ../master-up>=/bras-cu-controller:bras-cu-controller/bras-cu-controller:global-attribute/bras-cu-controller:up-base-id)"; mandatory true; description "Specify the ID of the vBRAS-UP where the master interface in a vBRAS-UP hot backup group resides."; } leaf slave-up { type uint16 { range "1024..2023 | 2048..3047 | 3072..4071 | 4096..5095"; } must "(../slave-up<=(/bras-cu-controller:bras-cu-controller/bras-cu-controller:global-attribute/bras-cu-controller:up-base-id + 999) and ../slave-up>=/bras-cu-controller:bras-cu-controller/bras-cu-controller:global-attribute/bras-cu-controller:up-base-id)"; mandatory true; description "Specify the ID of the vBRAS-UP where the slave interface in a vBRAS-UP hot backup group resides."; } } // case hot-standby-up-group case up-group { description "The specified address pool is exclusive to be used by vBRAS-UP warm backup groups or vBRAS-UP hot backup groups."; leaf master-up-id { type uint16 { range "1024..2023 | 2048..3047 | 3072..4071 | 4096..5095"; } must "../master-up-id!=../slave-up-id"; must "(../master-up-id<=(/bras-cu-controller:bras-cu-controller/bras-cu-controller:global-attribute/bras-cu-controller:up-base-id + 999) and ../master-up-id>=/bras-cu-controller:bras-cu-controller/bras-cu-controller:global-attribute/bras-cu-controller:up-base-id)"; mandatory true; description "Specify the ID of the vBRAS-UP where the master interface in a vBRAS-UP warm backup group resides or a vBRAS-UP hot backup group resides."; } leaf slave-up-id { type uint16 { range "1024..2023 | 2048..3047 | 3072..4071 | 4096..5095"; } must "(../slave-up-id<=(/bras-cu-controller:bras-cu-controller/bras-cu-controller:global-attribute/bras-cu-controller:up-base-id + 999) and ../slave-up-id>=/bras-cu-controller:bras-cu-controller/bras-cu-controller:global-attribute/bras-cu-controller:up-base-id)"; mandatory true; description "Specify the ID of the vBRAS-UP where the slave interface in a vBRAS-UP warm backup group resides or a vBRAS-UP hot backup group resides."; } } // case up-group } // choice occupied-policy } // container occupied-policy } // grouping specified-up grouping gateway { description "Configure the gateway and gate mask for the IP address pool."; leaf gate-ip { type inet:ipv4-address-no-zone; description "Specify a gateway address."; } leaf gate-mask { type inet:ipv4-address-no-zone; description "Specify the subnet mask of the gateway."; } } // grouping gateway grouping vpn-instance { description "Specify the name of vpn-instance binded."; container vpn-instance { description "Configure the VPN instance name."; leaf name { type leafref { path "/ni:network-instance/ni:instances/ni:instance/ni:name"; } must "../name!='_public_'"; must "/ni:network-instance/ni:instances/ni:instance[ni:name=current()]/l3vpn:afs/l3vpn:af[l3vpn:type='ipv4-unicast']"; description "The name of vpn-instance binded."; } } // container vpn-instance } // grouping vpn-instance grouping rui-slave { description "Indicate RUI-slave address pools."; leaf rui-slave { type boolean; default "false"; description "Enable/disable RUI-slave address pools."; } } // grouping rui-slave grouping dhcp-server-group { description "Bind a dhcp-server group to an IP address pool."; leaf name { type leafref { path "/bras-dhcp-server:bras-dhcp-server/bras-dhcp-server:dhcp-server-groups/bras-dhcp-server:dhcp-server-group/bras-dhcp-server:name"; } description "The dhcp-server group command associates the address pool with the DHCPv4 server group."; } } // grouping dhcp-server-group grouping lease-management { description "Enables the lease management function for IP address pool."; container lease-management { description "Configure the lease management function for IP address pool."; leaf enable { type boolean; default "false"; description "Enable/disable the lease management function for IP address pool."; } } // container lease-management } // grouping lease-management grouping common-config { description "The configuration for all type IP address pool."; container export-route { description "Configure export host routes from the current address pool."; leaf enable { type boolean; default "false"; description "Enable/disable export host routes from the current address pool."; } } // container export-route container unr-tag { description "Configure a route tag for an IP address pool."; leaf value { type uint32 { range "0..4294967295"; } description "Configure a route tag for an IP address pool."; } } // container unr-tag container dns-server { description "Configure a DNS server address."; leaf-list ip-address { type inet:ipv4-address-no-zone; max-elements 8; description "Configure the IP address of DNS server."; } } // container dns-server container warning-exhaust { description "Configure warning exhaust of IPv4 address usage."; leaf exhaust { type boolean; default "false"; description "Enable/disable the address exhaustion alarm function for an IPv4 address pool."; } } // container warning-exhaust } // grouping common-config grouping time-default-config { description "Define the time include day hour and minute."; leaf day { type uint16 { range "0..999"; } units "d"; default "3"; description "Specify the number of days."; } leaf hour { type uint8 { range "0..23"; } units "h"; default "0"; description "Specify the number of hours."; } leaf minute { type uint8 { range "0..59"; } units "min"; default "0"; description "Specify the number of minutes."; } } // grouping time-default-config grouping date-time-config { description "Define the time include day hour and minute."; leaf day { type uint32 { range "0..999"; } units "d"; default "0"; description "Specify the number of days."; } leaf hour { type uint32 { range "0..23"; } units "h"; default "0"; description "Specify the number of hours."; } leaf minute { type uint32 { range "0..59"; } units "min"; default "0"; description "Specify the number of minutes."; } } // grouping date-time-config grouping constant-index { description "Statistics of the constant index for an IPv4 address pool."; container constant-index { config false; description "Statistics of the constant index for an IPv4 address pool."; leaf value { type uint16 { range "0..16383"; } description "The index of the IPv4 address pool."; } } // container constant-index } // grouping constant-index grouping ip-address-number { description "Statistics of IP address."; leaf total-number { type uint32; description "The IP address total number of subnet segment."; } leaf used-number { type uint32; description "The IP address used number of subnet segment."; } leaf idle-number { type uint32; description "The IP address idle number of subnet segment."; } leaf conflict-number { type uint32; description "The IP address conflict number of subnet segment."; } leaf disable-number { type uint32; description "The IP address disable number of subnet segment."; } leaf reserved-number { type uint32; description "The IP address reserved number of subnet segment."; } leaf static-bind-number { type uint32; description "The IP address static-bind number of subnet segment."; } leaf delayed-number { type uint32; description "The IP address delayed number of subnet segment."; } } // grouping ip-address-number grouping ip-address-info { description "The info of IP address."; container address-infos { description "List of IPv4 address informations."; list address-info { key "ip"; description "Statistics of IPv4 address information."; leaf ip { type inet:ipv4-address-no-zone; description "The IP address."; } leaf status { ext:support-filter "true"; type ip-address-status; description "The status of IP address."; } leaf index { type uint32; description "The index of IP address."; } leaf mac { type pub-type:mac-address; description "User's MAC address."; } leaf user-id { type uint32; description "User ID."; } leaf lease { type uint32; units "s"; description "IP address lease."; } } // list address-info } // container address-infos } // grouping ip-address-info grouping ip-pool-usage { description "The usage of IP address."; leaf total-number { type uint32; description "The total number of IP address."; } leaf used-number { type uint32; description "The used number of IP address."; } leaf ratio { type uint8 { range "0..100"; } units "%"; description "The used ratio of IP address."; } } // grouping ip-pool-usage grouping ip-pool-max-usage { description "The max usage of IP address."; leaf total-number { type uint32; description "The total number of IP address."; } leaf used-number { type uint32; description "The used number of IP address."; } leaf time { type yang:date-and-time; description "Time when the maximum number of addresses were used."; } } // grouping ip-pool-max-usage grouping lock { description "Lock an IPv4 pool."; container lock { presence "Create lock pool"; description "Configure an IP address pool lock so that the address pool cannot be used to assign IP addresses to new users."; leaf drain { type boolean; default "false"; description "Enable/disable DHCP request messages for lease renewal from online users using the address pool are discarded."; } } // container lock } // grouping lock grouping import-vpn-instance { description "Bind a specified VPN instance to an address pool."; leaf-list name { type leafref { path "/ni:network-instance/ni:instances/ni:instance/ni:name"; } must "/ni:network-instance/ni:instances/ni:instance[ni:name=current()]/l3vpn:afs/l3vpn:af[l3vpn:type='ipv4-unicast']"; max-elements 8; description "Specify the name of a VPN instance."; } } // grouping import-vpn-instance grouping ip-attribute-public { description "Enable the ip attribute public function for IP address pool."; container ip-attribute-public { description "Configure the ip attribute public function for IP address pool."; leaf enable { type boolean; default "false"; description "Enable/disable the ip attribute public function for IP address pool."; } } // container ip-attribute-public } // grouping ip-attribute-public grouping warning-threshold { description "Define the configure warning threshold of IPv4 address usage."; container warning-threshold { description "Configure warning threshold of IPv4 address usage."; leaf threshold-value { type uint8 { range "0..100"; } default "80"; description "The alarm threshold for the address usage of an IPv4 address pool is a percentage."; } } // container warning-threshold } // grouping warning-threshold grouping delayed-release { description "Define the configure IP address delayed release function for IP address pool."; container delayed-release { description "Configure the IP address delayed release function for IP address pool."; leaf enable { type boolean; default "true"; description "Enable/disable the IP address delayed release function for IP address pool."; } } // container delayed-release } // grouping delayed-release container bras-ipv4-address-manage { description "Bras IPv4 address management."; container ipv4-pools { description "List of IPv4 address pools."; list ipv4-pool { must "./rui-slave != 'true' or ./type != 'dynamic'"; key "name"; max-elements 16384; description "Configure an IPv4 address pool."; leaf name { ext:case-sensitivity "lower-only"; type string { length "1..128"; pattern '[a-z0-9._-]{1,128}'; } must "../name != '-' and ../name != '--'"; description "Specify the name of the IP address pool."; } leaf type { ext:operation-exclude "update"; type pool-type; mandatory true; description "Specify the type of the IP address pool."; } leaf rui-slave { ext:operation-exclude "update|delete" { when "../type != 'remote'"; description "The 'rui-slave' cannot be updated or deleted, when IPv4 pool type is not 'remote'."; } type boolean; default "false"; description "Enable/disable RUI-slave address pools."; } container local { when "../type = 'local'"; must "not(./vpn-instance/name = ./import-vpn-instance/name)"; description "Configure the information for the local IP address pool."; uses specified-up; uses vpn-instance; container gateway { must "(./gate-ip and ./gate-mask) or (not(./gate-ip) and not(./gate-mask))"; description "Configure the IP address pool gateway and gateMask. The gate-ip and gate-mask combinations of different pool instances cannot overlap."; uses gateway; } // container gateway container gateway-unnumbered { description "Configure an address pool to borrow an interface address as a gateway address."; leaf interface-name { type leafref { path "/ifm:ifm/ifm:interfaces/ifm:interface/ifm:name"; } must "../../../rui-slave != 'true'"; must "/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ip:ipv4/ip:addresses/ip:address/ip:ip"; must "/ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:type='GigabitEthernet' or /ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:type='10GE' or /ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:type='XGigabitEthernet' or /ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:type='100GE' or /ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:type='Virtual-Ethernet' or /ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:type='50GE' or /ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:type='50|100GE' or /ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:type='FlexE' or /ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:type='25GE' or /ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:type='400GE' or /ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:type='Ethernet' or /ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:type='Eth-Trunk' or /ifm:ifm/ifm:interfaces/ifm:interface[ifm:name=current()]/ifm:type='LoopBack'"; description "Specify the name of the interface."; } } // container gateway-unnumbered container sections { when "../gateway/gate-ip"; description "List of address segments in an IP address pool. The section address segments cannot have overlapping IP addresses."; list section { must "not(./start-ip-address=../../gateway/gate-ip and ./end-ip-address=../../gateway/gate-ip) or ../../gateway-unnumbered/interface-name"; key "number"; unique "start-ip-address"; unique "end-ip-address"; max-elements 256; description "Configure an address segment in an IP address pool. The section address segments cannot have overlapping IP addresses."; leaf number { type uint16 { range "0..255"; } description "Specify the address segment number."; } leaf start-ip-address { type inet:ipv4-address-no-zone; mandatory true; description "Specify the start IP address of the address segment in the dotted decimal format."; } leaf end-ip-address { type inet:ipv4-address-no-zone; mandatory true; description "Specify the end IP address of the address segment in the dotted decimal format."; } container excluded-ip-addresss { description "List of range of IP addresses that do not take part in automatic address assignment."; list excluded-ip-address { key "start-ip-address end-ip-address"; description "Configure the range of IP addresses that do not take part in automatic address assignment."; leaf start-ip-address { type inet:ipv4-address-no-zone; must "not(../start-ip-address=../../../../../gateway/gate-ip)"; description "Specify the start IP address which must be in the IP address segment specified in the section."; } leaf end-ip-address { type inet:ipv4-address-no-zone; description "Specify the end IP address which must be in the IP address segment specified in the section."; } } // list excluded-ip-address } // container excluded-ip-addresss container static-binds { description "List of the statically bound IP-MAC address pair."; list static-bind { key "ip-address"; unique "mac-address"; description "Configure the statically bound IP-MAC address pair. The specification on the device cannot exceed 2000."; leaf ip-address { type inet:ipv4-address-no-zone; must "not(../ip-address='255.255.255.255' or ../ip-address='127.0.0.0')"; description "Specify the bound IP address. This IP address must be within the current address segment."; } leaf mac-address { type pub-type:mac-address; must "not(../mac-address='ffff-ffff-ffff')"; mandatory true; description "Specify the bound MAC address. The MAC address cannot be a manycast MAC address with the first byte of 01 and must be unique in the current address pool."; } } // list static-bind } // container static-binds container statistic { config false; description "Statistics of IP pool sections."; uses ip-address-number; } // container statistic container address-infos { config false; description "List of IPv4 address informations."; list address-info { key "ip"; description "Statistics of IPv4 address information."; leaf ip { type inet:ipv4-address-no-zone; description "The IP address."; } leaf status { ext:support-filter "true"; type ip-address-status; description "The status of IP address."; } leaf index { type uint32; description "The index of IP address."; } leaf mac { type pub-type:mac-address; description "User's MAC address."; } leaf user-id { type uint32; description "User ID."; } leaf lease { type uint32; units "s"; description "IP address lease."; } leaf interface-name { type string { length "1..64"; } description "The name of an interface."; } leaf pevlan { type uint16; description "The PE-VLAN of IP address."; } leaf cevlan { type uint16; description "The CE-VLAN of IP address."; } } // list address-info } // container address-infos } // list section } // container sections container dhcp-server-group { when "../../rui-slave = 'true' and ../gateway/gate-ip"; description "Configure to bind a dhcp-server group to an IP address pool."; uses dhcp-server-group; } // container dhcp-server-group uses common-config; uses delayed-release; container lease { description "Configure lease of IP pool, include day, hour and minute. If the value is 0, the lease is infinite. The lease value (sum of day, hour, and minute, in seconds) must be greater than the effective value of rebind time (sum of day, hour, and minute, in seconds) and the effective value of renew time (sum of day, hour, and minute, in seconds). If the value of lease is 0, the values of both rebind time and renew time must be 0."; uses time-default-config; } // container lease container lease-rebind-time { description "Configure the rebind time of the pool. If the value of rebind time is 0, the effective value is 1/2 of the lease. If the value of rebind time is not 0, the effective value is the actually configured value. The effective value of rebind time (sum of day, hour, and minute, in seconds) must be less than the value of lease (sum of day, hour, and minute, in seconds) and greater than the effective value of renew time (sum of day, hour, and minute, in seconds). If the value of lease is 0, the value of rebind time must be 0."; uses date-time-config; } // container lease-rebind-time container lease-renew-time { description "Configure the renew time of the pool. If the value of renew time is 0, the effective value is 7/8 of the lease. If the value of rebind time is not 0, the effective value is the actually configured value. The effective value of renew time (sum of day, hour, and minute, in seconds) must be less than the effective value of rebind time (sum of day, hour, and minute, in seconds) and the value of lease (sum of day, hour, and minute, in seconds). If the value of lease is 0, the value of renew time must be 0."; uses date-time-config; } // container lease-renew-time container reserved-ip-address { description "Configure the reservation type of an IP address for a user, either leased-based IP address reservation or MAC-address-based IP address reservation."; leaf type { type reserved-ip-address; description "Specify the type of reserved IP address."; } } // container reserved-ip-address uses lease-management; uses lock; container import-vpn-instance { when "../gateway"; description "Configure the spcified VPN instance to an address pool."; uses import-vpn-instance; } // container import-vpn-instance uses ip-attribute-public; uses warning-threshold; uses constant-index; } // container local container remote { when "../type = 'remote'"; must "not(./vpn-instance/name = ./import-vpn-instance/name)"; description "Configure the information for the remote IP address pool."; uses specified-up; uses vpn-instance; container gateway { must "(./gate-ip and ./gate-mask) or (not(./gate-ip) and not(./gate-mask))"; description "Configure the gate IP address and gate mask for the remote IP address pool. The gate-ip and gate-mask combinations of different pool instances cannot overlap."; uses gateway; } // container gateway container excluded-ip-addresss { when "../gateway/gate-ip"; description "List of range of IP addresses that do not take part in automatic address assignment."; list excluded-ip-address { must "not(./start-ip-address=../../gateway/gate-ip and ./end-ip-address=../../gateway/gate-ip)"; key "start-ip-address end-ip-address"; description "Configure the range of IP addresses that do not take part in automatic address assignment."; leaf start-ip-address { type inet:ipv4-address-no-zone; description "Specify the start IP address which must be in the IP address segment specified in the gateway."; } leaf end-ip-address { type inet:ipv4-address-no-zone; description "Specify the end IP address which must be in the IP address segment specified in the gateway."; } } // list excluded-ip-address } // container excluded-ip-addresss container dhcp-server-group { when "../gateway/gate-ip"; description "Configure an IP address pool bound to a dhcp-server group."; uses dhcp-server-group; } // container dhcp-server-group container ip-loose-check { description "Configure a BRAS checking whether the IP addresses assigned by the DHCP server are on the network segment to which the gateway address of the remote address pool belongs."; leaf enable { type boolean; default "false"; description "Enable/disable check remote IP Loose."; } } // container ip-loose-check uses lease-management; uses common-config; container reserved-ip-address { description "Configure the reservation type of an IP address for a user, only leased-based IP address reservation."; leaf type { type reserved-ip-address-remote; description "Specify the type of reserved IP address."; } } // container reserved-ip-address uses lock; container import-vpn-instance { when "../gateway"; description "Configure the spcified VPN instance to an address pool."; uses import-vpn-instance; } // container import-vpn-instance uses ip-attribute-public; uses warning-threshold; uses constant-index; } // container remote container dynamic { when "../type = 'dynamic'"; must "not(./vpn-instance/name = ./import-vpn-instance/name)"; description "Configure the information for the dynamic IP address pool."; uses vpn-instance; container dap-server { description "Configure a DAP resource pool to assign address segments to a BRAS."; leaf name { type string { length "1..32"; } description "Specify the name of a DAP resource pool."; } } // container dap-server container subnet-length { presence "Subnet length."; description "Configure a mask length for the initial and extended address segment."; leaf initial { type uint16 { range "0 | 16..30"; } mandatory true; description "Specify a mask length for the initial address segment."; } leaf extend { type uint16 { range "0 | 16..30"; } description "Specify a mask length for the extend address segment."; } } // container subnet-length uses common-config; uses delayed-release; container lease { description "Configure lease of IP pool, include day, hour and minute. If the value is 0, the lease is infinite. The lease value (sum of day, hour, and minute, in seconds) must be greater than the effective value of rebind time (sum of day, hour, and minute, in seconds) and the effective value of renew time (sum of day, hour, and minute, in seconds). If the value of lease is 0, the values of both rebind time and renew time must be 0."; uses time-default-config; } // container lease container lease-rebind-time { description "Configure the rebind time of the pool. If the value of rebind time is 0, the effective value is 1/2 of the lease. If the value of rebind time is not 0, the effective value is the actually configured value. The effective value of rebind time (sum of day, hour, and minute, in seconds) must be less than the value of lease (sum of day, hour, and minute, in seconds) and greater than the effective value of renew time (sum of day, hour, and minute, in seconds). If the value of lease is 0, the value of rebind time must be 0."; uses date-time-config; } // container lease-rebind-time container lease-renew-time { description "Configure the renew time of the pool. If the value of renew time is 0, the effective value is 7/8 of the lease. If the value of rebind time is not 0, the effective value is the actually configured value. The effective value of renew time (sum of day, hour, and minute, in seconds) must be less than the effective value of rebind time (sum of day, hour, and minute, in seconds) and the value of lease (sum of day, hour, and minute, in seconds). If the value of lease is 0, the value of renew time must be 0."; uses date-time-config; } // container lease-renew-time container detect-interval { description "Configure the number of retransmission times and a retransmission interval for detecting address segment availability in a dynamic address pool."; leaf retransmit-times { type uint16 { range "1..10"; } default "2"; description "Specify the number of retransmission times."; } uses time-default-config { refine day { default "0"; } refine hour { default "0"; } refine minute { default "30"; } } } // container detect-interval container bind-radius-server-group { description "Configure a dynamic address pool bound to a RADIUS server group."; leaf name { type leafref { path "/radius:radius/radius:radius-server-groups/radius:radius-server-group/radius:name"; } description "Specify a RADIUS server group for a dynamic address pool."; } } // container bind-radius-server-group uses lock; uses lease-management; container used-threshold { must "./upper-limit > ./lower-limit"; description "Configure upper and lower address usage thresholds of a dynamic address pool."; leaf upper-limit { type uint32 { range "1..100"; } default "80"; description "Specify an upper threshold for address segment application, in percentage."; } leaf lower-limit { type uint32 { range "0..99"; } default "20"; description "Specify a lower threshold for address segment release, in percentage. lower-limit must be smaller than upper-limit."; } } // container used-threshold container authentication { must "(./name and ./password) or (not(./name) and not(./password))"; description "Configure an authentication name and a password for the BRAS to apply to a RADIUS server for dynamic address segments."; leaf name { type string { length "1..253"; } description "Specify an authentication name used for applying for dynamic address segments."; } leaf password { type pub-type:password-extend { length "1..128"; } description "The password is a string ranging from 1 to 16 characters for a simple password or 1 to 128 characters for a ciphertext password."; } } // container authentication container import-vpn-instance { description "Configure the spcified VPN instance to an address pool."; uses import-vpn-instance; } // container import-vpn-instance container bind-up-authorization-group { description "Configure the UP authorization group bound to the dynamic address pool."; leaf name { type leafref { path "/bras-cu-controller:bras-cu-controller/bras-ipv4-address-manage:ipv4-address-manage/bras-ipv4-address-manage:up-authorization-groups/bras-ipv4-address-manage:up-authorization-group/bras-ipv4-address-manage:name"; } must "count(/bras-cu-controller:bras-cu-controller/bras-ipv4-address-manage:ipv4-address-manage/bras-ipv4-address-manage:up-authorization-groups/bras-ipv4-address-manage:up-authorization-group[bras-ipv4-address-manage:name=current()]/bras-ipv4-address-manage:ups/bras-ipv4-address-manage:up) >= 1"; description "Specify the name of the UP authorization group bound to the dynamic address pool."; } } // container bind-up-authorization-group uses constant-index; container subnet-segments { config false; description "List of statistics for dynamic IP address pool."; list subnet-segment { key "subnet-index start-ip-address"; description "Get the subnet total statistics for dynamic IP address pool."; leaf subnet-index { type uint16; description "The subnet index of dynamic pool."; } leaf start-ip-address { type inet:ipv4-address-no-zone; description "The start IP address of subnet segment."; } leaf end-ip-address { type inet:ipv4-address-no-zone; description "The end IP address of subnet segment."; } leaf subnet { type inet:ipv4-address-no-zone; description "The IP address of subnet."; } leaf mask { type inet:ipv4-address-no-zone; description "The mask IP address of subnet segment."; } choice occupied-policy { description "The algorithm for IP address pool."; case up-id { description "Query address pool statistics based on the up-id."; leaf up-id { ext:support-filter "true"; type uint16; description "Specify the ID of a vBRAS-UP."; } } // case up-id case standby-group { description "Query address pool statistics based on master or slave up."; leaf master-up-id { ext:support-filter "true"; type uint16; description "Specify the ID of the vBRAS-UP where the master interface in a vBRAS-UP warm backup group resides or a vBRAS-UP hot backup group resides."; } leaf slave-up-id { ext:support-filter "true"; type uint16; description "Specify the ID of the vBRAS-UP where the slave interface in a vBRAS-UP warm backup group resides or a vBRAS-UP hot backup group resides."; } } // case standby-group case up-backup-profile { description "Query address pool statistics based on the up-backup-profile."; leaf up-backup-profile { ext:support-filter "true"; type uint32; description "Specify the name of a vBRAS-UP backup policy profile."; } } // case up-backup-profile } // choice occupied-policy leaf total { type uint32; description "The total IP address number of subnet segment."; } leaf used { type uint32; description "The used IP address number of subnet segment."; } leaf idle { type uint32; description "The idle IP address number of subnet segment."; } leaf conflict { type uint32; description "The conflict IP address number of subnet segment."; } leaf status { type string { length "1..15"; } description "The status of subnet segment. When the address segment status is working, the value of status is Unlocked. When the address segment status is used, init, release, block, or not created, the value of status is Locked."; } leaf acct-session-id { type string { length "1..44"; } description "The acct session id of subnet segment."; } uses ip-address-info; } // list subnet-segment } // container subnet-segments container cu-pool-statistics { config false; description "List of the statistics for IP address pool. Only support CU mode."; list cu-pool-statistic { key "upmng-instance"; description "Get the statistics for IP address pool. Only support CU mode."; leaf upmng-instance { type uint32; description "UPMNG instance ID."; } leaf pool-index { ext:support-filter "true"; type uint16; description "The index of IP address pool."; } leaf status { type string { length "1..30"; } description "The status of IP address pool."; } leaf ratio { type uint8; description "The used ratio of IP address pool."; } leaf total-ip-number { type uint32; description "The total number of IP address."; } leaf total-idle-number { type uint32; description "The total number of idle IP address."; } leaf used-ip-number { type uint32; description "The number of used IP address."; } leaf conflict-ip-number { type uint32; description "The number of conflict IP address."; } leaf disable-ip-number { type uint32; description "The number of disable IP address."; } leaf designated-ip-number { type uint32; description "The number of designated IP address."; } leaf delayed-ip-number { type uint32; description "The number of delayed IP address."; } leaf gateway-ip-number { type uint32; description "The number of gateway IP address."; } leaf isolated-ip-number { type uint32; description "The number of isolated IP address."; } leaf time-out-count { type uint32; description "The number of no responses from the address pool."; } leaf option-number { type uint32; description "The number of option."; } leaf sub-option-number { type uint32; description "The number of sub-option."; } leaf blocked-time { type uint32; description "The number of times that the address pool is isolated."; } leaf ip-allocation-failures { type uint32; description "The number of times that the address pool allocation ip fail."; } leaf force-reply-count { type uint32; description "The force reply count of that the address pool."; } } // list cu-pool-statistic } // container cu-pool-statistics } // container dynamic container pool-statistic { config false; description "Get the statistics for IP address pool."; leaf pool-index { ext:support-filter "true"; type uint16; description "The index of IP address pool."; } leaf status { type string { length "1..30"; } description "The status of IP address pool."; } leaf ratio { type uint8; description "The used ratio of IP address pool."; } leaf total-ip-number { type uint32; description "The total number of IP address."; } leaf total-idle-number { type uint32; description "The total number of idle IP address."; } leaf used-ip-number { type uint32; description "The number of used IP address."; } leaf conflict-ip-number { type uint32; description "The number of conflict IP address."; } leaf disable-ip-number { type uint32; description "The number of disable IP address."; } leaf designated-ip-number { type uint32; description "The number of designated IP address."; } leaf delayed-ip-number { type uint32; description "The number of delayed IP address."; } leaf gateway-ip-number { type uint32; description "The number of gateway IP address."; } leaf isolated-ip-number { type uint32; description "The number of isolated IP address."; } leaf time-out-count { type uint32; description "The number of no responses from the address pool."; } leaf option-number { type uint32; description "The number of option."; } leaf sub-option-number { type uint32; description "The number of sub-option."; } leaf blocked-time { type uint32; description "The number of times that the address pool is isolated."; } leaf ip-allocation-failures { type uint32; description "The number of times that the address pool allocation ip fail."; } leaf force-reply-count { type uint32; description "The force reply count of that the address pool."; } } // container pool-statistic } // list ipv4-pool } // container ipv4-pools container pool-groups { description "List of address pool groups."; list pool-group { key "name"; max-elements 1024; description "Configure an address pool group."; leaf name { ext:case-sensitivity "lower-only"; type string { length "1..128"; pattern '[a-z0-9._-]{1,128}'; } must "../name != '-' and ../name != '--'"; description "Specify the name of an address pool group."; } uses vpn-instance; container bind-pools { description "Configure the address pool used by the IP pool-group or changes the ID of the address pool."; leaf-list pool-name { type leafref { path "/bras-ipv4-address-manage:bras-ipv4-address-manage/bras-ipv4-address-manage:ipv4-pools/bras-ipv4-address-manage:ipv4-pool/bras-ipv4-address-manage:name"; } must "/bras-ipv4-address-manage:bras-ipv4-address-manage/bras-ipv4-address-manage:ipv4-pools/bras-ipv4-address-manage:ipv4-pool[name=current()]/bras-ipv4-address-manage:type != 'dynamic'"; max-elements 1024; description "Configure the name of the IP address pool bound to IP pool group."; } } // container bind-pools uses ip-attribute-public; uses warning-threshold; container warning-exhaust { description "Configure warning exhaust of IPv4 address usage."; leaf exhaust { type boolean; default "false"; description "Enable/disable the address exhaustion alarm function for an IPv4 address pool."; } } // container warning-exhaust } // list pool-group } // container pool-groups container auto-refresh { description "Configure the ip-pool route auto-refresh disable command disables auto-refresh of address pool routes."; leaf enable { type boolean; default "true"; description "Enable/disable auto-refresh of address pool routes."; } } // container auto-refresh container ip-unr-route-tag { description "Configure route tags for IPv4 users."; leaf local-pool-tag { type uint32; default "0"; description "Specify the route tag of the network segment generated by an IPv4 local address pool."; } leaf framed-route-tag { type uint32; default "0"; description "Specify the route tag of the network segment generated based on the Framed-Route attribute delivered by the RADIUS server."; } leaf framed-ip-netmask-tag { type uint32; default "0"; description "Specify the route tag of the network segment generated based on the IP-Netmask attribute delivered by the RADIUS server."; } leaf framed-ip-address-tag { type uint32; default "0"; description "Specify the route tag of the host route generated based on the IPv4 address delivered by the RADIUS server."; } leaf remote-pool-tag { type uint32; default "0"; description "Specify the route tag of the network segment generated by an IPv4 remote address pool."; } leaf dynamic-pool-tag { type uint32; default "0"; description "Specify the route tag of the network segment generated by an IPv4 dynamic address pool."; } } // container ip-unr-route-tag container pool-select-algorithm { description "Configure an algorithm to device which IP address pool to online users."; leaf local-round-robin { type boolean; default "false"; description "Enable/disable the round robin algorithm for local IP address pool."; } choice remote-algorithm { description "The algorithm for remote IP address pool."; case remote-round-robin { description "Configure the round robin algorithm for remote IP address pool."; leaf remote-round-robin { type empty; description "The round robin algorithm for remote IP address pool."; } } // case remote-round-robin case remote-loading-share { description "Configure the restrain period and timeout threshold to select the IP address pool according to the weight algorithm."; container remote-loading-share { presence "Create remote-loading-share."; description "Enable/disable the restrain period and timeout threshold to select the IP address pool according to the weight algorithm."; leaf restrain-period { type uint8 { range "1..60"; } units "min"; default "10"; description "The restrain period."; } leaf timeout-threshold { type uint8 { range "1..255"; } default "10"; description "The timeout threshold."; } } // container remote-loading-share } // case remote-loading-share } // choice remote-algorithm } // container pool-select-algorithm container dhcp-decline { description "Configure the action taken by the device on the user IP address after the device receives a DHCP decline packet from the user."; leaf ip-address-status { type ip-status; default "conflict"; description "Set IP address status."; } } // container dhcp-decline container constant-index { description "Configure pool constant index."; leaf enable { type boolean; default "false"; description "Enable/disable the function to configure a constant index for the IPv4 address pool."; } } // container constant-index container remote-id-strip { description "Configure the functional strip remote-id of Option 82 in dhcp request packet."; leaf enable { type boolean; default "false"; description "Enable/disable the functional strip remote-id of Option 82 in dhcp request packet."; } } // container remote-id-strip container frame-ip-reply-option82 { description "Configure a device to insert Option 82 attributes into Offer and ACK messages."; leaf enable { type boolean; default "false"; description "Enable/disable a device to insert Option 82 attributes into Offer and ACK messages."; } } // container frame-ip-reply-option82 container auto-block { description "Configure automatic isolation of address pools."; leaf enable { type boolean; default "true"; description "Enable/disable automatic isolation of address pools."; } leaf slave-switch { type boolean; default "true"; description "Enable/disable the active/standby switchover function for IPv4 address pool isolation."; } } // container auto-block container delay-release { description "Configure the delay time for IP address release when users go offline."; leaf time { type uint16 { range "10..3600"; } units "s"; description "Specify the delay release time."; } } // container delay-release container import-ribs { description "List of bas unr import-ribs policy."; list import-rib { must "not(./source-vpn-instance=./destination-vpn-instance)"; key "source-vpn-instance destination-vpn-instance"; max-elements 256; description "Configure a bas unr import-ribs policy."; leaf source-vpn-instance { type leafref { path "/ni:network-instance/ni:instances/ni:instance/ni:name"; } must "/ni:network-instance/ni:instances/ni:instance[ni:name=current()]/l3vpn:afs/l3vpn:af[l3vpn:type='ipv4-unicast'] or ../source-vpn-instance='_public_'"; description "The name of source vpn-instance."; } leaf destination-vpn-instance { type leafref { path "/ni:network-instance/ni:instances/ni:instance/ni:name"; } must "/ni:network-instance/ni:instances/ni:instance[ni:name=current()]/l3vpn:afs/l3vpn:af[l3vpn:type='ipv4-unicast'] or ../destination-vpn-instance='_public_'"; description "The name of destination vpn-instance."; } } // list import-rib } // container import-ribs container pool-usage-statistics { config false; description "List of usage statistics for all IPv4 address pools, including the local and remote address pools."; list pool-usage-statistic { key "pool-name"; description "Display the usage statistics for all IPv4 address pools, including the local and remote address pools."; leaf pool-name { type string { length "1..128"; } description "Name of a pool."; } leaf vpn-name { ext:support-filter "true"; type pub-type:vrf-name { length "1..31"; } default "_public_"; description "Name of an vpn."; } leaf total-num { type uint32; description "Total number of IPv4 addresses in the pool."; } leaf used-num { type uint32; description "Number of used IPv4 addresses in the pool."; } leaf ratio { type uint8; description "Usage of the IPv4 address pool of the pool."; } } // list pool-usage-statistic } // container pool-usage-statistics container global-statistic { config false; description "Get the total statistics for IP address pool."; leaf pool-number { type uint32; description "Number of configured addresses pools."; } leaf local-pool-number { type uint32; description "Number of configured local addresses pools."; } leaf remote-pool-number { type uint32; description "Number of configured remote addresses pools."; } leaf dynamic-pool-number { type uint32; description "Number of configured dynamic addresses pools."; } leaf total-number { type uint32; description "The total number of IP address."; } leaf idle-number { type uint32; description "Number of idle addresses on the equipment."; } leaf used-number { type uint32; description "Number of addresses in use on the equipment."; } leaf conflict-number { type uint32; description "Number of conflicting addresses on the equipment."; } leaf exclude-number { type uint32; description "Number of excluded addresses on the equipment."; } leaf designated-ip-number { type uint32; description "The designated number of IP address."; } leaf gateway-ip-number { type uint32; description "The gateway number of IP address."; } leaf delayed-ip-number { type uint32; description "The delayed number of IP address."; } leaf isolated-ip-number { type uint32; description "The isolated number of IP address."; } leaf used-percent { type uint32; description "The percent of used IP address."; } } // container global-statistic container cu-global-statistics { config false; description "List of the total statistics for IP address pool. Only support CU mode."; list cu-global-statistic { key "upmng-instance"; description "Get the total statistics for IP address pool. Only support CU mode."; leaf upmng-instance { type uint32; description "UPMNG instance ID."; } leaf pool-number { type uint32; description "Number of configured addresses pools."; } leaf local-pool-number { type uint32; description "Number of configured local addresses pools."; } leaf remote-pool-number { type uint32; description "Number of configured remote addresses pools."; } leaf dynamic-pool-number { type uint32; description "Number of configured dynamic addresses pools."; } leaf total-number { type uint32; description "The total number of IP address."; } leaf idle-number { type uint32; description "Number of idle addresses on the equipment."; } leaf used-number { type uint32; description "Number of addresses in use on the equipment."; } leaf conflict-number { type uint32; description "Number of conflicting addresses on the equipment."; } leaf exclude-number { type uint32; description "Number of excluded addresses on the equipment."; } leaf designated-ip-number { type uint32; description "The designated number of IP address."; } leaf gateway-ip-number { type uint32; description "The gateway number of IP address."; } leaf delayed-ip-number { type uint32; description "The delayed number of IP address."; } leaf isolated-ip-number { type uint32; description "The isolated number of IP address."; } leaf used-percent { type uint32; description "The percent of used IP address."; } } // list cu-global-statistic } // container cu-global-statistics container statistics-by-domains { config false; description "List of domain-based statistics."; list statistics-by-domain { key "domain-name"; description "Domain-based statistics."; leaf domain-name { type leafref { path "/aaa:aaa/aaa:domains/aaa:domain/aaa:name"; } description "Specify the name of a domain."; } container usages { description "Statistics of IP address."; container upid-statistics { description "List of IP address by UP ID statistics."; list upid-statistic { key "up-id"; description "IP address by UP ID statistics."; leaf up-id { type uint32 { range "1024..2023 | 2048..3047 | 3072..4071 | 4096..5095"; } must "(../up-id<=(/bras-cu-controller:bras-cu-controller/bras-cu-controller:global-attribute/bras-cu-controller:up-base-id + 999) and ../up-id>=/bras-cu-controller:bras-cu-controller/bras-cu-controller:global-attribute/bras-cu-controller:up-base-id)"; description "The UP ID."; } uses ip-pool-usage; } // list upid-statistic } // container upid-statistics } // container usages container max-usage { description "Display historical maximum usage statistics for IPv4 addresses base on domain."; uses ip-pool-max-usage; } // container max-usage container cu-max-usages { description "List of usage statistics for IPv4 addresses base on domain."; list cu-max-usage { key "up-group-id"; description "Display historical maximum usage statistics for IPv4 addresses base on domain."; leaf up-group-id { type uint32; description "The instance ID."; } uses ip-pool-max-usage; } // list cu-max-usage } // container cu-max-usages container usage-status { description "Display statistics for public IP address pool status in a specified domain."; uses ip-pool-usage; leaf pool-status { type uint8; description "Public IP address pool status can be 0, 1, or 2. If the IP address pool usage is greater than the lower threshold and less than the upper threshold, the value is 1 (warning). If the IP address pool usage is greater than or equal to the upper threshold, the value is 2 (danger)."; } } // container usage-status container cu-usage-statuss { description "List of statistics for public IP address pool status in a specified domain."; list cu-usage-status { key "up-group-id"; description "Display statistics for public IP address pool status in a specified domain."; leaf up-group-id { type uint32; description "The instance ID."; } uses ip-pool-usage; leaf pool-status { type uint8; description "Public IP address pool status can be 0, 1, or 2. If the IP address pool usage is greater than the lower threshold and less than the upper threshold, the value is 1 (warning). If the IP address pool usage is greater than or equal to the upper threshold, the value is 2 (danger)."; } } // list cu-usage-status } // container cu-usage-statuss } // list statistics-by-domain } // container statistics-by-domains } // container bras-ipv4-address-manage rpc reserved-ip-address { description "Recycle all the reserved addresses in the address pool."; input { leaf pool-name { type string { length "1..128"; } mandatory true; description "Specify the pool name."; } } } // rpc reserved-ip-address augment /ni:network-instance/ni:instances/ni:instance/l3vpn:afs/l3vpn:af { description "Define the configuration under the vpn-instance which configued the IPv4-family."; container bas { description "Configure the bas under vpn-instance."; container ipv4-address-manage { when "../../l3vpn:type='ipv4-unicast' and ../../../../ni:name!='_public_'"; description "Configure the bas-pool information about vpn-instance."; container warning-threshold { description "Configure the warning threshold of IPv4 pools who bound with the vpn instance."; leaf percent-value { type uint8 { range "0..100"; } default "80"; description "The percentage of IPv4 pools warning threshold."; } } // container warning-threshold } // container ipv4-address-manage } // container bas } augment /bras-cu-controller:bras-cu-controller { description "Define the configuration under BRAS CU controller."; container ipv4-address-manage { description "Configure the Bras IPv4 address management about cu-controller."; container up-authorization-groups { description "List of UP authorization groups."; list up-authorization-group { key "name"; max-elements 1024; description "Configure an UP authorization group."; leaf name { type string { length "1..32"; pattern '[a-zA-Z0-9._-]{1,32}'; } must "../name != '-' and ../name != '--'"; description "Specify the UP authorization group name."; } container ups { description "List of UP IDs bound to the UP authorization group."; list up { key "up-id"; description "Configure the ID of the UP bound to the UP authorization group."; leaf up-id { type uint32 { range "1024..2023 | 2048..3047 | 3072..4071 | 4096..5095"; } must "(../up-id<=(/bras-cu-controller:bras-cu-controller/bras-cu-controller:global-attribute/bras-cu-controller:up-base-id + 999) and ../up-id>=/bras-cu-controller:bras-cu-controller/bras-cu-controller:global-attribute/bras-cu-controller:up-base-id)"; description "Specify the ID of the UP bound to the UP authorization group."; } } // list up } // container ups } // list up-authorization-group } // container up-authorization-groups } // container ipv4-address-manage } } // module huawei-bras-ipv4-address-manage
© 2023 YumaWorks, Inc. All rights reserved.