Network ProtocolsNetwork Protocols
Why Protocols?Why Protocols?
Rules and procedures to govern Rules and procedures to govern communicationcommunication Some for transferring dataSome for transferring data Some for route discoverySome for route discovery
TCP/IPTCP/IP
Suite of Protocols to define communicationSuite of Protocols to define communication Application – client functionalityApplication – client functionality Transport - moving dataTransport - moving data Network – tasks for moving dataNetwork – tasks for moving data
Steps –SendingSteps –Sending
Protocol responsible for breaking data into Protocol responsible for breaking data into smaller parts called packetssmaller parts called packets
Network address is attached to packetNetwork address is attached to packet Data prepared for transmission and sent Data prepared for transmission and sent
through NICthrough NIC
Steps - ReceivingSteps - Receiving
Data received, taken off network through Data received, taken off network through NICNIC
Address information strippedAddress information stripped Data packets are resemblesData packets are resembles Packets are then sent to application for Packets are then sent to application for
use.use.
Common ProtocolsCommon Protocols
TCPTCP FTPFTP UDPUDP TCP/IPTCP/IP DHCPDHCP TFTPTFTP DNSDNS HTTPHTTP ARPARP SIPSIP
RTPRTP SSHSSH POP3POP3 NTPNTP IMAP4IMAP4 TELNETTELNET SMTPSMTP SNMPSNMP ICMPICMP IGMPIGMP TLSTLS
TCPTCP
Transmission Control ProtocolTransmission Control Protocol Connection oriented – establishes a Connection oriented – establishes a
manually acknowledged session between manually acknowledged session between two hosts.two hosts.
Provides reliability to IP Provides reliability to IP Flow control, sequencing, and error Flow control, sequencing, and error
detection and correction.detection and correction. Transport layerTransport layer
TCP ConnectionTCP Connection
Sends SYN to target hostSends SYN to target host Target opens connection and sends ACKTarget opens connection and sends ACK Originated host sends ACK ready to Originated host sends ACK ready to
transfer datatransfer data Called three-way handshakeCalled three-way handshake
UDPUDP
User Datagram ProtocolUser Datagram Protocol No guarantee deliveryNo guarantee delivery ““fire and forget”fire and forget” Uses IPUses IP Transport layerTransport layer Lower overhead – low bandwidthLower overhead – low bandwidth
FTPFTP
File Transfer ProtocolFile Transfer Protocol Uploading and downloading of filesUploading and downloading of files Uses TCP as a transport protocolUses TCP as a transport protocol Used to transfer files over the LANUsed to transfer files over the LAN
Popular to distribute files over the internetPopular to distribute files over the internet Application layerApplication layer
Common FTP commandsCommon FTP commands
knowknow
SSHSSH
Secure ShellSecure Shell Alternative to telnetAlternative to telnet Provides security and encryptionProvides security and encryption Allows sessions to be opened on a remote Allows sessions to be opened on a remote
hosthost
SFTPSFTP
Secure File Transfer ProtocolSecure File Transfer Protocol Authentication between sender and receiverAuthentication between sender and receiver Encryption – if packets copied remain Encryption – if packets copied remain
hiddenhidden Implemented though client and server Implemented though client and server
softwaresoftware Allows for securely uploading and Allows for securely uploading and
downloading files to and from remote hostdownloading files to and from remote host
TFTPTFTP
Trivial File Transfer ProtocolTrivial File Transfer Protocol File transferFile transfer Not the same file security and functionality Not the same file security and functionality
as FTPas FTP Simple downloads – firmwareSimple downloads – firmware No directory navigationNo directory navigation Uses UDPUses UDP Application layerApplication layer
SMTPSMTP
Simple Mail Transfer ProtocolSimple Mail Transfer Protocol How mail is sent/transported through the How mail is sent/transported through the
networknetwork TCPTCP Can be used to send and receive mailCan be used to send and receive mail authenticationauthentication
HTTPHTTP
Hypertext Transfer ProtocolHypertext Transfer Protocol Uses TCPUses TCP Allows text, graphics, multimedia and Allows text, graphics, multimedia and
other material to be downloadedother material to be downloaded Requests sent in clear textRequests sent in clear text
HTTPSHTTPS
Hypertext Transfer Protocol SecureHypertext Transfer Protocol Secure SSL – encrypts SSL – encrypts Both the client and server must supportBoth the client and server must support
POP3/IMAP4POP3/IMAP4
Post Office Protocol 3/ Internet Message Post Office Protocol 3/ Internet Message Access ProtocolAccess Protocol
Can download email but not sendCan download email but not send Passwords transferred in clear textPasswords transferred in clear text
TelnetTelnet
Virtual terminal protocolVirtual terminal protocol Allows session to be opened and Allows session to be opened and
commands executedcommands executed Used to access routers and other network Used to access routers and other network
devicesdevices Not secureNot secure
ICMPICMP
Internet Control Message ProtocolInternet Control Message Protocol Works with the IP layer to provide error Works with the IP layer to provide error
checking and reportingchecking and reporting Tools to provide best-deliveryTools to provide best-delivery PINGPING Used for error reporting, flow control, and Used for error reporting, flow control, and
route testingroute testing
ARPARP
Address Resolution ProtocolAddress Resolution Protocol Resolving IP addresses to MAC Resolving IP addresses to MAC
addressesaddresses
RARPRARP
Reverse ARPReverse ARP Resolves MAC to IP addressesResolves MAC to IP addresses Reveres lookups in DNSReveres lookups in DNS
Network Time Protocol NTPNetwork Time Protocol NTP
Facilitates the communication of time Facilitates the communication of time between systemsbetween systems
Important for email and directory servicesImportant for email and directory services
Network News Transfer Protocol Network News Transfer Protocol NNTPNNTP
Posting and retrieval of messagesPosting and retrieval of messages Application layerApplication layer
Secure Copy Protocol SCPSecure Copy Protocol SCP
Secure means of copying filesSecure means of copying files Encrypts data Encrypts data More secure then RCPMore secure then RCP
Lightweight Directory Access Lightweight Directory Access Protocol LDAPProtocol LDAP
Access and query directory servicesAccess and query directory services NDS and ADSNDS and ADS
Internet Group Management Internet Group Management Protocol IGMPProtocol IGMP
Manages multicastManages multicast Used to register and discover devicesUsed to register and discover devices Routers and videoconferencing clientsRouters and videoconferencing clients
Domain Name Service DNSDomain Name Service DNS
Resolves host names to IP addressesResolves host names to IP addresses Used to use txt file hostsUsed to use txt file hosts
WINSWINS
On windows allows NetBIOS names to be On windows allows NetBIOS names to be resolved to IP addresses.resolved to IP addresses.
If no WINS server use LMHOSTS fileIf no WINS server use LMHOSTS file
Simple Network Management Simple Network Management Protocol SNMPProtocol SNMP
Network management of devicesNetwork management of devices
Dynamic Host Configuration Dynamic Host Configuration Protocol DHCPProtocol DHCP
Automatically assigns IP addressesAutomatically assigns IP addresses Allows a range of IP addresses to be Allows a range of IP addresses to be
defineddefined Clients ask the server for and addressClients ask the server for and address Lease - scopeLease - scope
Transport Layer Security TLSTransport Layer Security TLS
Ensure privacy between client/server appsEnsure privacy between client/server apps
Session Initiation Protocol SIPSession Initiation Protocol SIP
VOIP VOIP Establish and maintain multimedia Establish and maintain multimedia
sessionssessions Internet telephone callsInternet telephone calls
Uses TCP or UDPUses TCP or UDP Application layerApplication layer
Real Time Transport Protocol Real Time Transport Protocol RTPRTP
Transport of real-time dataTransport of real-time data Does not guarantee deliveryDoes not guarantee delivery Transport LayerTransport Layer
Ports Ports
Each protocol needs a port to access and Each protocol needs a port to access and leave the systemleave the system
PortsPorts
TCP/IP has 65,535 portsTCP/IP has 65,535 ports Well known – 0-1023Well known – 0-1023 Registered ports – 1024-49151 Registered ports – 1024-49151
Used by apps or servicesUsed by apps or services Dynamic or private – 49152 – 65353Dynamic or private – 49152 – 65353
Can be used for any service or appCan be used for any service or app
FTP – 20 – TCPFTP – 20 – TCP FTP – 21 TCPFTP – 21 TCP SSH – 22 TCPSSH – 22 TCP Telnet – 23 – TCPTelnet – 23 – TCP SMTP – 25 – TCPSMTP – 25 – TCP DNS – 53 – UDP/TCPDNS – 53 – UDP/TCP TFTP – 69 – UDPTFTP – 69 – UDP HTTP – 80 – TCP/UDPHTTP – 80 – TCP/UDP POP3 – 110 – TCP POP3 – 110 – TCP
NNTP – 119 – TCPNNTP – 119 – TCP NTP – 123 – TCPNTP – 123 – TCP IMAP4 – 143 – TCPIMAP4 – 143 – TCP SNMP – 161- UDPSNMP – 161- UDP HTTPS – 443 – TCPHTTPS – 443 – TCP DHCP – 67 - UDPDHCP – 67 - UDP
IP AddressIP Address
Consists of a series of 32 binary bits Consists of a series of 32 binary bits Grouped into four 8-bit bytes Grouped into four 8-bit bytes
Called and octetCalled and octet Presented in decimal valuePresented in decimal value
Composed of two parts Composed of two parts First part – networkFirst part – network Second part - hostSecond part - host
ExampleExample
192.168.18.57 192.168.18.57 First three octets are networkFirst three octets are network
• 192.168.18192.168.18 Last octet identifies the host Last octet identifies the host
• 5757
Address RangesAddress Ranges
ClassClass Address Range Address Range Default Subnet Default Subnet MaskMask
AA 10.0.0.0-10.255.255.25510.0.0.0-10.255.255.255 255.0.0.0 255.0.0.0
BB 172.16.0.0-172.31.255.255 255.255.0.0172.16.0.0-172.31.255.255 255.255.0.0
CC 192.168.0.0-192.168.255.255 192.168.0.0-192.168.255.255 255.255.255.0 255.255.255.0
Need to KnowNeed to Know
169.254.0.0- no DHCP server to give 169.254.0.0- no DHCP server to give addressaddress
127 loopback127 loopback
ClassClass
IP addresses are divided into 5 classesIP addresses are divided into 5 classes Class A – large networksClass A – large networks Class B – medium sized networks – Class B – medium sized networks –
universitiesuniversities Class C – small networks – ISP’s for Class C – small networks – ISP’s for
customerscustomers Class D – multicastingClass D – multicasting Class E - testingClass E - testing
Subnet MaskSubnet Mask
Network portion of the addressNetwork portion of the address Hosts on a LAN use the same subnet Hosts on a LAN use the same subnet
maskmask
Subnet Mask contSubnet Mask cont
Class A – 255.0.0.0Class A – 255.0.0.0 Class B – 255.255.0.0Class B – 255.255.0.0 Class C – 255.255.255.0Class C – 255.255.255.0