TDC 568
Fall 2008

 

Network Management

Assignment # 3: Logic Programming for Network Configuration Analysis  

 

Due: 11:59pm, November 10 for Part I and November 26 for Part II, 2008

 

 

PART I: Network Reachability Analysis 

Develop a Prolog program to implement a tool that can analyze if two nodes (source and distention) are reachable in the network. The nodes A and B are reachable if there is a path of non faulty nodes between A and B such that all routers in the path have a forwarding entry to B and all firewalls in the path “permit” traffic from A to B.  Path us a directed graph. Means A can reach B does not imply B can reach A. Firewall configuration includes only permitted traffic, otherwise traffic is blocked.  A router forwards a traffic if the destination is the routing table.

 

Testing

Implement the following network as an example in your prolog facts:

 

 

 

Your program should be used with any general network topology. Let us assume that b and d are routers that forward to both x and y, and c is a firewall that permit traffic from a, e to x & y.

 

?- isreachable(a,x) Yes

 

Assume b is faulty then

?- isreachable(a,x) Yes

 

Assume b and d are faulty then

?- isreachable(a,x) No

 

Assume c allows traffic from e to y, then

?- isreachable(e,x) Yes

?- isreachable(e,y) No

 

And so on.

                 

Extra Credits:

 

Change the program above to allow router to have multiple forwarding ports. In this case the topological path may not correspond to the routing path.  The reachability will b true if there is topological path and routing path that are equivalent.

 

PART II: Diagnosis Network Problems

 

A symptom or trouble ticket is a tuple of multiple fields that include source/initiator and set of destinations that are not reachable. For example, a symptom Si = [a, x, y] means that the source “a” can not reach either destinations “x” or “y”. Users will provide as an input a set of symptoms S1, S2 and Sn as follows [S1, S2, ..Sn]. For example, [[a, x,y], [e,x]] means the source “x”  can nit reach “x” and “y” and the source “e”can not reach “x”. Write a prolog program that takes this list of symptoms and find out the most likely problem. The most likely problem is the one that is the most common between all the paths of the symptoms. State if the problem is configuration or a network failure. The program should run as follows (these are just example):

 

?- diagnose([[e, x, y], X), write(X) [d]Yes

?- diagnose([[a, y],[e, x]], X), write(X) [b,d]Yes

?- diagnose([[a, x, y],[e, x]], X), write(X) [c1]Yes

?- diagnose([[a, x, y],[e, x, y]], X), write(X) [c1,d]Yes

 

Note: if there is a path that does not intersect with any other, then all intermediate nodes are potentially faulty. E.g. take out the link(a,d) and then run  ?-diagnose([[a, x],[e, y]], X),

Extra Credits:

 

-          Write a prolog program to discover loops in the routing and print this cycle. It should run as follows: cycles(A, X) where A is the starting and X is the rout list of this cycle

-          Instead of providing the symptoms as input, introduce faults by using faulty() predicate and then generate the appropriate symptoms automatically. For example, assuming faulty(c1) is true, what is the appropriate negative symptoms and how you can use directly to find this fault using prolog?

-          Add positive symptoms to enhance the fault diagnosis as follows:  after finding out intersecting nodes who are potentially faulty, use the positive symptoms to eliminate any common ones. the predicate will be as follows:

?- diagnose(ListofNegativeSym, Listof PositiveSym, X).

-           

If you do any of the extra credit or extensions, then you must give each one a different predicate name and explain each one in the README file.

 

Submission Procedure:

Submit the program sources code with facts and rules and list of queries to run. The program file should include YOUR NAME and ID. The source code should also include as comments description of all predicates you use. In the final section of the program include as a comments to answer the following questions:

 

- Does your program work exactly as specified in this assignment?

- If not then show examples where your program fails? Can you explain why?

 

Submit your program as a text file (.pro) to DELWEB. 10% is considered for well-organized answers.  Include the doc file in the tar file below for submission.