sict ii - lecture 4

82
TCP/IP PROTOCOL SUITE AND ROUTING FUNDAMENTALS Mr. Froilan E. De Guzman

Upload: eric-coronel-lunas

Post on 28-Nov-2014

144 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Sict II - Lecture 4

TCP/IP PROTOCOL SUITE AND ROUTING FUNDAMENTALS

Mr. Froilan E. De Guzman

Page 2: Sict II - Lecture 4

Introduction to TCP/IP

TCP/IP in fact consists of dozens of different protocols, but only a few are the “main” protocols that define the core operation of the suite.

The Internet Protocol (IP) is the primary OSI network layer (layer three) protocol that provides addressing, datagram routing and other functions in an internetwork.

The Transmission Control Protocol (TCP) is the primary transport layer (layer four) protocol, and is responsible for connection establishment and management and reliable data transport between software processes on devices.

Page 3: Sict II - Lecture 4

TCP/IP Protocol Suite Layers and OSI Layers

Page 4: Sict II - Lecture 4

IPv4 vs. IPv6

Example of IPv4 (32-bits) 00110001.10000110.11000001.00000011 33.134.193.3

Example of IPv6 (128-bits) 0011111111111110:0001100100000000: 0110010101000101:0000000000000011: 0000001000110000:1111100000000010: 0111111010111111:0001001011000010 3FFE.1900.6545.3.230.F804.7EBF.12C2

Page 5: Sict II - Lecture 4

Application Layer

The last layer of both the OSI and the TCP/IP model.

It is the closest to the end user when interacting with software applications, such as sending and receiving email over a network

Page 6: Sict II - Lecture 4

Domain Name System

Domain is a group of computers that are associated with geographical location or their business types

Geographic Locations - .us, .uk, .ph Business Types:

.edu – educational sites - .com – Commercial sites .gov – Government sites - .org – Nonprofit sites .net – Network service - .mil – US military sites .int – International database/treaty organizations sites

Page 7: Sict II - Lecture 4

FTP and TFTP

FTP – is designed to download and upload files. The main purpose of this is transfer files from one computer to another.

TFTP – it is connectionless service that uses UDP. It is used on routers and switches to transfer configuration files and to transport files that supports TFTP

Page 8: Sict II - Lecture 4

Hypertext Transfer Protocol

It works with the world wide web, which is the fastest-growing and most used part of the Internet.

URL components: http:// - Identifies to the browser what protocol

should be used www. – Identifies what type of site is being

contacted by the browser Yahoo.com – Represents the domain entry of

the website /cgi/r3/ - Identifies the folder where the web

page is located on the server. Also, because no name is specified, the browser loads the default page identified by the server.

Page 9: Sict II - Lecture 4

Simple Mail Transfer Protocol It transport email messages in ASCII

format using TCP. You can connect to an SMTP server by

performing a ping test to the SMTP port (25) or to the POP3 port (110).

Page 10: Sict II - Lecture 4

Simple Network Management Protocol It is an application layer protocol that

facilitates the exchange of management information between network devices.

It enables network administrators to manage network performance, find and solve network problems and plan for network growth.

Page 11: Sict II - Lecture 4

Key Components of SNMP

Managed Device – It collect and store management information and make this information available to NMSs using SNMP.

Agent – It has local acknowledgement of management information and translates that information into a form compatible with SNMP.

Network Management System (NMS) – It provides the bulk of the processing and memory resources requires for network management

Page 12: Sict II - Lecture 4

Terminal Emulation

It provides the capability to remotely access another computer.

It enables you to log in to an Internet host and execute commands.

It commonly used for remote administration of servers and network equipment such as routers and switches.

Page 13: Sict II - Lecture 4

Transport Layer

It provides transport services from the host to the destination host.

It constitutes a logical connection between the endpoints of the network.

Transport services segments and reassemble data that is sent by several upper-layer applications onto the same transport layer data stream.

Transport layer data stream is a logical connection between the endpoints of a network.

Page 14: Sict II - Lecture 4

Transport Layer Protocols

Transport services using TCP include all the following services whereas using UDP provides only the first two Segmenting upper-layer application data Sending segments from one end device to

another end device Establishing end-to-end operations Flow control provided by sliding windows Reliability provided by sequence numbers and

acknowledgments.

Page 15: Sict II - Lecture 4

Flow Control

It avoids the problem of a transmitting host overflowing buffers in the receiving host.

Overflow can represent serious problems because they can result in the loss of data

Page 16: Sict II - Lecture 4

Establishing Connection

Sender Receiver

Synchronize

Synchronize

Negotiate Connection

Acknowledgement

Connection EstablishedData Transfer (Send Segments)

Page 17: Sict II - Lecture 4

Three-way Handshake

A sequence of messages exchanged between two or more network devices to ensure transmission synchronization before sending user data.

Page 18: Sict II - Lecture 4

Windowing

A flow-control mechanism requiring that the source device receive an acknowledgement from the destination after transmitting a certain amount of data.

Page 19: Sict II - Lecture 4

Acknowledgement

Notification sent from one network device to another to acknowledge that some vent occurred.

Sometimes abbreviated ACK

Page 20: Sict II - Lecture 4

Transmission Control Protocol It is a connection-oriented transport layer

protocol that provides reliable full-duplex data transmission

It is part of TCP/IP protocol stack. TCP is responsible for breaking messages

into segments, reassembling them at the destination station, resending anything that is not received, and reassembling messages from the segments

Page 21: Sict II - Lecture 4

Protocols Use TCP

File Transfer Protocol Hypertext Transfer Protocol Simple Mail Transfer Protocol Domain Name System

Page 22: Sict II - Lecture 4

TCP Segment Fields

Source Port – Number of calling port Destination Port – Number of called port Sequence Number – Number used to

ensure correct sequencing of the arriving data

Acknowledgement Number – Next expected TCP octet

HLEN – Number of 32-bit words in the header

Reserved – Set to 0 Code Bits – Control functions (such as

setup and termination of a session)

Page 23: Sict II - Lecture 4

TCP Segment Fields

Window – Number of octets that the sender is willing to accept

Checksum – Calculated checksum of the header and data fields

Urgent Pointer – Indication of the end of the urgent data

Options – One option currently defined – maximum TCP/IP segment size

Data – Upper-layer protocol data

Page 24: Sict II - Lecture 4

User Datagram Protocol

It is connectionless transport protocol in the TCP/IP protocol stack

It is a simple protocol that exchanges datagrams without acknowledgements or guaranteed delivery.

Page 25: Sict II - Lecture 4

Protocols Use UDP

Trivial File Transfer Protocol Simple Network Management Protocol Dynamic Host Configuration Protocol Domain Name System

Page 26: Sict II - Lecture 4

UDP Segment Fields

Source Port – Number of calling port Destination Port – Number of called

port Length – Number of bytes, including

header and data Checksum – Calculated checksum of

the header and data fields Data – Upper-layer protocol data

Page 27: Sict II - Lecture 4

Reserved TCP and UDP Port Numbers

Decimal Port

Number

Keyword Description

0 - Reserved

1 to 4 - Unassigned

5 RJE Remote Job Entry

7 Echo Echo

9 Discard Discard

11 Users Active Users

13 Daytime Daytime

15 NetStat Who is up, or netstat

17 Quote Quote of the Day

Page 28: Sict II - Lecture 4

Reserved TCP and UDP Port Numbers

Decimal Port

Number

Keyword Description

19 Chargen Character Generator

20 FTP-data File Transfer Protocol (Data)

21 FTP File Transfer Protocol

23 Telnet Terminal Connection

25 SMTP Simple Mail Transfer Protocol

37 Time Time of the Day

39 RLP Resource Location Protocol

42 NameServer Host name server

43 nickname Who is 

Page 29: Sict II - Lecture 4

Reserved TCP and UDP Port Numbers

Decimal Port

Number

Keyword Description

53 Domain Domain Name Server

67 Bootps Bootstrap protocol server

68 Bootpc Bootstrap protocol client

69 TFTP Trivial File Transfer Protocol

75 - Any private dial-out service

77 - Any private RJE service

79 Finger Finger

80 HTTP Hypertext Transfer Protocol

95 SUPDUP SUPDUP Protocol

Page 30: Sict II - Lecture 4

Reserved TCP and UDP Port Numbers

Decimal Port

Number

Keyword Description

101 HOSTNAME NIC Host Name Server

102 ISO-TSAP ISO-TSAP

113 AUTH Authentication Service

117 UUCP-PATH UUCP Path Service

123 NTP Network Time Protocol

133 to 159 Unassigned

160 to 223 Reserved

224 to 241 Unassigned

242 to 255 Unassigned

Page 31: Sict II - Lecture 4

Internet Layer

The purpose of the Internet Layer is to send packets from the device using correct protocol that function at this layer.

Best path determination and packet switching occur at this layer

Page 32: Sict II - Lecture 4

Internet Layer Protocol

IP - Provides connectionless, best-effort delivery routing of packets. IP is not concerned with the content of the packet. Instead, it looks for a way to move the packets to their destination.

Internet Control Message Protocol (ICMP) – Provides control messaging capabilities.

Page 33: Sict II - Lecture 4

Internet Layer Protocol

Address Resolution Protocol (ARP) - Determines the data link layer addresses (MAC address) for known IP address.

Reverse Address Resolution Protocol (RARP) - Determines IPS addresses when data link layer addresses (MAC address) are known.

Page 34: Sict II - Lecture 4

IP Performs the Following:

Defining a packet and an addressing scheme

Transferring data between the Internet Layer and the Network Access Layer

Routing Packets to remote hosts

Page 35: Sict II - Lecture 4

Network Access Layer

It is also called the host-to-network layer. It is the layer that is concerned with all the

issues than an IP packets requires to make a physical link to the medium

It includes the LAN and WAN technology details and all the details contained in the OSI physical and data link layer

Page 36: Sict II - Lecture 4

Network Access Layer Protocols

Ethernet Fast Ethernet SLIP and PPP FDDI ATM, Frame Relay and SMDS ARP Proxy ARP RARP

Page 37: Sict II - Lecture 4

TCP/IP versus OSI (similarities) Both have layers Both have application layers, although

they include very different services Both have comparable transport and

network layers Packet-switched (not circuit-switched)

technology is assumed Networking professional need to know

both

Page 38: Sict II - Lecture 4

TCP/IP versus OSI (differences)

TCP/IP combines the presentation and session layers into its application layer

TCP/IP combines the OSI data link and physical layers into its network access layer.

TCP/IP appears simpler because it has fewer layers.

TCP/IP transport layer using UDP does not always guarantee reliable delivery of packets, as the transport layer in the OSI model does

Page 39: Sict II - Lecture 4

Internet Architecture

Internet is a deceptively simple idea that, when repeated on a large scale, enables nearly instantaneous worldwide data communications between anyone, anywhere at anytime.

Page 40: Sict II - Lecture 4

Limitation of LANs is that they don’t scale

Beyond a certain number of stations

Beyond a certain geographic separation

Page 41: Sict II - Lecture 4

Internet Architecture

The details of host computers, and LANs on which they reside, are separate from the details of getting messages from one network to another

The big-picture architecture for the Internet was to focus on the application layer interactions between the source and destination computers and any intermediate computers

Page 42: Sict II - Lecture 4

Concept of Internetworking

Building networks of networks A network of networks is called an

“internet”. The network that grew out of the DoD on

which the WWW runs is called “Internet”.

Page 43: Sict II - Lecture 4

Internetworking Characteristics

It must be scalable in the number of networks and computers attached.

It must be able to handle the transport of data across vast distances, including entire earth and near-end space.

It must be flexible to account for constant technological innovations.

It must adjust to dynamic conditions on the network.

It must be cost-effective It must be a system that permits anytime,

anywhere data communications to anyone.

Page 44: Sict II - Lecture 4

IP Addressing

A 32-bit IP address is broken into a network part and a host part. A bit or bit sequence at the start of each address determines the address’s class

Page 45: Sict II - Lecture 4

Hierarchical IP Address

Internet Address

1.0.0.0 2.0.0.0 3.0.0.0

10.1.0.0

50.0.0.0. . . . . . 255.0.0.0

10.3.0.010.2.0.010.4.0.0

10.0.0.0

10.5.0.0 10.255.0.0. . .

10.2.1.0 10.2.2.0 10.2.3.0 10.2.255.0

. . .. . .10.4.1.0 10.4.2.0 10.4.3.0 10.4.255.

0

Page 46: Sict II - Lecture 4

IP Address Class

Address Class

Number of Networks

Number of Hosts/

Network

A 126 16,777,216

B 16,384 65,535

C 2,097,152 254

D (multicast)

Page 47: Sict II - Lecture 4

Class A Addresses It was designed to support extremely

large networks. It uses only the first octet to indicate the

network addresses 127.0.0.0 network is reserved for

loopback testing, it cannot be signed to a network.

Any address that has value between 1 and 126 in the first octet is a Class A address.

Page 48: Sict II - Lecture 4

Class B Addresses

The first 2 bits of the first octet of a class B addresses are always 10.

