Unformatted text preview:

CMPE 150 Introduction to Computer Networks Dr Chane L Fullmer chane cse ucsc edu Spring 2003 UCSC cmpe150 1 Homework Assignments Homework assignment 3 Chapter Four Due right now Spring 2003 UCSC cmpe150 2 Homework Assignments Homework assignment 4 Chapter three Due May 29 NEXT WEEK Spring 2003 UCSC cmpe150 3 Homework Assignments Homework assignment 5 Chapter two Due June 5th only two short weeks from today Spring 2003 UCSC cmpe150 4 Optional Class Project Network programming project Goal In lieu of taking final examination Or just a wildcard for mid term or final Build an FTP client server from scratch Using C language Details on web page now Due by June Spring 2003 UCSC th 4 cmpe150 5 CMPE 150 Introduction to Computer Networks Set 15 End to End Transmission Control TCP and UDP Spring 2003 UCSC cmpe150 6 Transport Protocols Services Reliable or unreliable transport from source process to end process es Multiplexing and demultiplexing Flow control Congestion control Avoid overflowing receiver s buffer Avoid overflowing the network bottleneck Examples UDP and TCP Spring 2003 UCSC cmpe150 7 Why Multiplexing IP delivers packets from source host to destination host However multiple processes run in the hosts Applications require communication among processes not just host computers Example Multiple telnet sessions email ftp sessions and www can all be running concurrently in the same host Ports are defined as the addresses of processes inside a host How do we identify processes uniquely and efficiently Spring 2003 UCSC cmpe150 8 Port Assignments Well known ports 0 1023 Registered ports 1024 49151 Dynamic ports 49152 65535 IANA Internet Assigned Number Authority www iana org List of currently assigned registered ports Spring 2003 www iana org assignments port numbers UCSC cmpe150 9 Well known applications Well known ports under 1024 such as FTP port 21 Telnet port 23 HTTP port 80 Doom port 666 Host A Client Host B Server Source port x Source port 23 Dst port 23 Dst port x Segment Spring 2003 UCSC cmpe150 10 Transport Protocols Transport protocols used today are point to point UDP used for TCP used for Remote file server NFS name translation DNS intra domain routing RIP network management SNMP multimedia applications and telephony Electronic mail SMTP file transfer FTP remote login Telnet web HTTP No standard multipoint e t e protocol yet Spring 2003 UCSC cmpe150 11 User Datagram Protocol UDP Provides best effort e t e delivery of segments among processes No guarantees for delivery ordering duplicates Small overhead no connection state no flow control no congestion control Header specifies the minimum needed for multiplexing and framing Spring 2003 UCSC cmpe150 12 UDP Format 0 15 31 Destination port Source port Length Checksum Data Source and destination ports identify the end points Length 8 byte header data Checksum optional if not used set to zero Spring 2003 UCSC cmpe150 13 UDP Checksum Computed over a pseudo header UDP header data padding to even number of bytes if needed Pseudo header 0 31 Source IP address 00000000 Spring 2003 Destination IP address Protocol Segment length UCSC cmpe150 14 TCP Flow Control vs Congestion Control Reliable vs Unreliable Communication TCP history service provided applications error recovery congestion control proposed enhancements Spring 2003 UCSC cmpe150 15 History of TCP The Internet protocol for reliable end to end communication First key paper V Cerf and R Kahn A Protocol for Packet Network Interconnection IEEE Trans Commun 1974 pp 627641 Designed per se in the early 80s J Postel RFC 793 also IP and UDP Network assumptions reliable links losses due to congestion only symmetric network connections Implicit in order delivery of packets more than IP can promise Spring 2003 UCSC cmpe150 16 Services Provided Layer 4 Transport layer End to end flow control Reliable byte stream In order packet delivery buffering Connection oriented Socket host address port uniquely identifiable connection Spring 2003 UCSC cmpe150 17 TCP Service Model TCP connections are full duplex and point to point Byte stream not message stream Message boundaries are not preserved e2e A B C 4 512 byte segments sent as separate IP datagrams Spring 2003 UCSC ABCD D 2048 bytes of data delivered to application in single READ cmpe150 18 TCP Byte Stream When application passes data to TCP it may send it immediately or buffer it Sometimes application wants to send data immediately Example interactive applications Use PUSH flag to force transmission URGENT flag Also forces TCP to transmit at once Spring 2003 UCSC cmpe150 19 TCP Header Source port Destination port sequence number Acknowledgment number Header length UAP R S F Checksum Window size Urgent pointer Options 0 or more 32 bit words Data Spring 2003 UCSC cmpe150 20 TCP Header Important fields source port and destination port identify connection end points 32 bit SN identifies byte in segment 32 bit ACK identifies next byte expected 4 bit header length how many 32 bit words in header 16 bit window size max 64KB advertised by the receiver RAW checksum checks header data and pseudo header Flags SYN FIN ACK URG PUSH RST Options Way to add more information Important Only one sequence number Identifies the segment but does not identify which retransmission of the segment is being sent Spring 2003 UCSC cmpe150 21 TCP Header Flags Six 1 bit flags URG indicates urgent data present urgent pointer gives byte offset from current sequence number where urgent data are ACK indicates whether segment contains acknowledgment if 0 acknowledgement number field ignored PUSH indicates PUSHed data so receiver delivers it to application immediately RST used to reset connection reject invalid segment or refuse to open connection SYN used to establish connection connection request SYN 1 ACK 0 FIN used to release connection Spring 2003 UCSC cmpe150 22 Connection establishment client SYN port ISN 10 server connection request SYN SYN ISN 35 ACK 11 connection granted SYNACK ACK 36 ACK A Three way handshake How to choose ISN Spring 2003 UCSC cmpe150 23 Connection Release Timers used to avoid 2 army problem If response to FIN not received within 2 MSL FIN sender releases connection After connection released TCP waits for 2 MSL e g 120 sec to ensure all old segments have aged Spring 2003 UCSC cmpe150 24 Connection Release Graceful Each direction terminated independently 2 half closes transmit a FIN Spring 2003 UCSC cmpe150 25 MSS Maximum Segment Size Largest chunk


View Full Document

UCSC CMPE 150 - Introduction to Computer Networks

Documents in this Course
Load more
Loading Unlocking...
Login

Join to view Introduction to Computer Networks and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Introduction to Computer Networks and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?