Giter Club home page Giter Club logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
Can you please post /etc/network/interfaces with your changes?

Original comment by [email protected] on 23 Feb 2013 at 3:50

from alt-f.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
Find below entire contents of my /etc/network/interfaces. The last line is my 
doing device's hostname being "lato".

--

# cat /etc/network/interfaces 
auto lo
  iface lo inet loopback

auto eth0
iface eth0 inet dhcp
  client udhcpc
  mtu 1500
  hostname lato

Original comment by [email protected] on 24 Feb 2013 at 5:30

from alt-f.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
It might work for you, but I get a warning from udhcpc, regarding the "-H 
<hostname>" option.
I might have to patch busybox networking/ifupdown.c

I don't have any problem with DHCP, and I think to remember that it used to be 
practice to send the hostname do the DHCP server, but most servers now don't 
require this anymore (using MAC?). What server are you using?

Thanks,

Current state:

PID   USER     COMMAND
...
 1045 root     udhcpc -R -n -p /var/run/udhcpc.eth0.pid -i eth0
...

~ # ifup eth0
udhcpc (v1.20.2) started
udhcpc: Deconfiguring eth0
Sending discover...
eth0: link up, 1000 Mb/s, full duplex, flow control disabled
Sending discover...
Sending select for 192.168.1.76...
Lease of 192.168.1.76 obtained, lease time 86400
udhcpc: udhcpc environment:
udhcpc:    router=192.168.1.254
udhcpc:    subnet=255.255.255.0
udhcpc:    METHOD=dhcp
udhcpc:    MODE=start
udhcpc:    domain=homenet
udhcpc:    PHASE=pre-up
udhcpc:    interface=eth0
udhcpc:    dns=192.168.1.254
udhcpc:    IF_MTU=1500
udhcpc:    ADDRFAM=inet
udhcpc:    serverid=192.168.1.254
udhcpc:    IF_CLIENT=udhcpc
udhcpc:    PATH=/sbin:/usr/sbin:/bin:/usr/bin
udhcpc:    ip=192.168.1.76
udhcpc:    lease=86400
udhcpc:    mask=24
udhcpc:    IFACE=eth0
udhcpc:    PWD=/root
udhcpc:    opt53=05
udhcpc: Updating /etc/hosts
udhcpc: Updating /etc/httpd.conf
udhcpc: Updating /etc/samba/smb.conf
udhcpc: Updating default route
route: SIOCDELRT: No such process
udhcpc: Updating /etc/resolv.conf
udhcpc: adding dns 192.168.1.254


**** After adding "hostname nas" to the dhcp stanza,

~ # ifup eth0
udhcpc: option -h NAME is deprecated, use -x hostname:NAME
udhcpc (v1.20.2) started
udhcpc: Deconfiguring eth0
Sending discover...
eth0: link up, 1000 Mb/s, full duplex, flow control disabled
Sending discover...
Sending select for 192.168.1.76...
Lease of 192.168.1.76 obtained, lease time 86400
udhcpc: udhcpc environment:
udhcpc:    router=192.168.1.254
udhcpc:    subnet=255.255.255.0
udhcpc:    METHOD=dhcp
udhcpc:    MODE=start
udhcpc:    domain=homenet
udhcpc:    PHASE=pre-up
udhcpc:    interface=eth0
udhcpc:    dns=192.168.1.254
udhcpc:    IF_MTU=1500
udhcpc:    ADDRFAM=inet
udhcpc:    serverid=192.168.1.254
udhcpc:    IF_CLIENT=udhcpc
udhcpc:    PATH=/sbin:/usr/sbin:/bin:/usr/bin
udhcpc:    IF_HOSTNAME=nas
udhcpc:    ip=192.168.1.76
udhcpc:    lease=86400
udhcpc:    mask=24
udhcpc:    IFACE=eth0
udhcpc:    PWD=/root
udhcpc:    opt53=05
udhcpc: Updating /etc/hosts
udhcpc: Updating /etc/httpd.conf
udhcpc: Updating /etc/samba/smb.conf
udhcpc: Updating default route
route: SIOCDELRT: No such process
udhcpc: Updating /etc/resolv.conf
udhcpc: adding dns 192.168.1.254

PID   USER     COMMAND
...
 1189 root     udhcpc -R -n -p /var/run/udhcpc.eth0.pid -i eth0 -H nas



Original comment by [email protected] on 24 Feb 2013 at 8:00

from alt-f.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
I was not aware of the warning but it seems to work for the moment at least. 
Apparently they have changed something at udhcpd.

My broadband modem acts as both DHCP server and name server. It's probably 
busybox and dnsmasq there for what I know. The name server adds an entry for 
each DHCP client that provides a name. That's why the client must send its 
name. It's all dynamic this way, I have no static nameserver entries at all.

I am bit puzzled how the server might guess clients' names otherwise. I checked 
my Linux Mint /etc/dhcp/dhclient.conf and it has the following line there:
send host-name = gethostname();

I am inclined to think that clients sending their name is the standard 
behaviour still.

Br

Original comment by [email protected] on 24 Feb 2013 at 11:13

from alt-f.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
This issue was closed by revision r2138.

Original comment by [email protected] on 25 Feb 2013 at 12:53

  • Changed state: Fixed

from alt-f.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 16, 2024
You are right.

Closed by svn commit 2138: /etc/network/interface: make dhcp stanza contain the 
hostname. Closes issue 133.

I still have to test it.

Original comment by [email protected] on 25 Feb 2013 at 12:58

from alt-f.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.