1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Website headers in IIS

Discussion in 'Windows Server System' started by moboking, 2005/01/06.

Thread Status:
Not open for further replies.
  1. 2005/01/06
    moboking

    moboking Inactive Thread Starter

    Joined:
    2004/12/26
    Messages:
    82
    Likes Received:
    0
    Using website headers, I can run multiple websites under a copy of IIS and one IP address. I have read about it but still do not understand how can this work. I mean when a browser requests a webpage, it goes to the webserver based on the unique IP of that server through the help of a DNS server at the default port 80. The browser does not use the name of the website, but its IP. In that case, how can IIS know which website among the multiple websites it hosts to reply to the browser since all of these sites use the same IP?
     
  2. 2005/01/06
    ReggieB

    ReggieB Inactive Alumni

    Joined:
    2004/05/12
    Messages:
    2,786
    Likes Received:
    2
    You'd need to check the workings of this but I am fairly sure this is how it works:

    At the IP level, when the client machine realises it wants to connect to a web server it initiates a communication. To work at IP level, the system needs to resolve the web server's name to an IP address, and it uses DNS to do this. The Client PC can then initial a communication to the server at the IP level.

    The IP packets will have the stack level 4 port set as 80, so TCP will hand the communication over to the service listening on port 80: the web service.

    Communication to the web service is via HTTP (Hyper Text Transfer Protocol). I am fairly sure that the HTTP communication includes both the request to transfer the page required AND the URL of the page required. Because HTTP provides the full URL in the request the server is able to distinguish between different "web sites" it hosts.
     
    Last edited: 2005/01/06

  3. to hide this advert.

  4. 2005/01/06
    moboking

    moboking Inactive Thread Starter

    Joined:
    2004/12/26
    Messages:
    82
    Likes Received:
    0
    The way I understand how the Web works is the browser ONLY connects to a webserver with 2 pieces of info: the IP address and the port number. The IP address of the webserver is given to the browser by a DNS server and therefore the URL we see is just a mask that covers up the actual IP numerical value. I am sure for headers to work, the browser must hit the webserver with more than just port and IP address, but what that extra piece of info is is never clear to me in all the literature that I have read. I supposed the URL itself is the logical choice, but I have not found this info being described in explicit terms. Does anyone here know a webpage that clearly explains the actual thing that enables the browser to distinguish which website it wants from the webserver that hosts multiple websites under a single IP and a single port?
     
    Last edited: 2005/01/06
  5. 2005/01/06
    BenMcDonald[MS]

    BenMcDonald[MS] Inactive

    Joined:
    2004/12/14
    Messages:
    228
    Likes Received:
    0
  6. 2005/01/06
    ReggieB

    ReggieB Inactive Alumni

    Joined:
    2004/05/12
    Messages:
    2,786
    Likes Received:
    2
    Nice links Ben

    moboking, I think what you are missing is that the network connection protocols act in a hiearchy - in a stack. Each packet sent over a TCP/IP includes information relating to each layer in the stack. The format the information is held in is controlled by the releavant protocol that operates at that layer.

    The layers/protocols that control the transmission of the information over the whole distance are layers 3 and 4. In a normal browser connection the layer 3 information is the IP address, and the layer 4 information is the port number.

    So as you say, to get to the webserver, all each packet of information needs is the right IP address and port number.

    However, once the packet of information arrives at the server information higher up in the TCP/IP stack - at the HTTP level - is then used. The packet of information as a whole looks something like this:

    {Higher level e.g. the HTTP messages}
    {Layer 4 info including source port and destination port}
    {Layer 3 info including source and destination IP address}
    {layer 2 info}

    or you can think of it like this:

     
    Last edited: 2005/01/06
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.