Friday, February 12, 2010

TCP/IP Review

1. Name the 5 layers of TCP/IP protocol suite and each layers purpose?

The TCP/IP protocol suite has 5 layers not to be confused with the OSI model 7 layers. The upper 3 layers in the TCP/IP protocol suite is made up of the Application layer, Presentation layer, and the Session Layer altogether called the Application Layer or the 5th TCP/IP protocol suite Layer. The 4 lower layers of the TCP/IP suite consist of the Physical, Data, Network, and Transport.

-5 Application Layer ( Application Presentation Session)
 -Application - allows access to network resources...ie...outlook..gmail...etc
 -Presentation - prepares data by compressing, encrypting, or translate
 -Session - establishes connections involving sockets 

-4 Host-to-Host Layer - is responsible for delivery...upd and tcp

-3 Internet (IP) Layer - enables actual routing of data across a logical network by packet format and address format.  Moves packets from source to destination.

-2 Data Layer - layer deals with the protocols (Ethernet, Frame-relay, ATM and SONET) that will control the data link layer.
Data link layer deals with:

-how the medium is accessed and shared *CSMA*
-how devices on the medium are identified *MAC address*
-how data is frame before being transformed on the medium

-1 Physical Layer - Transmission of bits over chosen medium and deals with electrical and mechanical specifications.


2. How many bits are in a ipv4 address and what is the most common version being used?

IPv4 is a 32 bit binary string.  Depending on the class of the address some of the bits will be Network bits and some bits will be host bits.  We will use subnet mask bits to distinguish the network bits from the host bits.

3. Explain Fragmentation?

Fragmentation is when the sending packet is larger than the Max Transmission Unit(MTU) of the data link that it is passing through.  For example, if the original packet traversing the network is 3000 bytes in size, once it hits a data link that has an MTU of 1500 bytes, the packet will have to be fragmented into smaller packets.  The router that placed the packet onto the data link will fragment the 3000 byte packet into 2 packets no larger than 1500 bytes in size each.

The router will use 3 fields to fragment the packet:
-Flags - 3 bit field.  First bit is unused.  Second bit is set to Don't Fragment (DF) bit. When the second bit is set to 1 then the router is instructed not to fragment the packet.  It is important to know that when the packets cannot be fragmented then they will be dropped and an error message will be sent to the source.  The third bit is the More Fragment (MF) bit and is set by the router when it fragments a packet.  The router sets the MF bit to 1 in all of the fragments except the last fragment.  By setting the MF bit to 1 the receiving device will continue to expect more fragments but when the MF bit is set to 0 the receiving device will no longer expect any more fragments for that packet.
-Fragmentation offset - 13 bit field that specifies the offset in units of 8 octets.  Allows for packets to be reassembled in the correct sequencial order.  This is especially important given that the fragments may not arrive in sequence.  It is important to note that if a single fragment is lost during transmission then the entire packet must be resent and refragmented.
-Identifier - 16 bit field that will mark each fragment with the same number in the Identifier field so that the receiving device can understand which packets go together.

4. Explain Time to Live(TTL)?

Time to Live is designed to help packets from forever wandering around that network and being lost.  TTL is an 8 bit field and it sets a certain number on each packet when orginally generated.  Each router that passes the packet will decrement the packet by 1.  Once the number reaches zero, the packet will be dropped/discarded and an error message will be sent to the source.  TTL is just like hop count with a recommended value of  64.

5. What is the First Octet Rule?

Network addresses are broken up into classes.  There are 4 octets each 8 bits long.  Those 8 bit binary numbers are translated into more human friendly numbers.  The first octet number will determine the class of the address.  Example 192.168.1.50 is a class C address given that 192 falls in the class C range of addresses.  So the First Octet Rule allows us to quickly determine which class the address belongs to.

Class A (1-126)
Class B (128-191)
Class C (192-223)

6. Show Class A, B, and C written in binary and decminal.

- Class A
*Binary form  (00000000 - 01111111)
*Decimal form (1 - 127)
-Class B
*Binary form (10000000 - 10111111)
*Decimal form (1 - 127)
-Class C
*Binary form (11000000 - 11011111)
*Decimal form (1 - 127)

7. What is the Address Mask?

There are 32 bits in a Network Address broken up into 4 octets. The address mask will consist of 1's or 0's in binary. For example the address mask of the Class C network address 192.168.1.20 is 255.255.255.0 or in binary 11111111.11111111.11111111.00000000. The address simply separates the network bits from the host bits. The 255's in the example are the network and the 0 represents the hosts.

8. Explain a Subnet and why its use.

Given that each data link (network) and host will require unique identification, subnetting can be used to divide up each major address into subnetworks.  This is done by using some of the host bits to become network bits.  Example would be a Class A address of 10.0.0.0 255.0.0.0 being subnetted to 10.0.0.0 255.255.0.0.  Notice that the subnet mask changed to 255.255.0.0.  By adding all 1's (255) to the second octet of the subnet mask, we have just that easily changed the network portion of the network address to 10.0 leaving the remaining 16 bits to host address.  A subnet is simply a subnetwork of a class A,B,or C network.

9. Explain why all O's or 1's cannot be used in a classful routing subnet environment.

Classful routing protocols (Rip ver1/IGRP) cannot distinguish between the network number and an all zero subnet.  Classful routing protocols cannot distinguish between all 1's in the subnet and the network number either. 
Classless protocols can recognize subnets with all 1's and 0's:
-RIP ver2
-EIGRP
-OSPF
-IS-IS
-BGP4

10. Describe ARP?

ARP is used to help devices discovered the data link identifier (mac address) of another device.  In this case, ARP request will be encapsulated into the frame.  ARP will map the discovered data link identifier to the IP address.

11. How does TCP provide connection oriented service?

TCP uses 3 mechanisms to assist TCP:
-labels packets with sequence numbers so that it can be properly ordered before delivery
-creates acknowledgements, checksums, and timer allowing sender and receiver to communicate regarding delivery of packets
-windowing allow the flow of packet delivery to be controlled