Internet Addressing. Introduction The Internet is a vast collection of machines and devices spread out across the world. There is an important need to.

Slides:



Advertisements
Similar presentations
Classifying Network Addressing
Advertisements

© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Addressing the Network – IPv4 Network Fundamentals – Chapter 6.
CIM 2465 IP Addressing Scheme1 IP Addressing Scheme (Topic 4) Textbook: Networking Basics, CCNA 1 Companion Guide, Cisco Press Cisco Networking Academy.
Understanding Internet Protocol
CECS 474 Computer Network Interoperability Notes for Douglas E. Comer, Computer Networks and Internets (5 th Edition) Tracy Bradley Maples, Ph.D. Computer.
© 2007 Cisco Systems, Inc. All rights reserved.ICND1 v1.0—1-1 Building a Simple Network Understanding the TCP/IP Internet Layer.
IP Address 1. 2 Network layer r Network layer protocols in every host, router r Router examines IP address field in all IP datagrams passing through it.
1 K. Salah Module 5.1: Internet Protocol TCP/IP Suite IP Addressing ARP RARP DHCP.
CMPE 80N - Introduction to Networks and the Internet 1 CMPE 80N Winter 2004 Lecture 17 Introduction to Networks and the Internet.
Oct 21, 2004CS573: Network Protocols and Standards1 IP: Addressing, ARP, Routing Network Protocols and Standards Autumn
Prepared By E.Musa Alyaman1 Chapter 3 Internet Addressing.
CS335 Networking & Network Administration Tuesday, May 11, 2010.
Understanding Networks. Objectives Compare client and network operating systems Learn about local area network technologies, including Ethernet, Token.
CSE452:Computer Networks
Introduction to networking (Yarnfield) IP addresses.
Copyright 2003 CCNA 1 Chapter 7 TCP/IP Protocol Suite and IP Addressing By Your Name.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 1 v3.0 Module 9 TCP/IP Protocol Suite and IP Addressing.
Chapter Eleven An Introduction to TCP/IP. Objectives To compare TCP/IP’s layered structure to OSI To review the structure of an IP address To look at.
Spring Ch 18 IP Addresses. 2 Internet Protocol  Only protocol at Layer 3  Defines Internet addressing Internet packet format Internet routing.
DIT314 ~ Client Operating System & Administration CHAPTER 9 SUPPORTING TCP/IP, DNS USING WINDOWS XP Prepared By : Suraya Alias.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Addressing the Network – IPv4 Network Fundamentals – Chapter 6.
DOMAIN NAME SYSTEM Based on Computer Networks and Internets, Comer CSIT 320 (Blum)1.
Name Resolution Domain Name System.
Internet Addressing. When your computer is on the Internet, anything you do requires data to be transmitted and received. For example, when you visit.
CCNA 1 v3.0 Module 9 TCP/IP Protocol Suite and IP Addressing
Computer Networks. IP Addresses Before we communicate with a computer on the network we have to be able to identify it. Every computer on a network must.
DNS (Domain Name System) Protocol On the Internet, the DNS associates various sorts of information with domain names. A domain name is a meaningful and.
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network Chapter 6: Name Resolution.
CIS 3360: Internet: Network Layer Introduction Cliff Zou Spring 2012.
Bootstrap and Autoconfiguration Chapter 23. Introduction Each computer attached to a TCP/IP internet needs to know: –its IP address –the address of a.
ES 101. Module 2 IP Addressing & Routing. Last Lecture Wide area networking Definition of “packets”
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network Chapter 2: Configuring Network Protocols.
CSE5803 Advanced Internet Protocols and Applications (2) Universal Identifier In general, addressing in a network is closely linked with the issue.
C HAPTER 9 Supporting TCP/IP, DNS using Windows XP.
Part 3: Internetworking Internet architecture, addressing, encapsulation, reliable transport and the TCP/IP protocol suite.
Chapter 4, slide: 1 CS 372 – introduction to computer networks* Friday July 23, 2010 Announcements: r Midterms are graded. r Lab 4 is posted. Acknowledgement:
C HAPTER 6 Part 2 1 Revised sem AAB-2013.
Addressing IP v4 W.Lilakiatsakun. Anatomy of IPv4 (1) Dotted Decimal Address Network Address Host Address.
1 TCP/IP, Addressing and Services S. Hussain Ali M.S. (Computer Engineering) Department of Computer Engineering King Fahd University of Petroleum and Minerals.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
The InetAddress Class Nipat J.. public class InetAddress  This class represents an Internet Protocol (IP) address.  An IP address is either a 32-bit.
Universal Identifier UNIVERSAL IDENTIFIER Universal network = globally accepted method for identifying each computer. Host identifier = host is identify.
CCNA 1 v3.0 Module 9 TCP/IP Protocol Suite and IP Addressing.
CMPE 80N - Introduction to Networks and the Internet 1 CMPE 80N Winter 2004 Lecture 16 Introduction to Networks and the Internet.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
CCNA 1 v3.0 Module 9 TCP/IP Protocol Suite and IP Addressing
IP addresses IPv4 and IPv6. IP addresses (IP=Internet Protocol) Each computer connected to the Internet must have a unique IP address.
© Cengage Learning 2014 How IP Addresses Get Assigned A MAC address is embedded on a network adapter at a factory IP addresses are assigned manually or.
CSI 3125, Preliminaries, page 1 Networking. CSI 3125, Preliminaries, page 2 Networking A network represents interconnection of computers that is capable.
CS470 Computer Networking Protocols
NETWORKING (2) Dr. Andy Wu BCIS 4630 Fundamentals of IT Security.
TCP/IP Protocol Suite and IP Addressing Presented By : Dupien AMS.
Advance Computer Programming Networking Basics – explores the java.net package which provides support for networking. – Also Called “programming for the.
Introduction to Networking Concepts Lesson 1. TCP/IP Protocol Suite Network protocols provide the logical “language” for communication over the network.
1 ECE453 – Introduction to Computer Networks Lecture 11 – Network Layer III – IP Protocol.
Network Layer IP Address.
1 K. Salah Module 5.1: Internet Protocol TCP/IP Suite IP Addressing ARP RARP DHCP.
Networks Connecting Two Computers With UTP. Every machine on a network has a unique identifier. Just as you would address a letter to send in the mail,
LESSON Networking Fundamentals Understand IPv4.
IP: Addressing, ARP, Routing
Module 8: Networking Services
Domain Name System (DNS)
Implementing TCP/IP.
CS4470 Computer Networking Protocols
Introduction to networking (Yarnfield)
Objective: Classful Internet Addressing
Chapter 9 Objectives Understand TCP/IP Protocol.
IP Address.
Week 6: Network Protocols Part 2
Exceptions and networking
Presentation transcript:

