1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Open source code for DHCP and webserver for LPC2294 and CS8900

Discussion in 'Embedded' started by Fred, Oct 24, 2005.

  1. Fred

    Fred Guest

    I know asking the earth. I have found webservers with fixed IP addresses
    but not with DHCP.

    Are there any alternatives I can port easily given I'm a fairly newbie to C!

    Many thanks in advance.
     
    Fred, Oct 24, 2005
    #1
    1. Advertisements

  2. A web server itself has neither a fixed nor a dynamically assigned IP
    address.

    Ignoring some custom/tiny servers for microcontrollers, a web server
    is an application running under a host operating system, (doesn't
    matter if the OS is a full blown system or a minimal kernel,) and it
    will use the IP address configured by the hosting environment.

    Check the services provided by your host environment to see how to get
    an address via DHCP.

    Roberto Waltman

    [ Please reply to the group, ]
    [ return address is invalid. ]
     
    Roberto Waltman, Oct 24, 2005
    #2
    1. Advertisements

  3. Fred

    Fred Guest

    Many thanks for your post.

    I was looking for a dedicated microcontroller webserver for a local network
    with some a system where I could type in http://embedded_system_name/ and
    get a status page. I am aware that this is not just DHCP but somewhat more.
    I was wondering if there were any open source software which could do this
    or I could modify.
     
    Fred, Oct 27, 2005
    #3
  4. Fred

    Markus Zingg Guest

    I was looking for a dedicated microcontroller webserver for a local network
    DHCP supports something that is called DHCP hostname. The purpose of
    this is that a DHCP client can pass a hostname to the DHCP server
    which in turn can do two things.

    a) it can assign an IP that is maybe influenced by the name you pass
    in.

    b) it can comunicate the IP asigned and the name to the nameserver in
    use.

    Both operations can be implemented differently if at all, but
    obviousely your DHCP client impelentation would have to support DHCP
    hostname.

    As the other poster mentioned already, servers (no matter wether they
    are embedded or not) get fixed IPs assigned to keep things simpler.
    Thereafter it's the nameservers job to map a name to said IP. If the
    DHCP server comunicates the assigned IP to the nameserver it's not
    needed that the IP is always the same, but such configurations seem to
    be rare IMHO.

    Implemeneting DHCP to one of the available freeware TCP stacks should
    not be rocket sience. Read the DHCP RFC's and study the stacks lower
    level IP networking code and you surely will get an idea on what to
    do.

    HTH

    Markus
     
    Markus Zingg, Oct 27, 2005
    #4
  5. To some extent, it's quite self-contradictory to be using DHCP on one
    hand, i.e. dynamic IP and hostname assignment, but still require a
    static published DNS host name.

    There are basically two solutions to this:

    1) kill part of the dynamicity of DHCP (--> pre-assigned DHCP responses
    for known MAC addresses)

    2) make the IP <-> hostname mapping of your responsible DNS server
    dynamic, even though DNS is meant to be mostly static (--> update
    DNS tables by request from the embedded device, as part of its
    start-up procedure).

    What both cases have in common is that the embedded system itself has
    little or nothing to do with them --- the bulk of the work has to be
    done on an organizational level, i.e. by your local network's
    adminstrator(s). They have to maintain the static DHCP tables, or
    make sure the local DNS server accepts such dangerous requests from
    otherwise completely unknown devices.
     
    Hans-Bernhard Broeker, Oct 27, 2005
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.