Networking Forums

Networking Forums > Computer Networking > Linux Networking > Determine IP address assigned to MAC

Reply
Thread Tools Display Modes

Determine IP address assigned to MAC

 
 
Ian Pilcher
Guest
Posts: n/a

 
      01-12-2006, 10:57 PM
When I am working in my home office, I like to use rdesktop (on Linux)
to connect to my Windows laptop. This gives me the big screen, full-
sized keyboard, etc., without springing for a docking station.

The problem (inconvenience) I have is that my Internet gateway (I refuse
to call them routers) can't be configured to assign a consistent IP
address to a particular MAC address. If, however, I could find a way to
scan my network for a particular MAC address and determine its IP
address, I could easily whip us a script to connect to the laptop
without manually determining its current IP address.

Anyone know of a way to do this?

Thanks!

--
================================================== ======================
Ian Pilcher (E-Mail Removed)
================================================== ======================
 
Reply With Quote
 
 
 
 
Paul Colquhoun
Guest
Posts: n/a

 
      01-12-2006, 11:39 PM
On Thu, 12 Jan 2006 17:57:29 -0600, Ian Pilcher <(E-Mail Removed)> wrote:
| When I am working in my home office, I like to use rdesktop (on Linux)
| to connect to my Windows laptop. This gives me the big screen, full-
| sized keyboard, etc., without springing for a docking station.
|
| The problem (inconvenience) I have is that my Internet gateway (I refuse
| to call them routers) can't be configured to assign a consistent IP
| address to a particular MAC address. If, however, I could find a way to
| scan my network for a particular MAC address and determine its IP
| address, I could easily whip us a script to connect to the laptop
| without manually determining its current IP address.
|
| Anyone know of a way to do this?
|
| Thanks!


The 'arp' cpmmand can show you the MAC to IP address mapping, as long as
the machines have swapped packets. Sending a 'ping' the the local broadcast
address may be an easy way to get a response from the laptop before
running 'arp'.


--
Reverend Paul Colquhoun, ULC. http://andor.dropbear.id.au/~paulcol
Asking for technical help in newsgroups? Read this first:
http://catb.org/~esr/faqs/smart-questions.html#intro
 
Reply With Quote
 
Allen McIntosh
Guest
Posts: n/a

 
      01-13-2006, 12:46 AM
> | The problem (inconvenience) I have is that my Internet gateway (I refuse
> | to call them routers) can't be configured to assign a consistent IP
> | address to a particular MAC address.
> | Anyone know of a way to do this?
> The 'arp' cpmmand can show you the MAC to IP address mapping,

You could always turn off DHCP on the gateway and run it on your Linux box.
 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      01-13-2006, 01:11 AM
>> | The problem (inconvenience) I have is that my Internet gateway (I refuse
>> | to call them routers) can't be configured to assign a consistent IP
>> | address to a particular MAC address.
>> | Anyone know of a way to do this?


Buy a router or Internet gateway or whatever you want to call it that does
allow assigning a consistent IP to a particular mac address.
Or try just turning off dhcp entirely and give your machine a static ip
which is not assigned by dhcp.
I assume these answers were all obvious to you before you asked so there
must be some other hidden question which you are not asking.
And why do you not want to call them routers when that is what they are.
They have nothing to do with the internet. They simply tell packets where
to go. They route them.


 
Reply With Quote
 
David Schwartz
Guest
Posts: n/a

 
      01-13-2006, 08:30 AM

"Ian Pilcher" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed). ..

> The problem (inconvenience) I have is that my Internet gateway (I refuse
> to call them routers) can't be configured to assign a consistent IP
> address to a particular MAC address. If, however, I could find a way to
> scan my network for a particular MAC address and determine its IP
> address, I could easily whip us a script to connect to the laptop
> without manually determining its current IP address.


Don't use DHCP for machines that you need to connect to. Configure them
statically, don't make the gateway assign the IP.

DS


 
Reply With Quote
 
Secure Buddha
Guest
Posts: n/a

 
      01-13-2006, 09:01 AM
This ia actually the job of the reverse address resolution
protocol(rarp). Google for it to find out more information if you so
desire. However, this rarp protocol will not apply to your scenario
becuase there are no static address assignments.

To successfully acquire the information that you need for a given node
you will need to send a broadcast to the subnet that you are attempting
to access using the "ping" utility. This will then elicit a response
from all the nodes located on the desired node's subnet. More
importantly, the node that you are trying to access.

Now that you have received a echo_reply from the subnet nodes, your arp
cache will contain all the MAC address to IP address resolutions. You
can then "grep" the cache for the needed MAC address to IP address
pairing.

