Maccd

From Wiki of WFilter NG Firewall
(Difference between revisions)
Jump to: navigation, search
 
(One intermediate revision by one user not shown)
Line 17: Line 17:
 
Suppose the core three layer switch has ip address "192.168.1.2", the "SNMP Command" is:
 
Suppose the core three layer switch has ip address "192.168.1.2", the "SNMP Command" is:
  
<code>
+
''snmpwalk -v 2c -c public 192.168.1.2 ipNetToPhysicalPhysAddress''
snmpwalk -v 2c -c public 192.168.1.2 ipNetToMediaPhysAddress
+
</code>
+
  
The real return message is:
+
"ipNetToPhysicalPhysAddress" can retrieve both IPv4 and IPv6 addresses, you also can use "ipNetToMediaPhysAddress" for IPv4 only. The real return message is:
  
<code>
+
''IP-MIB::ipNetToPhysicalPhysAddress.9.192.168.1.1 = STRING: 0:6:f6:bf:8b:cc''
IP-MIB::ipNetToMediaPhysAddress.9.192.168.1.1 = STRING: 0:6:f6:bf:8b:cc
+
 
+
IP-MIB::ipNetToMediaPhysAddress.9.192.168.1.11 = STRING: ae:15:53:a0:9b:7f
+
  
 +
''IP-MIB::ipNetToPhysicalPhysAddress.9.192.168.1.11 = STRING: ae:15:53:a0:9b:7f''
 
...
 
...
</code>
+
 
  
 
To match every return rows, we configure the "result format" as:
 
To match every return rows, we configure the "result format" as:
  
<code>
+
''IP-MIB::ipNetToPhysicalPhysAddress\.\d+.*''
IP-MIB::ipNetToMediaPhysAddress\.\d+.*
+
 
</code>
+
  
 
The "MAC Detector" will use the "result format" to get every record and retrieve the mac and ip information.
 
The "MAC Detector" will use the "result format" to get every record and retrieve the mac and ip information.

Latest revision as of 16:30, 1 April 2026

Contents

[edit] 1 MAC Detector

"MAC Detector" can gather client's physical MAC addresses via SNMP protocol. With "MAC Detector" enabled, you can:

  • Set access policy by MAC addresses.
  • Set IP-MAC binding in a multiple-segments network.
  • Show real MAC addresses in "Real-time Bandwidth".
  • Show real MAC addresses in "Internet Usage".

[edit] 2 Settings

[edit] 3 SNMP Commands

"MAC Detector" use snmpwalk commands to send SNMP query to manageable devices. Usually, the snmpwalk commands are sent to routing devices, for example: core three-layer switch, or manageable wireless AP.

  • "SNMP Commands": snmpwalk commands be sent to the manageable devices. Multiple commands are supported.
  • "Result Format": a regular expression which matches ONE record row.

[edit] 3.1 Example

Suppose the core three layer switch has ip address "192.168.1.2", the "SNMP Command" is:

snmpwalk -v 2c -c public 192.168.1.2 ipNetToPhysicalPhysAddress

"ipNetToPhysicalPhysAddress" can retrieve both IPv4 and IPv6 addresses, you also can use "ipNetToMediaPhysAddress" for IPv4 only. The real return message is:

IP-MIB::ipNetToPhysicalPhysAddress.9.192.168.1.1 = STRING: 0:6:f6:bf:8b:cc

IP-MIB::ipNetToPhysicalPhysAddress.9.192.168.1.11 = STRING: ae:15:53:a0:9b:7f ...


To match every return rows, we configure the "result format" as:

IP-MIB::ipNetToPhysicalPhysAddress\.\d+.*


The "MAC Detector" will use the "result format" to get every record and retrieve the mac and ip information.

Maccd00.jpg

[edit] 3.2 Test

You may click "test" to test the SNMP commands in the list.

Maccd01.jpg

[edit] 4 FAQ

Personal tools
Namespaces

Variants
Actions
Navigation
Tools