Looking up Internet Addresses - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

Looking up Internet Addresses

Description:

People can remember only 7 digits (phone numbers split into 3 digits-4digits) ... If a client requests for the IP address outside the domain, the local DNS server ... – PowerPoint PPT presentation

Number of Views:50
Avg rating:3.0/5.0
Slides: 7
Provided by: v5o5jotqkg
Category:

less

Transcript and Presenter's Notes

Title: Looking up Internet Addresses


1
Looking up Internet Addresses
  • Chapter 6

2
IP Addresses
  • IPv4
  • Ex 139.124.12.14
  • (0.0.0.0 to 255.255.255.255)
  • IPv6
  • Ex Address of www.ipv6.com.cn
    20012502ff2102508bfffede67c8
  • In a mixed of IPv4 IPv6 networks, the last four
    bytes are written in v4
  • Ex fedcba982ff210118.64.70.15
  • IPv6 is supported by Java 1.4 later. Java 1.3
    earlier support only 4 byte address.

3
Domain Name System (DNS)
  • People can remember only 7 digits (phone numbers
    split into 3 digits-4digits)
  • DNS associates hostnames that people can remember
    to their IP addresses.
  • Ex www. UNB.CA to lt gt
  • Except computers that do not have permanent IP
    address (most PCs ) since they are not used as
    serversdont need a name since nobody will refer
    to them
  • Some machines have multiple names. www.xx refers
    to a website not a machine
  • Website can be easily moved to another machine
    URLs around the world need not be updated.

4
DNS cont..
  • Sometimes one name maps to a number of IP
    addresses. Then the DNS server must randomly
    select machines to respond to each request. Used
    in high traffic web sites, where it splits the
    load across multiple systems.
  • Ex www.oreilly.com is actually in 2 machines
    208.201.239.36 208.201.239.37
  • Each computer connected to Internet must have
    access to a machine called Domain Name Server
    (locally)usually a unix box running special DNS
    software that knows the mapping between different
    hostnames IP addresses.
  • If a client requests for the IP address outside
    the domain, the local DNS server asks a remote
    DNS server relays the answer to the request!

5
The InetAddress Class
  • Java.net.InetAddress class in java is a
    high-level representation of an IP address, both
    IPv4 v6.
  • It is used by most other network classes, such as
    Socket, ServerSocket, URL, DatagramSocket, and
    many more..
  • Includes both a hostname IP address

6
Creating new InetAddress objects
  • InetAddress class has three static methods that
    return suitably initialized InetAddress objects.
  • Public static InetAddress getByName (String
    hostName)
  • throws UnknownHostException
  • Public static InetAddress getAllByName (String
    hostName)
  • throws UnknownHostException
  • Public static InetAddress getLocalHost ()
  • throws UnknownHostException
Write a Comment
User Comments (0)
About PowerShow.com