* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Introduction
Asynchronous Transfer Mode wikipedia , lookup
Low-voltage differential signaling wikipedia , lookup
Computer network wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
Zero-configuration networking wikipedia , lookup
Network tap wikipedia , lookup
IEEE 802.1aq wikipedia , lookup
Airborne Networking wikipedia , lookup
Code-division multiple access wikipedia , lookup
IEEE 802.11 wikipedia , lookup
Serial digital interface wikipedia , lookup
Internet protocol suite wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
Introduction Basic Concepts • • • • • Line configuration Topology Transmission mode Categories of networks Internetworks Line Configuration • Two or more comm devices attached to a link • Link is a physical communicating path to transfer data Point – to – Point • Dedicated link b/w two devices • Entire capacity reserved between two devices • Normally actual path line of wire but microwaves & satellites links also possible – E.G Remote of a TV Multi Point Configuration • • • • Also called multidrop More than two devices share common link Capacity of channel shared If devices use link simultaneously – Spatially shared-in terms of space – Time shared-devices take turns Topology • • • • Way a NW is laid out physically or logically Two or more devices connect to a link Two or more links form a topology Geometrical representation of relationship of all links Possible Relationships • Peer to Peer : Devices share link equally – Ring – Mesh • Primary-Secondary :One device controls traffic & other must transmit through it – Star – Tree Mesh Topology Star Topology Tree Topology Bus Topology Ring Topology HYBRID TOPOLOGY The Internet • Loosely administered network of networks • Agreed procedures for access and intercommunication • Internetworking uses gateways, routers and firewalls • Gateways: convert data traffic from one network format to another. They link LANs to WANs and WANs to WANs • An Analog signal is a continuously varying electromagnetic wave. (Clock with arm) – Have infinite values – Used in early telephone systems. – Analog signals had the drawback that they attenuate (weaken) over long distances. Needed amplifiers to boost the signals. However, amplifiers distort the signal and introduce noise. • A Digital signal is a sequence of binary voltage pulses (0’s and 1’s).It is discrete. Have limited values normally 0 & 1 – Digital transmission avoids the noise problem by encoding the analog signal into digital form. The digitized version is then sent across the network. Periodic & Nonperiodic Signal • Both analog and digital signal can take two forms • Periodic Signal : A signal which completes a pattern within a measurable time frame called Period and repeats the pattern. A sine wave is the simplest Periodic signal • The completion of one pattern is called Cycle • Period is amount of time required to complete one full cycle • Nonperiodic Signal: Also called Non-periodic which changes pattern over time. • In data comm periodic analog signal (use less bandwidth) and nonperiodic digital signals Units of Periods & Frequencies Unit Equivale nt Unit hertz (Hz) Equivalen t Seconds (s) 1s 1 Hz Milliseconds (ms) 10–3 s kilohertz (KHz) 103 Hz Microseconds (ms) 10–6 s megahertz (MHz) 106 Hz Nanoseconds (ns) 10–9 s gigahertz (GHz) 109 Hz Picoseconds (ps) 10–12 s terahertz (THz) 1012 Hz Example 1 Express a period of 100 ms in microseconds, and express the corresponding frequency in kilohertz. Solution From Table 3.1 we find the equivalent of 1 ms. We make the following substitutions: 100 ms = 100 10-3 s = 100 10-3 106 ms = 105 ms Now we use the inverse relationship to find the frequency, changing hertz to kilohertz 100 ms = 100 10-3 s = 10-1 s f = 1/10-1 Hz = 10 10-3 KHz = 10-2 KHz Wave Length • Wave length is another characteristic of signal moving through medium. Distance signal can travel in one period • It binds period or frequency of sine wave to the propagation speed of the medium • Frequency is in dependent of medium but wavelength depends upon both frequency and the medium • Generally used in Optical Fiber Wave Length Wave length = Propagation sp × period = Propagation / frequency Wave length is normally measured in micrometers(microns) Bandwidth • Range of frequencies contained in composite signal is its BW • The bandwidth is a property of a medium: It is the difference between the highest and the lowest frequencies that the medium can satisfactorily pass If a periodic signal is decomposed into five sine waves with frequencies of 100,300, 500, 700, and 900 Hz, what is the bandwidth? Draw the spectrum, assuming all components have a maximum amplitude of 10 V. Solution B = fh - fl = 900 - 100 = 800 Hz The spectrum has only five spikes, at 100, 300, 500, 700, and 900 Bit rate & Bit Interval • Most digital signals are aperiodic thus period or frequency is not appropriate • Bit Interval is time required to send one single bit • Bit Rate is no of bits sent per second • Example: A digital signal has a bit rate of 2000 bps. What is the duration of each bit (bit interval) • Solution: The bit interval is the inverse of the bit rate Bit interval = 1/bitrate =1/ 2000 s = 0.000500 s=500microsec TRANSMISSION IMPAIRMENT • Signals travel through media, which are not perfect • The imperfection causes signal impairment • This means that the signal at the beginning of the medium is not the same as the signal at the end of the medium PERFORMANCE In networking, we use the term Bandwidth in two contexts: •The first, bandwidth in hertz, refers to range of frequencies in a composite signal or the range of frequencies that a channel can pass • The second, bandwidth in bits per second, refers to the speed of bit transmission in a channel or link. Throughput It is the measure of how fast we can send data. It is different from BW. We may have B BW but may send only T bps Example: A network with bandwidth of 10 Mbps can pass only an average of 12,000 frames per minute with each frame carrying an average of 10,000 bits. What is the throughput of this network? Solution We can calculate the throughput as The throughput is almost one-fifth of the bandwidth in this case. Propagation Time Time required for a bit to travel from source to destination Propagation Time = Distance / Propagation Speed Example: What is the propagation time if the distance between the two points is 12,000 km? Assume the propagation speed to be 2.4 × 108 m/s in cable. Solution We can calculate the propagation time as The example shows that a bit can go over the Atlantic Ocean in only 50 ms if there is a direct cable between the source and the destination. Transmission Time Time required for transmission of all the bits. Transmission Time = Message size / Bandwidth Example: What are the propagation time and the transmission time for a 2.5kbyte message (an e-mail) if the bandwidth of the network is 1 Gbps? Assume that the distance between the sender and the receiver is 12,000 km and that light travels at 2.4 × 108 m/s. Solution Example What are the propagation time and the transmission time for a 5Mbyte message (an image) if the bandwidth of the network is 1 Mbps? Assume that the distance between the sender and the receiver is 12,000 km and that light travels at 2.4 × 108 m/s. Solution Latency Latency or delay is the time for a message to completely arrive at a destination from the time 1st bit left the source Latency = Propagation Time + Transmission Time +Queuing Time + Processing delay Jitter Variance in delay. More prominent in real time applications Multiplexing •When BW of a link is grater than BW requirement of devices, Link can be shared •It is technique that allows simultaneous transmission of multiple signal across single data link Dividing a link into channels •MUX: Combines n lines to 1 •DEMUX: Separates back into its components •Link refers to physical path •Channel refers to portion of link that carries transmission Categories of multiplexing FDM • Analog Technique • Applied when BW of link greater than combined BW of signals to be transmitted • Each sending device modulate different CF, which in turn combined into a composite signal for transmission • CF separated by sufficient BW to accommodate modulated signal •Channels are separated by strips of unused BW called GUARDBAND that prevent signals from overlapping •To use FDM for digital signal covert it to analog signal first WDM • WDM same as FDM except that it involves light signals • WDM is an analog multiplexing technique to combine optical signals • Designed for Fiber optic • Using Fiber optic cable for one single line wastes available bandwidth Synchronous TDM •Digital process •Each connection occupies portion of time in a link •Fig shows only multiplexing and not switching i-e source 1 to any but fixed destination Statistical TDM • Ensure no slot is wasted. Slots are not pre-assigned • Slots are dynamically allocated to improve BW • Unlike Sync TDM, total speed of input lines can be greater than capacity of path • Slots can be less than devices • Mux scan the input line until slots are filled the transmits LAN Medium •Connected directly •Signal constrained by Physical limit of media OSI Model Please DO NOT Touch Steve’s Pet Alligator Data Encapsulation • Data Encapsulation is the process of adding a header to wrap the data that flows down the OSI model. • The 5 Steps of Data Encapsulation are: 1. The Application, Presentation and Session layers create DATA from users' input. 2. The Transport layer converts the DATA to SEGMENTS 3. The NW layer converts the Segments to Packets (datagram) 4. The Data Link layer converts the PACKETS to FRAMES 5. The Physical layer converts the FRAMES to BITS. Types of Switching A Datagram Network With 4 Switches (Routers) •All packets may take different route, arrive out of order, lost or dropped in the way •These NWs are called connectionless NWs as Switch does not keep info about connection state, no setup or tear down phase A virtual Circuit Network • A virtual-circuit NW is in between a circuit-switched and datagram NW. It has some characteristics of both • It has setup, data transfer & tear down phases • Resources are allocated during setup phase as in circuit switched NW or on demand as in datagram NWs • Data are packetized & each packet carries an address (local jurisdiction only; add of next switch) in a header • All packets follow same path & implemented at data link layer • Virtual circuit NW is implemented in Datalink layer, A virtual Circuit Network Single-bit error Burst error of length 5 Protocols • Can not be used in real life High Level Data Link Control Protocol - HDLC • High-level Data Link Control (HDLC) is a bitoriented protocol for communication over point-topoint and multipoint links. It implements the ARQ mechanisms • HDLC is most important Data link protocol • It is widely used • Supports both Half Duplex & Full Duplex TXn and Both pt– to - pt and pt–to – multipoint • It has been developed by ISO and the standard is called (ISO 3309, ISO 4335) Frame Format Flag Fields: Delimit frame at both ends with unique pattern 01111110 for sync Single frame may be used to close one frame and open another Receiver hunts for flag sequence to synchronize Not needed for pt-to-pt link but added for uniformity HDLC Frame Types • Information Frames: User data & control info • Supervisory Frames: Control info only • Unnumbered Frames: System Management info Multiple Access When nodes are connected to a common link, there is a need of multiple –access protocol to coordinate access to the link. Multiple-Access Protocols Pure ALOHA • Original ALOHA is called pure ALOHA • After collision each node waits for random time before resending frame. After maximum tries node give up and try later Slotted ALOHA • Time is divided in to slots and each node must transmit at the start of time slot • If node misses start of slot, it waits until start of next slot • There is collision if 2 nodes transmit at start of slot CSMA / CD • CSMA does not define procedure for a collision. That's why it was never implemented • CSMA / CD adds method to handle collision • Node uses one of the persistent strategies • Any station can send frame, then monitors medium, if senses collision , frames are sent again • To reduce probability of collision 2nd time, node waits , it needs to back off • In the exponential back off method, node waits an amount of time between 0 and 2 k × max_ propagation_ time where k is the no of attempted Transmissions • 1st time = between 0 & 21 × max_ propagation_ time CSMA / CA • Why not CSMA/CD in WLAN: In CSMA / CD node is able to receive while transmitting – If no collision occurs node receives own signal (same energy as that of sent signal) – If collision occurs node receives own plus other node signal (detected energy is almost double) • In wireless, sent energy looses its strength so received signal has little energy, therefore collision may add only 5-10% of additional energy. This is not useful for effective collision detection • Therefore we need to avoid collision as it can not be detected • Collisions are avoided through 3 strategies; Inter frame spaces, contention window and Reservation • Node needs to make reservation before sending data • Time divided in to intervals • In each interval reservation frame precedes data frame in that interval • If there are N nodes , there are N reservation minislots in reservation frame • Each minislot belongs to a node • When node needs to send data, it makes reservation in its own minislot • Node that made reservation can send data after the reservation frame Polling • It works with topologies in which a device is designated as Primary Station and others as Secondary Stations • All data exchange through Primary even if its not the destination • Primary controls the link, Secondary follow instructions • Primary decides which node may transmit therefore its always the initiator • If Primary wants to receive data, its asks Secondary if they have data – This function is called POLLING • If Primary wants to send data, its asks Secondary Token Passing • A node is authorized to send data if it receives as special frame called TOKEN • Nodes arranged around a ring. Each node has a predecessor and Successor • When no data around the ring, Token circulates • If node needs to send data, it waits fir the token • Node captures Token and send one or more data frames either all data frame sent or allocated time expires • Then it releases the Token to be captured by next waiting node (successor) • Priority or reservation may be added to the process IEEE STANDARDS • In 1985, the Computer Society of the IEEE started a project, called Project 802, to set standards to enable intercommunication among equipment from a variety of manufacturers • Project 802 is a way of specifying functions of the physical layer and the data link layer of major LAN protocols Data Link Layer • Logical Link Control: Performs flow control, error control and part of framing duties – LLC provides one single link control to all IEEE standards • MAC layer provides different protocols to different LANs • Framing: LLC defines PDU similar to HDLC. Header contains flow and error control functions • LLC Header also defines upper layer protocol at source and dest. that uses LLC called DSAP & SSAP (not used by IP) • Other fields including access methods have been moved to MAC layer. Physical layer is media Ethernet • The term Ethernet refers to the family of local-area network (LAN) products covered by the IEEE 802.3 standard that defines what is commonly known as the CSMA/CD protocol • Originally developed by Xerox in 1976 • Later extended by DEC (digital Equipment Corporation), Intel and Xerox – Called Ethernet • Three data rates are currently defined for operation over optical fiber and twisted-pair cables: Standard Ethernet (10 Mbps), Fast Ethernet (100 Mbps) and Gigabit Ethernet (1Gbps) Connecting Devices • Five kinds of connecting devices; Repeaters, Hubs, Bridges, Layer Two and Layer Three Switches • Repeaters and Hubs operate in the 1st layer • Bridges and layer 2 switches on 1st two layers • Routers and layer 3 switches on 1st three layers IPV4 Datagram Format Supporting Protocols in TCP/IP at NW Layer • • • • ARP (Address Resolution Protocol ) RARP ICMP IGMP Internet Control Message Protocol (ICMP) •The IP protocol has no error-reporting or errorcorrecting mechanism. The IP protocol also lacks a mechanism for host and management queries. The Internet Control Message Protocol (ICMP) has been designed to compensate for the above two deficiencies. It is a companion to the IP protocol •ICMP is a mechanism used by hosts and routers to send notification of datagram problems back to the sender if some thing has gone wrong •It handles both control and error msg. It only report problem but not correct it •Since datagram carries the add of original sender & final recipient, it does not know the add of previous IGMP (Internet Group Message Protocol) • The IGMP has been designed to help a multicast router identify the hosts in a LAN that are member of a multicast group. It is a companion to the IP protocol. • What is multicasting ? Addressing • Each device on the Internet id identified through IP add • An IP address is a 32-bit address • The IP addresses are unique and universal • The address space of IPv4 is2 32 or 4,294,967,296 • Dotted-decimal notation Netid & Hostid Subnetting • Without subnetting, IP address with 2-level of hierarchy (consist of netid and hostid) is not enough. • Consider the org. which has 2-level of hierarchy cannot have more than one physical network. • With this scheme, the org. is limited to two levels of hierarchy. The hosts cannot be organized into groups, and all of the hosts are at the same level. The org. has one network with many hosts. • One solution to this problem is subnetting, the further division of a network into smaller networks called subnetworks. Network is divided into 3-subnetworks. • In next fig., the rest of the Internet is not aware that the network is divided into 3 physical subnetworks: the three subnetworks still appear as a single network to the rest of Internet. E.g. A packet destined Subnetting • Subnetting is done borrowing bits form host portion. Mask of all zero’s in the host field specify the entire network • Number of bits borrowed from the host portion are identified by subnet mask. Example: Network 131.10.0.0, Mask for Class B 255.255.0.0. An eight bit mask will be 255.255.255.0. You can have 254 subnets and 254 hosts per subnet • How to find Subnet add: Use bit wise AND operator • Rules: 1. Bytes in IP add that correspond to 255 in the mask will be repeated in Sub Net add 2. Bytes in IP add that correspond to 0 in the mask will Default Masks Network address can be found by applying the default mask to any address in the block (including itself). It retains the netid of the block and sets the hostid to 0s. Private IP Addresses • Another approach to conservation of the IP address space • IP addresses are globally unique by reserving part of the address space for networks which are used exclusively within a single organization and which do not require IP connectivity to the Internet • There are three ranges of addresses which have been reserved by IANA for this purpose: TCP/IP and the OSI Model Process to Process Comm • TPT layer provides process to process comm through Client Server methodology – Process on local host is called Client and it gets services from remote host called Server – OS support no of processes to be run concurrently Addressing • Processes are delivered to transport layer add called Port Number which are 16 bits integers from 0 – 65535 • Client process randomly chose a Port No where as Server Process are designated a predefined No called Well known ports assigned by central authority (1-1023) – User-defined ports (range 1024 or greater) IANA(I/N Assigned No Authority) Ranges •Registered: Not assigned or controlled by IANA. Can be registered to avoid duplication •Dynamic: Neither controlled nor registered Socket Add • Each process need two identifiers – IP add & Port no called Socket • A transport layer protocol needs a pair of Socket add i.e. Client Socket and Server Socket – Part of TCP / UDP Header User Datagram Protocol (UDP) • • • • UDP is called connectionless unreliable protocol. It has no flow & error control mechanism UDP message called user datagram It is very simple protocol with no over heads thus suitable for protocols that requires simple request response comm with little flow & error control concerns • Not used for app such a FTP that send bulk of data UDP Header • Fixed header size of 8 bytes • Checksum is over entire datagram. Calculation is optional TCP • It is reliable connection oriented protocol that creates virtual connection • TCP Services: – Process to process comm – Stream Delivery Service – Buffered Service – Full Duplex Service – Connection Oriented Service • TCP provides reliable, end-to-end data Txn with flow and error control. E.G Telnet, FTP, WWW, POP, IMAP, etc. TCP Segment Format Three-step Connection Establishment Not actual but imaginary byte What is Sync Flooding Attack? How cookies help in overcoming it? Connection Termination using ThreeWay Handshaking Four - Way Handshaking Half-Close