Page 16 - DCAP202_Fundamentals of Web Programming
P. 16

Unit 1: Internet Basic




            Host2Ip  =  myIPs.AddressList(0).ToString()                                         Notes
            Catch  ex  As  Exception
            ‘Handle  the  error
            End  Try
          End  Function
          Finally, although this approach works much better than just looking at REMOTE_ADDR, still
          it’s far from  a full proof solution, simply because it relies on the HTTP header information
          which can be easily manipulated.

          Self Assessment

          Fill in the blanks:

          10.  The IP address could be used either for ........................... or authentication purposes.
          11.  Using the ........................... function we get a list of all the IP addresses the hostname resolves
               to.

          1.6 IP Address


          An IP address is an identifier for a computer or device on a TCP/IP network. Networks using the
          TCP/IP protocol route messages based on the IP address of the destination.
          An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g.,
          computer, printer)  participating in a computer network that  uses the Internet Protocol  for
          communication. An IP  address serves  two principal  functions: host  or  network  interface
          identification and location addressing. Its role has been characterized as follows: “A name indicates
          what we seek. An address indicates where it is. A route indicates how to get there.”

          1.6.1 Network Part of IP Address

          The format of an IP address is a 32-bit numeric address written as four numbers separated by
          periods. Each number can be zero to 255.


                 Example: 1.160.10.240 could be an IP address.
          Within an isolated network, you can assign IP addresses at random as long as each one is unique.
          However, connecting a private network to the Internet requires using registered IP addresses
          (called Internet addresses) to avoid duplicates.

          1.6.2 Local Host Part of the IP Address

          A localhost is, put plainly, the standard hostname given to the address assigned to the loopback
          network interface. Translated into an IP address, a localhost is always designated as 127.0.0.1.
          This may be overwhelming, so let’s look at what these things mean.
          Hostname is the term for the label that is assigned to any  device connected  to a  computer
          network and is used to identify the device across the web. A hostname usually consists of a
          single word or phrase and can be followed by a Domain Name System domain at the end. That
          is, a website. Used this way, the hostname is called a domain name.


                 Example: An example of using a hostname this way would be: hostname.domain.




                                           LOVELY PROFESSIONAL UNIVERSITY                                    9
   11   12   13   14   15   16   17   18   19   20   21