Class Notes for Nov. 14, 2002
By: Jody Platt, Hongming Li
Contents:
1. Networks and Network Programming

· Networks can enable machines to talk to each other (Machine A can talk to Machine B)
· Communication software was written to be used for network communication between different machines, and what path to take.
|
|
Accomplishes using goals:
Time synchronization: NTP |
|
Presentation |
How Is Information Presented? Big Endin (e.g., ASCII)/ Little Endin(e.g., EBCIPIC) |
|
Session |
Organize and Synchronize Data Exchange. Ex. Getright Download Program |
|
Transport |
It provides end-to-end issues.. |
|
Network |
Addressing + Routing |
|
Data link |
It sends blocks of data (frames) with the necessary synchronization, error control and flow control |
|
Physical |
It deals with the mechanical, electrical,
procedural characteristics to establish, maintain and deactivate the
physical link. |
1.2 ADDRESSING: how are machines known to each other?
v Class A: 127 networks of 16 million host addresses (S.H.H.H).--------0xxxxxxx
v Class B: 16,000 networks of 65,000 host addresses (S.S.H.H).-------10xxxxxx
v Class C: 2 million networks of 254 host addresses (S.S.S.H).---------110xxxxx
v Class D: Multicast address -------------------------------------------------------1110xxxx
v Class E: Experimental -------------------------------------------------------------11111xxx
Examples: Pitt has Class B. Anything on
the internet 136.142.x.x is from Pitt.
Carlow College has 2 Class C's.
back to top
1.3 DOMAIN
NAME SERVICE: how are machines known to humans?
1.4
PORTS: enable simultaneous communication with
machines
v 21=ftp
v 23=telnet
v 80=http
v 119=ntp
For a list of port number assignments, see: /etc/services
type netstat | more to list all connections in use
back to top
1.5
SOCKET: interface between a process and networking
software
2.1 Functional
|
CLIENT |
SERVER |
|
1. send a name to server |
|
|
|
2. add the name on the list |
|
3. get the list and print it |
|
|
CLIENT |
SERVER |
|
|
1. Creates a master socket or passive socket . Listen and waits for connection to be accepted. |
|
2. Read the name |
|
|
3. Connect to server |
|
|
4. Write the record to server |
|
|
|
5. Read record from client |
|
|
6. Append the record to the file |
|
|
7. Send entire file to client |
|
8. Receive all the records from server |
|
|
9. Read all record and print them |
|
|
10 .Exit |
|
2.3 Data Flow
CLIENT SERVER
webpage of homework 9
http://www2.sis.pitt.edu/~klynch/Homework9.html