Client-Server Programming
Spring Semester, 2005 Networks |
||
---|---|---|
© 2005, All Rights Reserved, SDSU & Roger Whitney San Diego State University -- This page last updated 08-Feb-05 |
CS 580 Client-Server Programming Spring Semester, 2005 Doc 5 Networks
How information is transmitted in a network
Classes of Communication Services
Our View of Network Communication with TCP/IP
Dr. Vinge's CS580 class notes, Spring 2000, http://www-rohan.sdsu.edu/faculty/vinge/courses/spring00/cs580/
Unix Network Programming by W. Richard Stevens, 1990, selected pages
Internetworking with TCP/IP Volume 1 Principles, Protocols, and Architecture, Third Edition, by Douglas E. Comer, selected pages
Computer Networks and Internets, Comer, 1997
Copyright ©, All rights reserved. 2005 SDSU & Roger Whitney, 5500 Campanile Drive, San Diego, CA 92182-7700 USA. OpenContent ( http://www.opencontent.org/opl.shtml) license defines the copyright on this document.
CS 580 Spring 05 | Doc 5, Networks Slide # 2 |
Communication Network
CS 580 Spring 05 | Doc 5, Networks Slide # 3 |
Information is transformed into electrical or optical signals
All signals are corrupted during transmission
Transmission adds noise to the signal
Digital data helps over come noise
Slightly corrupted 1's are distinguishable from slightly corrupted 0's Digital data allows for error-control
Dynamic data like audio or video normally requires continuous transmission
CS 580 Spring 05 | Doc 5, Networks Slide # 4 |
Stream of bits is divided into separate packets
CS 580 Spring 05 | Doc 5, Networks Slide # 5 |
End-to-end services as seen by the users:
Synchronous communications
Bit stream is delivered with a fixed delay and given error rate Each bit reaches the destination with the same time delay after leaving the source
Asynchronous communications
Bit stream is divided into packets Packets are received with varying delays, so packets can arrive out of order Some packets are not received correctly
Packets are delivered in order System confirms delivery and put packets in order Error free
Packets are treated individually Program has to worry about order, error and lost packets
CS 580 Spring 05 | Doc 5, Networks Slide # 6 |
TCP - Connection-oriented
UDP - Connectionless
TCP gives us a "pipe" between machines to allow us to send messages between machines
Fast
Client & Server must handle
Used by:
CS 580 Spring 05 | Doc 5, Networks Slide # 7 |
Handles
Receiver acknowledges each packet
Sender resends packet if it is lost
TCP has delays in
CS 580 Spring 05 | Doc 5, Networks Slide # 8 |
IP address is currently a 32-bit number
130.191.3.100 (Four 8 bit numbers)
IPv6 uses 128 bit numbers for addresses
105.220.136.100.0.0.0.0.0.0.18.128.140.10.255.255 69DC:8864:0:0:0:1280:8C0A:FFFF 69DC:8864::1280:8C0A:FFFF
Machines on a network need a unique IP address
CS 580 Spring 05 | Doc 5, Networks Slide # 9 |
Common loopback address
Refers to the current computer
Messages sent to 127.0.0.1 to not reach the network
CS 580 Spring 05 | Doc 5, Networks Slide # 10 |
Maps machine names to IP addresses
rohan.sdsu.edu <-> 130.191.143.100
Unix "host" command
->host rohan.sdsu.edu rohan.sdsu.edu has address 130.191.3.100 ->host 130.191.3.100 100.3.191.130.IN-ADDR.ARPA domain name pointer rohan.sdsu.edu
CS 580 Spring 05 | Doc 5, Networks Slide # 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CN,IN,MX,US |
|
biz |
Business |
info |
Information |
name |
For individuals |
pro |
For professionals |
aero |
Forviation |
coop |
For coopertives |
museum |
For museums |
More top level domains will be added later this year
Dealing for applications is March 15, 2004 at 23.59 UTC
Internet Corporation for Assigned Names and Numbers (ICANN http://www.icann.org/) oversees assigning TLDs
CS 580 Spring 05 | Doc 5, Networks Slide # 12 |
TCP/IP supports multiple logical communication channels called ports
Ports are numbered from 0 - 65535
A connection between two machines is uniquely defined by:
1 - 1023 | ||||||
Registered Ports | 1024 - 49151 | Dynamic/Private ports | 49152 - 65535 |
CS 580 Spring 05 | Doc 5, Networks Slide # 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For a local list of services
file://rohan.sdsu.edu/etc/services
For a complete list see:
http://www.iana.org/assignments/port-numbers
See IANA numbers page http://www.iana.org/numbers.html for more information about protocol numbers and assignment services
CS 580 Spring 05 | Doc 5, Networks Slide # 14 |
Telnet & port 23
Telnet Client and other ports
CS 580 Spring 05 | Doc 5, Networks Slide # 15 |
Type:
telnet sdsu.edu 13
Type
telnet www.eli.sdsu.edu 80
GET /courses/spring04/cs580/index.html HTTP/1.0 <CR> <CR>
Note <Cr> indicates were you need to hit return
Copyright ©, All rights reserved.
2005 SDSU & Roger Whitney, 5500 Campanile Drive, San Diego, CA 92182-7700 USA.
OpenContent license defines the copyright on this document.