Recent Changes - Search:

Network Programming

This website demonstrates using wikis as teaching and learning tool.

The course instructor is happy to share the teaching materials here with those who find it readable.

Course Revision

A Network Programming Lecture by Steven Choy

Lecture Overview: We use a few meetings for course revision and tutorial. We review and discuss the main topics you have learned in the course.


Final Examination

  • April 28, 2010, 09:30-12:30
  • 3-hours, closed-book, written examination
  • Part A - 10 short questions, all compulsory, amount to 40 marks
  • Part B - 5 long questions, answer 3 out of 5 questions, amount to 60 marks
     3 hours, 100 marks
     180 minutes, 100 marks
     1.8 minutes per mark
     ~70 minutes to answer all short question (40 marks)
     ~35 minutes to answer one long question (20 marks)
  • You can bring calculator.
  • Do not bring dictionary.

Scope of Examination

  • Networking and Network Protocols
  • Network Programming - Socket Programming
  • Network programming - Higher Level and Other Topics
  • Web Services and XML
  • Network Design and Security

Networking and Network Protocols

Main lectures covering:

Some key questions and topics:

  • Networking Stacks and Layers - Can you name each layers from top to bottom with appropriate examples?
  • IP (Internet Protocol) suites, the five layers model - Can you name each of them with appropriate examples?
  • What are the main functions of IP Protocol (in the network layer)?
  • IPv4 (IP version 4) addressing and classes (Class A to E)
  • Basic concepts of IP subnetting
  • Can you explain/discuss the benefits of subnetting?
    • Ability to organize your resources within a network.
    • Ability to secure your resources by placing them into separate subnetworks
    • speedup your network
    • reduces network congestion by redirecting traffic and reducing broadcasts; it can significantly improve the performance of Ethernet network;
    • makes it easier to control the network segment by dividing hosts into different subnetworks.
  • What are the major functions of TCP?
  • When should we use UDP rather than TCP?
  • Can you explain the main limitations of IPv4?
  • Can you explain the improvements made by IPv6?
  • Two types of HTTP messages
  • What are HTTP Headers?
  • Can you illustrate the HTTP request structure?
  • Can you illustrate the HTTP response structure?
  • Can you explain the difference between HTTP GET method and HTTP POST method?
  • What are FQDN and PQDN? Can you give appropriate examples?
  • What is the difference between a primary and secondary DNS server?
  • What is the difference between a domain and a zone in DNS?

Network Programming - Socket programming

Main lectures covering:

Some key questions and topics:

  • What are sockets in network programming?
  • Class Socket and ServerSocket in Java
  • General operations of building a TCP client program in Java
  • General operation of building a TCP server program in Java
  • Can you write Java code for implementing a simple TCP client and server?
  • 8 basic classes for Java network programming: InetAddress, Socket, ServerSocket, DatagramSocket, MulticastSocket, DatagramPacket, InputStream, OutputStream. Which classes are necessary in building TCP client, TCP server, UDP client, UDP server?
  • Discuss the differences between using datagram (UDP) sockets and stream (TCP) sockets in programming client-server applications.
  • Three situations of using UDP rather than TCP.
  • Write Java code for implementing a simple datagram client and server.
  • Write Java code for implementing a simple multicast client and server.
  • Importance and limitations of multicast networking.

Network Programming - Higher level and other topics

Main lectures covering:

Some key questions and topics:

  • Two main classes in Java URL framework: URL and URLConnection.
  • What is the difference between a URL instance and URLConnection instance?
A URL instance represents the location of a resource. A URLConnection instance represents a link for accessing or communicating with the resource at that location.
The URLConnection represents a connection to the resource specified by the URL. It provides support for both well known protocols (e.g. HTTP, FTP) and custom ones.
  • What are the benefits of using Java URL-related classes and interfaces rather than sockets and streams in building network applications?
  • What are the functions of bind and connect system calls in network programming in C?
  • What are the functions of listen and accept system calls in network programming in C?
  • What are the functions of send, sendto, recv, and recvfrom system calls in network programming in C?
  • TCP Socket programming flow in C
  • UDP Socket programming flow in C
  • What is Remote Procedure Call (RPC)?
  • Can you illustrate the RPC mechanism and architecture?
  • What are the functions of client procedure stub and server procedure stub?
  • What is the function of rpcgen in Sun RPC?
  • What is XDR (External Data Representation) in the context of RPC?
  • What are the advantages and disadvantages of using RPC over socket programming in building network applications?
    • Advantages: The programmer can define a much cleaner, higher-level application protocol. All communication details are taken care of transparently.
    • Disadvantages: RPC incurs computation and communication overheads in procedure calls setup. RPC provides less control on the data being transmitted across the network.

Web Services and XML

Main lectures covering:

Some key questions and topics:

  • What is Web Services? Can you briefly describe the term in a few sentences?
  • Can you illustrate the Web Services architecture?
  • Can you explain the terms SOAP, WSDL, UDDI?
  • What is the function of XML in implementing Web Services?
  • What is the function of HTTP in implementing Web Services?
  • Common encoding formats of response messages of Web services
  • What is SOA (Service Oriented Architecture)?
  • Three different styles (or realizations) of Web services?
  • This is a old definition of Web services: a Web service is any piece of software that makes itself available over the Internet and uses a standardized XML messaging system. Discuss the validity of this definition in today's implementations of Web Services.
  • What do we mean by a well-formed XML?
  • What do we mean by a valid XML document?
  • Can you list main properties of well-formed XML?
  • Can you describe properties of valid XML?
  • Document type definition (DTD)
  • XML Schema Definition (XSD)
  • Compare DTD and XSD.
  • Why XML Schemas (or XSD) are more popular than DTD in defining the legal elements of an XML document?

Network Design and Security

Main lectures covering:

Some key questions and topics:

  • Can you illustrate the NFS Architecture?
  • What do we mean by access transparency in network file systems?
  • What is the function of VFS (Virtual File System) in Unix/Linux machine?
  • What is SMB (Server Message Block)?
  • What is Samba?
  • What is the difference between NFS and CIFS?
  • What to do if we want share files among Windows PC and Linux/Unix workstations?
  • What are the functions of a bridge, repeater, switch, modem, and NIC in computer networking and inter-networking?
  • What is gateway in a network?
  • Can you illustrate a small network design based on requirements?
  • What is a DHCP server in a network?
  • What is the common application of NAT in computer networking?
  • What is DMZ in network design?
  • What is IP masquerade in computer networking?
  • Can you explain a few techniques to secure your wireless network?
    • 1) Secure your wireless router or access point administration interface
    • 2) Don't broadcast your SSID
    • 3)Enable WPA encryption instead of WEP
    • 4) Remember that WEP is better than nothing
    • 5) Use MAC filtering for access control
    • 6) Reduce your WLAN transmitter power
    • 7) Disable remote administration
  • Can you explain the main goals of network security, namely, confidentiality, integrity, authenticity, and availability?
  • What are IDS?
  • Network-based IDS and Host-based IDS
  • Can you describe a simple technique of firewall?
  • What is proxy servers?
  • What is the difference between firewall and proxy server?
  • Can you describe the main concepts and definition of VPN (Virtual Private Networks)?
  • Can you state the different types of VPN?
  • Can you compare symmetric encryption and asymmetric encryption?
  • What is Digital Signature?
  • Can you illustrate a common way of creating a digital signature?
  • Can you explain the main concepts of IPSec?
  • Can you explain the main concepts of SSL?
  • IPSec and SSL are the two popular security protocols of the Internet. Can you compare them?

Thanks for Reading

If you would rather like to have this lecture note in printed format, please click the print action link in the top right corner.

If you find any problem in this lecture note, please feel free to tell Steven via steven@findaway.hk.

Edit - History - Print - Recent Changes - Search
Page last modified on April 08, 2010, at 10:57 AM