0% found this document useful (0 votes)
103 views1 page

DHCP Script

The document configures queue settings for a client based on their MAC address and IP address retrieved from a DHCP lease. If the lease is bound, it adds the client to three queues - a global INET queue, a client-specific queue, and an AP-specific queue - with various bandwidth limits. If the lease is not bound, it removes the client from the queues.

Uploaded by

arif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views1 page

DHCP Script

The document configures queue settings for a client based on their MAC address and IP address retrieved from a DHCP lease. If the lease is bound, it adds the client to three queues - a global INET queue, a client-specific queue, and an AP-specific queue - with various bandwidth limits. If the lease is not bound, it removes the client from the queues.

Uploaded by

arif
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

:local macaddr "Kos - $leaseActMAC";

:if ($leaseBound = "1") do={


/queue simple add name=$macaddr parent="GLOBAL INET" target=($leaseActIP .
"/32") max-limit=1024k/3096k burst-limit=1224k/4096k burst-threshold=768k/2048k
burst-time=3s/3s packet-marks=none;} else={/queue simple remove $macaddr}

:local queueName "Client- $leaseActMAC";

:if ($leaseBound = "1") do={


/queue simple add name=$macaddr parent="GLOBAL INET" target=($leaseActIP .
"/32") limit-at=1024k/3096k max-limit=1224k/4096k comment=[/ip dhcp-server lease
get [find where active-mac-address=$leaseActMAC && active-address=$leaseActIP]
host-name];
} else={
/queue simple remove $macaddr
}

:local queueName "Kos- $leaseActMAC";

:if ($leaseBound = "1") do={


/queue simple add name=$queueName parent="3. AP WISMA KARTINI 2(tengah)"
target=($leaseActIP . "/32") limit-at=512k/1496k max-limit=768k/2048k comment=[/ip
dhcp-server lease get [find where active-mac-address=$leaseActMAC && active-
address=$leaseActIP] host-name];
} else={
/queue simple remove $queueName
}

You might also like