CSAS 3211 Practice - Seton Hall University Pirate Server

advertisement
CSAS 3211 Practice
What do the following terms mean: IP number; IP name; DHCP; DNS; TCP; UDP; IP; router;
host; DSL; client; server
Give a short answer to each of the questions:
a) Why do networks in general use layers?
b) In the network layer of TCP/IP, do packets arrive in the same order they are sent?
c) How does “1-complements checksum” work? Give an example of computing a 1complements checksum of two 8-bit words.
d) Describe briefly what happens when your laptop boots up and connects for the first time
to a web server www.exoticname.org.
e) If a ‘class B’ license consists of fixing the first 2 parts of an IP number, then how many
class-B licenses can exist on the Internet, and how many machines can be part of any
‘class B’ licensee?
f) What is a class A Internet license?
Explain how you could convert positive integers to binary numbers (i.e. sequences of bits). If 16
bits are used to represent integers, how many different positive integers could you represent?
Which integer is represented by the binary number 100100, assuming only positive integers are
used? Convert the integer 42 into a binary number.
List the different layers, including – very briefly – their responsibilities, of the OSI reference
model. Contrast that with the TCP/IP model.
Suppose the graph below represents a subnet, where the numbers on the edges represent
distances between the attached routers. Use the Dijkstra Shortest Path algorithm to find the
shortest path from A to D. Fill in the labels of all nodes you encounter while applying that
algorithm. Create a complete sink tree for node D.
We have covered several routing algorithms in the network layer, among them shortest path,
flooding, distance vector, and link state routing (improved) algorithms. Describe these routing
algorithms. What is the principle difference between distance vector and link state routing
(improved) algorithms?
Consider a subnet with 6 routes named A, B, C, D, E, and F. Suppose that for distance vector
routing the following vectors have just arrived at router C.
from B: (5, 0, 8, 12, 6, 2) (i.e the distance B-A is 5, B-B is 0, B-C is 8, B-D is 12, B-E is
6, and B-F is 2),
from D: (16, 12, 6, 0, 9, 10); and from E: (7, 6, 3, 9, 0, 4);
The measured delays from C to its neighbors B, D, and E are 6, 3, and 5, respectively. What is
C’s new routing table? Give both the outgoing line to use and the expected delay.
What is the “count-to-infinity” problem, and for which routing algorithm does it apply? How
does the other routing algorithm manage to avoid that problem?
Describe some pros and cons of flooding as a routing algorithm.
Give at least one example each for a computer application that would use (a) a connectionoriented, reliable service and (b) a connectionless, unreliable service
In which layer of TCP/IP do TCP and UDP services exist? What is the major difference between
these services? Give at least one example of an application that uses TCP and one that uses UDP
services.
What is the structure of a TCP packet and what is the meaning of each field
What is the structure of a UDP packet and what is the meaning of each field
What is the structure of a IPv4 packet and what is the meaning of each field
What is the structure of a IPv6 packet and what is the meaning of each field
Describe the difference between flow control and congestion control. How does flow control
work at the TCP level? How, in principle, does congestion control work?
Describe the phases of a TCP connection process. What is a SYN-flood attack?
In class we discussed the Internet protocol and its proposed successor known as IPv6.
a) What is the maximum number of hosts that can be addressed using IPv4 addresses and
IPv6 addresses, approximately (ignoring details such as reserving bits for special
purposes)
b) IPv6 no longer uses a header checksum field. Discuss – briefly – the pros and cons of
that.
c) What are the advantages of IPv6 over IPv4?
d) List a typical IPv4 address. List a typical IPv6 address.
e) Seton Hall has a “class B” Internet license. What does that mean?
f) Can you can intercept IP packets even though your machine is neither the sender nor the
receiver of those packets? Where must your machine be located? Does this present a
security problem for Internet traffic, and how could you overcome the problem?
In class we discussed some key aspects of the Transport Layer.
a) What is the main purpose of the transport layer? Make sure to mention ports and their
purpose.
b) What two services are offered at the transport layer by the TCP/IP model and what are
their differences
c) How does TCP enhance IP?
d) How does UDP enhance IP?
e) Describe the purpose of sequence numbers, acknowledgements, timers, and
retransmission in TCP
f) Describe how TCP turns IP into a reliable service.
g) What does “sliding window” refer to and why is it useful?
In class we discussed several protocols in the Internet application layer such as “http”, “smtp”,
“daytime”, and “telnet”.
a) What are the standard ports for http, smtp, and telnet? Why is there a need for
'standardization' of ports? What is the smallest port you can use for your own nonstandard protocol?
b) Can you connect to a server speaking “http” with a client that does not speak that
language? If so, what is the most likely result of doing so? Make sure to distinguish
between “connecting” and “obtaining useful results”.
c) List a valid request in http 1.1
d) Why might a network administrator try to restrict an smtp server from delivering mail
from “foreign” clients? How could the smtp server distinguish between traffic originating
from “foreign” and “internal” systems?
In class we discussed the Java classes “ServerSocket”, “Socket”, and “DatagramSocket” that use
the TCP and UDP services of the transport layer, respectively.
a) Create a Java server that accepts TCP connections on port 1234, closes a connection as
soon as it is accepted, and continues to wait for additional connections after that.
b) Create a Java client that connects to a TCP server “test.shu.edu” on port 1234, sends the
string “test client 101” and expects a single answer string to be returned by the server.
When the client receives the answer string it prints it to the console and disconnects. The
server can be assumed to cooperate, i.e. if you successfully connect and send your string,
the server will reply with a single string (you do not have to write the code for that
server).
c) Create a Java program to send a UDP datagram containing the integer 42 to the machine
“test.shu.edu” on port 1234.
Download