×

Discussion Board

Results 1 to 12 of 12

Thread: Change hostname

  1. #1
    Registered User
    Join Date
    Jun 2007
    Posts
    19

    Change hostname

    Hi,

    title says it all. My phone is via wlan in my local network and I want to change the hostname from "DLB6031" to something meaningful. I know this has nothing to do with httpd.conf but since it's related to the web server access I thought I could ask here. I didn't find any settings in my E61i to do so.

    Ben

  2. #2
    Registered User
    Join Date
    Jun 2007
    Posts
    13

    Re: Change hostname

    What do you mean with hostname?
    If your phone connects via WLAN, you either need to specify a fixed IP oder let assign one automatically via DHCP.
    On both cases, a well-configured DNS server can assign hostnames for that IP device.

    Marv

  3. #3
    Registered User
    Join Date
    Jun 2007
    Posts
    19

    Re: Change hostname

    Quote Originally Posted by _marv_
    What do you mean with hostname?
    If your phone connects via WLAN, you either need to specify a fixed IP oder let assign one automatically via DHCP.
    On both cases, a well-configured DNS server can assign hostnames for that IP device.

    Marv
    I'm logging into quite a number of different networks (3 at home, some at my friends, some at the university). Of course I don't have access to the DNS server at all places and the chances are high that the IP address is already in use, so there is no way around DHCP at most of the places. So it would make things easier if the device could be given a host name.

    Ben

  4. #4
    Registered User
    Join Date
    Jun 2007
    Posts
    13

    Re: Change hostname

    As long as you do not have access to the involved DNS servers I see no chance of setting a unique hostname.

    The DNS name of a device is constructed from it's IP address (called reverse DNS lookup), and the IP address is changing when roaming around.

    Keep in mind that distinct "providers" want to implement their own DNS naming scheme, thus you cannot force your device to have a unique/non-changing name at all places.
    (you could try insisting on having the same IP address everywhere to keep your hostname

    Or do I miss the point and you do want something completely different?

    Marv

    P.S. Perhaps you are looking for something like http://www.dyndns.com/ or any other dynamic DNS service?

  5. #5
    Registered User
    Join Date
    Jun 2007
    Posts
    19

    Re: Change hostname

    Quote Originally Posted by _marv_
    As long as you do not have access to the involved DNS servers I see no chance of setting a unique hostname.
    Well, I see several. First things first: If you have a router that shows you some stats, you will see the host name of every PC, be it Linux of Windows or whatever. But if you connect your Nokia device, there is no name assigned (in my case, dd-wrt shows a * as host name).

    Next thing is, DHCP allows you to set the host name. This is defined in the DHCP RFC [1] section 2.1 and 4.2. Instead to send the pair (IP-subnet-number, hardware-address) like Nokia does, it's also possible to send the pair (IP-subnet-number, hostname) and set the "client-identifier" and host-name option in the dhcp request.

    This makes the dhcp server to query the dns server and assign an IP address to the host name (or more specific as far as I understand it's assigned to the client-identifier field). Sample datagrams of a MS dhcp request/responses are in [2]. And in Linux dhcpd can also make use of the host-name option.

    See:
    [1] http://tools.ietf.org/html/rfc2131
    [2] http://support.microsoft.com/kb/169289

    The DNS name of a device is constructed from it's IP address (called reverse DNS lookup), and the IP address is changing when roaming around.

    Keep in mind that distinct "providers" want to implement their own DNS naming scheme, thus you cannot force your device to have a unique/non-changing name at all places.
    That may be the case at *some* places, but this would be handled by the protocol then. You'd have to be registered with your device in that network then anyways where you then either know the name you are given (and also you can use the same name in any subnetwork then most of the time), or the name you specify in the phone may be used instead the of the dns entry.

    (you could try insisting on having the same IP address everywhere to keep your hostname

    Or do I miss the point and you do want something completely different?
    I talk about local network applications. It is totally acceptably that a host name can be used in many networks and subnetworks as long as it's unique, this is also handled by the protocols.

    I give you a real world example scenario: I make a presentation and I want to use my laptop and and connect to the web server on my phone. I'd just go to like http://bensphone in the browser and since both laptop and phone are in the same network I'm done connecting to the phone. No hassle to look up the phone IP first.

    Marv

    P.S. Perhaps you are looking for something like http://www.dyndns.com/ or any other dynamic DNS service?
    Besides dyndns the Raccoon or MWS gateway might do this just fine. But I talk about local area networks and there it's also very common to have a hostname. And the upcoming applications where the phone is now part of the network and not only user of the net miss this.

    Ben

  6. #6
    Registered User
    Join Date
    Jun 2007
    Posts
    13

    Re: Change hostname

    Quote Originally Posted by stadin
    Well, I see several. First things first: If you have a router that shows you some stats, you will see the host name of every PC, be it Linux of Windows or whatever. But if you connect your Nokia device, there is no name assigned (in my case, dd-wrt shows a * as host name).
    IIRC that means, the Nokia device requests a hostname to be set by the DHCP Query (sending hostname "*") and your DHCP server does not assign one.

    Quote Originally Posted by stadin
    Next thing is, DHCP allows you to set the host name. This is defined in the DHCP RFC [1] section 2.1 and 4.2. Instead to send the pair (IP-subnet-number, hardware-address) like Nokia does, it's also possible to send the pair (IP-subnet-number, hostname) and set the "client-identifier" and host-name option in the dhcp request.
    The MAC address _IS_ required for a successfull DHCP request while the hostname is not. But we are leaving the main topic of this forum, this is more a phone hardware related question...

    Quote Originally Posted by stadin
    This makes the dhcp server to query the dns server and assign an IP address to the host name (or more specific as far as I understand it's assigned to the client-identifier field). Sample datagrams of a MS dhcp request/responses are in [2]. And in Linux dhcpd can also make use of the host-name option.

    See:
    [1] http://tools.ietf.org/html/rfc2131
    [2] http://support.microsoft.com/kb/169289
    DHCP and DNS have not much more in common than working on IP addresses. The process of adding a DHCP-requested-and-acknowledged IP address with corresponding hostname to the DNS server is some sort of magic, which Microsoft encapsulates in ActiveDirectory DynDNS/DynDHCP services.
    An IP address requested from your DHCP server on your WLAN router will not update your DNS server running somewhere else.
    In common, DHCP-assigned addresses are normally not reflected in DNS without further interaction.


    Quote Originally Posted by stadin
    That may be the case at *some* places, but this would be handled by the protocol then. You'd have to be registered with your device in that network then anyways where you then either know the name you are given (and also you can use the same name in any subnetwork then most of the time), or the name you specify in the phone may be used instead the of the dns entry.
    This - again - requires the specific DHCP server to accept the requested hostname and assign/create/refresh the corresponding DNS record. Can you assure that this is always the case?


    Quote Originally Posted by stadin
    I talk about local network applications. It is totally acceptably that a host name can be used in many networks and subnetworks as long as it's unique, this is also handled by the protocols.

    I give you a real world example scenario: I make a presentation and I want to use my laptop and and connect to the web server on my phone. I'd just go to like http://bensphone in the browser and since both laptop and phone are in the same network I'm done connecting to the phone. No hassle to look up the phone IP first.
    And again: for private networks, you may contact the administrator (yourself?) and specify fixed DHCP leases with a fixed hostname for your phone. However this will not work on public networks since their admins have usually a different idea of what name a device is given.


    Quote Originally Posted by stadin
    Besides dyndns the Raccoon or MWS gateway might do this just fine. But I talk about local area networks and there it's also very common to have a hostname. And the upcoming applications where the phone is now part of the network and not only user of the net miss this.

    Ben
    Well, as mentioned, assign a fixed IP in DHCP.

    Marv

  7. #7
    Registered User
    Join Date
    Jun 2007
    Posts
    19

    Re: Change hostname

    Quote Originally Posted by _marv_
    DHCP and DNS have not much more in common than working on IP addresses. The process of adding a DHCP-requested-and-acknowledged IP address with corresponding hostname to the DNS server is some sort of magic, which Microsoft encapsulates in ActiveDirectory DynDNS/DynDHCP services.
    An IP address requested from your DHCP server on your WLAN router will not update your DNS server running somewhere else.
    In common, DHCP-assigned addresses are normally not reflected in DNS without further interaction.
    You are right in means of an managed enterprise where you have a DNS server. But for home use, at the university (wlan subnet here takes the name I assign in my laptop), or if you just want to plug in your PC or phone at your friends it is of much help especially for a mobile device that you can give your device a netBIOS name and it *could* just work. That's no special MS thing, it's defined in the DHCP RFC, works with Linux and even my 100€ embedded DOS thingy and propably works with most OS' out of the box.

    I mean, device names work fine with my laptop most of the times. I don't see why it shouldn't be possible with the phone when it could make things easier.

    Edit: Another example is that I just cannot assign neither a fixed IP nor a DNS name at my university. So I have no other option than looking it up with ifinfo on my device.

  8. #8
    Registered User
    Join Date
    Jun 2007
    Posts
    13

    Re: Change hostname

    Quote Originally Posted by stadin
    You are right in means of an managed enterprise where you have a DNS server. But for home use, at the university (wlan subnet here takes the name I assign in my laptop), or if you just want to plug in your PC or phone at your friends it is of much help especially for a mobile device that you can give your device a netBIOS name and it *could* just work. That's no special MS thing, it's defined in the DHCP RFC, works with Linux and even my 100€ embedded DOS thingy and propably works with most OS' out of the box.

    I mean, device names work fine with my laptop most of the times. I don't see why it shouldn't be possible with the phone when it could make things easier.
    Huh? My phone does not "speak" NetBIOS und thus does not have a "device name" by means of a hostname. Nor does my Linux box when I disable Samba. Or any other device which does not know anything about "computername". So a NetBIOS name _IS_ a MS thing and has !really! nothing to do with standard DNS or standard DHCP. It is just occasionally used in MS environments. Don't mistake the NetBIOS name as an alias for a FQDN, since these are completely different.
    Example: a windows web server is called \\MSWEBSERVER by means of NetBIOS, but is called www.my-company.com by means of DNS and TCPIP. What is in your opinion the "hostname"?
    Nokia phones do not speak NetBIOS, only TCPIP. So here only the TCPIP hostname applies, and this can be set via DHCP and/or DNS.

    Marv

  9. #9
    Registered User
    Join Date
    Jun 2007
    Posts
    19

    Re: Change hostname

    Quote Originally Posted by _marv_
    Huh? My phone does not "speak" NetBIOS und thus does not have a "device name" by means of a hostname. Nor does my Linux box when I disable Samba. Or any other device which does not know anything about "computername". So a NetBIOS name _IS_ a MS thing and has !really! nothing to do with standard DNS or standard DHCP. It is just occasionally used in MS environments.
    You're right regarding NetBIOS. This seems to be what the MS DHCP Server uses when you use the host-name option. But still, this option really is defined in the DHCP RFC and it really is used productively to define a hostname within dhcp, I guess it's the responsibility of the DHCP server to handle this right, I do not master any details. But it certainly is not a proprietary MS thing.
    You may try this if you don't see your hostname on Linux (edit dhclient.conf)

    interface "ethEDITME" {
    send dhcp-client-identifier mac-adresse;
    send host-name "hostname.athome.org";
    }

    In case of my WLAN router (Buffalo WHR-HP-54G) at home dnsmaq is responsible for DHCP and DNS (as you mention correct it propably doesn't use NetBIOS, but may result in an DNS entry).

    Don't mistake the NetBIOS name as an alias for a FQDN, since these are completely different.
    Example: a windows web server is called \\MSWEBSERVER by means of NetBIOS, but is called www.my-company.com by means of DNS and TCPIP. What is in your opinion the "hostname"?
    In my example I was in the same network with Laptop and phone. As long as the host is in the same domain you can use the host name for brevity. http://hostname will work as well as http://hostname.domain.xyz.
    When the domainname option supplied by the DHCP response is takes as domain name it would even be sufficient in a phone configuration to just define a hostname. Like on Linux DHCPD there an option (-D) to use the domain name spcified in the DHCP response.

    Nokia phones do not speak NetBIOS, only TCPIP. So here only the TCPIP hostname applies, and this can be set via DHCP and/or DNS.

    Marv
    ... So it should be possible to set it, shouldn't it?

    Ben

  10. #10
    Registered User
    Join Date
    Jun 2007
    Posts
    13

    Re: Change hostname

    Quote Originally Posted by stadin
    You're right regarding NetBIOS. This seems to be what the MS DHCP Server uses when you use the host-name option. But still, this option really is defined in the DHCP RFC and it really is used productively to define a hostname within dhcp, I guess it's the responsibility of the DHCP server to handle this right, I do not master any details. But it certainly is not a proprietary MS thing.
    Sure is the hostname option defined in DHCP RFCs, and as you state (and I did before), it is the the job of the DHCP to accept a requested hostname or deny it and assign a self-choosen one.

    You may try this if you don't see your hostname on Linux (edit dhclient.conf)

    interface "ethEDITME" {
    send dhcp-client-identifier mac-adresse;
    send host-name "hostname.athome.org";
    }
    That is complete fine, the Linux DHCP client sends a configured hostname to *ask* the DHCP server if that name can be confirmed. The DHCP client has nearly no influence of insisting on a specfic hostname, though.

    In case of my WLAN router (Buffalo WHR-HP-54G) at home dnsmaq is responsible for DHCP and DNS (as you mention correct it propably doesn't use NetBIOS, but may result in an DNS entry).
    This is because dnsmasq is only a DNS forwarder combined with a DHCP server. The functionality of DNS and DHCP is somewhat "bundled" here. It acts as a DNS server (by working as a DNS "proxy cache" and maintain its own "local" tables which get filled by local DHCP requests).

    In my example I was in the same network with Laptop and phone. As long as the host is in the same domain you can use the host name for brevity. http://hostname will work as well as http://hostname.domain.xyz.
    This applies only for Windows where for "user convinience" the NetBIOS names and FQDN names get mixed up in some strange, magically (and IMHO to-be-disliked) manner.

    :EDIT And for NetBIOS-free environments, this works because of setting your default-DNS-domain to the correct value and specifying a DNS "search order".
    On windows:
    C:\WINDOWS>ipconfig /all

    Windows-IP-Konfiguration

    Hostname. . . . . . . . . . . . . : oshi
    Primäres DNS-Suffix . . . . . . . : b1.dom
    Knotentyp . . . . . . . . . . . . : Peer-Peer
    IP-Routing aktiviert. . . . . . . : Nein
    WINS-Proxy aktiviert. . . . . . . : Nein
    DNS-Suffixsuchliste . . . . . . . : b1.dom

    On Unix:
    mheerling@styx:~> cat /etc/resolv.conf
    nameserver 127.0.0.1
    search b1.dom


    In both cases, one can omit the domain part of the FQDN. This does howver not solve any problems since the names and IP addresses need to be well-defined - either manually/static or automatically/centrally/dynamic|static.
    :END_EDIT


    Important point here is the type of protocol you are using: http requests to your computer are different than "net use \\BEN\c$" requests.
    The first is plain TCPIP, while the second is NetBIOS/NetBT.

    When the domainname option supplied by the DHCP response is takes as domain name it would even be sufficient in a phone configuration to just define a hostname. Like on Linux DHCPD there an option (-D) to use the domain name spcified in the DHCP response.



    ... So it should be possible to set it, shouldn't it?

    Ben
    Oh, we're doing circles here. It depends on the DHCP server if it accepts your *REQUEST* for assigning a specific FQDN which is the TCPIP hostname. Technically spoken - from the DHCP server view - you have no rights to get a specific hostname assigned without configuring the DHCP server to do so. This is done by specifying fixed DHCP leases on DHCP server side. You might only REQUEST a name, the DHCP server decides if it satisfies your REQUEST or not.

    Marv
    Last edited by _marv_; 2007-06-22 at 15:24.

  11. #11
    Registered User
    Join Date
    Jun 2007
    Posts
    19

    Re: Change hostname

    Quote Originally Posted by _marv_
    Oh, we're doing circles here. It depends on the DHCP server if it accepts your *REQUEST* for assigning a specific FQDN which is the TCPIP hostname. Technically spoken - from the DHCP server view - you have no rights to get a specific hostname assigned without configuring the DHCP server to do so. This is done by specifying fixed DHCP leases on DHCP server side. You might only REQUEST a name, the DHCP server decides if it satisfies your REQUEST or not.

    Marv
    Yes we're indeed where we were before . In practical use however I've only seen a mac address assigned to a IP address. It is not of much (administrative) help in most cases to force a name for a PC. At least I've not come through such network (I know for sure that at least the place I was the users would just complain and argue to name and rename the PCs and servers like they want to).
    And on Linux dhcpd Man the standard behaviour is j- on client side - just the other way around (eventhough this doesn't mean you have the right to change the hostname):

    "-H
    Forces dhcpcd to set hostname of the host to the hostname option supplied by DHCP server. By default dhcpcd will NOT set hostname of the host to the hostname option received from DHCP server."

    Anyways, be it how it is. But it would really be fine if there was an option in Raccoon or MWS to see at least the phone IP address(es) that you have currently when you start the server. That would be fine though. Because as I said earlier, in quite a lot of places I really have no influence on any server settings (and won't get the admin to change them for me, or at least not fast enough) and thus no other option than looking up the phone IP myself.
    Currently I'm using IFInfo for s60 which is available with source code.
    Last edited by stadin; 2007-06-22 at 17:39.

  12. #12
    Registered User
    Join Date
    Jun 2007
    Posts
    13

    Re: Change hostname

    Ok Ben, so we can close this thread.

    Greetings,
    Marv

Similar Threads

  1. How to change menubar or menupane?
    By ahsp83 in forum Symbian User Interface
    Replies: 19
    Last Post: 2009-01-29, 13:52
  2. Displayable change (again)
    By Wontar in forum Mobile Java General
    Replies: 0
    Last Post: 2007-01-13, 16:14
  3. Change icon in listbox
    By ninidotnet in forum Symbian User Interface
    Replies: 2
    Last Post: 2006-10-12, 02:57
  4. Replies: 0
    Last Post: 2003-10-06, 12:28
  5. change focus
    By f_alonso_1 in forum Symbian
    Replies: 0
    Last Post: 2003-07-17, 13:34

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •