Node Lookup in P2P Networks. Node lookup in p2p networks Section 5.2.11 in the textbook. In a p2p network, each node may provide some kind of service.

Slides:



Advertisements
Similar presentations
1 Routing Protocols I. 2 Routing Recall: There are two parts to routing IP packets: 1. How to pass a packet from an input interface to the output interface.
Advertisements

University of Calgary – CPSC 441.  We need to break down big networks to sub-LANs  Limited amount of supportable traffic: on single LAN, all stations.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
IP Forwarding Relates to Lab 3.
Packet Switching COM1337/3501 Textbook: Computer Networks: A Systems Approach, L. Peterson, B. Davie, Morgan Kaufmann Chapter 3.
Node Lookup in Peer-to-Peer Network P2P: Large connection of computers, without central control where typically each node has some information of interest.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 22 Omar Meqdadi Department of Computer Science and Software Engineering University.
Networks: Routing1 Network Layer Routing. Networks: Routing2 Network Layer Concerned with getting packets from source to destination Network layer must.
Introduction to Peer-to-Peer (P2P) Systems Gabi Kliot - Computer Science Department, Technion Concurrent and Distributed Computing Course 28/06/2006 The.
Oct 21, 2004CS573: Network Protocols and Standards1 IP: Addressing, ARP, Routing Network Protocols and Standards Autumn
CSEE W4140 Networking Laboratory Lecture 4: IP Routing (RIP) Jong Yul Kim
CSEE W4140 Networking Laboratory Lecture 4: IP Routing (RIP) Jong Yul Kim
Spring Routing & Switching Umar Kalim Dept. of Communication Systems Engineering 06/04/2007.
EECC694 - Shaaban #1 lec #7 Spring The OSI Reference Model Network Layer.
Networks: Routing1 Network Layer Routing. Networks: Routing2 Network Layer Concerned with getting packets from source to destination. The network layer.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
CECS 474 Computer Network Interoperability WAN Technologies & Routing
MODULE IV SWITCHED WAN.
CS 453 Computer Networks Lecture 24 IP Routing. See…
Network Layer (3). Node lookup in p2p networks Section in the textbook. In a p2p network, each node may provide some kind of service for other.
Routing Information Protocol (RIP). Intra-and Interdomain Routing An internet is divided into autonomous systems. An autonomous system (AS) is a group.
Routing Protocols RIP, OSPF, BGP. A Routing Protocol’s Job Is to Find a “Best” Path between Any Pair of Nodes Routers in a network exchange their routing.
1 Introducing Routing 1. Dynamic routing - information is learned from other routers, and routing protocols adjust routes automatically. 2. Static routing.
Review of Networking Concepts Part 1: Switching Networks
Network Layer (4). Classless Addressing Addresses allocated in contiguous blocks – Number of addresses assigned always power of 2 Network portion of address.
ECE 466 Switching Networks. ECE 466 A communication network provides a scalable solution to connect a large number of end systems Communication Networks.
1 Flow Identification Assume you want to guarantee some type of quality of service (minimum bandwidth, maximum end-to-end delay) to a user Before you do.
Network and Communications Ju Wang Chapter 5 Routing Algorithm Adopted from Choi’s notes Virginia Commonwealth University.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Unicast Routing Protocols.
The Network Layer Introduction  functionality and service models Theory  link state and distance vector algorithms  broadcast algorithms  hierarchical.
CSCI 465 D ata Communications and Networks Lecture 15 Martin van Bommel CSCI 465 Data Communications & Networks 1.
Node Lookup in P2P Networks. Node lookup in p2p networks In a p2p network, each node may provide some kind of service for other nodes and also will ask.
SIGCOMM 2001 Lecture slides by Dr. Yingwu Zhu Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications.
COP 5611 Operating Systems Spring 2010 Dan C. Marinescu Office: HEC 439 B Office hours: M-Wd 2:00-3:00 PM.
Netprog: Routing and the Network Layer1 Routing and the Network Layer (ref: Interconnections by Perlman)
Routing Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific Institute of Information.
Routing protocols. Static Routing Routes to destinations are set up manually Route may be up or down but static routes will remain in the routing tables.
Routing Algorithms and IP Addressing Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality.
Univ. of TehranComputer Network1 Advanced topics in Computer Networks University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani.
Connection-orientated Service. Connection in data networks Another type of network, such as the telephone network, was developed based on the connection.
18-WAN Technologies and Dynamic routing Dr. John P. Abraham Professor UTPA.
1 Switching and Forwarding Sections Connecting More Than Two Hosts Multi-access link: Ethernet, wireless –Single physical link, shared by multiple.
Network Layer (2). Review Physical layer: move bits between physically connected stations Data link layer: move frames between physically connected stations.
Computer Networks Chapter 8 – Circuit Switching versus Packet Switching.
Lecture 7. Building Forwarding Tables There are several methods Static Method Dynamic Methods Centralized Distributed Distance Vector Link State.
Distance Vector Routing
1587: COMMUNICATION SYSTEMS 1 Wide Area Networks Dr. George Loukas University of Greenwich,
WAN Technologies. 2 Large Spans and Wide Area Networks MAN networks: Have not been commercially successful.
Chapter 29 Peer-to-Peer Paradigm Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Network Layer Routing Networks: Routing.
Chapter 3: Packet Switching (overview)
Network Layer.
Routing Information Protocol (RIP)
IP Forwarding Covers the principles of end-to-end datagram delivery in IP networks.
Network Layer.
THE NETWORK LAYER.
ECE 544 Protocol Design Project 2016
IP Forwarding Relates to Lab 3.
IP Forwarding Relates to Lab 3.
IP Forwarding Relates to Lab 3.
IP Forwarding Relates to Lab 3.
Network Layer Routing Networks: Routing.
Wide Area Networks (WANs), Routing, and Shortest Paths
IP Forwarding Relates to Lab 3.
Wide Area Networks (WANs), Routing, and Shortest Paths
Routing and the Network Layer (ref: Interconnections by Perlman
Networking and Network Protocols (Part2)
IP Forwarding Relates to Lab 3.
Network Layer.
Presentation transcript:

Node Lookup in P2P Networks

Node lookup in p2p networks Section in the textbook. In a p2p network, each node may provide some kind of service for other nodes and also will ask other node for service. The problem is to locate a node who provides the service I need. In our project there is a central server who assigns nodes to others.

Node lookup in p2p networks P2P networks may have a very large number of nodes, such that a single central server may not be able to handle. Besides, there are legal issues. So, how to design lookup mechanism, such that I can find the node providing the service I need? For simplicity, let’s use the same model as in our project – Each node may have some files, and the job is to find a node with the file I need.

Node lookup in p2p networks Any suggestions? Ask the nodes in the network one-by-one? Flood the network?

Node lookup in p2p networks Two costs you have to consider. – The lookup time – The number of messages sent Assume that there is only one node with the file I need, what is the cost for – Linear search? – Flood? – Are they any good?

The key idea There is really not so much you can do if the network does not have a structure. Introduce structure to the network. Distributed Hash Table (DHT).

Chord Each node has a unique ID – By hashing its IP address by SHA-1 to get a 160-bit ID. Each file also has a unique ID, called key. – By hashing the file name by SHA-1 to get a 160-bit ID.

Chord Successor of a key x or ID x. – Arrange the node as a circle. Start at x and travel clockwise. The first (real) node you visit is the successor of F.

Chord successor(F) is the node in charge of telling other people where to get F. If a node has file F, he tells successor(F) that he has F. So, if you can find successor(F), meaning that the IP address of it, you are done.

Chord How to find successor(F)? Any suggestions?

Chord You know your location on the circle. You know the location of F on the circle. If every node keeps the IP address of its neighbor on the circle, need to do a linear search.

Chord But you control what nodes should remember. What do you want the nodes to remember, such that your searching time is small and your number of message is small?

Chord What Chord does is this. – remembering the successors of m locations if the node ID and key are m bits. Consider a node with ID k. The i th entry of his finger table is the IP address of the successor of k+2 i mod 2 m. Given this, how do you design the routing algorithm?

Chord Start with k as the routing point (RP). If RP < F < successor(RP), successor(RP) = successor(F) and we are done. Else, let the next RP be the one in the RP’s finger table that is the closest predecessor of F. Repeat.

Chord Chord needs O(m) routing steps. The reason is every time, roughly speaking, the distance from the RP to the key is at least halved. – WLOG, suppose the current RP is 0, and F is between 2 i and 2 i+1. So if there is at least one valid node between 2 i and F, we will go to the first such point, distance is halved.

Connection-orientated Service

Connection in data networks Another type of network, such as the telephone network, was developed based on the connection idea. – Before communication, a connection must be set up, which consists of physical circuits. – After the communication is over, tear down the connection.

Advantage The resources in the connection is reserved, so interference-free from other connections. Can guarantee certain Quality of Service requirements. The connection (the physical circuits in the routers) has been set up, the processing of data packets is minimal. No need to check the header for full destination address. The packet does not even have to carry the address information.

Disadvantage People may reserve more resources than they need. Such resources, even when idle, cannot be used by others. A waste. The set up of the connection requires time. For a large network, the delay can be 100ms. Okay for telephone networks, not oaky for some data services which just need to send a single packet.

Virtual Circuit Implementing circuit in a datagram network? – Datagram network forwards packets, there is no physical circuits that can be set up for connections. – Still, if we set up a virtual circuit, the routers will know how to route the packets of this virtual circuit. To reduce the complexity of routers. – Before transmission, a virtual circuit is set up. Then, a packet will carry the ID of the virtual circuit. The virtual circuit ID is much smaller, and thus much easier to deal with, than the full destination address. It is also much smaller than the full destination address, can save some overhead.

Virtual Circuit When setting up the virtual circuit, a VC ID is picked. The router knows where to forward a packet with a certain VC ID. A practical problem in a distributed environment – different stations may pick the same VC ID. – Labels can be swapped without causing confusion. B E F D C A H1 H2 A’s Table In Out H1, 1 C, 1 H2, 1 C, 2 H3 C’s Table In Out A, 1 E, 1 A, 2 D, 1

Exercise Find the shortest path from A to all other nodes in the network.

Exercise Suppose a network runs the distance vector algorithm. Suppose node A is adjacent to B, C, and D, with link distance of 5, 2, and 9, respectively. A receives advertisements from B, C, and D about node E. From B: 5. From C: 10. From D: 3. So to reach E, A will pick which node as the next hop and the distance is a.B, 12 b.C, 10 c.D, 12 d.None of the above.

Exercise A router has the following (CIDR) entries in its routing table: Address/mask: Next hop /19: Interface /20: Interface /21: Router 1 Default: Router 2 For a packet with destination address of , the router will forward it to a.Interface 0 b.Interface 1 c.Router 1 d.Router 2

Exercise A router just received the following new IP addresses: /21, /22, /22, all with the same outgoing line. They a.can be aggregated to /19. b.can be aggregated to /19 c.cannot be aggregated. d.None of the above.

Exercise Which of the following statements is true? a.BGP is for routing between the ASes, and suffers from the count-to-infinity problem. b.OSPF is for routing within ASes, and is a distance vector algorithm. c.ARP is used when a node wants to know the IP address of itself. d.None of the above,

Exercise Suppose an input buffered switch has 4 inputs/outputs. If the buffer states at input 0 to 3 are (0,2,0,0), (1,2,3,0),(0,0,2,2), and (0,0,1,0), respectively, what is the maximum number of packets that can be sent in this time slot? a.2. b.3. c.4. d.None of the above.

Exercise Line FG goes down. What message will node F have in its routing table when DV is used? What will he do in the first step? What message will node F have in its routing table when Path Vector is used? What will he do in the first step? A G F E I J H D C B

Exercise Line FG goes down. What message will node F have in its routing table when DV is used? What will he do in the first step? – B: 5 – E: 4 – I: 5 What message will node F have in its routing table when Path Vector is used? What will he do in the first step? – B: 5, BCD – E: 4, EFGCD – I: 5, IFGCD A G F E I J H D C B