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
- May 7, 2011, PM
- 3-hours, closed-book, written examination
- Part A - 10 short questions, all compulsory, amount to 40 marks
- Part B - 4 long questions, answer 3 out of 4 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
- 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 is TCP/IP?
- 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
- Basic calculation 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
- 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? (3 different situations)
- 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?
- Different types of DNS records.
- Some integration / practical questions
What do you need to do if you want to let your home PC be a Web server that can be accessed by the internet users?
Give a network specification, can you describe a packet from a device to another?
How do you find the IP address and MAC address of your device?
What is netstat?
Network 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.
- 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.
- 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.
- When do you need
URLConnection?
- What are the benefits of using Java URL-related classes and interfaces rather than sockets and streams in building network applications?
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?
- Can you list common protocols that are based on 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?
- Some integration / practical questions
Given a program that involves some Web Service APIs, can you discribe how it works?
Given a XML code, can you tell if it is well-formed?
Given a XML code and its XSD or DTD, can you tell if it is a valid XML?
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?
"IP masquerading is a form of network address translation (NAT) which allows internal computers with no known address outside their network, to communicate to the outside. It allows one machine to act on behalf of other machines."
IP Masquerade is a one-to-many NAT (Network Address Translation) servers found in network routers. For example, if a router is connected to the Internet via PPP, the IP Masquerade feature allows other "internal" computers connected to this router to also reach the Internet as well. IP Masquerading allows for this functionality even though these internal machines do not have a public IP address.
- 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?
- How to set simple firewall rule?
- 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?
- Symmetric Encryption, Asymmetric Encryption, and Hashing
Hashing condenses a message into an irreversible fixed-length value, or hash.
- Typical applications of symmetric encryption
"Common symmetric encryption algorithms include DES, 3DES, AES, and RC4. 3DES and AES are commonly used in IPsec and other types of VPNs. RC4 has seen wide deployment on wireless networks as the base encryption used by WEP and WPA version 1."
- Typical applications of asymmetric encryption
The most common asymmetric encryption algorithm is RSA.
"Robust encryption solutions such as IPsec and SSL implement the strengths of both symmetric and asymmetric encryption. First, two endpoints exchange public keys, which allows for the setup of a slow but secure channel. Then the two hosts decide on and exchange shared symmetric encryption keys to construct much faster symmetric encryption channels for data."
- What is Digital Signature?
- Can you illustrate a common way of creating and verifying 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?
- What is SSH (Secure Shell) ?
- What is SSID? (An SSID is the name of a wireless local area network (WLAN). All wireless devices on a WLAN must employ the same SSID in order to communicate with each other.)
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.