CS2034 TCP/IP DESIGN AND IMPLEMENTATION L T P C 3 0 0 3

UNIT I INTRODUCTION 9
Internetworking concepts and architecture model – classful Internet address – CIDR –
Subnetting and Supernetting – AARP – RARP- IP- IP Routing – ICMP – IPV6.

UNIT II TCP 9
Services – header – connection establishment and termination – interactive data flow –
bulk data flow – timeout and retransmission – persist timer – keep alive timer – futures
and performance.

UNIT III IP IMPLEMENTATION 9
IP global software organization – routing table – routing algorithms – fragmentation and
reassembly – error processing (ICMP) – Multicast Processing (IGMP).
UNIT IV TCP IMPLEMENTATION I 9
Data structure and input processing – transmission control blocks – segment format –
comparision – finite state machine implementation – Output processing – mutual
exclusion – computing the TCP Data length.

UNIT V TCP IMPLEMENTATION II 9
Timers – events and messages – timer process – deleting and inserting timer event –
flow control and adaptive retransmission – congestion avoidance and control – urgent
data processing and push function.

TOTAL: 45 PERIODS

TEXT BOOKS:
1. Douglas E Comer,”Internetworking with TCP/IP Principles,Protocols and
Architecture”,Vol 1 and 2, Vth Edition
2. W.Richard Stevans “TCP/IP Illustrated” Vol 1.2003.

REFERENCES:
1. Forouzan, “ TCP/IP Protocol Suite” Second Edition, Tate MC Graw Hill, 2003.
2. W.Richard Stevens “TCP/IP Illustrated” Volume 2, Pearson Education 2003

Saraswathi Velu College of Engineering

Dept. of Computer applications

Question with Answers

Sub Code / Title: MC9278– TCP / IP Design and Implementation

Year / Sem : III / V

Unit I – Introduction

Part A

1. Define networking, internetworking?

Networking – Interconnecting the individual host.

Internetworking – Interconnecting the different networks.

2. Define MAC address, IP address?

MAC address – is the physical address of a host. Its length is 48 bits. Eg:12:de:34:0f:1x:1d

IP address – is the logical address of a host. Its length is 32 bits. Eg:191.168.150.1

3. How we can identify a host.

A host can be identified by its logical address (IP) and physical address(MAC).

4. Define Classfull and Classless addressing?

Classful addressing – Total address space is divided in to 5 classes called as Class ‘A’, Class ‘B’, Class ‘C’, Class’D’ and Class’E’ such that each class with their own prefix.

Classless addressing – Here, there are variable length blocks that belong to no class. The entire address space is divided in to blocks based on organization needs.

5.What is subnetting ?

Subnetting divides one large network into several smaller ones. Subnetting adds an intermediate level of hierarchy in IP addressing.

6. What is supernetting?

Supernetting combines several networks into one large one.

7. What is meant by masking ?

Masking is a process that extracts the network address from an IP address. Subnet masking is a process that extracts the subnetwork address from an IP address. A network or subnet address is obtained from applying the bit-wise AND operation on the IP address and the mask.

8. What is meant by connectionless protocol?

The IP protocol is a connectionless protocol. Every packet is independent and has no relationship to any other packet.

9. What is direct delivery?

The delivery of a packet is called direct if the deliverer (host or router) and the destination are on the same network.

10. What is indirect delivery ?

The delivery of a packet is called indirect if the deliverer (host or router) and the destination are on different networks

11. What is the function of routing table?

Every host or router has a routing table to route IP packets. In next hop routing instead of a complete list of the stops the packet must make only the address of the next hop is listed in the routing table. In network specific routing all hosts on a network share one entry in the routing table. In hostspecific routing the full IP address of a host is given in the routing table. In default routing, a router is assigned to receive all packets with no match in the routing table.

12. What is static and dynamic routing ?

A static routing table’s entries are updated manually by an administrator. A dynamic routing table’s entries are updated automatically by a routing protocol.

13. What are the fields included in routing table?

The routing table can consist of seven fields: a mask, a destination address, a next-hop address, flags, a reference count, a use, and an interface. The routing module applies the mask, row by row, to the received destination address until a match is found. Classless addressing requires hierarchical and geographical routing to prevent immense routing tables.

14. What is the maximum length of a datagram?

The maximum length of a datagram is 65,535 bytes.

15. What is Maximum Transfer Unit ?

The MTU is the maximum number of bytes that a data link protocol can encapsulate. MTUs vary from protocol to protocol.

16. What is Fragmentation?

Fragmentation is the division of a datagram into smaller units to accommodate the MTU of adata link protocol. The fields in the IP header that relate to fragmentation are the identification number, the fragmentation flags, and the fragmentation offset. The IP datagram header consists of a fixed, 20-byte section and a variable options section with a maximum of 40 bytes.

17. How the errors are detected in IP?

The error detection method used by IP is the checksum. The checksum uses one’s complement arithmetic to add equal-size sections of the IP header. The complemented result is stored in the checksum field. The receiver also uses one’s complement arithmetic to check the header.

18. What is Unicast, Multicast and Broad cast communication?

Unicast communication is one source sending a packet to one destination. Multicast

communication is one source sending a packet to multiple destinations. Hosts with the same multicast address can either be on the same network or on different networks. Multicast addresses are often used for information retrieval and conferencing purposes. Broadcast communication is one source sending a packet to all hosts on its network

19. Differentiate ARP and RARP?

ARP – Address Resolution Protocol, which translates the given 32-bit IP address in to 48-bit MAC address.

RARP – Reverse Address Resolution Protocol, which translates the given 48-bit MAC address into 32-bit IP address.

20. Draw the IPv6 packet format.

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

