Results 1 to 8 of 8

Thread: How to find remote system IP ,Gateway and Mac Address

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default How to find remote system IP ,Gateway and Mac Address

    Hi All,

    How to find remote systems gateway from server in the same lan .
    we have multiple gateways in our network like 192.168.1.1 , 192.168.1.2 and 192.168.1.175 .
    how can find out that which system is using which gateway .

    Can you please suggest me to achieve this by script or tools .

    Thanks ,
    Srinivas

  2. #2
    Member
    Join Date
    Feb 2008
    Posts
    61
    Thanks
    0
    Thanked 5 Times in 4 Posts
    Rep Power
    7

    Default

    Quote Originally Posted by srinivasa.nallapati View Post
    how can find out that which system is using which gateway
    Log in and get the output of 'ifconfig' or 'ip route show' or 'netstat -nr' or 'route -n' or 'arp -a' or cat the ethernet devices DHCP lease file (if any) or use SNMP (see 'man snmpwalk') if it's enabled (sorry don't know the OID for Network Gateway top of my head) to name just a few.

  3. #3
    Junior Member
    Join Date
    May 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by unSpawn View Post
    Log in and get the output of 'ifconfig' or 'ip route show' or 'netstat -nr' or 'route -n' or 'arp -a' or cat the ethernet devices DHCP lease file (if any) or use SNMP (see 'man snmpwalk') if it's enabled (sorry don't know the OID for Network Gateway top of my head) to name just a few.
    thanks for the help ,

    Actually i want to know gateway Address of systems in lan from server with out log in to individual systems.

  4. #4
    Member
    Join Date
    Feb 2008
    Posts
    61
    Thanks
    0
    Thanked 5 Times in 4 Posts
    Rep Power
    7

    Default

    Quote Originally Posted by srinivasa.nallapati View Post
    Actually i want to know gateway Address of systems in lan from server with out log in to individual systems.
    That's why I added "... or use SNMP".

  5. #5
    Junior Member
    Join Date
    May 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by unSpawn View Post
    That's why I added "... or use SNMP".

    Thanks,

    I installed SNMP in my machine then how can i use snmp to get gatways of remote systems

  6. #6
    Member
    Join Date
    Feb 2008
    Posts
    61
    Thanks
    0
    Thanked 5 Times in 4 Posts
    Rep Power
    7

    Default

    Quote Originally Posted by srinivasa.nallapati View Post
    I installed SNMP in my machine
    Just to be clear: you would install SNMPd on the machine you would like to retrieve nfo from then run 'snmapwalk' from your system.

    Quote Originally Posted by srinivasa.nallapati View Post
    how can i use snmp to get gatways of remote systems
    This is an example:
    Code:
    snmpget -v 1 -c "community" target_name_or_ip .1.3.6.1.2.1
    see 'man snmpwalk' for more.

  7. #7
    Junior Member
    Join Date
    May 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by unSpawn View Post
    Just to be clear: you would install SNMPd on the machine you would like to retrieve nfo from then run 'snmapwalk' from your system.


    This is an example:
    Code:
    snmpget -v 1 -c "community" target_name_or_ip .1.3.6.1.2.1
    see 'man snmpwalk' for more.

    When i run this command i am getting following error.


    [root@localhost srinivas]# snmpget -v 1 -c "public" 127.0.0.1 .1.3.6.1.2.1Error in packet
    Reason: (noSuchName) There is no such variable name in this MIB.
    Failed object: SNMPv2-SMI::mib-2

  8. #8
    Member
    Join Date
    Feb 2008
    Posts
    61
    Thanks
    0
    Thanked 5 Times in 4 Posts
    Rep Power
    7

    Default

    Quote Originally Posted by srinivasa.nallapati View Post
    Code:
    [root@localhost srinivas]# snmpget -v 1 -c "public" 127.0.0.1 .1.3.6.1.2.1Error in packet
    Reason: (noSuchName) There is no such variable name in this MIB.
    Failed object: SNMPv2-SMI::mib-2
    First of all there is no need to run snmpwalk as root. Secondly I don't know what OIDs your device exposes so you best walk the whole MIB tree recursively and find out.

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Similar Threads

  1. [Solved] Ifconfig Shell script to find out NIC ip, netmask, gateway address
    By ritili in forum Shell scripting
    Replies: 5
    Last Post: 17th February 2012, 11:36 AM
  2. snmpwalk to remote address gives timeout
    By manish_2479 in forum Networking, Firewalls and Security
    Replies: 6
    Last Post: 5th November 2010, 02:17 AM
  3. Replies: 7
    Last Post: 25th September 2010, 06:18 AM
  4. Linux Bounding 2 Gateway IP Address
    By please in forum Networking, Firewalls and Security
    Replies: 4
    Last Post: 9th August 2009, 09:18 PM
  5. remote x via ssh gateway
    By ricc in forum Linux software
    Replies: 1
    Last Post: 5th January 2006, 06:16 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •