Computer Science 328 Distributed Systems - PowerPoint PPT Presentation

1 / 34
About This Presentation
Title:

Computer Science 328 Distributed Systems

Description:

Allocate a bunch of contiguous class C addresses to a subnet requiring more than ... Subdivide a Class B address space for allocation to multiple Class-C ... – PowerPoint PPT presentation

Number of Views:33
Avg rating:3.0/5.0
Slides: 35
Provided by: mehdith
Category:

less

Transcript and Presenter's Notes

Title: Computer Science 328 Distributed Systems


1
Computer Science 328Distributed Systems
  • Lecture 3
  • NETWORKING

2
Networking Issues for DS
  • ? Performance
  • Latency (Lt)
  • Propagation delay the time it takes for the
    first bit of a message to reach the destination.
  • Processing delay the time it takes for the OS to
    process/send/ receive the message.
  • Queueing delay the time it takes a message to be
    queued either at end hosts or intermediate nodes
    waiting for transmission.
  • Data transfer rate (Tr)
  • Bandwidth the total amount of information that
    can be transmitted over a given time.
  • ?

packet delay Lt packet size / Tr,
3
Other Networking Issues for DS
  • Scalability
  • Reliability
  • Security
  • Mobility
  • Quality of service
  • Multicasting

4
Types of Networks
  • Range Bandwidth Latency
  • Local Area 1 - 2 km 10-1000Mbps 1-10
    ms
  • Network (LAN)
  • Wide Area worldwide 0.01- 600 100 - 500
  • Network (WAN)
  • Metro Area 2 - 50 1 - 150 10
  • Network (MAN)
  • Wireless LAN 0.15 - 1.5 2 11 5 - 20
  • Wireless WAN worldwide 0.01 - 2
    100 - 500
  • Internetwork worldwide 0.01 - 2
    100 - 500

5
Networking Principles
  • Switching Schemes
  • Broadcast
  • Circuit Switching a physical circuit is
    established from the caller to the callee before
    communication takes place.
  • Packet Switching (a.k.a. store-and-forward)
    packets that arrive at a node are first stored at
    the node and then forwarded toward their
    destinations.
  • Frame Relay Similar to store-and-forward, but
    intermediate nodes route frames based on their
    first few bits. Frames as a whole are not stored
    at nodes but pass through the nodes as short
    streams of bits.

6
OSI 7-Layer Protocol Model
  • Protocol
  • Specifies the sequence of messages to be
    exchanged
  • Specifies the format of data in messages

Message Sent
Message Received
Application
Presentation
Session
OSI Layered Protocol Model
Transport
Network
Data link
Physical
Communication Channel
7
Encapsulation of Upper-layer Data
8
Internet 5-Layer Model
9
Message Encapsulation -- TCP over an Ethernet
10
The Programmer's Conceptual View
TCP Transmission control protocol UDP User
datagram protocol
11
OSI 7-Layer Protocol Summary
12
OSI Reference Model
  • Each layer performs a well defined function, and
    provides a well-defined service to the next
    higher layer. The protocol defines the operation
    that the peer modules use in exchanging messages
    so as to provide the required functions.
  • The interface between layer n module and layer
    n-1 module at a node is precisely defined.
  • A layer n module at one end communicates with its
    peer layer n module at the other end by passing a
    message into the layer n-1 module (along with
    necessary information for the lower layer module
    to generate headers).

13
Physical Layer
  • Function Provides a virtual link, called virtual
    bit pipe, for transmitting a sequence of bits
    between any pair of nodes.
  • Physical interface module (called modem) maps the
    incoming bits from the data link layer into
    signals appropriate for the channel, and at the
    receiving end, maps the signals back into bits.
  • Interface module between the data link module and
    the modem (e.g., RS-232-C interface or X.21
    physical layer) is responsible for initiating
    data sending/receipt by providing separate wires
    between the two modules for control signals.

14
Data Link Layer
  • Function Converts the unreliable bit pipe
    provided by the physical layer into a virtual
    communication link for sending packets error
    free.
  • The sending DL module places some control bits
    called header at the beginning of each packet and
    some more overhead bits called trailer at the end
    of each packet, resulting in a longer string of
    bits called a frame.
  • Some of the overhead bits perform error
    detection/correction, and some request
    retransmissions when error occurs.
  • For multiaccess links (e.g., Ethernets), there is
    a need for a new sublayer, called the MAC
    sublayer, to arbitrate the access to the link so
    that each node can successfully transmit its
    frames without interference from the other nodes.

15
Network Layer
  • The transport layer provides packets and control
    information (on how to handle the packets, e.g.,
    where the packets should be delivered) to the
    network layer. The network layer then uses the
    control information to generate the packet
    header.
  • Function 1 Addressing
  • Function 2 Routes packets from their sources
    through the network to their destinations
  • Function 3 Congestion control

16
IP Addressing
7
24
Class A
0
Network ID
Host ID
14
16
Class B
1
0
Network ID
Host ID
21
8
28
Class D (multicast)
1
1
1
0
Multicast address
27
Class E (reserved)
1
1
1
1
unused
0
32-bit numeric identifier consisting of a network
identifier and a host identifier
17
Decimal Representation of Internet Addresses
octet 1
octet 2
octet 3
Range of addresses
Network ID
Host ID
1.0.0.0 to
Class A
1 to 127
0 to 255
0 to 255
0 to 255
127.255.255.255
Network ID
Host ID
128.0.0.0 to
Class B
128 to 191
0 to 255
0 to 255
0 to 255
191.255.255.255
Network ID
Host ID
192.0.0.0 to
Class C
0 to 255
0 to 255
1 to 254
192 to 223
223.255.255.255
Multicast address
Multicast address
224.0.0.0 to
Class D (multicast)
0 to 255
0 to 255
1 to 254
224 to 239
239.255.255.255
240.0.0.0 to
Class E (reserved)
0 to 255
0 to 255
1 to 254
240 to 255
255.255.255.255
18
IP Header
19
IP Packet Layout
  • IP address allocation problem
  • Network administrators usually overestimate
    future growth of their networks
  • and request Class B address.
  • Two existing solutions
  • IP v6
  • Classless interdomain routing (CIDR)

20
IPv6 Header Layout
0-8 time-insensitive traffic 8-15
time-sensitive traffic
Establishment of virtual circults
IPv6 addresses are 128 bits (16 bytes) long
sufficient to provide 7 x 1023 IP addresses per
square metre across the entire surface of the
Earth.
21
CIDR
  • Ideas
  • Allocate a bunch of contiguous class C addresses
    to a subnet requiring more than 255 addresses.
  • Subdivide a Class B address space for allocation
    to multiple Class-C subnets.
  • Approaches
  • Add a mask field a bit pattern to select the
    portion of an IP address for representing the
    subnet address and for routing table comparison.
  • For example, a Class C address space can be
    subdivided into 32 groups of 8 hosts, e.g.,
    138.37.95.248/29

8
21
22
Address Resolution between IP and Underlying
Networks
  • Most hosts are attached to a LAN by an interface
    board that only understands LAN addresses. For
    example, every Ethernet board is equipped with a
    48-bit Ethernet address.
  • The boards send and receive frames based on
    48-bit Ethernet addresses. They know nothing
    about the 32-bit IP addresses.
  • Address Resolution Protocol (ARP) maps the IP
    addresses onto data link layer addresses (e.g.,
    Ethernet).

23
ARP
  • Suppose host 1 wants to send a packet to host 2.
  • Host 1 finds the IP address, 192.31.65.5, for
    host 2 by the Domain Name Service (DNS).
  • Host 1 builds a packet with 192.31.65.5 and
    gives it to the IP software.
  • The IP software looks at the address and knows
    the destination is on its own subnet.
  • Host 1 broadcasts a packet onto the Ethernet
    asking Who owns IP address 192.31.65.5?''
  • Host 2 will respond with its Ethernet address
    (E2).
  • The IP software on host 1 builds an Ethernet
    frame addressed to E2, puts the IP packet
  • in the payload field, and dumps it onto the
    Ethernet.
  • The Ethernet board of hosts 2 detects this frame
    and causes an interrupt.

24
ARP
  • The performance of ARP can be improved by caching
    the broadcast results.
  • Host 1 can include its IP to Ethernet mapping the
    ARP packet so that host 2 does not have to make
    the inquiry if needed.
  • What if host 1 wants to send packets to host 4?
  • proxy ARP the CS router could be configured to
    respond to ARP requests for network 192.31.63.0.
  • default Ethernet address host 1 can be
    configured to see that the destination is on a
    remote network and sends all packets to a default
    Ethernet address (E3).

25
Routing Algorithms
  • Programmed in the network layer
  • determine the route for each packet as it
    travels through the net
  • dynamically update routing tables to reflect
    congestion, changes and failures.
  • Two approaches
  • link-state (e.g., OSPF)
  • distance-vector (e.g., RIP)
  • Routers send a summary of their table to every
    neighboring node, periodically, or upon change.
  • receiving node updates its table (link cost).

26
Distance Vector Routing
  • Also termed as distributed Bellman-Ford algorithm
    or Ford-Fulkerson algorithm, included in RIP
    (routing information protocol), AppleTalk, and
    Cisco routers.
  • Each router maintains a table indexed by each
    router in the subnet and giving the best known
    distance to each router and which link to use to
    get there.
  • Once every T seconds each router sends to each
    neighbor the table.

27
Distance Vector Routing

28
Routing Tables
29
Distance Vector Routing
30
Pseudo-Code for RIP
Send Each t seconds or when Tl changes, send Tl
on each non-faulty outgoing link. Receive
Whenever a routing table Tr is received on link
n for all rows Rr in Tr if (Rr.link not equal
n) Rr.cost Rr.cost 1 Rr.link n if
(Rr.destination is not in Tl) add Rr to Tl
// add new destination to Tl else for all rows Rl
in Tl if (Rr.destination Rl.destination and
(Rr.cost lt Rl.cost or Rl.link n)) Rl Rr //
Rr.cost lt Rl.cost remote node has better
route // Rl.link n remote node is more
authoritative
31
Link State Routing
  • Each router must
  • Discover the neighbors and learn their network
    addresses
  • When a router is booted, it learns who its
    neighbors are by sending a special Hello packet
    on each point-to-point link.
  • The router on the other end sends back a reply.
  • Measure the delay or cost to each of its
    neighbors
  • A router sends a special Echo packet over the
    link that the other end sends back immediately.
    By measuring the round-trip time, the sending
    router gets a reasonable delay estimate.
  • Construct a packet telling all it has just
    learned.

32
Link State Routing
  • A router broadcasts a link-state-advertisement
    (LSA) packet periodically or upon topology change.

33
Link State Routing
  • Broadcast the LSA packet to all other routers in
    the subnet.
  • Each packet contains a sequence number that is
    incremented for each new LSA packet sent.
  • Each router keeps track of all the (source
    router, sequence) pairs it sees. When a new LSA
    packet comes in, it is checked against the pairs.
    If the new packet is new, it is forwarded on all
    the links except the one it arrived on.
  • The age of each packet is included and is
    decremented once per second (per hop in reality).
    When the age hits zero, the information is
    discarded.
  • Compute the shortest path to every other router
    with Dijkstras algorithm.

34
Congestion Control
  • Is achieved by informing nodes along a route that
    congestion has occurred and asking them to reduce
    their packet transmission rate.
  • Congestion information can be supplied by
  • explicit transmission of special messages (called
    choked packets), or
  • implementation of a specific transmission control
    protocol (e.g., TCP takes packet loss as an
    indication of congestion and will hence reduce
    its congestion window the number of packets
    allowed to be transmitted before receipt of a
    positive acknowledgement).
Write a Comment
User Comments (0)
About PowerShow.com