Reply
 
Thread Tools Display Modes
  #1  
Old 07-01-2007, 09:15 PM
pheet pheet is offline
Super Moderator
 
Join Date: Mar 2007
Location: Berlin
Posts: 268
Thanks: 0
Thanked 0 Times in 0 Posts
Default Make your internet router accept your hostname (DHCP)
I noticed recently that my internet router (a Fritzbox) wasn't recording my machines' hostname, and all were showing up as "noname".

This makes communicating with the BSD computer from other machines on the LAN impossible.

The following will probably help with many internet routers that provide DHCP.

1. First you need to know the network card type and MAC address. From a console, type
Code:
ifconfig
and you'll get back something like:
Quote:
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=8<VLAN_MTU>
inet6 fe80::250:bfff:fee7:27ea%rl0 prefixlen 64 scopeid 0x1
inet 192.168.178.40 netmask 0xffffff00 broadcast 192.168.178.255
ether 00:50:bf:e7:de:ad
media: Ethernet autoselect (10baseT/UTP)
status: active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2
inet 127.0.0.1 netmask 0xff000000
pfsync0: flags=0<> mtu 2020
pflog0: flags=0<> mtu 33208
The first item with 2 letters and a number (often zero) is your network card id, which in my example is a realtek card (ignore lo0, this is the local loopback device present on every machine) and the 6 pairs of hexadecimal after ether is the card's MAC address.

2. Next, edit /etc/dhclient.conf as root.
Code:
su
Password:  
ee /etc/dhclient.conf
Add the following to the file (which by default is empty), substituting your card type and MAC address:
Quote:
interface "rl0" {
send host-name "mymachinename";
send dhcp-client-identifier 1:00:50:bf:e7:de:ad;
}
and save.
3. To bring this into effect without rebooting, as the superuser:
Quote:
ifconfig rl0 down
ifconfig rl0 up
( :idea: Maybe future version of PCBSD will automatically create the dhclient.conf file during installation if the user specifies the interface as DHCP under advanced options )
Reply With Quote
  #2  
Old 07-01-2007, 09:21 PM
Dingens Dingens is offline
Senior Member
 
Join Date: May 2005
Location: GER
Posts: 1,004
Thanks: 0
Thanked 0 Times in 0 Posts
Default
danke schön. wäre vllt auch was hie für http://pc-bsd.de/forum/viewforum.php?f=3
Reply With Quote
  #3  
Old 07-01-2007, 09:29 PM
pheet pheet is offline
Super Moderator
 
Join Date: Mar 2007
Location: Berlin
Posts: 268
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Originally Posted by Dingens
danke schön. wäre vllt auch was hie für http://pc-bsd.de/forum/viewforum.php?f=3
Bitte Können Sie übersetzen, mein Deutsch ist schleckt ops: , Fritzbox sind in Deutschland populär.
Reply With Quote
  #4  
Old 07-01-2007, 09:35 PM
Dingens Dingens is offline
Senior Member
 
Join Date: May 2005
Location: GER
Posts: 1,004
Thanks: 0
Thanked 0 Times in 0 Posts
Default
ok, ich dachte du wärst deutscher. wegen deiner location ;-) wird gemacht :-)
Reply With Quote
  #5  
Old 07-01-2007, 09:51 PM
pheet pheet is offline
Super Moderator
 
Join Date: Mar 2007
Location: Berlin
Posts: 268
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Originally Posted by Dingens
ok, ich dachte du wärst deutscher. wegen deiner location ;-) wird gemacht :-)
Ja, ich kann verstehen . Ikk bin ein Berliner...
Reply With Quote
  #6  
Old 07-01-2007, 11:36 PM
Dingens Dingens is offline
Senior Member
 
Join Date: May 2005
Location: GER
Posts: 1,004
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Originally Posted by pheet
Originally Posted by Dingens
ok, ich dachte du wärst deutscher. wegen deiner location ;-) wird gemacht :-)
Ja, ich kann verstehen . Ikk bin ein Berliner...
*looooooooooooooooooooooooool*
Reply With Quote
  #7  
Old 07-01-2007, 11:40 PM
Dingens Dingens is offline
Senior Member
 
Join Date: May 2005
Location: GER
Posts: 1,004
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Make your internet router accept your hostname (DHCP)
Originally Posted by pheet
The first item is your network card id, which in my example is a realtek card
by me, it was the snd one. but i have a 5port switch between the fritz.box and my pc :!:


Quote:
fwe0: flags=108802<BROADCAST,SIMPLEX,MULTICAST,NEEDSGIAN T> mtu 1500
options=8<VLAN_MTU>
ether 02:e0:18:47:e7:36
ch 1 dma -1
sk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=8<VLAN_MTU>
inet6 fe80::20e:a6ff:fe10:ae95%sk0 prefixlen 64 scopeid 0x2
inet 192.168.178.20 netmask 0xffffff00 broadcast 192.168.178.255
ether 00:0e:a6:10:ae:95
media: Ethernet autoselect (100baseTX <full-duplex,flag0,flag1>)
status: active
plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGI ANT> mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
inet 127.0.0.1 netmask 0xff000000
pfsync0: flags=0<> mtu 2020
pflog0: flags=0<> mtu 33208
Reply With Quote
  #8  
Old 07-02-2007, 12:12 AM
pheet pheet is offline
Super Moderator
 
Join Date: Mar 2007
Location: Berlin
Posts: 268
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Make your internet router accept your hostname (DHCP)
Originally Posted by Dingens
by me, it was the snd one. but i have a 5port switch between the fritz.box and my pc :!:
Ok, danke, I've edited my post to make it more clear.


(The switch doesn't effect the output of ifconfig - fwe0 is
Quote:
Ethernet emulation driver for FireWire
apparently)
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make the internet not suck (as much) antik Tips and Tricks 30 10-07-2009 10:24 PM
Changing hostname birdman General Questions 3 11-09-2008 11:57 PM
internet with router welepeer General Questions 3 08-04-2007 10:55 AM
How to make the ADSL internet connection to work? _HG_ Networking 4 09-07-2006 02:20 PM
Changing the hostname lazyilmaz General Questions 3 07-12-2005 03:16 PM


All times are GMT. The time now is 06:46 PM.


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Copyright 2005-2010, The PC-BSD Project. PC-BSD and the PC-BSD logo are registered trademarks of iXsystems.
All other content is freely available for sharing under the terms of the Creative Commons Attribution License.