Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Communication Networks

Similar presentations


Presentation on theme: "Introduction to Communication Networks"— Presentation transcript:

1 Introduction to Communication Networks
Lecture 5-6 LAN continuation + Network Layer Introduction to Communication Networks 2/2006

2 Extending Local Area Networks
Motivation Distance limitation Performance degradation as number of users increases Hub Repeater Bridge Switch Introduction to Communication Networks 2/2006

3 Hub Hardware device Creates one LAN segment
Each Ethernet frame received on one port will be forwarded to all other ports Logically operates on signals and propagates each incoming signal to all connections Creates one collision domain Introduction to Communication Networks 2/2006

4 Repeaters R Hardware device Connects two LAN segments Repeater
Ethernet segment Ethernet segment R Direct connection Hardware device Connects two LAN segments Copies signal from one segment to the other Amplifies signals from one segment and sends to the other Propagates noise and collisions Operates in two directions simultaneously Repeater Introduction to Communication Networks 2/2006

5 Bridges Hardware, Link Level device Connects two LAN segments
Forwards frames stores and forwards Ethernet frames examines frame header and selectively forwards frame based on MAC destination address when frame is to be forwarded on segment, uses CSMA/CD to access segment Does not forward noise or collisions Learns addresses and filters Allows independent transmission transparent hosts are unaware of presence of bridges plug-and-play, self-learning bridges do not need to be configured Introduction to Communication Networks 2/2006

6 Bridges: traffic isolation
Bridge installation breaks LAN into LAN segments Bridges filter packets: same-LAN-segment frames not usually forwarded onto other LAN segments segments become separate collision domains bridge collision domain = hub = host LAN segment Introduction to Communication Networks 2/2006

7 Bridge Learning Algorithm
Listen in promiscuous mode (all frames are copied & analyzed) Watch source address in incoming frames Make list of computers on each segment Only forward if necessary Always forward broadcast/multicast Introduction to Communication Networks 2/2006

8 Bridge Learning cont. A bridge has a bridge table
entry in bridge table: (Node LAN Address, Bridge Interface, Time Stamp) stale entries in table dropped (TTL can be 60 min) bridges learn which hosts can be reached through which interfaces when frame received, bridge “learns” location of sender: incoming LAN segment records sender/location pair in bridge table Introduction to Communication Networks 2/2006

9 Filtering/Forwarding
When bridge receives a frame: index bridge table using MAC dest address if entry found for destination then{ if dest on segment from which frame arrived then drop the frame else forward the frame on interface indicated } else floodforward on all but the interface on which the frame arrived Introduction to Communication Networks 2/2006

10 Bridge example Suppose C sends frame to D and D replies back with frame to C. Bridge receives frame from C notes in bridge table that C is on interface 1 because D is not in table, bridge sends frame into interfaces 2 and 3 frame received by D Introduction to Communication Networks 2/2006

11 Bridge example D generates frame for C, sends bridge receives frame
notes in bridge table that D is on interface 2 bridge knows C is on interface 1, so selectively forwards frame to interface 1 Introduction to Communication Networks 2/2006

12 Distributed Spanning Tree Algorithm
Introduction to Communication Networks 2/2006

13 Spanning Tree Algorithm
The network of bridges is a graph. Usually built in hierarchical way If bridges at top hierarchy fails -> LAN can become disconnected Therefore LANs are usually connected in more than one point (redundancy) Can cause same information to be copied many times over the LAN  can even crash the network. The Spanning Tree Protocol finds a a subgraph that spans all the vertices without loops. Spanning => all LAN segments are included. Tree => the topology has no loops. The distributed protocol runs: To determine which bridge is the root of the tree, and Each bridge turns off ports that are not part of the tree. Introduction to Communication Networks 2/2006

14 Example Spanning Tree B8 B3 B5 Protocol operation: B7 B2 B1 B6 B4
Picks a root For each LAN, picks a designated bridge that is closest to the root. All bridges on a LAN send packets towards the root via the designated bridge. B8 Introduction to Communication Networks 2/2006

15 Example Spanning Tree Spanning Tree: Root B8 B3 B5 B7 B2 B1 B6 B4
Introduction to Communication Networks 2/2006

16 Switch High performance multiple interface bridge!
Physically similar to a hub Logically similar to a bridge Operates on packets Understands addresses Only forwards when necessary More fancy forwarding methods Permits separate pairs of computers to communicate at the same time (full duplex) Introduction to Communication Networks 2/2006

17 Typical Configuration
Introduction to Communication Networks 2/2006

18 Network Layer Protocol Stack App Transport Network IP + Routing
Data Hdr IP Datagram Link Introduction to Communication Networks 2/2006

19 Network Layer Role of the Network Layer Main Functions:
Move packets from sending host to receiving host. Main Functions: Host-to-Host delivery: Internetworking Addressing Routing Path determination  Routing Algorithms Forwarding  select the correct outgoing port Call Setup: Some network layer architectures (ATM, RSVP) requires that routers along a chosen path will agree on the path. Packetizing Fragmenting Introduction to Communication Networks 2/2006

20 The Routing Problem “A” “B” R1 R2 R3 R4
How does R1 choose a route to host B? Introduction to Communication Networks 2/2006

21 Switching Introduction to Communication Networks 2/2006

22 Circuit Switching It’s the method used by the telephone network.
A B Source Destination It’s the method used by the telephone network. A call has three phases: Establish circuit from end-to-end (“dialing”), Communicate, Close circuit (“tear down”). Originally, a circuit was an end-to-end physical wire. Nowadays, a circuit is like a virtual private wire: each call has its own private, guaranteed data rate from end-to-end. Introduction to Communication Networks 2/2006

23 Circuit Switching Telephone Network
Source “Caller” Central Office “C.O.” Destination “Callee” Trunk Exchange Each phone call is allocated 64kb/s. So, a 2.5Gb/s trunk line can carry about 39,000 calls. Introduction to Communication Networks 2/2006

24 Packet Switching Virtual circuit approach – relationship between all packets belonging to a message is preserved – a single route is chosen, and all packets take that route Datagram approach – each packet is treated independently of all others – thus, packets in the same message can take different routes, and possibly arrive out of order Introduction to Communication Networks 2/2006

25 Datagram approach It’s the method used by the Internet.
Each packet is individually routed packet-by-packet, using the router’s local routing table. The routers maintain no per-flow state. Different packets may take different paths. Several packets may arrive for the same output link at the same time, therefore a packet switch has buffers. Introduction to Communication Networks 2/2006

26 Store-and-Forward Basic paradigm used in packet switched network
Sent from source computer Travels router/switch-to-router/switch Delivered to destination Router ‘‘Stores’’ packet in memory Examines packet’s destination address ‘‘Forwards’’ packet toward destination Introduction to Communication Networks 2/2006

27 Routing Table Configuration
Manual Table created by hand Useful in small networks Useful if routes never change Automatic routing Software creates/ updates table Needed in large networks Changes routes when failures occur Introduction to Communication Networks 2/2006

28 Routing & Graph Theory Graph Node models switch Edge models connection
Introduction to Communication Networks 2/2006

29 An algorithm ensuring all nodes get a copy of an update packet
Reliable Flooding An algorithm ensuring all nodes get a copy of an update packet R1 Un update packet: Node sequence update id number data Algorithm: A source node sends out the packet on all ports Each node receiving the packet checks the sequence no. and if more recent, stores it and sends it out on all ports but the ingress port Each node receiving the packet acks the directly node which sent it A sending node, not receiving an ack within a T/O, retransmits Introduction to Communication Networks 2/2006

30 Reliable Flooding Advantages: Reliable transmission. Works also when network topology is unknown. If the network is connected, every node gets a copy of the packet Disadvantages: Some nodes receive multiple copies of the packet Packets can go round in loops forever. Waste of network resources To prevent looping for ever, a TTL is added to packet Useful only for important updates – not for regular routing Node sequence TTL update id number data Introduction to Communication Networks 2/2006

31 Routing Approaches Source Routing Virtual Circuit Destination Routing
complete path in packet Used in practice in ad hoc networks Virtual Circuit Path is setup in advance Used in practice in ATM/MPLS/RSVP Destination Routing Forwarding according to destination address Used in practice in IP networks Introduction to Communication Networks 2/2006

32 Routing Algorithm classification
Global or decentralized information? Global: all routers have complete topology, link cost info “link state” algorithms Decentralized: router knows physically-connected neighbors, link costs to neighbors iterative process of computation, exchange of info with neighbors “distance vector” algorithms Static or dynamic? Static: routes change slowly over time Dynamic: routes change more quickly periodic update in response to link cost changes Introduction to Communication Networks 2/2006

33 Shortest Path Algorithms
Algorithms from graph theory Dijkstra Bellman-Ford May be distributed (No central authority) A Router Must learn route to each destination Only communicates with directly attached neighbors Introduction to Communication Networks 2/2006

34 Shortest Path Label on edge represents ‘‘distance’’
Possible distance metric Geographic distance Economic cost Inverse of capacity Introduction to Communication Networks 2/2006

35 Algorithms For Computing Shortest Paths
Distance Vector (DV) Routers exchange information in their routing tables  Local Link-state Routers exchange link status information  Global Algorithm has complete information about the network. Both used in practice Introduction to Communication Networks 2/2006

36 Distance Vector Periodic, two-way exchange between neighbors
Iterative, asynchronous and distributed During exchange, switch sends List of pairs Each pair gives (destination, distance) Receiver Compares each item in list to local routes Changes routes if better path exists Introduction to Communication Networks 2/2006

37 Distance Vector Intuition
Let N be neighbor that sent the routing message V be destination in a pair D be distance in a pair C = D + WN (WN the cost to reach the sender) If no local route to V or local route has cost greater than C, install a route with next hop N and cost C else ignore pair Introduction to Communication Networks 2/2006

38 Example Of Distance Vector Routing
Consider transmission of one DV message Node 2 sends to 3, 5, and 6 Node 6 installs cost 8 route to 2 Later 3 sends update to 6 6 changes route to make 3 the next hop for destination 2 Introduction to Communication Networks 2/2006

39 Bellman-Ford Algorithm
Objective: Finds the minimum cost path from every node to every other node Example: Determine the route from (R1, …, R7) to R8 that minimizes the cost. R5 R3 R7 R6 R4 R2 R1 1 4 2 3 R8 Examples of link cost: Distance, data rate, price, congestion/delay, … Introduction to Communication Networks 2/2006

40 B-F is a Distance Vector Algorithm
1 1 4 R1 R2 R4 R6 3 2 2 2 R7 R5 2 3 4 R3 R8 The solution is a spanning tree with R8 as the root of the tree (link costs are cost in the direction to R8). The Bellman-Ford Algorithm finds all spanning trees. Introduction to Communication Networks 2/2006

41 The Distributed Bellman-Ford Algorithm
Introduction to Communication Networks 2/2006

42 Bellman-Ford Algorithm - Example
1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8 R1 Inf R2 R3 4, R8 R4 R5 2, R8 R6 R7 3, R8 R2 R5 R7 R4 R6 R8 R3 R1 1 4 2 3 Introduction to Communication Networks 2/2006

43 Bellman-Ford Algorithm - Example
1 4 2 3 R1 6, R3 R2 4, R5 R3 4, R8 R4 6, R7 R5 2, R8 R6 R7 3, R8 R8 R6 R4 R2 R1 R3 R5 1 4 2 3 R7 Solution R1Z 5, R2 R2 4, R5 R3 4, R8 R4 R5 2, R8 R6 R7 3, R8 Introduction to Communication Networks 2/2006

44 Bellman-Ford Algorithm
Questions: How long can the algorithm take to run? How do we know that the algorithm always converges? What happens when link costs change, or when routers/links fail? Introduction to Communication Networks 2/2006

45 Link-State Routing Overcomes instabilities in DV
Pair of routers periodically Test link between them Broadcast link status message Router Receives status messages Computes new routes Uses Dijkstra’s algorithm Introduction to Communication Networks 2/2006

46 Dijkstra’s Shortest Path First (SPF) Alg
Objective: Finds the minimum cost path from every node to every other node Executed by every node based on the following complete network topology and link costs When completed at node, say R8, C(n) will contain the minimum cost path from R8 to node n Introduction to Communication Networks 2/2006

47 Dijkstra’s Shortest Path First (SPF) Alg
Each router calculates lowest cost path to all its neighbors, starting from itself; At each step of the algorithm, a router adds a node to M to which it can reach with its current minimum cost For every node outside M, updates the minimum path cost to it Introduction to Communication Networks 2/2006

48 Getting Network Topology for SPF
Done by the Reliable Flooding algorithm that sends the following Link State Packet (LSP): LSP are sent out whenever the state of an attached link changes (up/down), or when an Interval Timer expires Node sequence TTL attached links id number and their costs Introduction to Communication Networks 2/2006

49 Dijkstra’s Shortest Path First Algorithm- Example
1 4 2 3 R8 Introduction to Communication Networks 2/2006

50 Dijkstra’s Shortest Path First Algorithm- Example
1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8 is the minimum Introduction to Communication Networks 2/2006

51 Dijkstra’s Shortest Path First Algorithm- Example
is the minimum R1 1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8 Introduction to Communication Networks 2/2006

