1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Hostname Problem

Discussion in 'HD-FOX T2 Freeview Receiver' started by Gary, Jul 30, 2012.

  1. Gary

    Gary Member

    I've set my HDR to have a hostname of HUMAXHDR.

    I can ping this fine from a pc. However on my HD box if I ping HUMAXHDR it just returns a default IP (same as if I ping THISDOESNTEXIST). Why is that?

    Also, I've tried to set the HD to have a hostname of HUMAXHD1, but despite the command prompt showing this hostname, pinging HUMAXHD1 from my pc doesn't work.

    I can connect to the HDR using the webif as HUMAXHDR, but to connect to the HD I cannot use the hostname I have to lookup the IP address everytime and use that
     
  2. Black Hole

    Black Hole Felinos Guru

    Hostnames are purely logical substitutions made at the client end. If pinging HUMAXHDR works from the PC, it's because the hosts table in the PC translates the name to an actual IP address on the way out.
     
  3. af123

    af123 Administrator Staff Member

    Most likely you're running the Samba package on the HDR which lets Windows find it by name.

    You can add your own extra name to IP address mappings by creating a file on the Humax called /mod/etc/hosts and putting something like this in it:

    Code:
    192.168.0.4 humaxhd
    
    On reboot, that mapping will be added to the global hosts file and then you can use the name from the Humax.
     
  4. Gary

    Gary Member

    There is nothing in the hosts file on my PC, so it must be the Samba that is making it work for the HDR.

    So....basically I need to give both boxes fixed IP addresses really don't I? Then I can add into the hosts file as above
     
  5. Black Hole

    Black Hole Felinos Guru

    Oh yes, fixed IPs are the way to go (whichever way you do it). I don't bother with naming them, I know that 192.168.1.64 and .68 are the devices in question (but these days I have very little need to access them directly except by WebIF, and I have presets for my browser anyway).
     
  6. Gary

    Gary Member

    Is there a guide for setting fixed IPs (I presume there is an option in the internet settings)? I know I'll need to pick some ones higher than my router will allocate dynamically
     
  7. Ezra Pound

    Ezra Pound Well-Known Member

    goto Menu >> Settings >> System >> Internet settings >> Configure LAN. If you have previously had a connection using DHCP then the various options will already be filled in for you and you would only need to change the first two lines, either way a typical set-up is below, NOTE 10.0.0.2 is the IP address of the router :-

    Configure IP = Manual
    IP address = 10.0.0.200 [see note below]
    Netmask = 255.255.255.0
    Gateway Address = 10.0.0.2
    DNS Address = 10.0.0.2

    Your router will have a block of numbers that are used for DHCP (my router uses 3 to 24 ) so in this case pick an IP address that matches the Gateway with the last number above 24, then click Apply and you should get a 'Network Connected' message
     
  8. Black Hole

    Black Hole Felinos Guru

    Something strange there. Devices on the local network should be allocated 192.168.xxx.yyy where xxx is probably 0 or 1.

    All you need to do is set DHCP and see what gets allocated on boot - then leave everything as it is and change to manual, except you might want to change the fourth field ONLY of the IP Address line.

    In my view it is better to manage this at the router end. If you log in to the management pages on the router you will be offered options to fix addresses allocated to particular MACs (I just take whatever has been allocated dynamically and then set it to never expire). Once that it done on the router you can leave the Humax set to DHCP as it will be allocated the same IP each time it requests one (each boot).
     
  9. xyz321

    xyz321 Well-Known Member

    RFC 1918:
    Code:
       The Internet Assigned Numbers Authority (IANA) has reserved the
       following three blocks of the IP address space for private internets:
    
         10.0.0.0        -   10.255.255.255  (10/8 prefix)
         172.16.0.0      -   172.31.255.255  (172.16/12 prefix)
         192.168.0.0     -   192.168.255.255 (192.168/16 prefix)
    
    
     
    af123 and Ezra Pound like this.
  10. Ezra Pound

    Ezra Pound Well-Known Member

    xyz321 Thanks for that
     
  11. Black Hole

    Black Hole Felinos Guru

    You will have noticed the first gives a local 24-bit address space, the next a 20-bit space, while the usual 192.168 gives a 16-bit space (and some devices might have trouble getting outside an 8-bit mask).
     
  12. af123

    af123 Administrator Staff Member

    While the 192.168 prefix does give a 16-bit space, it's usually used with a 24-bit mask (netmask 255.255.255.0 or /24). That's its natural net mask under the old class system..

    Mostly 10/8 and 172.16/12 are used with a /24 too although I've seen and designed many variations. One if my customers uses 10 space submitted using /22's

    How did we get onto this?
     
  13. Gary

    Gary Member

    Thanks for all the responses. I will look into getting this done
     
  14. Black Hole

    Black Hole Felinos Guru

    I was surprised to see Ezra's example with 10.0... IP addresses. As most home networks probably use the broadband router as the DHCP manager, it will be the router that determines the subnet (most likely left in its default state), and as all the home devices must be on the same subnet if they want to communicate, I find it strange that a home router would be supplied with anything other than 192.168... We have had queries on here in the past about non-communicating devices and discovered there was a mix of 192.168.0.. and 192.168.1...

    On a wider subject, I wonder how many networks there are out there where the IT manager has just tweaked settings until it works, instead of understand what they should actually be??
     
  15. af123

    af123 Administrator Staff Member

    The last part is easy... many, many. Most people don't understand network masks, often assuming that 255.255.255.0 is always the right answer, even fewer are comfortable with netmasks like 255.255.255.248. In the old days before classless subnetting, a subnet mask didn't even need to be a set of contiguous 1's followed by zeros - I came across networks using non-contiguous schemes that I can only imagine were set up like that to secure the IT manager's job!

    You're right, most broadband routers will use 192.168.0/24 or 192.168.1/24 by default, although there's actually nothing wrong with having both 192.168.0 and 192.168.1 on the same network as long as your network mask is /23 (255.255.254.0) or shorter - but it isn't common. 10 addresses are sometimes the default but rarely anything in the 172.16.0.0-172.31.255.255 range. That's one of the reasons I use 172.29.0/24 - I never get address conflicts with VPNs to other networks : )
     
  16. Ezra Pound

    Ezra Pound Well-Known Member

    It has been some time (years) since I set-up my router and I couldn't remember why I chose the '10s' rather than '168s' or '172s' I seem to remember that the last company I worked for used '172s' so I would have avoided that to avoid confusion, anyway having looked at the manual for my router (probably for the first time) I discovered that it's default IP address is 10.0.0.2 so I was just lazy and didn't bother changing it
     
  17. dandnsmith

    dandnsmith Member

    At one stage Speedtouch routers had a default IPAddr of 10.0.0.138, and DHCP in the 10.0.0.x
    Nowadays there are a whole slew of routers using 192.168.2.1 as default ...
    It's fine, as long as you know what you're doing (I've never had the 172... situation, but am well aware of it as a possibility) - I do wonder what it will be like when IP6 is the norm