CCM 4300 Lecture 6 Computer Networks, Wireless and Mobile Communications Dr Shahedur Rahman s.rahman@mdx.ac.uk Room: T115 1
Recap of Last Session Access Control ALOHA FDMA, TDMA, CDMA OSI Model Internetworking Interconnecting Devices Repeater, Hub Switches, Bridges Router 2
Session Content Introduction to Protocols TCP/IP, IPX/SPX, NetBeui, AppleTalk Routing Protocols IGP/EGP, Static, Dynamic, RIP, OSPF Distance Vector and Link State protocols Dijkstra s algorithm Ethernet and the frame structure CSMA/CD Token Ring 3
Lesson objectives At the completion of this lesson you should be able to : - describe different types of routing protocols - describe the operation of Distance Vector and Link State routing protocols - describe the operation of Dijkstra s algorithm - understand the concept of Hierarchical routing - understand the Ethernet and its frame structure - describe operation of CSMA/CD and Token Ring in details 4
Routable and routing protocols A routable (routed) protocol is a protocol that contains enough network layer addressing information for user traffic to be directed from one network to another one. Routable protocols define the format and use of fields within a packet. Packets are delivered between networks. 5
Transmission Control Protocol/Internet Protocol (TCP/IP) Routed Network Environment Windows Client Segment 1 Segment 2 Windows Client TCP/IP Router TCP/IP 6
Internetwork Packet Exchange/Sequenced Packet Exchange (IPX/SPX) Windows 2000 NetWare Client Routed Network Environment Server Segment 1 Segment 2 IPX/SPX Router IPX/SPX 7
NetBIOS Enhanced User Interface (NetBEUI) Routed Network Environment Windows Client Segment 1 Segment 2 Windows Client NetBEUI NetBEUI is a small, fast, and efficient protocol Router that is limited to running on one segment. NetBEUI 8
AppleTalk Routed Network Environment Windows 2000 Macintosh Client Server Segment 1 Segment 2 AppleTalk Router AppleTalk 9
Routing protocols A routing protocol supports routed protocols to carry messages between networks. Routing protocols are used exchange information between routers, but they do not carry any user traffic. The exchange of information between routers is used to update routing tables maintained by routers and calculate the best path for packet transmission. Interior gateway protocols (IGPs): Routing protocols that run inside an enterprise. Examples: RIP, IGRP, EIGRP, and OSPF. Exterior gateway protocols (EGPs): Protocols that run outside an enterprise, or between autonomous systems (AS). (BGP4) 10
Routing Static Routes manually defined by the system administrator as the next hop to a destination. useful for security and traffic reduction. May contain alternative routes. Default Routes Manually defined by the system administrator as the path to take when no route to the destination is known. Dynamic Routing 11
Interior routing protocols Distance-vector routing protocol Requires that a router informs its neighbours of topology changes periodically. The routing table is passed to neighbour nodes Calculates the direction and distance to any link in a network. The cost of reaching a destination is calculated using various route metrics. Link-state routing protocol Performed by every switching node in the network Every node constructs a map of the connectivity of the network, in the form of a graph. The graph shows which nodes are connected to which other nodes The cost of reaching a destination is calculated using various route metrics. The collection of best next hops forms the node's routing table. Only connectivity related information is passed. (not the whole routing table) 12
Interior routing protocols RIP (Classful, V2 Classless): A distance-vector routing protocol (also known as Bellman-Ford algorithms). originally specified in RFC 1058. Key characteristics: Hop count is used as the metric for path selection. The maximum allowable hop count is 15. Routing updates are broadcast every 30 seconds by default. Most widely used protocol on the Internet. Classful, v2 Classless OSPF: A link-state routing protocol. Support variable-length subnet masking (VLSM) and Classless Inter- Domain Routing (CIDR) addressing models The link-state (also called shortest path first) approach recreates the exact topology of the entire internetwork (or at least of the partition in which the router is situated). Changes in the topology are detected very quickly. It computes the shortest path tree for each route using a method based on Dijkstra's algorithm, a shortest path first algorithm. 13
Dijkstra s Algorithm 1. Assign to every node a distance value. Set it to zero for our initial node and to infinity for all other nodes. 2. Mark all nodes as unvisited. Set initial node as current. 3. For current node, consider all its unvisited neighbours and calculate their distance (from the initial node). For example, if current node (A) has distance of 6, and an edge connecting it with another node (B) is 2, the distance to B through A will be 6+2=8. If this distance is less than the previously recorded distance (infinity in the beginning, zero for the initial node), overwrite the distance. 4. When we are done considering all neighbours of the current node, mark it as visited. A visited node will not be checked ever again; its distance recorded now is final and minimal. 5. Set the unvisited node with the smallest distance (from the initial node) as the next "current node" and continue from step 3 14
Ethernet Developed jointly Digital Equipment Corp., Intel & Xerox Ethernet was a standard 1980s Ethernet Blue Book and 1982 Ethernet Version 2.0 IEEE formed subcommittee 802.3 very similar to Ethernet (V2.0) Due to IEEE influences with U.S. and international standardisation authorities, IEEE 802.3 eventually became ISO standard IS88023 The two Ethernet specification are similar technical difference are related to differences in cable size, transceiver function, frame format & topology. So what is the bottom line! In casual usage, IEEE 802.3 is commonly referred to as Ethernet. What you should realise, though is that technically it is not Ethernet only V2.0 is considered Ethernet 15
CSMA: Carrier Sense Multiple Access CSMA: listen before transmit: Recap If channel sensed idle: transmit entire pkt If channel sensed busy, defer transmission - Persistent CSMA: retry immediately with probability p when channel becomes idle continuously monitors the channel (may cause instability) - Non-persistent CSMA: retry after random interval does not continuously monitor the channel human analogy: don t interrupt others! 16
CSMA/CD (Collision Detection) CSMA/CD: carrier sensing, deferral as in CSMA - collisions detected within short time - colliding transmissions aborted, reducing channel wastage - persistent or non-persistent retransmission collision detection: - easy in wired LANs: measure signal strengths, compare transmitted, received signals -difficult in wireless LANs: WHY? -receiver shut off while transmitting (more details later) human analogy: the polite conversationalist 17
CSMA/CD (Carrier Sense Multiple Access with Collision Detection) S 1 S 2 S 3 S 1 S 2 S 3 1. 3. Carrier Sense Multiple Access Multiple Access S 1 S 2 S 3 2. 4. S 1 S 2 S 3 Access Carrier Sense Random Access method, where every workstation on the Ethernet, can send messages (anytime!). This has been standardised in IEEE 802.3. Collision Detection 18
CSMA/CD: Collisions Station B Station A Frame from B Frame from A 19
CSMA/CD collision detection Jam Signal: make sure all other transmitters are aware of collision; 48 bits; Exponential Back-off: Goal: adapt retransmission attempts to estimated current load - heavy load: random wait will be longer first collision: choose K from {0,1}; delay is K x 512 bit transmission times after second collision: choose K from {0,1,2,3} after ten or more collisions, choose K from {0,1,2,3,4,,1023} 20
CSMA/CD : Random-Access-Algorithm Station is ready to send listen to channel new attempt Channel busy wait according to Backoff-Strategy channel free Send data and monitor channel ready collission detected send Jam-Signal 21
Ethernet Frame Structure Example: Sending IP datagram on Ethernet LAN - Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame Preamble: 7 bytes ( wake up ) with pattern 10101010 followed by one byte ( important stuff ) with pattern 10101011 used to synchronise receiver, sender clock rates This consists of 62 alternating 1's and 0's followed by the pattern 11. Strictly speaking the last byte which finished with the '11' is known as the "Start of Frame Delimiter". 22
Ethernet Frame Structure - cont Addresses: 6 bytes, frame is received by all adapters on a LAN and dropped if address does not match Length / Type: 2 bytes, indicates length (value <=1500) or the higher layer protocol (mostly IP but others such as Novell IPX and AppleTalk may be supported) CRC: 4 bytes, checked at receiver, if error is detected, the frame is simply dropped 23
Advantages / Disadvantages Advantages: - Fast Channel Access (for low utilisation) - Stable, high redundancy (no need for Segment Server or Monitor) Disadvantages: - No fixed runtimes, no guaranteed service classes/capacity availabe - Higher utilisation -> more collisions - "Unfair", stations can be blocked from sending 24
Taking-turns MAC: Token Ring Initially, chosen LAN architecture from IBM IEEE 802.5 Token Ring LANs operate at 4 Mbit/s and 16Mbit/s Attached resources vary from PCs to large computers Flow is unidirectional Physical topology is usually a star network, connecting each node back to a hub ( wire closet ) 25
Token Passing This technology is nearly extinct! control token passed from one node to next sequentially token message 3 octet concerns: - token overhead - single point of failure (token) - a node might accidentally neglects to release token 26
Advantages / Disadvantages Advantages: - No Collisions - Every station can send data within a fixed timeframe - Flexible topology - Effective / performant for large segments Disadvantages: - Complicated protocol / difficult error detection - Market acceptance 27
Summary Internetworking repeater, hub, switches, bridges, router Routing protocols Routing algorithms Medium Access Control CSMA CSMA/CD Token ring Ethernet, Ethernet Frame 28