Comp 343/443 materials - Summer I, 2000

Peter Dordal, Loyola Univ Chicago Dept of Mathematical and Computer Sciences.

New (Fri 6/23) study questions for the final exam.

Here is an outline of the entire course.

The outline is in logical order; during summer 2000 we jumped around more. The outline also mentions a few topics we didn't do at all (mostly marked "omitted").

Some of the midterm review questions, below, may still be applicable too.

The text is the new second edition of Peterson & Davie's Computer Networks, A Systems Approach. Be sure to read the paragraph on Exercises on page xxv. ;-)

Course groundrules (not updated yet, but midterm exam will be June 12, and will count about 75-80% as much as the final, which is June 28)

Here are the files for the (first?) programming assignment, due June 19:

You are to: Here is some further information. For the simpletalk server, you start with a ServerSocket. The accept() function here returns connected Socket instances. You then get the InputStream and read from it until end of file, more or less as follows:

 InputStream istr;
 try { istr = s.getInputStream(); }
 catch (IOException ioe) {...}
 byte[] buf = new byte[bufsize];
 int len;
 while (true) {
      try {
           len = istr.read(buf, 0, bufsize);
      }
      catch (IOException ioe) {... }
      if (len == -1) break; // this means EOF
       String str = new String(buf, 0, len);
      System.out.println(str);
 } //while reading from s

Note that this prints out an extra blank line between each output line ... it shouldn't.

For the UDP version, you have to do slightly more work. Much of this is closely tied to the different semantics of UDP sockets. First, you create a DatagramSocket (bound to a specific port on the server, any port on the client). Then, you read from the keyboard and send over the network, on the client, and read from the network and write to the screen, on the server. This part is just like the TCP version.

What changes is sending over the network. To transfer data using UDP, you will use the methods send() and receive(). The parameter for these is of type DatagramPacket. A DatagramPacket is constructed with a byte[] buffer and int length to hold the data, and also an IP address and port. The client only needs to set the IP address (using the getByName() function) and port once; the buffer and length change with each message sent. The server can ignore the IP address and port.


The summer schedule is very compressed. A class-by-class schedule appears below. In order to keep us all from getting lost, I'm dividing the material into three "tracks" that we'll alternate between, at will. I'll try not to cover much more than an hour's worth of material from any one track on any one day. Here are the tracks: This looks like the traditional four-layer model (LAN/IP/transit/application), but we're not really abiding by any strict layering. Here is further information about what will be covered in each track:

LAN basics

1.1 basics
1.2 layering
1.3 sockets programming intro
2.1 links basics
2.5 reliable transmission (moved up to accomodate TCP)
3.1 switching and forwarding (moved up to accomodate IP)
2.2 encoding
2.3 framing
2.4 error detection
2.6 Ethernet
3.2 bridged Ethernet
3.3 ATM

IP and routing

4.1 IP basics
4.2 Distance-Vector and Link-State Routing
4.3 Subnets, supernets, BGP, and IPv6; backbone structure; AADS v MAE EAST.

TCP and congestion

5.1 UDP
5.2 TCP
5.3 Remote Procedure Call (blast/chan v Sun)
6.1 Congestion issues
6.2 Queuing models
6.3 TCP congestion management: Reno and Tahoe
6.4 DECbit, RED, and TCP Vegas
6.5 Reservation-based approaches to congestion

I hope to cover some material on network security too.


Schedule

May 22, day 1

Chapter 1: resource sharing, requirements, delay, layering, etc

May 24, day 2

Ethernet
IP intro: addressing, routing, fragmentation

May 31, day 3

Ethernet: exponential backoff algorithm
Ethernet bridging
IP basics

June 2, day 4

ARP, 4.1.5; ICMP 4.1.6
Datagram, Virtual Circuit, and Source routing: 3.1
Encoding 2.2

June 5, day 5

Framing 2.3, error detection 2.4 except for CRC algorithm
Simpletalk example TCP program, in C (1.3) and Java.
Introduction of programming assignment.

June 7, day 6

sliding windows 2.5
UDP 5.1, TCP 5.2
Subnets 4.3.1

June 12, day 7

TCP 5.2
RPC 5.3
Midterm exam

June 14, day 8

IP routing, 5.3: distance-vector & link-state
TCP/RPC
ATM

June 19, day 9

More IP routing
TCP congestion: Issues, queuing basics
Program 1 due

June 21, day 10

Supernets, BGP, global IP backbone structure
TCP congestion: TCP Tahoe

June 26, day 11

TCP congestion: new approaches: DECbit, RED, TCP Vegas
Network security

June 28, day 12

Final exam!


Homework 1:

Chapter 1: exercises 15, 19, 23
Chapter 2: exercises 4, 34
Chapter 3: exercises 4, 5, 14, 16, 38a


Midterm Exam Information

The midterm will cover the following sections. Sections in bold are the most important.

1.1 Foundations
2.2 Encoding
2.3 Framing
2.4 Error Detection
2.5 Sliding windows
2.6 Ethernet (see also my ethernet notes)
3.1 Forwarding
3.2 Bridging
4.1 Basic IP
4.3.1 Subnets
5.1 UDP
5.2 TCP (basic properties, connection setup, concept of state diagram)

The homework problems assigned earlier are good to study. The following additional exercises would also be good to study; you shouldn't necessarily complete these, but you should study the text until you're reasonably confident you know how to approach them. Solutions are here.

Chapter 2:
 #30-32    Sliding windows
 #33     Ethernet minimum packet size
 #39     Ethernet collision timeline
Chapter 3:
 #1     connections => VCI tables
 #2     datagram forwarding
 #3     datagram forwarding with DEFAULT entry
 #13   Ethernet learning bridges
Chapter 4:
 #1     IP addresses are per host, not per machine
 #2     Fragmentation, header layout issues
 #14   IP forwarding
 #16   IP forwarding again
 #32   Based on a real incident at Loyola. Aaargh!
 #34   subnets (skip the part about giving sample subnet assignments)

Here are two further study problems:

1. The following problem deals with IP routing tables as maintained by routers; machines A, B, C, D, etc. are routers. No host machines are shown. The special machine DEFAULT is also a router, but you need not give its routing table (it represents a default destination). Nets involved are all class C, with addresses 200.0.5, 200.0.6, 200.0.7, .... The following convention is used: machine A always has host portion of its address equal to 1; e.g. 200.0.5.1, 200.0.6.1, etc. Similarly, B has host portion 2, C has 3, D has 4. The special machine DEFAULT has host portion 100.

(a). Give the routing tables for the following connections. You may use symbolic names (A, B, C...) for routers instead of IP addresses. Use default routes whenever possible, but be sure that a packet destined for some net other than 200.0.x gets routed to machine DEFAULT.

  net               net               net                 net
200.0.5____A_____200.0.6_____B______200.0.7_______D____ 200.0.8______DEFAULT
                             |                                                                                                                   200.0.8.100
                        net 200.0.9
                             |
                             C
                             |
                        net 200.0.10

b. Do the same for the following configuration.
                               B
                         /            \
        net 200.0.5             net 200.0.6
     /                                           \
    A                                             D------------200.0.9
     \                                            /                              \
       net 200.0.7                net 200.0.8                        DEFAULT
                        \             /
                               C

c. Suppose two routers, A and B, have tables as below. What will happen to an IP packet sent from A to address 147.126.4.9?

     200.0.5----A----------------------B----200.0.6

A: ___________________              B: ___________________
   200.0.5  |  direct                  200.0.6  |  direct
   default  |   B                      default  |   A

======================================================================
2. In real implementations of ARP, hosts are allowed to extract address mapping info from any broadcast ARP query packet: every machine sending such a packet includes its own IP-to-physical address binding info, and every machine receiving such a broadcast (whether or not intended for that machine) adds the source IP-to-physical address info to its ARP cache. Thus, in the example above, not only would A get B's address info but also every machine on the net would get A's address info.

(a). Explain why this means that if
   1. A broadcasts an ARP query "where is B?"
   2. A sends B a regular IP packet
   3. B wants to send an IP packet in reply to A
then A's physical address will already be in B's ARP cache.

(b). Suppose A broadcasts a request "where is B", but inadvertently lists the physical address of another machine C instead of its own (i.e. the ARP packet has IP src=A, phys src = ethernet address of C).

What will happen? Specifically, will A get a reply? What entries will be made in the ARP caches on A, B, C, and a 4th machine D?

Suppose D uses its newly updated cache to send to A. Will the packet arrive at A? What if C tries to send to A?
 

Solutions are here!


Final Exam information

The final exam will be June 28. The final will cover the following sections; the most important sections are highlighted in bold.
 
Chapter 2:
2.5: reliable transmission
 
Chapter 3
3.1: switching and forwarding
 
Chapter 4:
  4.1: basic IP
  4.2: routing (distance-vector and link-state)
  4.3: subnets, supernets, BGP, and the Internet (omit 4.3.6, on IPv6)
 
Chapter 5:
  5.1: UDP
  5.2: TCP (you do not need to memorize the state diagram)
  5.3: RPC (basically SunRPC and BLAST/CHAN; T/TCP will not be on the exam)
 
Chapter 6:
  6.1.2: Taxonomy
  6.2: Fair Queuing
  6.3: TCP congestion control mechanisms: linear increase, slow start, fast retransmit
  6.4.1: DECbit
  6.4.2: RED
  6.4.3: General outline of TCP Vegas [?]


Here are a few review exercises from chapters 4-6 for the final. The final may include questions from selected sections of chapters 2 and 3 as well, as listed above; see the midterm study questions to prepare for these.
 

Chapter 4:
6:       general IP
11ab: ARP
12, 14, 15: IP distance-vector routing
27b:   IP versus bridging
32:     bridge-router
38, 39ab, 40: CIDR
 
Chapter 5:
5: general TCP
18: Nagle algorithm
21, 31: TIME_WAIT
34ab: client/server asymmetry
37: ACK numbering
42: MID field of BLAST and CHAN
 
Chapter 6:
10: Fair Queuing
14: slow start
20: router congestion
24: "forensic" routing (enforcing TCP rules!)
25: TCP trace picture
28: congestion scenario
39: general congestion; TCP Vegas
 

Solutions are here!



Some Ethernet sources of information.


Some selected links to networking info


The following paper has useful information about TCP/IP security: Security Problems in the TCP/IP Protocol Suite by Steve Bellovin.