How to name my Puppy so a router can find it?

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
NickBiker
Posts: 155
Joined: Wed 01 Mar 2006, 13:06
Location: Guildford, UK
Contact:

How to name my Puppy so a router can find it?

#1 Post by NickBiker »

hi

I just wondered if anyone knew how I can give my ethernet linked puppy a name at boot - so that my router can link the name with the MAC address?

It must be somewhere in the DHCP start-up but I just can't find it!!

HELP!! :oops:
Nick

See my Puppy webcam Guide at:
www.moyo.me.uk/pupplinux

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#2 Post by sunburnt »

Howdy NickBiker; I'm wondering if you use a little box type router like me (mine is a D-Link).
If you do, then the router doesn't use the HOSTNAME, it only uses the MAC address & give out an IP address.

Puppy's HOSTNAME is: puppypc (depending on the version your using).

Click on xterm (terminal) & type: env
You'll get a list of system variables, in the list you'll see: HOSTNAME=puppypc (or the real hostname).
Unless you've changed it of course.

I'm thinking your problem is that you haven't run the DHCP setup wizard, run it just once & that's it.

[Start} > Setup > Ethernet/network Wizard

Just follow the instructions that popup to setup the ethernet connection.
Let us know how it goes... SunBurnt

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#3 Post by GuestToo »


User avatar
NickBiker
Posts: 155
Joined: Wed 01 Mar 2006, 13:06
Location: Guildford, UK
Contact:

#4 Post by NickBiker »

sunburnt wrote:Howdy NickBiker; I'm wondering if you use a little box type router like me (mine is a D-Link).
If you do, then the router doesn't use the HOSTNAME, it only uses the MAC address & give out an IP address.
Hello

Thanks for the reply and help! Just to say that the network from the Puppy is all working and I have used the Wizard a few times! I have it working both on wired Ethernet and Wireless
Nick

See my Puppy webcam Guide at:
www.moyo.me.uk/pupplinux

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#5 Post by sunburnt »

Yep; very time consuming, most box routers don't seem to do name resolution, or maybe they're not setup.
Etherreal is a great tool, but using it is a mental exercise.
NetGear may be able to tell you what's required, a command to the box to associate the hostname.
Or perhaps a worst case senario... they don't support Linux, be hard to beleave of a network equipment co.

User avatar
BlackAdder
Posts: 385
Joined: Sun 22 May 2005, 23:29

#6 Post by BlackAdder »

May be a silly suggestion, but have you tried:

Code: Select all

http://UNKNOWN:1234
Even if it were to work, I realise that it is not really a solution.
My router (from MSI) keeps track of the names of associated machines/devices including the puppies. It associates a MAC Address, IP Address and name on the first occasion that it sees a NIC; has the option to Release the IP, and presumably will do a new association when the MAC Address appears again.
Does your router have the option to Release the IP address? Might be worth a try if it does.

HTH

r__hughes
Posts: 359
Joined: Thu 13 Apr 2006, 04:14
Location: Montreal, Canada

#7 Post by r__hughes »

BlackAdder wrote:May be a silly suggestion, but have you tried:

Code: Select all

http://UNKNOWN:1234
Even if it were to work, I realise that it is not really a solution.
My router (from MSI) keeps track of the names of associated machines/devices including the puppies. It associates a MAC Address, IP Address and name on the first occasion that it sees a NIC; has the option to Release the IP, and presumably will do a new association when the MAC Address appears again.
Does your router have the option to Release the IP address? Might be worth a try if it does.

HTH
I'm trying to sort this out too. Like sunburnt I have a D-Link router (DI-514)
and the router DHCP list as follows for 2 W98 PCs (with names), 1 puppy PC (192,168,0,101) and my puppy laptop (192.168.0.103). All machines have windows shares which show up on named hosts in windows mode but when using Live puppy 108rl all become unknown and the shared files are unseen & inaccessible.

I changed each computer to a different linux hostname by changing the word in /etc/hostname from puppypc to something else - the new name is shown by rxvt hostname and also by Samba LinNeighbourhood client but the DI-514 manager still shows - the game is still afoot.

Host Name IP Address MAC Address
DHCP Client Table
Host Name IP Address MAC Address Expired Time
unknown 192.168.0.101 00-30-21-11-E4-3D May/07/2006 17:37:33
unknown 192.168.0.103 00-0F-3D-85-92-A3 May/07/2006 17:24:29
Jen-HP 192.168.0.100 00-0D-88-3F-31-8A May/07/2006 11:23:31
Chris-HP 192.168.0.102 00-0D-88-3C-56-78 May/07/2006 11:26:40

User avatar
NickBiker
Posts: 155
Joined: Wed 01 Mar 2006, 13:06
Location: Guildford, UK
Contact:

#8 Post by NickBiker »

r__hughes wrote: I changed each computer to a different linux hostname by changing the word in /etc/hostname from puppypc to something else - the new name is shown by rxvt hostname and also by Samba LinNeighbourhood client but the DI-514 manager still shows - the game is still afoot.
Hi

Seems like we have the same problem!

My network has Windows PC and network printers. Each of these is named and found in the router. If on my Windows PC I do a
PING PRINTER1

then it works fine.

If I do the same thing from a Puppy PC I get a "Unknown Host error".

If on my Windows PC called NICK I do
ping Nick

It is fine and shows it resolving the IP to 123.456.0.1

