在profile的on-up腳本中定義以下腳本:
#判斷當前賬號連接方式是否pppoe :if ([/ppp active get [find name=$user] service]="pppoe") do={ #獲取當前賬號分配的IP地址 :local ip [/ppp active get [find name=$user] address]; #獲取當前賬號的mac地址 :local mac [/ppp active get [find name=$user] caller-id]; :log error "賬號:$user,分配的內網IP:$ip,mac地址:$mac" #設置賬號綁定的內網ip及mac地址 /ppp secret set [find name=$user] remote-address=$ip caller-id=$mac; }