Re: hostnames and interfaces

From: Jerry McAllister (jerrymc_at_clunix.cl.msu.edu)
Date: 11/21/03

  • Next message: Matthew Seaman: "Re: Staying current with 4.9 - which supfile?"
    To: MLandman@face2interface.com (Marty Landman)
    Date: Fri, 21 Nov 2003 11:56:26 -0500 (EST)
    
    

    >
    > At 10:35 AM 11/21/2003, Jerry McAllister wrote:
    >
    > >You can also configure your NIC to answer to multiple IP addresses
    > >and then configure your Apache to treat each as a virtual host with
    > >a separate hostname/URL. Yes, you have to have whoever is serving
    > >DNS for you (either yourself, your ISP or some DNS service) set up
    > >to translate IP <-> hostname
    >
    > Jerry, thanks for trying but I don't know what this means (I've heard this
    > remark so many times myself from others...). Yikes, I'm just a blathering
    > idiot. :(

    Well, I am not the best one to explain in detail.
    For this specific item, your best bet might be to study the
    Apache documentation on doing virtual hosts and maybe do some
    searching on the net (Google, etc) on the subject.

    Generally, it seems like there are actuall several questions being
    asked in this series of posts and I am having trouble figuring out
    what the core issue is. Hostnames and IPs are used on the net to
    address machines. Some of these can be 'virtual' machines that are
    hosted by machines that are set up to respond to a lot of either/or
    hostnames and IPs. Each actual machine that lives on the net will
    have a specific hostname and IP address that is its own and all the
    others that it answers to are considered either virtual addresses or
    aliases. A DNS server sorts out the relationships and reports
    the matchings between IPs and hostnames. You can run your own DNS
    server, especially if you have a lot of machines and your own domain,
    or you can arrange with another entity, such as your ISP or another
    DNS service to do that for you.

    If you are not connected to the net, it doesn't matter what you call
    your machine or how many aliases you create or what IPs you use, though
    you might want to stick to the designated private IP ranges if you
    create your own intranet even if it is not connected to the internet.

    There is no limit other than practical ones that I know of to how
    many aliases/virtual hosts you create if you are running an intranet
    that is not connected to the internet.

    If you connect to the internet, the domain you are using must be
    registered with a registering service. The service you use depends on
    the top level element of the name (.com .net, .org, .edu, .cn, .fr, etc)
    Your ISP will normally be the best one to help you with that (except that
    some ISPs are decidedly unhelpful; then you have to go looking)

    A fully Qualified Host Name consists of two main parts.
    A machine name such as 'mypc' and a domain name such as concern.com.
    They are assembled in to a FQHN (Fully Qualified Host Name)
     - as mypc.concern.com in this example.
    During installation, when it asks for hostname, it wants a Fully
    Qualified Hostname if you are going to be connected to the internet.
    You might just as well fake one if you are not going to be on
    the internet just to be consistent, but you can put just a single
    string if you want. IP addresses must be in the form xxx.xxx.xxx.xxx
    unless you are playing with IPV6 and if you are, you should know all
    this already so stop reading.

    There is often much misspeak about these. The full qualified hostname
    is often called a domain name, for example when only the last part is
    really the domain name. Plus, the term hostname is used to refer to
    both/either the single machine part of the name such as 'mypc' above
    and the fully qualified hostname 'mypc.concern.com' as above. This
    leads to much confusion and I wish we had better names. But, that is
    the way it is.

    The domain name 'concern.com' must be registered with the service
    handling .com. Then whoever owns the 'concern.com' domain allows or
    directs hostnames to use it. If you registered the domain name, then
    you decide.

    When the 'concern.com' domain name is registered, you have to tell the
    service what DNS server will be providing DNS service for that domain.
    It may be you if you registered the domain name and have a DNS server
    or it might be some other system, such as one run by your ISP or another
    company that runs DNS servers for hire. Whenever you create a host
    that resides in the domain, such as 'mypc' in 'mypc.concern.com' an entry
    must be made in whatever DNS server that is handling the 'concern.com'
    domain. That is required before it will do correct translation.

    The physical machine that is mypc on the concern.com domain may answer
    to lots of host names and even lots of IPs. There are two parts to
    making this happen.

    The 'mypc' machine must be set up to respond to all those host names
    besides its own name. If it involves additional IP address (an alias)
    it is done in a rc.conf ifconfig alias statement (or we actually put those
    in a rc.conf.local file and add an include just to keep things a little
    more clean and clear), and/or in the software that is expected to respond
    to it, such as Apache. If it is only a different hostname, it can be
    done only by configuring the software that responds to it. For Apache,
    for example, you configure it in either httpd.conf or better in
    virtualhosts.conf (and make sure httpd.conf has an entry to include
    virtualhosts.conf) to listen to particular IPs and/or hostnames and tell
    it which web pages to go looking for for each different one. Something
    similar can be done for Email servers and other pieces of software.

    The other part to making it respond to multiple hostnames and/or IPs is
    making sure the DNS server has the proper entries to translate addresses.

    I am not sure if there is some logic for the secondary addresses/names
    being called aliases or virtual hosts or not. Apache calls them
    virtual hosts and Email servers seem to call them aliases as does
    the boot up configuration (rc.conf, etc).

    As someone has mentioned, if you are not on the internet, much of this
    does not matter. You can enter almost anything when it asks for
    hostname and claim any IP you want. You can set up your own DNS server
    and make it all work any which way you choose.

    This is quite general. From this overall view, the rest is up to you to
    study documentation to understand. There are many subtleties admins add.

    ////jerry

    >
    > Marty Landman Face 2 Interface Inc 845-679-9387
    > Sign On Required: Web membership software for your site
    > Make a Website: http://face2interface.com/Home/Demo.shtml
    >
    >

    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"


  • Next message: Matthew Seaman: "Re: Staying current with 4.9 - which supfile?"

    Relevant Pages

    • swinstall problem
      ... Could not contact host "jupiter.isctem.ac.mz". ... hostname is correct and an obsolete pathname is specified (beginning ... We have a dns server and initially the swinstall was running ...
      (comp.sys.hp.hpux)
    • Re: DHCP startup problems
      ... > There appears to be a way to tell the DHCP server what hostname you have ... > so that it can update a DNS server. ... Yep, with TCPIP 5.3, the DHCP server has the ability. ... generate a host name which gets transmitted to the DNS server and will get ...
      (comp.os.vms)
    • Re: How to resolve names
      ... So I can ping and try to ssh/telnet the 2 other machines from my PC via ... I cannot do it by using their host names although I get proper ... I assume that the router is acting as the DNS server, ... # passwd: files nis ...
      (comp.os.linux.networking)
    • Re: /bin/hostname
      ... Find a real news server. ... in /etc/hosts that maps the host and the FQDN to the static IP ... Linux distributions are supposed to follow Linux Standard Base standards, ... hostname -- show or set the system's host name ...
      (comp.os.linux.networking)
    • Re: Any known issues withsp2 and non-sp xp ics?
      ... Default Gateway: none ... DNS Server: 192.168.0.1 or your ISP's DNS server ... as my isp is configured to use DHCP (Dynamic Host ... After doing the above changes to the client, ...
      (microsoft.public.windowsxp.network_web)