Precise information of network topology is important for both network management and network analysis. In this paper we describe an efficient algorithm for discovering the multi-hop IP and MAC layer topology of the network. The proposed algorithm for subnet guessing probes hosts that have high probability of being active. Efficient probing mechanisms are also used to ensure fewer blockages from the devices. Our algorithm only needs SNMP to be configured only on routers, switches and network printers not the end nodes. We have implemented and tested the algorithm at NUST Institute of Information Technology, Pakistan and Communication technologies, Japan and it has accurately discovered the network topology.