Trivial Protocols CS-328 Dick Steflik. What’s a Protocol The rules that govern the exchange of...
-
Upload
delilah-clark -
Category
Documents
-
view
217 -
download
2
Transcript of Trivial Protocols CS-328 Dick Steflik. What’s a Protocol The rules that govern the exchange of...
Trivial Protocols
CS-328
Dick Steflik
What’s a Protocol
• The rules that govern the exchange of information between to hosts– when a dignitary visits a foreign country there
are certain rules of protocol that they must follow
– when you meet the Queen of Great Britain you bow or curtsey
more specifically…
• Communications rules– who initiates the exchange– who terminates the exchange– what order things are done in
• finite state machine model
– option negotiation
DayTime
• RFC 868, RFC 867
• TCP and UDP
• port 13
• client connects to port 13– server returns date/time and closes connection
Echo
• RFC 862• TCP and UDP• well known port 7• TCP Client opens connection on port 7
– Client sends data <crlf>
– server echos data back
– repeat prev two steps
– client closes connection
Echo
• UDP Client connects and sends data– host receives and immediately returns datagram
Finger
• Retrieve user information from remote host
• RFC 1288
• well known TCP port 79
• Client opens connection on port 79– client sends finger query– remote host runs query, returns data and closes
connection
Finger
• Queries– {Q1} ::= [{W} | {W} {S} {U} ] {C}– {Q2} ::= [{W} {S} ] [{U} {H} {C}– {U} ::= username– {H} ::= @hostname | @hostname{H}– {W} ::= /W– {S} ::= <sp> | <sp>{S}– {C} ::= <crlf>
Finger
• Remote User Interface Program (RUIP)– program on remote host that performs finger
queries– may be turned off in TCP/IP config– may be configured to return limited info on
user for security purposes– format may be differant on various platforms
Finger
• Security– many sites don’t fun finger servers
• a bug in the original finger left a hole through which unfriendly and unnatural acts could be done
– 1988 - Internet Worm gained machine access via the finger bug
– some sites run a finger server that just returns a textual message
Post Office Protocol (POP3)
• Used in conjunction with anSMTP Host– SMTP Host sends and receives e-mail for
remote users, POP allows users to retreive their mail from the host.
– SMTP stores mail for unconnected hosts
• RFC 1730
• TCP Port 110
POP3
• protocol is relatively simple– connect to port 110 of remote host
• read back a response check for OK or ERR
• over and over again
– close the connection
POP3 - State Machine
AuthAuth AuthAuth TransactionTransaction UpdateUpdate
USERUSER PASSPASS
CommandsCommands
QUITQUIT
POP3
• Commands– USER name
• terminate with <crlf>• identifies the user/mail drop name
– PASS string• user password• usually the same as the user’s logon password
– STAT• request number of messages on server and size of mail
drop
POP3 (Commands)
– LIST• return a list <crlf> of all msgs on server
– format msg size
– LIST [msg_no]• request size of msg_no
– format msg_no size
– RETR msg_no• return the message identified by msg_no
POP3 (Commands)
– DELE msg_no• delete msg_no from server
• happens in UPDATE State
– NOOP• nothing except a positive reply from server
– RSET• reset all deletions pending on server
– QUIT• quit session, UPDATE, enter AUTH1 State