I. Question proposal  
 
After the campus network is built, it is required that the MAC address of each workstation in the network and the assigned static IP address be bound on the server side to facilitate unified management and reduce security risks. Whether it is binding the MAC address on the server after the terminal obtains the MAC address, or remotely obtaining the MAC address in batches using the "MAC scanner", the Network Manager is very heavy. Is there a more convenient and convenient way?
 
Ii. Solution  
 
After exploration, I found that the combination of "MAC scanner" and Excel 2000 can solve this problem well. The idea is as follows:
 
1. Run the "MAC scanner": After scanning the http://dl.163.com/html/10/10456.html, click "Save saved" to save the scanned result as a local file, such as mac.txt.
 
2. Use Excel's powerful data processing function to convert the MAC address in a text file to the format required by the ARP command, copy and paste the data to the notepad, and save it as a batch processing file.
 
3. Run the batch file on the server side.
 
Iii. Procedure  
 
1.import mac.txt to an Excel Workbook 
 
1) Start Excel and create a new work book, save it as a drawing macaddress table .xls ". In the dialog box that appears, select "import" and click "text import wizard.
 
2) In the "text import wizard-3 step 1", click "Raw data type". Under the "select the most appropriate file type" option, change the default "fixed width" to "separator", and click the [next] button to go to the "text import wizard-Step 3 2 ", in the "separator" option, cancel the "Tab key", select only the "space" item, and then click the [next] button; go to the "text import wizard-Step 3" and click the [finish] button. When the "Import Data" dialog box is displayed, click [OK] to complete data import. The imported worksheet 3 is shown in.
 
2. Use Excel to process data 
 
1) insert A column before column A and enter the command and parameter "ARP-S" for binding the MAC address in cell A1 ". 2) Insert seven columns between the MAC address and the computer name. The column numbers are D, E, F, G, H, I, and J in sequence.
 
3) use string functions to separate 12-bit MAC addresses into two groups:
 
Enter "= left (C1, 2)" in cell D1 )";
 
Enter "= mid (C1, 3, 2)" in cell E1 )";
 
Enter "= mid (C1, 5, 2)" in cell F1 )";
 
Enter "= mid (C1, 7,2)" in cell G1 )";
 
Enter "= mid (C1, 9, 2)" in cell H1 )";
 
Enter "= right (C1, 2)" in the I1 cell )".
 
4) Change D1 ~ In the J1 Cell ~ The content of cell I1 is merged and separated by minus signs. Merge method: in J1, enter "= D1 &"-"& E1 &"-"& F1 &"-"& G1 &"-"& H1 & & "-" & I1 ". 5) use the fill method to complete column A and column D ~ Data Processing of column J
 
6) Hide C ~ Column I.
 
3. Create a batch file  
 
1) copy the data in columns A, B, and J of the Excel worksheet and paste it to notepad. Save the work book into macaddress table .xls "and exit Excel.
 
2) Save the notepad file as Mac. bat.
 
4. Bind MAC addresses and IP addresses in batches
 
In Server DOS mode, run Mac. bat to bind multiple MAC addresses and IP addresses.