52 Dijkstra’s Shortest Path First Algorithm- Example
is the minimum R1 1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8 Introduction to Communication Networks 2/2006

53 Dijkstra’s Shortest Path First Algorithm- Example
1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8 is the minimum Introduction to Communication Networks 2/2006

54 Dijkstra’s Shortest Path First Algorithm- Example
1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8 is the minimum Introduction to Communication Networks 2/2006

55 Dijkstra’s Shortest Path First Algorithm- Example
1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8 is the minimum Introduction to Communication Networks 2/2006

56 Dijkstra’s Shortest Path First Algorithm- Example
1 1 4 R2 R4 R6 2 3 2 2 R7 3 R5 2 R3 4 R8 is the minimum Introduction to Communication Networks 2/2006

57 Comparison of LS and DV algorithms
Message complexity LS: with n nodes, E links, O(nE) msgs sent DV: exchange between neighbors only larger msgs convergence time varies Speed of Convergence LS: requires O(nE) msgs may have oscillations DV: convergence time varies may be routing loops count-to-infinity problem Robustness: what happens if router malfunctions? LS: node can advertise incorrect link cost each node computes only its own table DV: DV node can advertise incorrect path cost each node’s table used by others error propagate thru network Introduction to Communication Networks 2/2006

58 Network Services Paradigms
Connection Oriented Paradigm: phone calls 3 phase protocol: connection establishment data transmission clearing Example: ATM (Asynchronous Transfer Mode) Connectionless Paradigm: snap mail 1 Phase protocol Example: IP (Internet Protocol) Introduction to Communication Networks 2/2006

59 Connection-Oriented Networks (CON)
Sender Requests ‘‘connection’’ to receiver Waits for network to form connection Leaves connection in place while sending data Terminates connection when no longer needed Network Receives connection request Forms path to specified destination and informs sender Transfers data across connection Removes connection when sender requests Introduction to Communication Networks 2/2006

60 Connectionless Networks (CLN)
Sender Forms packet to be sent Places address of intended recipient in packet Transfers packet to network for delivery Network Uses destination address to forward packet Each packet handled independently One phase protocol No setup required before transmitting data No cleanup required after sending data Introduction to Communication Networks 2/2006

61 Network layer service models:
Architecture Internet ATM Service Model best effort CBR VBR ABR UBR Bandwidth none constant rate guaranteed avg. rate minimum Loss no yes Order Timing Congestion feedback no (inferred via loss) congestion Guarantees ? Internet model being extended: Intserv, Diffserv More in the QoS lecture Introduction to Communication Networks 2/2006

62 CLN vs CON CON - Connection Oriented Networks CLN - Connectionless
More intelligence in network Can reserve bandwidth Connection setup overhead Well-suited to real-time applications CLN - Connectionless Less overhead Permits asynchronous use Allows broadcast/ multicast Introduction to Communication Networks 2/2006

63 Routing in the Internet
The Internet uses hierarchical routing The Internet is split into Autonomous Systems (AS’s) Examples of AS’s: Stanford (32), HP (71), MCI Worldcom (17373) Try (unix): whois –h whois.arin.net ASN “MCI Worldcom” Within an AS, the administrator chooses an Interior Gateway Protocol (IGP) Examples of IGPs: RIP (rfc 1058), OSPF (rfc 1247). Between AS’s, the Internet uses an Exterior Gateway Protocol AS’s today use the Border Gateway Protocol, BGP-4 (rfc 1771) Introduction to Communication Networks 2/2006

64 Interior Routing Protocols
RIP (Routing Information Protocol) Uses distributed Bellman-Ford algorithm (DV). Updates (in a RIP packet) are sent every 30 seconds. No authentication in RIP ver. 1; password in ver. 2 Originally in BSD UNIX. OSPF (Open Shortest Path First) Link-state updates (LSU) sent (using reliable flooding) as and when required. Every router runs Dijkstra’s algorithm. Authenticated updates. Autonomous system may be partitioned into “areas”. Allows multiple paths with the same cost to a destination Introduction to Communication Networks 2/2006

65 Interior Routing Protocols
Authentication of LSU packets To prevent, e.g., forged advertisement of zero cost Early OSPF uses 8-byte password Strong cryptography in newer versions “Areas” as a further hierarchy layer An AS can be partitioned into “areas” Adds scalability to the OSPF alg A router knows only how to reach the “areas” – not to all networks Introduction to Communication Networks 2/2006


Download ppt "Introduction to Communication Networks"

Similar presentations


Ads by Google