PC Review


Reply
Thread Tools Rate Thread

how do I force use of hosts file?

 
 
BobGardner
Guest
Posts: n/a
 
      25th May 2004
I have a winsock app to send udp datagrams to an embedded controller. I put the
eth add of the controller in the arp table, and I put the 'dummy' ip add in a
line in the hosts file. So I create the socket and fill in the ip addr, it
should look up the eth addr in the arp table, right?
I have an entry in the hosts file with the ip address and ethernet address of
my device. When I open the socket to that ip address, the sniffer shows it
sending the packet off to the default gateway. This all worked last week till
the network guy changed everything from 192.168.1.1 thru 200 to 5.1 thru 5.99.
My device is still 192.168.1.200. I should be able to send a udp datagram to
that ip addr, and have it look up the eth addr in the host file, right? What
got messed up and how do I change it back?!? Thanks!

 
Reply With Quote
 
 
 
 
John Wunderlich
Guest
Posts: n/a
 
      26th May 2004
(E-Mail Removed)a (BobGardner) wrote in
news:(E-Mail Removed):

> I have a winsock app to send udp datagrams to an embedded
> controller. I put the eth add of the controller in the arp table,
> and I put the 'dummy' ip add in a line in the hosts file. So I
> create the socket and fill in the ip addr, it should look up the
> eth addr in the arp table, right?


If it is in the same subnet as your device, it will. If it is in a
different subnet (or thinks it is), then it will send the packet to the
gateway device.

> [...] I should be able to send a udp datagram to that ip addr, and
> have it look up the eth addr in the host file, right?


The hosts file will convert an IP _name_ to an IP _address_. Given the
IP address, the _Ethernet_ address will be looked-up in the ARP table
if it hasn't expired from there and found by broadcast if it has.

It sounds as if your network admin has moved all devices into a
different subnet except your machine so your machine is always
searching for the gateway device to route packets to the destination.
Type "netstat -rn" to see the routing table and see how your packets
will be routed.

HTH,
John
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
windows hosts file c:\windows\system32\drivers\etc\hosts q_q_anonymous@yahoo.co.uk Windows XP General 15 8th Aug 2006 06:08 PM
force logoff of xp hosts before backup job occurs Joe Windows XP Configuration 3 10th Nov 2005 01:24 PM
force logoff of xp hosts before backup job occurs Joe Microsoft Windows 2000 Advanced Server 3 10th Nov 2005 01:24 PM
Host file updater : HOSTS File Manger v1.0.1.2 Wayne D Freeware 1 13th Jun 2005 07:23 PM
SP2 hosts file bug (or COM bug with hosts-file mapped machine names)? Sean Windows XP General 0 28th Sep 2004 09:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:59 PM.