If on my Puppy PC called puppypc I do
ping puppypc
I get IP 127.0.0.1

This is the localhost. So either Linux is being clever and realises that puppypc is the local machine, or it is not set to resolve the IP address.

Certainly it seems that ther Puppy network is not quite right - it should have registered a name with the router for a start!

I will have to look at what is being sent on the network at boot.

Anyone else got any ideas?
Nick

See my Puppy webcam Guide at:
www.moyo.me.uk/pupplinux

r__hughes
Posts: 359
Joined: Thu 13 Apr 2006, 04:14
Location: Montreal, Canada

#9 Post by r__hughes »

Just to add another bit of information to the stew - it seems the router is the culprit for branding all puppy dhcp clients as 'unknown' in its dhcp or wireless list and in its logfile. My DI514 router does the same when I connect my iPaq3650 PPC2002 to the network.

One interesting fact I've noticed on the Windows ME (WME) PC's that have file-shares on the network is this - when a puppy accesses shared WME files using LinNeighbourhood and the the WME machine is shut down we get a message saying that puppyNEC, puppyChris etc will be disconnected if shutdown proceeds. So the network is passing the puppy hostnames around - the router just doesn't seem to be using them.

When I shutdown a W98 filesharing machine I just get a general warning that an unnamed user will be disconnected - no names given by W98.

The stew - I mean the plot thickens :?

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#10 Post by sunburnt »

This is the same crud I'm going through trying to setup LanPup client's.
I'm attempting to solve it by ignoring the router in the LanBoot network setup.

If the difference between Puppy & Win. were found, it'd be nice, but I'm sure LOTS of effort.

Other than that, shut off the routers DNS & use a different method.

User avatar
NickBiker
Posts: 155
Joined: Wed 01 Mar 2006, 13:06
Location: Guildford, UK
Contact:

#11 Post by NickBiker »

sunburnt wrote:This is the same crud I'm going through trying to setup LanPup client's.
I'm attempting to solve it by ignoring the router in the LanBoot network setup.

If the difference between Puppy & Win. were found, it'd be nice, but I'm sure LOTS of effort.

Other than that, shut off the routers DNS & use a different method.
Hi!

Well I have tried but no luck so far.

I think it is something to do with the dhcpcd utility which is used in Puppy as a client to get get the IP addresses from the network router. It has an option -h to set the "hostname" (the name of your computer) - but my router seems to take no notice! I have searched for this problem, which comes up a lot - but wioth no solution!

I will try to find time to compare the messages my window box sends to the router to give its name at boot, compared with Puppy...
Nick

See my Puppy webcam Guide at:
www.moyo.me.uk/pupplinux

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#12 Post by sunburnt »

Hey NickBiker; that would be great to solve, but don't spend alot of time on it, I've wasted too much on similar stuff.

My solution was to comment out the part that runs dhcpcd & use the lines:

ifconfig lo 127.0.0.1 ##################### sets the NIC loop back device
ifconfig eth0 (IP add. you want for the host PC) #### sets host IP add.
route (the IP add. of the router-gateway) ####### allows web access for host PC

If it's an unmodified Puppy your using, dhcpcd is run at the end of the file: /etc/rc.d/rc.network (inside the image.gz file).
Just use "#" the pound sign to comment out that part & no DHCP request will be broadcast.
You'll have to "open up the image.gz file" & edit the file manually, not hard to do but the first time is always shakey.
If it's too much to do (I don't think so), let me know & I'll post the "fixed" file & a GUI tool to do it.

User avatar
NickBiker
Posts: 155
Joined: Wed 01 Mar 2006, 13:06
Location: Guildford, UK
Contact:

#13 Post by NickBiker »

sunburnt wrote:Hey NickBiker; that would be great to solve, but don't spend alot of time on it, I've wasted too much on similar stuff.
I know what you mean - it is just annoying!

I think it is the dhcpcd utility that is used in Puppy - as others on the web have the same problem - in fact loads! It makes you wonder why it is not fixed. There are alternatives that I might try for a quick solution!
Nick

See my Puppy webcam Guide at:
www.moyo.me.uk/pupplinux

Trog Dog
Posts: 1
Joined: Sat 27 May 2006, 08:37

#14 Post by Trog Dog »

I solved this by editing /root/.etc/rc.d/rc.network

I commented out line 124

Code: Select all

dhcpcd ${INTERFACE}
- just incase it didn't work
and added the following
dhcpcd -t 20 -h "hostname" eth0
then rebooted.

-Note don't use the quotation marks around hostname - but ensure that this is the hostname that is specified in /root/.etc/hostname and /root/.etc/hosts.
-And if you're using anything other than eth0 then change that to what you are using.

BTW, this works with a Thomson/Alcatel Speedtouch 530, your results may vary.

TheSquire
Posts: 5
Joined: Thu 18 Jan 2007, 00:58

#15 Post by TheSquire »

Using Puppy 2.13 on my Hard Disk based system, I had to make similar changes to the file /etc/eth0mode as well.

By the time processing gets to the line in /etc/rc.d/rc.network mentioned by Trog Dog, it seems that dhcpcd is already running.

I decided to change both places, because Paranoia is Good(TM).

I wonder if the scripts could be made smarter, so as to pick up the contents of the /etc/hostname file. This would require more adeptness than I currently possess, alas.

Peace.

Post Reply