Re: Find out the mac address



On Oct 31, 2007 3:02 AM, K. R. <mcse@xxxxxxxxxx> wrote:
Hi @all

How can I find out the mac address from the default gateway with a ruby
script?
Does exist any methods to read it out? The script runs on a linux
distribution...

If you know the IP address of the gateway, then parse the output of
the 'arp -n <IP>' command. It's reasonably portable and easy to
parse.

--
Aaron Turner
http://synfin.net/
http://tcpreplay.synfin.net/ - Pcap editing & replay tools for Unix
They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety. -- Benjamin Franklin

.



Relevant Pages

  • Re: howto start something 5 mins after boot
    ... e.g. 5 minutes after boot run a script. ... Keep Europe free from software patents, ... They that can give up essential liberty to obtain a little temporary ... safety deserve neither liberty nor safety. ...
    (Debian-User)
  • Re: CAMELOT question
    ... If you modify a script without express written permission, ... "They that can give up essential liberty to obtain a little ... safety deserve neither liberty nor safety." ...
    (rec.arts.theatre.musicals)
  • Re: File in UTF-8 or local encoding
    ... >> in basicly every possible encoding in the world. ... The signed external script is then used to configure/control the ... (safety deserve neither liberty nor safety. ...
    (comp.lang.tcl)
  • Re: Remove Default Gateway
    ... getting the same error with the full script including DHCP ... I can't get the gateway to remove. ... For Each objNetAdapter in colNetAdapters ... >> For Each objNetAdapter In colNetAdapters ...
    (microsoft.public.windows.server.scripting)
  • Re: [opensuse] iptables MASQUERADE problems with oss 11.2
    ... public address of machine A) and sent out the interface called comcast1, ... This exact same script worked fine with oss11.1 and earlier versions - ... They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. ...
    (SuSE)