The remaining 6 bits may be populated with either 1s or 0s.

Therefore the lowest number that can be represented with the class B is 10000000 (128), and the highest is number is 10111111 (191).

Any address that starts with a value in the range of 128 to 192 in the first octet is Class B address

Page 49: Sict II - Lecture 4

Class C Addresses

A Class C address begins with binary 110.

The lowest number that can be represented is 11000000 (192) and the highest number that can be represented is 11011111 (223).

If an address contains a number in the range of 192 to 223 in the first octet is Class C address.

Page 50: Sict II - Lecture 4

Class D Addresses

The Class D address space, much like the other address space, is mathematically constrained.

The first 4 bits of a Class D must be 1110.

The first octet range is 11100000 to 11101111, or 224 to 239.

Page 51: Sict II - Lecture 4

Class E Addresses

The first 4 bits of the first octet is 1111 The octet range is 11110000 to

11111111 (240 to 255) Class E addresses are reserved for IETF

(Internet Engineering Task Force) research.

Page 52: Sict II - Lecture 4

Reserved IP Address

Network Address are used to identify the network itself.

Broadcast address are used to broadcast packets to all devices on a network.

Page 53: Sict II - Lecture 4

Public IP Address

It is unique. No two machines that connect to public

network can have the same IP address. Because public IP are global and

standardized. Public IP addresses must be obtained

from an Internet service provider or a registry at some expense

Page 54: Sict II - Lecture 4

Private IP Address

RFC 18 sets aside three blocks of IP addresses for private, internal use.

Addresses are not routed on the Internet backbone, Internet routers immediately discard private IP addresses

Page 55: Sict II - Lecture 4

Private IP Addresses

IP Address Class RFC 1918 Internal Address Range

Class A 10.0.0.0 to 10.255.255.255

Class B 172.16.0.0 to 172.31.255.255

Class C 192.168.0.0 to 192.168.255.255

Page 56: Sict II - Lecture 4

Introduction to Subnetting

The way to conserve IP address. This method of dividing full network

address classes into smaller pieces has helped prevented complete IP address exhaustion

Page 57: Sict II - Lecture 4

Obtaining IP Address

Static Addressing RARP Addressing BOOTP Addressing DHCP Addressing

Page 58: Sict II - Lecture 4

Static Addressing

Each device must be configure with an IP address.

Page 59: Sict II - Lecture 4

RARP Addressing

It is a process wherein MAC address binding into IP addresses which allows some network devices to encapsulate data before sending it out on the

Page 60: Sict II - Lecture 4

BOOTP Addressing

It operates in a client/server environment and requires only a single packet exchange to obtain IP information

Page 61: Sict II - Lecture 4

DHCP Addressing

Dynamic Host Configuration Protocol is the successor of BOOTP. It allows to obtain an IP address dynamically without the network administrator’s having to set up an individual profile for that machine.

Page 62: Sict II - Lecture 4

What is Protocol?

It is standards-based set of rules that determines how computers communicate with each other across networks.

It also serves as the common denominator or medium by which different applications, hosts or systems communicate

Page 63: Sict II - Lecture 4

A Protocol Describes

The format that a message must take The way in which computers must

exchange a message within the context of a particular activity, such sending messages across networks.

Page 64: Sict II - Lecture 4

Routed Protocol

Any network protocol that provides enough information in its network layer address to allow a packet to be forwarded from one host to another based on the addressing scheme.

It defines the field formats within a packet.

Page 65: Sict II - Lecture 4

Example of Routed Protocols Internet Protocol Internetwork Packet Exchange AppleTalk

Page 66: Sict II - Lecture 4

Routing Protocol

It supports a routed protocol by providing mechanisms for sharing routing information.

Its messages move between router It allows the routers to communicate

with other routers to update and maintain tables

Page 67: Sict II - Lecture 4

Example of Routing Protocol

Routing Information Protocol Interior Gateway Routing Protocol Enhanced Interior Gateway Routing

Protocol Open Shortest Past First

Page 68: Sict II - Lecture 4

Connectionless

Data transfer without the existence of a virtual circuit.

It means that no dedicated circuit connection is required, as there would be for a telephone call.

The destination is not contacted before a packet is sent.

The recipient is not contacted before a letter is sent from one destination to another.

Page 69: Sict II - Lecture 4

Connection-Oriented

Data transfer that requires establishment of a virtual circuit.

It is established between the sender and the recipient before any data is transferred.

You place a call, a connection is established and the communication occurs

