亚洲欧洲国产欧美一区精品,激情五月亚洲色五月,最新精品国偷自产在线婷婷,欧美婷婷丁香五月天社区

      考試首頁 | 考試用書 | 培訓(xùn)課程 | 模擬考場 | 考試論壇  
        當(dāng)前位置:操作系統(tǒng) > Unix > 文章內(nèi)容
        

      Unix系統(tǒng):freebsd服務(wù)器ARP綁定腳本

       [ 2017年6月28日 ] 【

        #!/bin/sh

        _PATH="/home/shwb"

        if [ -s $_PATH/md5 ] && [ -s $_PATH/arp.txt ] ; then

        new=`md5 $_PATH/arp.txt | cut -d ' ' -f 4`

        old=`cat $_PATH/md5`

        if [ "$new" != "$old" ] ; then

        arp -a -d

        arp -f $_PATH/arp.txt

        date "+DATE: %Y-%m-%d-%H:%M:%S" >>/var/log/arp.log

        md5 $_PATH/arp.txt | cut -d ' ' -f 4 >$_PATH/md5

        fi

        elif [ -s $_PATH/arp.txt ] ; then

        arp -a -d

        arp -f $_PATH/arp.txt

        date "+DATE: %Y-%m-%d-%H:%M:%S" >>/var/log/arp.log

        md5 $_PATH/arp.txt | cut -d ' ' -f 4 >$_PATH/md5

        fi

        注arp.txt文件格式為ip mac,如:

        192.168.1.1 00:00:00:00:00:00

        配合ftp就可以實現(xiàn)遠(yuǎn)程動態(tài)修改服務(wù)器的靜態(tài)MAC表了

      將考試網(wǎng)添加到收藏夾 | 每次上網(wǎng)自動訪問考試網(wǎng) | 復(fù)制本頁地址,傳給QQ/MSN上的好友 | 申請鏈接 | 意見留言 TOP
      關(guān)于本站  網(wǎng)站聲明  廣告服務(wù)  聯(lián)系方式  站內(nèi)導(dǎo)航  考試論壇
      Copyright © 2007-2013 中華考試網(wǎng)(Examw.com) All Rights Reserved