for instance:
buddha@linux:~> ping -b <subnet broadcast>
PING <subnet broadcast>(<subnet broadcast>) 56(84) bytes of data.
64 bytes from <subnet broadcast>: icmp_seq=1 ttl=64 time=0.130 ms
64 bytes from <subnet broadcast>: icmp_seq=2 ttl=64 time=0.078 ms
64 bytes from <subnet broadcast>: icmp_seq=3 ttl=64 time=0.087 ms
64 bytes from <subnet broadcast>: icmp_seq=4 ttl=64 time=0.109 ms
64 bytes from <subnet broadcast>: icmp_seq=5 ttl=64 time=0.097 ms
64 bytes from <subnet broadcast>: icmp_seq=6 ttl=64 time=0.086 ms

buddha@linux:~> /sbin/arp -a
? (<node1>) at 00:0A:41:7E:B8:A0 [ether] on eth0
? (<node2>) at 00:0A:41:7E:B8:A1 [ether] on eth0
? (<node3>) at 00:0A:41:7E:B8:A2 [ether] on eth0

Now this whole process is dependent on a few things:

1. You are capable of sending broadcasts to the internal subnet. It may
be rejected from a external router or firewall through ingress rules.

2. Host resident firewalls may deny echo_requests.

3. Egress filtering may be in place to deny information leakage from
the internal network/subnets.

Hopefully, that'll help. Good luck.
Thomas

 
Reply With Quote
 
Ian Pilcher
Guest
Posts: n/a

 
      01-13-2006, 02:46 PM
David Schwartz wrote:
> Don't use DHCP for machines that you need to connect to. Configure them
> statically, don't make the gateway assign the IP.


That approach would be fine if the laptop never left my house. I often
travel, however, and need to plug in to various networks. Reconfiguring
the Ethernet interface on the laptop between DHCP and a static address
would probably be more of a pain than having to locally run ipconfig.

--
================================================== ======================
Ian Pilcher (E-Mail Removed)
================================================== ======================
 
Reply With Quote
 
Ian Pilcher
Guest
Posts: n/a

 
      01-13-2006, 02:48 PM
Allen McIntosh wrote:
> You could always turn off DHCP on the gateway and run it on your Linux box.


I've had things set up this way on occassion. Unfortunately, I do
occassionally need to reboot this box into Windows or do some sort of
maintenance on it, etc. Of course, if I'm having a problem with the
Linux box, that's when I most need to be able to connect with my laptop,
so I don't like introducing that dependency.

--
================================================== ======================
Ian Pilcher (E-Mail Removed)
================================================== ======================
 
Reply With Quote
 
Robert
Guest
Posts: n/a

 
      01-14-2006, 12:49 AM
On Fri, 13 Jan 2006 09:48:28 -0600, Ian Pilcher wrote:

> I've had things set up this way on occassion. Unfortunately, I do
> occassionally need to reboot this box into Windows or do some sort of
> maintenance on it, etc. Of course, if I'm having a problem with the
> Linux box, that's when I most need to be able to connect with my laptop,
> so I don't like introducing that dependency.


Have you thought about locking down and ip address to a MAC Address?

host apex {
option host-name "apex.example.com";
hardware ethernet 00:A0:78:8E:9E:AA;
fixed-address 192.168.1.4;
}


--

Regards
Robert

Smile... it increases your face value!


----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
Reply With Quote
 
Snowbat
Guest
Posts: n/a

 
      01-14-2006, 01:51 AM
On Fri, 13 Jan 2006 09:46:13 -0600, Ian Pilcher wrote:

> David Schwartz wrote:
>> Don't use DHCP for machines that you need to connect to. Configure them
>> statically, don't make the gateway assign the IP.

>
> That approach would be fine if the laptop never left my house. I often
> travel, however, and need to plug in to various networks. Reconfiguring
> the Ethernet interface on the laptop between DHCP and a static address
> would probably be more of a pain than having to locally run ipconfig.


It looks like you could toggle an interface between DHCP and static IP
pretty easily using ipconfig.pl - perhaps from a couple of DOS on/off
scripts?
http://www.itefix.no/phpws/index.php...age&PAGE_id=36

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bogus IP address assigned to laptop ivory_kitten Wireless Networks 1 07-06-2006 01:44 PM
Clients not assigned IP address Pete S Windows Networking 1 08-16-2005 03:51 AM
IP Address Already Assigned Blackyell Windows Networking 1 09-17-2004 12:31 PM
how IP address is assigned? Matthew Louden Windows Networking 2 12-06-2003 06:01 AM
ip address assigned bu dhcp but cannot access network news.bellsouth.net Windows Networking 0 08-19-2003 07:34 PM



1 2 3 4 5 6 7 8 9 10 11