Software  Tools   and  Techniques


Class Notes  for Nov. 14, 2002

By: Jody Platt, Hongming Li

 

Contents:

  1. Networks and Network Programming
    1.1  Network Layers
    1.2  Addressing
    1.3  Domain Name Service
    1.4  Ports
    1.5  Sockets
     
  2. Homework 9
    2.1  Functional
    2.2  Program
    2.3  Data Flow
     

 

 

1.   Networks and Network Programming

 

net

 

·        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.

back to top

 

    1.1  Network layers (OSI):

Application

Accomplishes using goals:

  • File transfer: FTP,NFS
  • Email: IMAP, POP
  • Remote logon: telnet, ssh

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..
Is all the data being received ?
Does it need to be resent?
Ex. TCP, UPD, TP4

Network

Addressing + Routing
Handling network wide connection
Ex. IP, IPX, XNS, SNA.

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.  
Ex. Ethernet, Frame relay, x.25, Token Ring, FDDI.

     back to top

 

    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?

    back to top



    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

    back to top

 

 

2 . Homework 9
                     

    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

 

 

    back to top

 

2.2   Program

 

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

 

 

    back to top


    2.3  Data Flow

 

                    CLIENT                                         SERVER

 

webpage of homework 9

http://www2.sis.pitt.edu/~klynch/Homework9.html

 

back to top