SlideShare a Scribd company logo
CHAPTER 2 :
Internet Addressing & Data Stream
By :
Mr. Asyran Zarizi Bin Abdullah
Socket Programming
• Socket is a IPC (Inter Process Communication)
facility for network application.
• To make socket communicate with other
socket, so it need unique address as a
identifier.
• Socket Address contain IP Address and Port
Number. Example : 192.168.20.12 : 8080
IP Address Port Number
What is IP ?
W2-1-2, Kuates Staff
Politeknik Muadzam Shah,
26700, Pahang D.M
W2-1-2, Kuates Staff
Politeknik Muadzam
Shah,
26700, Pahang D.M
PC A
(Source)
PC B
(Destination)
172.168.2.3 10.10.10.34
An Analogy
HERE WE KNOW THE IMPORTANT IS…
Internet Addressing
• IP is stand for Internet Protocol.
• IP is an unique ID.
• It use for communicate between 1 point to
another point in network.
• Public & Private
• IPv4 has 32 bits , example : 192.168.32.12
but IP Address is running out….
Quiz :
What is the solution for
ipv4 issues?
Quiz :
What is the solution for
ipv4 issues?
Answer : ipv6
Chapter 2 : Inet Address & Data Stream
What is this??
This is IPV4 
4,294,672,96
Chapter 2 : Inet Address & Data Stream
340,282,366,920,938,463,463,
374,607,431,768,211,456
340 Undecillion!!!
Chapter 2 : Inet Address & Data Stream
Chapter 2 : Inet Address & Data Stream
Chapter 2 : Inet Address & Data Stream
Chapter 2 : Inet Address & Data Stream
Chapter 2 : Inet Address & Data Stream
Chapter 2 : Inet Address & Data Stream
Internet Addressing in JAVA
• Java is a capable programming language that is
capable to support networked environment
which support most popular protocol available
• Java API that support internet addressing is :-
– InetAddress
• There are two subclasses under it
– Inet4Address
– Inet6Address
– An InetAddress object is capable to store IP address or
Domain name which later used for communication
address or translation between the form available.
IP Addresses & Hostname
• Java.net.InetAddress class
– Represents a single IP Address
– Performs transparent DNS lookups
• Java.net.UnknownHostException class
– Thrown if DNS system can`t find IP address for
specific host
InetAddress class
• Creating an InetAddress object is as follow:-
• Some of the useful methods within InetAddress class
– getHostName()
• It return the host domain name in String format
– getHostAddress()
• It return the IP address in String format
– getLocalHost()
• It return InetAddress object with local computer address information
with its host name
– getByName()
• It return InetAddress object of a destination computer containing its
address and host name
getByName example
getHostName example
getHostAddress example
getLocalHost example
Socket & Protocol

More Related Content

PDF
Presentation On Steganography
PPTX
Network address translation
PPTX
Http request and http response
PPTX
ip spoofing
PDF
Mini Project on Data Encryption & Decryption in JAVA
PPT
Message authentication
 
PPTX
Subnetting Presentation
Presentation On Steganography
Network address translation
Http request and http response
ip spoofing
Mini Project on Data Encryption & Decryption in JAVA
Message authentication
 
Subnetting Presentation

What's hot (20)

PPTX
CONTROL STRUCTURE IN VB
PPT
ipv6 ppt
PPS
Message AUthentication Code
PPTX
IP Address - IPv4 & IPv6
PDF
Network security - OSI Security Architecture
PDF
Cloud Cryptography
PDF
Java applet programming concepts
PDF
Threat Modeling for IoT Systems
PPTX
Data Encryption Standard (DES)
PDF
What is Socket Programming in Python | Edureka
PPTX
IOT - Unit 3.pptx
PPT
Scripting languages
PPT
Ip addressing
PPTX
Transport Layer Security
PPT
PPT
Email security
PPTX
Network security & cryptography
PDF
Java Full Stack Developer Interview Questions PDF By ScholarHat
PPTX
Steganography
CONTROL STRUCTURE IN VB
ipv6 ppt
Message AUthentication Code
IP Address - IPv4 & IPv6
Network security - OSI Security Architecture
Cloud Cryptography
Java applet programming concepts
Threat Modeling for IoT Systems
Data Encryption Standard (DES)
What is Socket Programming in Python | Edureka
IOT - Unit 3.pptx
Scripting languages
Ip addressing
Transport Layer Security
Email security
Network security & cryptography
Java Full Stack Developer Interview Questions PDF By ScholarHat
Steganography
Ad

Similar to Chapter 2 : Inet Address & Data Stream (20)

PPTX
Internet protocols
PPTX
Ip address
PPTX
4. Understanding Internet Protocol.pptx
PPTX
PPTX
Basics about IP address, DNS and DHCP.
PPTX
Internetworking
PDF
183492595 md.jiarul islam(CSE 318)
PPTX
Network programming in java - PPT
PPTX
Microsoft Offical Course 20410C_05
PPTX
ffuyu yguyguyg.pptx
PPTX
IPv4 Addressing
PPT
Ip addressing upload
PPTX
Unit 2 : Internet Address
PPTX
Ip address and subnet masking final
PDF
Ip and mac adress
PDF
Module 1 networking basics-2
PPT
Tcp ip protocol
PPT
Ccna1v3 mod09
PPTX
2.2.1.4 internet address amrizah
PDF
Lesson 4
Internet protocols
Ip address
4. Understanding Internet Protocol.pptx
Basics about IP address, DNS and DHCP.
Internetworking
183492595 md.jiarul islam(CSE 318)
Network programming in java - PPT
Microsoft Offical Course 20410C_05
ffuyu yguyguyg.pptx
IPv4 Addressing
Ip addressing upload
Unit 2 : Internet Address
Ip address and subnet masking final
Ip and mac adress
Module 1 networking basics-2
Tcp ip protocol
Ccna1v3 mod09
2.2.1.4 internet address amrizah
Lesson 4
Ad

Recently uploaded (20)

PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Classroom Observation Tools for Teachers
PPTX
master seminar digital applications in india
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Cell Structure & Organelles in detailed.
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Insiders guide to clinical Medicine.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Computing-Curriculum for Schools in Ghana
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Basic Mud Logging Guide for educational purpose
TR - Agricultural Crops Production NC III.pdf
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Classroom Observation Tools for Teachers
master seminar digital applications in india
Supply Chain Operations Speaking Notes -ICLT Program
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Cell Structure & Organelles in detailed.
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Abdominal Access Techniques with Prof. Dr. R K Mishra
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
human mycosis Human fungal infections are called human mycosis..pptx
Final Presentation General Medicine 03-08-2024.pptx
Insiders guide to clinical Medicine.pdf
Anesthesia in Laparoscopic Surgery in India
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Computing-Curriculum for Schools in Ghana
VCE English Exam - Section C Student Revision Booklet
Microbial disease of the cardiovascular and lymphatic systems
Basic Mud Logging Guide for educational purpose

Chapter 2 : Inet Address & Data Stream

  • 1. CHAPTER 2 : Internet Addressing & Data Stream By : Mr. Asyran Zarizi Bin Abdullah
  • 2. Socket Programming • Socket is a IPC (Inter Process Communication) facility for network application. • To make socket communicate with other socket, so it need unique address as a identifier. • Socket Address contain IP Address and Port Number. Example : 192.168.20.12 : 8080 IP Address Port Number
  • 4. W2-1-2, Kuates Staff Politeknik Muadzam Shah, 26700, Pahang D.M W2-1-2, Kuates Staff Politeknik Muadzam Shah, 26700, Pahang D.M PC A (Source) PC B (Destination) 172.168.2.3 10.10.10.34 An Analogy
  • 5. HERE WE KNOW THE IMPORTANT IS…
  • 6. Internet Addressing • IP is stand for Internet Protocol. • IP is an unique ID. • It use for communicate between 1 point to another point in network. • Public & Private • IPv4 has 32 bits , example : 192.168.32.12 but IP Address is running out….
  • 7. Quiz : What is the solution for ipv4 issues?
  • 8. Quiz : What is the solution for ipv4 issues? Answer : ipv6
  • 22. Internet Addressing in JAVA • Java is a capable programming language that is capable to support networked environment which support most popular protocol available • Java API that support internet addressing is :- – InetAddress • There are two subclasses under it – Inet4Address – Inet6Address – An InetAddress object is capable to store IP address or Domain name which later used for communication address or translation between the form available.
  • 23. IP Addresses & Hostname • Java.net.InetAddress class – Represents a single IP Address – Performs transparent DNS lookups • Java.net.UnknownHostException class – Thrown if DNS system can`t find IP address for specific host
  • 24. InetAddress class • Creating an InetAddress object is as follow:- • Some of the useful methods within InetAddress class – getHostName() • It return the host domain name in String format – getHostAddress() • It return the IP address in String format – getLocalHost() • It return InetAddress object with local computer address information with its host name – getByName() • It return InetAddress object of a destination computer containing its address and host name