Lecture Notes on Advanced Programming Concepts | CMSC 132, Study notes of Computer Science

Material Type: Notes; Professor: Padua-Perez; Class: OBJECT-ORIENTED PROG II; Subject: Computer Science; University: University of Maryland; Term: Unknown 1989;

Typology: Study notes

Pre 2010

Uploaded on 02/13/2009

koofers-user-3vf
koofers-user-3vf ๐Ÿ‡บ๐Ÿ‡ธ

10 documents

1 / 38

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CMSC 132:
Object-Oriented Programming II
1
Networking
Department of Computer Science
University of Maryland, College Park
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26

Partial preview of the text

Download Lecture Notes on Advanced Programming Concepts | CMSC 132 and more Study notes Computer Science in PDF only on Docsity!

CMSC 132:

Object-Oriented Programming II

Networking

Department of Computer Science

University of Maryland, College Park

Advanced Programming Concepts

Objected-oriented support in Java for

Exception handling Streams Threads Graphics user interfaces (GUIs) Networking

Look at networking as example of OO design

Networking Background

Definition

Set of computers using common protocols tocommunicate over connecting media

History

1969 ARPANET 1986 NSFnet 1995 Internet

Networking Concepts

Protocols Network model Internet addresses Ports Sockets URLs Connection (TCP) vs. packet oriented (UDP) Reliability

Protocols โ€“ Email Delivery

Protocol โ€“ HTTP GET (Web Page)

Client connects to server on port 80

GET /~pugh/index.html HTTP/1.0 Server responses with HTTP headers

HTTP/1.1 200 OK Date: Mon, 20 Feb 2006 03:47:44 GMT Server: Apache Last-Modified: Wed, 15 Feb 2006 01:17:09 GMT ETag: "9b2b1c-948-1222af40" Accept-Ranges: bytes Content-Length: 2376 Connection: close Content-Type: text/html; charset=ISO-8859- Followed by blank line, then contents of response

Network Model โ€“ Layers

Physical layer

Transmit data as 0โ€™s and 1โ€™s over connection

Data-link layer

Between two physically connected computers

Network layer

Between any two computers connected to network

Transport layer

Deliver network data to application

Application layer

Between two applications using network

Network Model โ€“ VOIP Example

Voice over IP (VOIP)

Physical

Data-link

Network

Transport Application

Internet (IP) Address

Problem

Running out of 32-bit IP addresses Caused by initial address allocation

Stanford & MIT given more IP addresses thanChina

Switching to 128-bit IP addresses in IPv

1+ million addresses per square meter on Earth

IP Address โ€“ DNS

Domain Name System (DNS)

Protocol for translating domain names to IPaddresses

Example: cs.umd.edu

Multiple DNS servers on internet DNS server may need to query other DNS servers

edu DNS server queries umd.edu server to findcs.umd.edu

IP Address โ€“ NAT

Network Address Translation (NAT)

Rewriting source / destination IP addresses

As data passes through router

Permits sharing of single IP address amongmultiple computers Used in home networking (NAT box)

IP Address โ€“ NAT

NAT approach

NAT box connects to both internet & private network

Obtains single public IP address from ISP Assigns local IP address to computers on privatenetwork

For data traveling to / from internet

NAT box merges and translates IP addresses

Local IP addresses

โ†”

public IP address

From Internet

All private computers appear to have same IPaddress

Sockets

Application-level abstraction

Represents network connection Implemented in software Supports both UDP and TCP protocols

History

Introduced in Berkley UNIX in 1980s Networking API

Sockets

Socket is bound to port number

Receives data packet Relays to specific port

port

port

port

port

port

TCP or UDP

port #,

data

Packet

app

app

app

app

app

Transport

Layer