fokiist.blogg.se

Query switch for mac table snmp
Query switch for mac table snmp




query switch for mac table snmp

Query the IP of the connected layer 2 switch according to the interface information of the layer 3 switchģ.1 Query the value of cdpCacheAddress according to dot1dBasePortIfIndex (reference: ) That is, the value of dot1dBasePortIfIndex is 85Ģ.3 Query the value of ifName according to dot1dBasePortIfIndex (reference: )

query switch for mac table snmp

The query result of this command line affects the subsequent query, so the query must be correctĢ.2 Query the value of dot1dBasePortIfIndex according to the value of dot1dTpFdbPort (reference: ) If the value found in this step is greater than 1000 (1000 in this example environment), it means that the MAC address was learned by another 6509 from the PO slave interface, and the query parameters need to be modified to query again

query switch for mac table snmp

The parameter in the command line indicates that the VLan ID to be queried is 11, and 0.21.96.180.229.94 is the MAC address of the target IP, converted to decimal values. Obtain the physical port number of the Layer 3 switch according to the MAC addressĢ.1 Query dot1dTpFdbPort based on MAC (reference: ) Indicates that the ifName of the port whose ipAdEntIfIndex value is 166 is Vl11, that is, the VLan ID is 11ġ.3 According to ipAdEntIfIndex and destination IP address query to obtain the MAC of the destination IP address (reference: ) Indicates that the ipAdEntIfIndex value corresponding to the 192.168.100 network segment is 166ġ.2 According to ipAdEntIfIndex, query the ifName that the target IP belongs to, that is, the VLan ID (reference: ) This step is divided into the following sub-steps:ġ.1 Obtain the ipAdEntIfIndex value of the target IP network segment (reference: ) obtain the MAC address corresponding to the destination IP address. Query condition: Set the IP address to be queried as 192.168.100.8/32ġ. Layer 2 switch: Cisco 3560 PoE Each 3560 is connected to two 6509 via two optical fibers, and the switch management IP is 192.168.8.214 The process of obtaining the L2 switch port corresponding to the IP address through snmp.Ĭore switches: Two Cisco 6509 + FWSMs are hot-backed through HSRP, and the core switch IPs are 192.168.8.1 and 192.168.8.2 respectively However, their authorized maintenance personnel cannot operate. This method is relatively simple when using the switch console command to query, and only a few commands are needed to obtain the required information. Telnet or ssh to log in to the Layer 3 switch or firewall.Ģ, by querying the arp table, find the corresponding IP address of mac -> through the mac address find mac port from which three switches learn -> then view the information of the port cdp -> found switcher IP management - > Log in to the Layer 2 switch -> Check the MAC address from which Layer 2 switch port the mac was learned -> Get the destination port Take the two-layer network structure as an example (core three-layer, desktop two-layer), the general method is:ġ. In daily work, network administrators sometimes need to query the switch port corresponding to the IP address. Method for querying IP address corresponding to switch port through telnet or ssh terminal This article provides a way to use snmp to obtain the switch port corresponding to the IP address, and use php to achieve automation and some additional functions. However, the way to log in to the switch through telnet or ssh, and then query the port, has security issues and permissions allocation issues. The software that can provide this function is limited and not very specific. It is often necessary to find the switch port corresponding to an IP address in routine maintenance. e.g enabled modules or advanced usage such as MySQL clustering/reverse proxies.Key word: switch IP IP address corresponding port snmp cisco switch If applicable, add screenshots or other error logs to help explain your problem.Īdd any other useful info about the problem here.

query switch for mac table snmp

Please set $debugging=true in your config.php and include any reported error messages. Please include steps to reproduce the issue: Your Environment (please supply the following information): Oid: BRIDGE-MIB::dot1dTpFdbAddress get_interfaces_ip: OK SNMP v3 unable to retrieve MAC addresses, reports "Fatal error: Unknown user name" Query Result get_system_info: OKĭisplays device system info get_arp_table: OKĬisco-sw-02: Fatal error: Unknown user name






Query switch for mac table snmp