All packets travel sequentially across the same physical circuit.

Page 70: Sict II - Lecture 4

Encapsulation Changes in a Router

Receive Frame on Interface

Is a DataFor Router?

DiscardData

End

Is CRCCheck valid?

Remove frameHeader andTrailer from

Packet

ExtractDestinationIP address .from Packet

Is PacketTo be

Routed?

Process PacketOn the Router.Send Response

CompareDestination IPWith Routing

Table

Is thereA match?

Is thereA DefaultRouter?

Forward the dataPacket to the

Interface in theRouting Table Entry

Encapsulate theData PacketWith the newCRC trailer

EncapsulateThe Data Packet

In the appropriateFrame Header

Forward theNew Frame

End

DiscardData

Send ReplyMessage

DestinationUnreachable

Page 71: Sict II - Lecture 4

Anatomy of an IP Packet

Version – A 4 bit field that indicates the version of IP currently used. All devices must be running the same version of IP, or the device that is different rejects the packets.

IP Header Length (HLEN)– A 4-bit field that indicates the datagram header length in 32-bit words. This is the total length of all header information, accounting for the two variable length header fields.

Page 72: Sict II - Lecture 4

Anatomy of an IP Packet

Type of Service (TOS) – An 8-bit field that specifies the level of importance that has been assigned by a particular upper-layer protocol.

Total Length – A 16-bit field that specifies the length of the entire packet in bytes, including the data and header. To get the length of the data payload, subtract the HLEN from the total length

Identification – A 16-bit field that contains an integer that identifies the current datagram, this is sequence number

Page 73: Sict II - Lecture 4

Anatomy of an IP Packet

Flags – A 3-bit field in which the 2 low-order bits control fragmentation. The first bit specifies whether the packet can be fragmented, and the second bit specifies whether the packet is the last fragment in a series of fragmented packets.

Fragment Offset – A 13-bit field that helps piece together datagram fragments. This field allows the Flag field to end at a 16-bit boundary.

Page 74: Sict II - Lecture 4

Anatomy of an IP Packet

Time-To-Live (TTL) – An 8-bit field that maintains a counter that gradually decreases, in increments, to 0. At this point, the datagram is discarded, keeping the packets from looping endlessly.

Protocol – An 8-bit field that indicates with upper-layer protocol receives incoming packets after IP processing has been completed

Header Checksum – A 16-bit field that helps ensure IP header integrity

Source IP Address – A 32-bit field that specifies the sending node IP address.

Destination IP Address – A 32-bit field that specifies the receiving node IP address.

Page 75: Sict II - Lecture 4

Anatomy of an IP Packet

Option – A variable length field that allows IP to support various options, such as security.

Padding – Extra 0s are added to this field to ensure that the IP header is always a multiple of 32-bits

Data – A variable-length (maximum of 64KB) field that contains upper-layer information

Page 76: Sict II - Lecture 4

Routing

It is an OSI Layer 3 function. It functions as a hierarchical organization

scheme that allows individual addresses to be grouped and treated as a single unit until the individual address is needed for final delivery of the data.

It is the process of finding the most efficient path from one device to another

Page 77: Sict II - Lecture 4

Two functions of the Router

To maintain routing tables and make sure other routers know of changes in the network topology. This function is performed using routing protocol to communicate network information to other routers.

When packets arrive at an interface, the router must use the routing table to determine where to send the packets. It switches them to the appropriate interface, adds the necessary framing for the interface and then transmits the frame.

Page 78: Sict II - Lecture 4

Routed Protocol Operation

It includes any network protocol suite provides enough information in its network layer address to allow a router to forward it to the next device and ultimately to its destination.

It defines the format and use of the fields within a packet. Packets generally are conveyed from end system to end system.

Page 79: Sict II - Lecture 4

Routing Protocol Operation

It provides processes for sharing routing information

It allows routers to communicate with other routers to update and maintain the routing tables.

Page 80: Sict II - Lecture 4

Routing Table Components

Protocol Type – The type of routing protocol that created the routing table entry.

Destination/Next hop associations – Tells the router that a particular destination is either directly connected to the router or that it can be reached via another router called the next hop on the way to the final destination.

Routing Metrics – These are used to determine a route’s desirability.

Outbound Interface – The interface that the data must be sent out to reach the final destination

Page 81: Sict II - Lecture 4

References:

CCNA 1 and 2 By CISCO PRESS

Page 82: Sict II - Lecture 4

END OF CCNA MODULE I