Internet Addressing

Introduction The Internet is a vast collection of machines and devices spread out across the world. There is an important need to identify and locate a specific one. We will look into greater detail about how addresses work and how they are represented in Java.

Local Area Network Addresses Devices connected to a LAN have their own unique hardware address. This address is useful only in the context of a LAN. In other words, it cannot be used to locate machines on the Internet. This address cannot be used to indicate the location of a machine as it is possible to move the machine somewhere else (e.g. notebook computers).

Java network programmers need not be concerned with details about how data is routed within a LAN. In fact, Java does not provide access to data link protocols (which are network dependent) used by LANs. No matter what type of LAN is used, software can be written for it provided it supports TCP/IP (which is network independent).

Internet Protocol Addresses Devices having a direct Internet connection are allocated a unique IP address. IP addresses may be  Static Bound permanently to a certain machine/device  Dynamic Leased to a particular machine/device for a certain period of time.

The IP address is used by the Internet Protocol to route IP datagrams to the correct location.

Structure of the IP Address Under Internet Protocol version 4 (IPv4), the IP address is a 32-bit number made up of 4 octets. E.g: There are 5 classes of IP addresses:  Class A to  Class B to  Class C to  Class D to  Class E to

Network ID Host ID Multicast Group ID Reserved for Future Use A B C D E

Each private network is allocated a network ID that is a unique identifier for a specific network. The network administrator is responsible for assigning host IDs to machines in the network. The use of the classification scheme can help to reduce wastage of addresses.

Obtaining an IP Address The Internet Corporation for Assigned Names and Numbers (ICANN) is responsible for allocating blocks of IP addresses. A person setting up a private network would be allocated either a Class A, B or C address, and could then assign host IP addresses to the machines on that particular network.

Special IP Addresses A loopback or localhost address ( ) refers to the local machine. It is useful for programmers to connect to the local machine for testing their network software. The connection using this address is possible whether or not there is a connection to the Internet.

Another set of useful IP addresses are those reserved for private networking. These addresses can be used safely within a private network as they are not exposed to the public Internet.  Class A to  Class B to  Class C to On the Internet, routers will not forward data for these addresses.

The Domain Name System The domain name system (DNS) allows textual names to be associated with IP addresses. Any entity, be it commercial, government or private, can apply for a domain name. The name can be used by people to locate that entity on the Internet.

In addition, organizations can allocated their own hostnames once they have their domain name. Examples: ftp.davidreilly.com and ftp.davidreilly.com

How Does the DNS Work? There are too many domain-name-to-IP- address mappings to handle on one system. The DNS is a distributed database in which responsibility for accepting new registrations, and returning the addresses of existing registrations, is spread out across many different hosts.

The distribution of such responsibilities forms an hierarchical structure such as shown below:.net.com.gov.edu.mil.au.uk davidreilly awl.co.org

Domain Name Resolution When a request for a hostname is made (e.g: the operating system of the client computer contacts the local DNS server on the LAN. The local DNS server needs to locate the domain server "aol.com". To do this, it queries the "root" level domain server, which refers it to the ".com". When "aol.com" has been located, the local DNS server then queries it for the IP address of "

get.com server get aol server ROOT DNS server.com DNS server LAN DNS server

DNS requests can be cached on the LAN DNS server. This prevents overloading the root-level domains. This also improves network performance as the delay between requesting a domain name and receiving a response is diminished.

Internet Addressing with Java In Java, IP addresses (whether in dotted decimal format or as a hostname) are represented as java.net.InetAddress objects. Refer textbook (pg 63) for a description of some of the methods in the class InetAddress. netAddress.html netAddress.html

Example 1:  A program to find out the IP address of the current machine Example 2:  A program which resolves hostnames to IP addresses and then attempts to perform a reverse lookup of the IP address. DEMO` DEMO RUN

import java.net.*; class LocalHostDemo { public static void main(String args[]) { try { InetAddress localAddr = InetAddress.getLocalHost(); System.out.print("IP address: "); System.out.println(localAddr.getHostAddress()); System.out.println(localAddr.getHostName()); } catch (UnknownHostException uhe) { System.out.println("Unable to resolve localhost"); }

import java.net.*; class NetworkResolverDemo { public static void main(String args[]) { if (args.length != 1) System.out.println("Syntax: NetworkResolverDemo host"); try { InetAddress addr = InetAddress.getByName(args[0]); System.out.print("IP address: "); System.out.println(addr.getHostAddress()); System.out.print("Hostname: "); System.out.println(addr.getHostName()); } catch (UnknownHostException uhe) { System.out.println("Unable to resolve hostname"); }