770 likes | 933 Views
Cosc 4765. Networking overview. Bandwidth Review. Bit (b) = a unit of information, 0 or 1 10 bits can represent 1024 different messages 20 bits represent > 1 million 30 bits > 1 billion messages The bandwidth of a communication channel = number of bits per second it transmits
E N D
Cosc 4765 Networking overview
Bandwidth Review • Bit (b) = a unit of information, 0 or 1 • 10 bits can represent 1024 different messages • 20 bits represent > 1 million • 30 bits > 1 billion messages • The bandwidth of a communication channel = number of bits per second it transmits • All channels have limited bandwidth • One byte (B) = 8 bits (an octet) • Transmitting 1 MB at 56K bps takes 143 sec. • 1 GB = gigabyte takes 40 hours • at 7Mbps 19 minutes; at 1 Gbps takes 8 seconds • Latency = delay from first bit transmitted to first received
Progress of Technology IMPROVEMENT: 8000 x • Have more disk storage • 1971: 10 MB • 2001: 80,000 MB (soon 1 terabyte = 1000GB) • Higher communication speeds • Human speech: 30 bits/sec • 1971 Modem 300 bits/sec • 2001 Modem: 56,000 bits/sec • T1 line: 1,544,000 bits/sec • Internet 2: 1,000,000,000 bits/sec • Nortel: 1,000,000,000,000 bits/sec in 1 fiber (entire U.S. telephone traffic) 1971-2001 IMPROVEMENT: 3 BILLION x
BANDWIDTH APPLICATION TECHNOLOGY 1 terabit Experimental All U.S. telephone conversations simultaneously 1 gigabit Gigabit Ethernet Full-motion HDTV OC12 = 622 Mb FDDI Fiber OC3 = 155 Mb Virtual Reality, Medical Imaging T3/E3 T3 = 44.7 Mb ADSL Video Conferencing, Multimedia DSL ~ 7 Mb T1/E1 Streaming Video + Voice ISDN T1 = 1.544 Mb 128K Copper Browsing, Audio New Modem 56K E-mail, FTP 19.2 In Kbps Old Modem Telnet 4.8 Wireless WAN Paging BANDWIDTH LIST Human speech = 30 bps
Some humor first http://www.the5thwave.com/images/cartoons_computer/large/training/631lg.gif
IEEE Standards for networking There are 7 layers in the OSI network model • Layer 7: Application • mechanisms to support end-user applications such as mail, ftp, etc. • Layer 6: Presentation • mechanisms for dealing with data representation • Layer 5: Session • mechanisms for establishing reliable communications between cooperating applications
IEEE Standards for networking (2) • Layer 4: Transport layer • provides reliable end-to-end error recovery mechanisms and flow control in the higher networking software • Firewall work here (an up to layer 7) • Layer 3: Network (hardware) • Establishes communication from station to station • Most high level Network protocols are in this layer • Routers work at this layer
IEEE Standards for networking (3) • Layer 2: Data link (hardware) • transmits and receives frames, MAC protocol belongs to this layer • Switches and bridges work at this layer. • layer 1: Physical (hardware) • standardizes the electrical, mechanical, and functional control of data circuits that connect to the transmission media • Hubs and repeaters work at this layer. • Layer 0: transmission media • cables between two network stations (includes wireless transmissions)
How OSI layer works. • A program, which "functions" at layer 7, (application layer) passes the message down to the next OSI levels. Each layer changes and adds information as needed. • the message goes out onto the network. • then back up the OSI levels (stripping off information needed only at that layer and changing the message as needed) until it reaches the application layer of the receiving program, which then reads the message based on the protocol used.
We are going to look at each layer, starting at layer 7 and working our way down to layer 0 • But remember, each layer is dependent on the one above it and below it. • An important concept in OSI is data encapsulation. Layer 7 data is encapsulated by Layer 4, then layer 3 encapsulates layer 4 data (which is encapsulated layer 7 data with more information), continuing this process down to layer 2. • Each layer also uses different terms as well.
Ethernet • Uses the OSI network model, but with different names. • Also compresses layer 5, 6, 7 into the same layer. Most network applications are written to the Ethernet standards (including O/Ss), • Because of the different names, which confuses people, the layer number is normally used as the name.
Layer 7: Application • Application protocol defines: • types of messages to be exchanged • requests and response messages • The syntax of the messages, fields and how they are delineated. • semantics of the fields (ie what they mean) • rules for when and how a program sends messages and replies to messages. • Such as the HTTP protocol.
Layer 6: Presentation layer • Deals with data representation • since UNIX, windows, Mac, the Internet, etc do not agree on what the data should look like, this layer deals with the multiple data representation standards. • These include whether the O/S uses ASCII standards or another character standard, big/little Endian byte ordering standards, etc.
Layer 5: Session layer • when a program asks for a network connection, it is this layer than establishes and maintains the connection • Sockets are created on this layer • These layer makes a request to Layer 4 for protocol. Layer 5 is a virtual layer in most respects. It's standard interface into layer 4. • A socket is created on this layer, but how all the communication is done is left up layer 4 and below.
Layer 4: Transport • Provides logical communication between application processes on different hosts. • Not a physical connection, but applications think so. • Applications don’t need to worry about physical infrastructure. • Two protocols provided and developer must choose one. • UDP (User Datagram Protocol) • TCP (Transmission control Protocol) • Other non-common transport protocols exist here
UDP in detail • [RFC 768] • multiplex/demultiplexing and error checking. • No connection establishment • No connection state • small packet header overhead • UDP adds 8B of header, while TCP adds 20B • Unregulated send rate
UDP segment • Contains • Source Port # • Destination Port # • Length of entire segment (including header) • Checksum • Application data or message. • No IP number, contained in the network layer header information. IP are layer 3 information.
full duplex data: bi-directional data flow in same connection MSS: maximum segment size connection-oriented: handshaking (exchange of control msgs) init’s sender, receiver state before data exchange flow controlled: sender will not overwhelm receiver point-to-point: one sender, one receiver reliable, in-order byte steam: no “message boundaries” pipelined: TCP congestion and flow control set window size send & receive buffers TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581
32 bits source port # dest port # sequence number acknowledgement number head len not used rcvr window size U A P R S F checksum ptr urgent data Options (variable length) application data (variable length) TCP segment structure URG: urgent data (generally not used) counting by bytes of data (not segments!) ACK: ACK # valid PSH: push data now (generally not used) # bytes rcvr willing to accept RST, SYN, FIN: connection estab (setup, teardown commands) Internet checksum (as in UDP)
Data Reliability • Why does TCP provide reliable data transfer and UDP does not? • In the Network layer (Layer 3), Best-effect delivery service is provided • Meaning the best attempt to deliver is made, but no guarantees, no orderly deliver, and no guarantee on the integrity of the data.
Host, router network layer functions: ICMP protocol • error reporting • router “signaling” IP protocol • addressing conventions • datagram format • packet handling conventions Routing protocols • path selection • RIP, OSPF, BGP routing table Layer 3: Network layer Transport layer: TCP, UDP Network layer Link layer physical layer
transport packet from sending to receiving hosts network layer protocols in every host, router three important functions: path determination: route taken by packets from source to dest. Routing algorithms switching: move packets from router’s input to appropriate router output call setup: some network architectures require router call setup along path before data flows network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical application transport network data link physical application transport network data link physical Network layer functions
Q: What service model for “channel” transporting packets from sender to receiver? guaranteed bandwidth? preservation of inter-packet timing (no jitter)? loss-free delivery? in-order delivery? congestion feedback to sender? Network service model The most important abstraction provided by network layer: ? ? virtual circuit or datagram? ? service abstraction
call setup, teardown for each call before data can flow each packet carries VC identifier every router on source-dest path s maintain “state” for each passing connection transport-layer connection only involved two end systems link, router resources (bandwidth, buffers) may be allocated to VC to get circuit-like performance. “source-to-dest path behaves much like telephone circuit” performance-wise network actions along source-to-dest path Virtual circuits
used to setup, maintain teardown VC used in ATM, frame-relay, X.25 not used in today’s Internet application transport network data link physical application transport network data link physical Virtual circuits: signaling protocols 6. Receive data 5. Data flow begins 4. Call connected 3. Accept call 1. Initiate call 2. incoming call
no call setup at network layer routers: no state about end-to-end connections no network-level concept of “connection” packets typically routed using destination host ID packets between same source-dest pair may take different paths application transport network data link physical application transport network data link physical Datagram networks: the Internet model 1. Send data 2. Receive data
Internet data exchange among computers “elastic” service, no strict timing req. “smart” end systems (computers) can adapt, perform control, error recovery simple inside network, complexity at “edge” many link types different characteristics uniform service difficult ATM (asynchronous transfer mode) evolved from telephony human conversation: strict timing, reliability requirements need for guaranteed service “dumb” end systems telephones complexity inside network Datagram or VC network: why?
Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links link cost: delay, $ cost, or congestion level 5 3 5 2 2 1 3 1 2 1 A D E B F C Routing protocol Routing Goal: determine “good” path (sequence of routers) thru network from source to dest. • “good” path: • typically means minimum cost path • other def’s possible
IP address: 32-bit identifier for host, router interface interface: connection between host, router and physical link router’s typically have multiple interfaces host may have multiple interfaces IP addresses associated with interface, not host, router 223.1.1.2 223.1.2.1 223.1.3.27 223.1.3.1 223.1.3.2 223.1.2.2 IP Addressing: introduction 223.1.1.1 223.1.2.9 223.1.1.4 223.1.1.3 223.1.1.1 = 11011111 00000001 00000001 00000001 223 1 1 1
IP datagram format IP protocol version number 32 bits total datagram length (bytes) header length (bytes) type of service head. len ver length for fragmentation/ reassembly fragment offset “type” of data flgs 16-bit identifier max number remaining hops (decremented at each router) upper layer time to live Internet checksum 32 bit source IP address 32 bit destination IP address upper layer protocol to deliver payload to E.g. timestamp, record route taken, specify list of routers to visit. Options (if any) data (variable length, typically a TCP or UDP segment)
IP datagram: 223.1.1.1 223.1.2.1 E B A 223.1.1.2 source IP addr 223.1.2.9 misc fields dest IP addr 223.1.1.4 data 223.1.2.2 223.1.3.27 223.1.1.3 223.1.3.2 223.1.3.1 Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 Getting a datagram from source to dest. routing table in A • datagram remains unchanged, as it travels source to destination • addr fields of interest here
223.1.1.1 223.1.2.1 A E B 223.1.1.2 223.1.2.9 223.1.1.4 223.1.2.2 223.1.3.27 223.1.1.3 223.1.3.2 223.1.3.1 Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 Getting a datagram from source to dest. misc fields data 223.1.1.1 223.1.1.3 Starting at A, given IP datagram addressed to B: • look up net. address of B • find B is on same net. as A • link layer will send datagram directly to B inside link-layer frame • B and A are directly connected
223.1.1.1 223.1.2.1 A E B 223.1.1.2 223.1.2.9 223.1.1.4 223.1.2.2 223.1.3.27 223.1.1.3 223.1.3.2 223.1.3.1 Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 Getting a datagram from source to dest. misc fields data 223.1.1.1 223.1.2.3 Starting at A, dest. E: • look up network address of E • E on different network • A, E not directly attached • routing table: next hop router to E is 223.1.1.4 • link layer sends datagram to router 223.1.1.4 inside link-layer frame • datagram arrives at 223.1.1.4 • continued…..
Dest. next 223.1.1.1 network router Nhops interface 223.1.2.1 E B A 223.1.1 - 1 223.1.1.4 223.1.1.2 223.1.2 - 1 223.1.2.9 223.1.2.9 223.1.1.4 223.1.3 - 1 223.1.3.27 223.1.2.2 223.1.3.27 223.1.1.3 223.1.3.2 223.1.3.1 Getting a datagram from source to dest. misc fields data 223.1.1.1 223.1.2.3 • Arriving at 223.1.4, destined for 223.1.2.2 • look up network address of E • E on same network as router’s interface 223.1.2.9 • router, E directly attached • link layer sends datagram to 223.1.2.2 inside link-layer frame via interface 223.1.2.9 • datagram arrives at 223.1.2.2!!! (hooray!)
network links have MTU (max.transfer size) - largest possible link-level frame. different link types, different MTUs large IP datagram divided (“fragmented”) within net one datagram becomes several datagrams “reassembled” only at final destination IP header bits used to identify, order related fragments IP Fragmentation & Reassembly fragmentation: in: one large datagram out: 3 smaller datagrams reassembly
length =4000 length =1500 length =1040 length =1500 ID =x ID =x ID =x ID =x fragflag =0 fragflag =1 fragflag =1 fragflag =0 offset =0 offset =0 offset =1480 offset =2960 IP Fragmentation and Reassembly One large datagram becomes several smaller datagrams MTU is min. of 576 bytes, so if MSS is 536b, fragmentation can eliminated
RIP ( Routing Information Protocol) • Distance vector algorithm • Included in BSD-UNIX Distribution in 1982 • Distance metric: # of hops (max = 15 hops) • Can you guess why? • Distance vectors: exchanged every 30 sec via Response Message (also called advertisement) • Each advertisement: route to up to 25 destination nets
RIP: Link Failure and Recovery If no advertisement heard after 180 sec --> neighbor/link declared dead • routes via neighbor invalidated • new advertisements sent to neighbors • neighbors in turn send out new advertisements (if tables changed) • link failure info quickly propagates to entire net • poison reverse used to prevent ping-pong loops (infinite distance = 16 hops)
RIP Tableprocessing • RIP routing tables managed by application-level process called route-d (daemon) • advertisements sent in UDP packets, periodically repeated
RIP Table example (continued) Router: giroflee.eurocom.fr Destination Gateway Flags Ref Use Interface -------------------- -------------------- ----- ----- ------ --------- 127.0.0.1 127.0.0.1 UH 0 26492 lo0 192.168.2. 192.168.2.5 U 2 13 fa0 193.55.114. 193.55.114.6 U 3 58503 le0 192.168.3. 192.168.3.5 U 2 25 qaa0 224.0.0.0 193.55.114.6 U 3 0 le0 default 193.55.114.129 UG 0 143454 • Three attached class C networks (LANs) • Router only knows routes to attached LANs • Default router used to “go up” • Route multicast address: 224.0.0.0 • Loopback interface (for debugging) • ASUWLINK: netstat –rn will show the route table
ICMP: Internet Control Message Protocol • used by hosts, routers, gateways to communication network-level information • error reporting: unreachable host, network, port, protocol • echo request/reply (used by ping) • network-layer “above” IP: • ICMP msgs carried in IP datagrams • ICMP message: type, code plus first 8 bytes of IP datagram causing error
ICMP • Reason for ICMP: • provides a mechanism for IP devices to use when they need to exchange information about network problems that are preventing delivery • Normally semi-permanent and/or non-transient errors. • problems that prevent all datagrams through to their destination.
ICMP (2) • IP datagram failed to be delivered because • next-hop router is unavailable • non-existent destination IP address or Port • ICMP error message are returned if is a semi-permanent or non-transient error • transient errors are ignored and left to the application or TCP to deal with. • why? the next packet should not have the same problem.
ICMP (3) • non-transient and semi-permanent errors • a fundamental problem with the network itself • a problem in the way that the sender is trying to use the network • destination becomes unreachable • IP Time-to-Live value reaching zero • Time-to-Live value based on hops, not actual time.
ICMP (4) • Also used for • exchanging general information about the network • Essentially ICMP is a collection of predefined messages • system chooses a message from a dictionary, places the code for the message into an ICMP-specific datagram and then sends it.
Ping and ICMP • Uses ICMP messages to test basic connectivity between two devices • The message created is for ICMP itself, so no other protocols are involved • ICMP is not a transport protocol and as such can not be used to deliver application data. • ICMP receives the message, which is an "echo request", then generates a response "echo reply" and sends it.
UNIX ping • example (ping k2 from meru) seker>ping k2 PING k2.cs.uwyo.edu (129.72.216.12): 56 data bytes 64 bytes from 129.72.216.12: icmp_seq=0 ttl=64 time=2.773 ms 64 bytes from 129.72.216.12: icmp_seq=1 ttl=64 time=1.720 ms ----k2.cs.uwyo.edu PING Statistics---- 2 packets transmitted, 2 packets received, 0.0% packet loss round-trip min/avg/max = 1.720/2.246/2.773 ms • MEANS: • icmp_seq is the sequence number from the icmp packet • ttl is time-to-live, time is the round trip time for the packet, so 2.773 milliseconds for the first line • And summary information
ICMP message types • Three main message types: • ICMP error message • There a problem to report • ICMP query message • Asking for information • ICMP query reply message • response to query • It is really a ICMP query message, it is easier to think about separately.