240 likes | 391 Views
Protocols 1. Objective: Build a protocol foundation for Client / Server programming in an Internet Environment. References: RFC’s 791, 793, 768, 826. Note: RFCs available from http://www.isi.edu/rfc-editor/. Objectives of C/S Architecture. Improve system performance
E N D
Protocols 1 Objective: Build a protocol foundation for Client / Server programming in an Internet Environment References: RFC’s 791, 793, 768, 826 Note: RFCs available from http://www.isi.edu/rfc-editor/
Objectives of C/S Architecture • Improve system performance • Get centralized applications closer to user • Improve system reliability • Improve intersystem (multi-vendor) communications • Improve resource utilization (PCs on the desktop) • Move towards standard inter-operating environment
Application Application Internetwork Communications
Layered Protocol Architectures • Driven by interoperability Concerns • Divide the communications process into tasks that can be managed by a protocol • Allow multiple protocols to do each of the layers.
Simple Layered Model Application FTP, e-mail, Client/Server Transport Connection Control Internetwork Routing Network Access Ethernet, fiber, Token Ring
Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer Standard Layered Architecture OSI Model Internet Application Layer TCP / UDP Layer Internet Protocol Physical Layer
Application Layer Application Layer TCP / UDP Layer TCP / UDP Layer Internet Protocol Internet Protocol Internet Protocol Physical Layer Physical Layer Physical Layer Multiple Hop Communications Router Host Host
Internet Addressing • 32 bit universal identifier (4 octets) • Normal Site Addresses • Multicast Address • Broadcast Address
Internet addressing 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0| NETWORK | Local Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1 0| NETWORK | Local Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1 1 0| NETWORK | Local Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1 1 1 0| MULTICAST ADDRESS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Special Internet Addresses • netid + hostid = 0’s: This host • netid = 0’s, host id = HOST: HOST on this net • netid + hostid = 1’s: local net broadcast • netid = NET, hostid = 1’s: broadcast on NET • high order octet = 127, rest = anything: loopback
Domain Name System • Hierarchical Names kc-sce-450p.kc.umkc.edu • Original Domain Name suffixes com edugov mil net orgarpaint country codes • Namespace has expanded … • 295 Country Codes • .tv (Tuvalu), .zw (Zimbabwe), etc. • 124 Generic names • .ninja, .kitchen, .guitars, …? • A few other restricted names • .arpa, .pro, .name
IP Data Encapsulation User Data Application Layer TCP TCP / UDP Layer IP Layer PH Physical Layer
Protocol Relationships +------+ +-----+ +-----+ +-----+ |Telnet| | FTP | | TFTP| ... | ... | +------+ +-----+ +-----+ +-----+ | | | | +-----+ +-----+ +-----+ | TCP | | UDP | ... | ... | +-----+ +-----+ +-----+ | | | +--------------------------+----+ | Internet Protocol & ICMP | +--------------------------+----+ | +---------------------------+ | Local Network Protocol | +---------------------------+
Ethernet Frame Format Preamble Destination Source Type Data FCS 8 6 6 2 46-1500 4 • Preamble - used for synchronization • Destination - Ethernet address of destination • Source - Ethernet address of source • Ethertype - higher layer protocol type(0800=IP) • Data - IP datagram • FCS - Frame Check Sequence (32 bit CRC)
Ethernet Frame with QoS / VLAN preamble DST SRC P/Q tag Type Upper Layer Protocol Payload (~> 1500 bytes) FCS Tag / Protocol ID Prio CFI VLAN ID 16 bits 3 bits 1 bit 12 bits
Address Resolution Protocol • Conversion of 32 bit Network Protocol address to 48 bit Ethernet Address • Specified in RFC 0826 • Each host must know its own IP address. • Hosts generally use dynamic discovery to identify mappings between IP and Ethernet addresses. • Ethernet broadcast address: FF.FF.FF.FF.FF.FF
Internet Protocol functions • Connectionless Datagram Delivery • RFC 791 • Benefits of connectionless delivery • Flexibility (requires little from networks) • Robustness (datagrams routed independently) • Connectionless application support
IP Design Issues • Addressing • Routing • Datagram lifetime • Fragmentation and reassembly • Error control • Flow control
IP Datagram Format 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Version| IHL |Type of Service| Total Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Identification |Flags| Fragment Offset | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Time to Live | Protocol | Header Checksum | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Source Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Destination Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Options | Padding | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
IP Service Primitives • Services offered to higher layers • Send • (source address, destination address, protocol, type of service indicators, identifier, don’t fragment indicator, time to live, data length, option data, data) • Deliver • (Source address, destination address, protocol. type of service indicators, data length, option data, data)
User Datagram Protocol Functions • Connectionless Data Transfer • “Unreliable”
UDP Header 0 7 8 15 16 23 24 31 +--------+--------+--------+--------+ | Source | Destination | | Port | Port | +--------+--------+--------+--------+ | | | | Length | Checksum | +--------+--------+--------+--------+ | | data octets ... +---------------- ...
UDP pseudo Header 0 7 8 15 16 23 24 31 +--------+--------+--------+--------+ | source address | +--------+--------+--------+--------+ | destination address | +--------+--------+--------+--------+ | zero |protocol| UDP length | +--------+--------+--------+--------+
Summary • Reviewed layered Protocol Architecture • Discussed Internet Naming and Addressing • Discussed Internet Protocol (IP) Functions and Header