|Version| Prio. | Flow Label |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| Payload Length | Next Header | Hop Limit |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| |

| |

+ Source Address +

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

| |

| |

+ Destination Address +

| |

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

21. What is the necessity for having ‘ttl’ field.

ttl – refers to time to live and this field will say the validity / lifetime for a IP datagram.

22. What is the importance of ICMP?

Internet Control Message Protocol – used to report the errors that had occurred while forwarding the IP datagram to the original sender of the datagram.

Eg: Destination unreachable, Redirection etc.

Unit II– TCP

Part A

1. List out various TCP services?

* Connection Oriented

* Reliable

* 8 bit byte stream.

2. Draw the TCP header format?

Bit offset / 0 / 1 / 2 / 3 / 4 / 5 / 6 / 7 / 8 / 9 / 10 / 11 / 12 / 13 / 14 / 15 / 16 / 17 / 18 / 19 / 20 / 21 / 22 / 23 / 24 / 25 / 26 / 27 / 28 / 29 / 30 / 31
0 / Source port / Destination port
32 / Sequence number
64 / Acknowledgment number (if ACK set)
96 / Data offset / Reserved / N
S / C
W
R / E
C
E / U
R
G / A
C
K / P
S
H / R
S
T / S
Y
N / F
I
N / Window Size
128 / Checksum / Urgent pointer (if URG set)
160
... / Options (if Data Offset > 5)
... / padding

3. Describe the protocol used for connection establishment.

Three way handshaking protocol is used for connection establishment:

a.  SYN: The active open is performed by the client sending a SYN to the server. It sets the segment's sequence number to a random value A.

b.  SYN-ACK: In response, the server replies with a SYN-ACK. The acknowledgment number is set to one more than the received sequence number (A + 1), and the sequence number that the server chooses for the packet is another random number, B.

c.  ACK: Finally, the client sends an ACK back to the server. The sequence number is set to the received acknowledgement value i.e. A + 1, and the acknowledgement number is set to one more than the received sequence number i.e. B + 1.

4. Define interactive data flow and bulk data flow.

On a byte-count basis the ratio is around 90% bulk data and 10% interactive, since bulk data segments tend to be full sized (normally 512 bytes of user data), while interactive data tends to be much smaller. (The above-mentioned study found that 90% of Telnet and Rlogin packets carry less than 10 bytes of user data.).

5. Define retransmission. When it occurs?

Whenever a segment has been transmitted, a retransmission timer will scheduled with RTO value. If no ACK was received till the timer expires then, the same segment has to be retransmitted.

6. Define Keepalive timer.

In order to understand what TCP keepalive (which we will just call keepalive) does, you need do nothing more than read the name: keep TCP alive. This means that you will be able to check your connected socket (also known as TCP sockets), and determine whether the connection is still up and running or if it has broken.

7. What is Persist timer?

If an acknowledgment is lost, we could end up with both sides waiting for the other: the receiver waiting to receive data (since it provided the sender with a nonzero window) and the sender waiting to receive the window update allowing it to send. To prevent this form of deadlock from occurring the sender uses a persist timer that causes it to query the receiver periodically, to find out if the window has been increased. These segments from the sender are called window probes.

8. Explain TCP connection termination process?

TCP Connection Termination is implemented as follows:

1.  One computer sends a FIN packet to the other computer including an ACK for the last data received (N).

2.  The other computer sends an ACK number of N+1

3.  It also sends a FIN with the sequence number of X.

4.  The originating computer sends a packet with an ACK number of N+1. The connection is closed.

Another way to close the connection is for one computer to send a packet with the RST (reset) bit set which will tell the other computer to immediately terminate the connection.

9. Define MSS?

The maximum segment size (MSS) is the largest "chunk" of data that TCP will send to the other end.

10. Define half close.

TCP provides the ability for one end of a connection to terminate its output, while still receiving data from the other end. This is called a half-close

11. What is reset segment.

We've mentioned a bit in the TCP header named RST for "reset." In general, a reset is sent by TCP whenever a segment arrives that doesn't appear correct for the referenced connection

12. Define simultaneous open.

It is possible, although improbable, for two applications to both perform an active open to each other at the same time. Each end must transmit a SYN, and the SYNs must pass each other on the network. It also requires each end to have a local port number that is well known to the other end. This is called a simultaneous open.

Unit III – IP Implementation

Part A

1. Describe about ‘ipproc.c’

ipproc.c – IP process, which is responsible to extract a datagram from a queue and to process it ie., to forward towards destination.

2. How the IP software is designed.

IP software is designed by considering the followings:

·  Uniform Routing & Queue

·  Independent Process

·  Pseudo network interface queue

3. Define the term “directed broadcast”

Whenever a datagram is sent to a directed broadcast address, all machines on the specified network must receive a copy. It includes both the gateway and host on the destination network. The gateway will perform the following:

·  Make a copy of the datagram for protocol software

·  Broadcast the datagram

4. List out the fields available in routing table data structure?

Struct ‘route’ contains following fields.

·  Ipaddr rt_net – network address of the route

·  Ipaddr rt_mask – mask address for this route

·  Ipaddr rt_gw – next hop address

·  U_short rt_metri – distance metric

·  U_short rt_ifnum – Interface number

·  Short rt_ttl – time to live in seconds.

5. What is purpose the ‘don’t fragment’ and ‘most fragment’ bit?

DF ( don’t fragment) – indicates whether fragmentation can be done or not. If it is set, then the datagram should not be fragmented else fragmentation can be done if needed.

MF ( more fragment) – indicates whether it is the last or some are fragments are there. If set, then there are some more fragments yet to be received else, it is the last fragment of the datagram.