I want to retrieve host's mac addressed which connected to cisco switch. And I see a lot of people say that "snmpbulkwalk -v2c -cpublic@vlan hostname BRIDGE-MIB::dot1dTpFdbTable" can get the host's mac address, but when I added the "@vlan" like "-c harvey@10". The command will return "Timeout: No response from XX.XX.XX.XX" my snmp config is "snmp-server community harvey RW". I don't know how they can get information and I can't.
Chances are that the given switch does not understand SNMP Community String Indexing and thus discards your SNMP request because of a "wrong" community string.
Still, your attempt at snmpwalk with an indexed snmp community string seems to be technically correct, according to the examples given at https://www.cisco.com/c/en/us/support/docs/ip/simple-network-management-protocol-snmp/40367-camsnmp40367.html. However, that document is almost 15 years old, and seems to refer to CatOS, and that very old networking software is rarely seen these days.
What kind of Cisco switch are you trying this with?
As an alternative, some suggest to define one SNMPv3 context per VLAN, and to submit SNMPv3 username, passwort and context when issuing the GET or WALK request:
Here is an example config that will give userv3 access to the default branch as well as contexts vlan-1 and vlan-100. See "show snmp context" for a list of all available contexts:
snmp-server group v3group v3 auth snmp-server group v3group v3 auth context vlan-1 snmp-server group v3group v3 auth context vlan-100 snmp-server user userv3 groupv3 v3 auth md5 userv3pw123
Then you would specify the context name (e.g. vlan-1, vlan-100, etc.) along with the SNMPv3 username and password when querying the dot1dTpFdbTable objects in MG-Soft.