Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Burgess M.Principles of network and system administration.2004.pdf
Скачиваний:
181
Добавлен:
23.08.2013
Размер:
5.65 Mб
Скачать

10.9. COMPETITION OR COOPERATION FOR SERVICE?

413

10.9 Competition or cooperation for service?

Consider, for simplicity, just two customers or users A and B who wish to share a service resource. We shall assume that the service ‘market’ is a free-for-all; i.e. no one player has any a priori advantage over the other, and that both parties behave rationally.

The users could try to cooperate and obtain a ‘fair’ share of the resource, or they could let selfish interest guide them into a competitive battle for the largest share. The cooperation or collaboration might, in turn, be voluntary or it might be enforced by a service provider.

These two strategies of competition and collaboration are manifestly reflected in technologies for networking, for instance:

Voluntary sharing: The Ethernet is an example of voluntary sharing, in which any user can grab as much of a share as is available. There is a maximum service rate that can be shared, but it is not necessarily true that what one user loses is automatically gained by the other. It is not a zero-sum game.

Forced sharing: Virtual circuits (like ATM or Frame Relay) are examples of forced sharing over parallel circuits. There are thus fixed quotas that enforce users’ cooperation. These quotas could be allocated unevenly to prioritize certain users, but for now we shall assume that each user receives an equal share of the resource pot.

We analyze this situation, in a very simple way, using a classic game-theoretical approach. The customers can ‘win’ a certain amount of the total service rate R (e.g. bytes per second, in the case of network service), and must choose strategies for maximizing their interests. We can therefore construct a ‘payoff’ matrix for each of the two users (see tables 10.1, 10.2 and 10.3). We see that when both customers collaborate (either willingly or by forced quota), they obtain equal shares. If one of them competes greedily, it can obtain an extra δR that is then subtracted from the other’s share. However, if both users compete, the result is generally worse (Rc) than an equal share.

Thus, we assume that each of the users assumes an equal share R/2 when they cooperate with one another. The relative sizes of the payoff are important. We have:

 

 

 

 

 

 

δR

R

(10.11)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2

 

 

R

δR

R

R

+ δR .

(10.12)

 

 

 

2

2

2

In other words, by competing, a selfish user might be able to gain an additional amount of the service capacity δR to the other’s detriment. The sum of both users’ shares cannot exceed R. If both users choose to compete, the resulting competition might lead to an amount of waste that goes to neither of the users. This is the case in Ethernet, for instance, where collisions reduce the efficiency of transmission for all parties equally. We model this by assuming that both users then obtain a share of Rc < R/2.

414

CHAPTER 10. NETWORK-LEVEL SERVICES

Table 10.1: A’s payoff matrix in two-customer sharing.

A

B Cooperate

B Compete

 

 

 

 

 

 

 

 

A Cooperate

R

R

δR

2

2

A Compete

R2 + δR

 

Rc

Table 10.2: B’s payoff matrix in two-customer sharing.

B

B Cooperate

B Compete

 

 

 

 

 

 

 

 

A Cooperate

R

R

+ δR

2

2

A Compete

R2 δR

 

Rc

Table 10.3: A, B combined payoff matrix in two-customer sharing.

A, B

 

B Cooperate

 

B Compete

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A Cooperate

 

R

2

R

2

2 +

 

 

 

R ,

R

 

R

 

δR, R

δR

 

 

 

 

2

 

 

 

 

 

A Compete

 

2

+ δR,

2

δR

 

(Rc, Rc)

 

This leaves us with two separate cases to analyze:

1.Rc > R/2 − δR: If the result from competitive ‘attacks’ against one another is greater than the result that can be obtained by passively accepting the other customer’s aggressiveness, then we are inclined to retaliate. This becomes an instance of the Prisoner’s Dilemma game. It has a solution in terms of Nash equilibria by dominant strategies (see figure 10.6).

2.Rc < R/2 − δR: If the payoff for mutual competition is less than the penalty for collaborating, then the situation becomes equivalent to another classic game: the Maynard-Smith dove–hawk game [206]. Both players see that they can win an important share by being greedy, but if the other player retaliates they both stand to win less. Thus one player can afford to be aggressive (hawkish) but then the other must be peaceful (dove-like). This is the case with the Ethernet, for instance. If there is excessive contention, there is an exponential ‘backoff’ from collisions leading to significantly worsened performance (see figure 10.7).

We can ask if there is a mixed strategy of partial cooperation that would succeed in countering the poor result from mutual competition, but which would yield slightly more. To show that this is not the case, let us pick B’s strategy and then allow A to choose cooperation with probability p:

(a)B cooperates: compare the payoffs for A and B and ask, is there a value

of p such that

p 2

+ (1 − p)

 

2

+ δR > p 2

+ (1 − p)

 

2

δR ?

(10.13)

 

R

 

 

R

 

R

 

 

R

 

 

10.10. SERVICE LEVEL AGREEMENTS

415

Either we must have δR = 0 or p = 0, so the answer is no: there is no way to improve on this strategy as long as there is something to gain from competition.

(b)B competes: compare the payoffs for A and B and ask, is there a value of p such that

p

 

2

δR + (1 − p)Rc > p

 

2

+ δR + (1 − p)Rc?

(10.14)

 

 

R

 

 

R

 

 

Again, consistency forces us to take p = 0 or δR = 0.

These simple games approximate the essence of the issues involved in sharing. They reflect both human strategies for competition and technological ones. We see that there is no clear answer as to whether Ethernet (hawkish) or fixed quota virtual circuit (dove-like) behavior is preferable, it depends on the level of traffic.

A’s payoff

B’s payoff

Equilibrium

B1

B2

B1

B2

B1

B2

A1

A1

 

 

A1

 

 

&

 

 

=

 

A2

A2

 

 

A2

 

Figure 10.6: With Rc > R/2 − δR, the game becomes a classic game-theoretical problem of ‘Prisoner’s Dilemma’ [222]. The dominant Nash equilibrium is where both players decide to compete with one another. If the customers are altruistic and decide to collaborate (or are forced to collaborate) with one another, they can win the maximum amount. However, if they know nothing about each other’s intentions then they realize, rationally, that they can increase their own share by δR by choosing a competitive strategy. However, if both choose to be competitive, they cannot achieve exactly this much: the balance point for mutual competition is Rc. This value is determined by the technology used by the service provider.

A or B’s payoff

B1

B2

A1

 

A2

 

Figure 10.7: With Rc < R/2 − δR the game becomes another classic game of dove–hawk. If both players are ‘hawkish’ and attack greedily, they both lose out. The stable equilibria are that one player is greedy and the other is submissive.

10.10 Service Level Agreements

Network connectivity and data transfer rates are now saleable commodities. To sell them, we must be able to measure the quantity and ‘quality’ of services levels, so that guarantees can be provided to customers. Quality is clearly a heuristic

416

CHAPTER 10. NETWORK-LEVEL SERVICES

value with no clear definition, yet the buzzword of network service provision is ‘Quality of Service’ (QoS). There is much current research devoted to defining this elusive metric.

Service Level Agreements (SLA) are contracts between clients and service providers that set expectations, and specify levels of resources and costs in a service. Increased interest in ‘outsourcing’ or sub-contracting services and work has placed these agreements center stage. In some cases, they fuel expectations that technology cannot match.

In service centers, system administration is shifting away from device management, where relatively little has been accomplished, towards service management which is more the domain of marketing and contractual law. However, to really define a service level quality factor, we must translate this heuristic ‘quality’ into a hard-nosed measurable such as data-rate. The basic principles involved are no mystery, if we think scientifically:

1.Predictability (determinism)

2.Cause–effect (dependence)

3.Strategy for resource sharing amongst clients

4.Uncertainty management.

Putting these items together enables us to address service levels in quantitative terms. The details of this are beyond the scope of the present book.3

Example 14. The simplest kind of SLA is that offered by Internet Service Providers, using ADSL lines, who might offer a home user a bit rate of 512 kbps downstream and 128 kbps upstream. A home user could, in principle, use ping or ftp or some other method to test this transfer rate and verify that the bit rate is at least as good as that advertised. Similarly, the service provider might say that any downtime will be corrected within a period no longer than 48 hours, or else give a money back guarantee.

An agreement for mission-critical services would need to be more comprehensive than this. There are two approaches to writing SLAs:

Top down: examine user needs and wishes and try to translate these into low-level device performance.

Bottom up: examine the limitations of technology and build up possible services.

A basic checklist for top-down SLAs should include:

1.What service is being offered?

2.What are the users’ responsibilities?

3.Plan for mapping quality of experience onto physical measurables.

3For a discussion of this point, see the follow-up book by the author: Scientific Principles of Network and System Administration, J. Wiley & Sons, 2004.

EXERCISES

417

4.How will the measurables be monitored?

5.How will errors be fixed, within a predictable time-frame?

6.How often will service levels be evaluated and revised?

7.What are maximum response times?

8.What is the security of operations (integrity, authenticity of parties etc)?

9.Intellectual property rights.

Of the more legal aspects of contractual agreement, one must have:

1.A clause defining when a service agreement has been broken.

2.What liability is agreed to (financial reparation)?

3.When does the agreement terminate?

Security is an essential aspect of SLAs (see chapter 11): a company’s livelihood can depend on a service. While it makes sense for any company to secure its assets by using redundant service providers, it is important to cover the possible damage that loss of service could result in, or simply to follow up on a breach of contract.

Today, SLAs are being suggested for outsourced Web services based on SOAP and XML-RPC. SLAs are even being defined as XML Document Type Definitions (DTD). Rodosek suggests the need for a language to describe SLAs in terms of quality of service parameters at all levels [255]. This is a matter of continuing research. Two approaches to mechanizing service regulation have been explored by policy-based feedback using cfengine [42, 50] and, more recently, fuzzy controllers with more specific service-based knowledge [95].

Exercises

Self-test objectives

1.What is meant by multiplexing?

2.Recall the difference between a bridge and a switch.

3.What is the difference between a switch and a router?

4.What is meant by a layer 3 switch?

5.What is a virtual circuit?

6.Explain the difference between deterministic and non-deterministic network protocols.

7.Give examples of deterministic and non-deterministic layer 2 technologies.

8.Give examples of deterministic and non-deterministic layer 3 technologies.

418

CHAPTER 10. NETWORK-LEVEL SERVICES

9.Is there a limit to the length of cable that can be used to connect two computers together with:

(a)Ethernet?

(b)ATM over fiber?

(c)Token ring?

If so explain how the length limitation arises.

10.What does the wavelength of an electromagnetic signal have to do with the rate at which data can be transmitted?

11.How does the wavelength of an electromagnetic signal affect the distance a signal can travel (through cable or by wireless means)?

12.Why can DSL technology transmit higher data rates over telephone lines than modems?

13.What is meant by a T1 line? What is meant by an E1 line?

14.Explain the difference between Frame Relay and Asynchronous Transfer Mode (ATM). Can these technologies carry Internet Protocol traffic?

15.Explain the difference between routing and forwarding.

16.What is meant by a default route?

17.What is an Autonomous System in the context of routing?

18.Explain what static routing is and how it is configured.

19.Explain what dynamical routing is and how one would go about configuring it.

20.What is a Distance Vector routing protocol? Give an example and explain why this method of routing is little used.

21.What is a Link State routing algorithm? Give an example of this and explain its advantages over Distance Vector algorithms.

22.Which so-called routing algorithm uses a Path Vector algorithm?

23.Explain the function of BGP in global routing.

24.Explain why BGP, alone, cannot route packets from source to destination.

25.What is MPLS and how does it differ from ATM?

26.What is meant by quality of service?

27.Explain how the principle of causality limits the attainable service rate of a network service. (Hint: what devices are involved in providing the service?)

28.What does game theory tell us about the usefulness of strategies for cooperative (shared) and non-cooperative (private) media for quality of service?

29.Explain the purpose of a Service Level Agreement.

EXERCISES

419

Problems

1.Use the ping and ping6 commands to ping different IP addresses on your network (note that these differ somewhat on different platforms – the examples here are from GNU/Linux). Pinging the addresses repeatedly with a large packet size (9064 bytes) yields something like this:

cube$ ping -s 9064 daneel

PING daneel (128.39.89.230) from 128.39.74.16 : 9064(9092) bytes 9072 bytes from daneel (128.39.89.230): icmp seq=1 ttl=63 time=17.1 ms 9072 bytes from daneel (128.39.89.230): icmp seq=2 ttl=63 time=16.8 ms 9072 bytes from daneel (128.39.89.230): icmp seq=3 ttl=63 time=17.9 ms 9072 bytes from daneel (128.39.89.230): icmp seq=4 ttl=63 time=17.9 ms

--- daneel ping statistics ---

4 packets transmitted, 4 received, 0% loss, time 3030ms rtt min/avg/max/mdev = 16.858/17.462/17.945/0.475 ms

host$ ping6 -s 9064 2001:700:700:3:290:27ff:fea2:477b PING 2001:700:700:3:290:27ff:fea2:477b

from 2001:700:700:4:290:27ff:fe93:6723 : 9064 data bytes

9072 bytes from 2001:700:700:3:290:27ff:fea2:477b: icmp seq=1 ttl=63 time=25.0 ms

9072 bytes from 2001:700:700:3:290:27ff:fea2:477b: icmp seq=2 ttl=63 time=22.4 ms

9072 bytes from 2001:700:700:3:290:27ff:fea2:477b: icmp seq=3 ttl=63 time=26.0 ms

9072 bytes from 2001:700:700:3:290:27ff:fea2:477b: icmp seq=4 ttl=63 time=21.3 ms

9072 bytes from 2001:700:700:3:290:27ff:fea2:477b: icmp seq=5 ttl=63 time=21.3 ms

--- 2001:700:700:3:290:27ff:fea2:477b ping statistics ---

6 packets transmitted, 5 received, 16% loss, time 5047ms rtt min/avg/max/mdev = 21.376/23.268/26.096/1.956 ms

Explain what the icmp seq numbers are and why the time in milliseconds is not constant.

2.Collect the test tcp program ttcp (e.g. ttcpw for Windows or ttcp linux) for traffic testing between hosts. Choose pairs of hosts on your local network and test the transmission rates between them. On the receiver host, use:

ttcp_linux -s -r

to receive and discard a standard source transmission, and on the transmitting host, use:

ttcp_linux -s -t receiver-IP

(a)Write a script to repeat this standard test every five minutes over the course of a day. Plot the transmission rate as a function of time throughout the day. Explain why the measured value varies as a function of time.

420

CHAPTER 10. NETWORK-LEVEL SERVICES

(b)Work out the average transmission rate and the standard deviation of the values in the previous part. What is the meaning of (what interpretation do you offer for) the average and standard deviation values for the whole day?

(c)Now pick ten hosts from a variety of locations on your LAN; make ten measurements of the transmission rate between each host and a single reference host. Work out the average and standard deviation in each case. Make a table of the results. Can you explain the differences between different hosts? Hint: think about the different hardware of hosts, what hardware connects them, and environmental factors.

3.Explain the difference between a switch and a router. Can switching alone be used to forward packets over a Wide Area Network?

4.Make a table of equivalences between switched networks with virtual circuits and IP services; include the following in your table: Forwarding Equivalence Classes (FEC), Virtual Circuit Identifiers, Labels, IP port numbers, IP addresses (network part and host part). Be sure to find analogues between routed IP data and switched data in all possible cases.

5.Use the traceroute program on Unix or tracert on Windows to compare routes. If you have a commercial Internet connection at home and a university Internet connection, repeat this from both locations and compare the results.

(a)Determine your hosts IP address and subnet mask.

(b)Trace the route to a host on the same subnet as your own.

(c)Trace the route to your nearest gateway router.

(d)Trace the route to a host on the next subnet above yours (e.g. try guessing a number).

(e)Trace the routes to www.gnu.org, www.iu.hio.no, www.cisco.com.

6.A router has the following CIDR entries in its routing table:

Network

Next hop

192.0.16.0/22

Interface 0

192.0.20.0/22

Interface 1

2001:700:700:3/64

Interface 3

192.0.40.0/23

Router 1

default

Router 2

What happens to packets with the following destination addresses?

(a)192.0.23.10

(b)192.0.17.5

(c)192.0.41.7

(d)192.0.42.99

(e)192.0.41.255

EXERCISES

421

(f)2001:700:700:3:290:27ff:fea2:477b

(g)fe80::220:e0ff:fe6c:5877

7.Look at the search algorithm for finding data in a binary tree. Compare this with the way that Internet packets are routed. What are the similarities and differences?

8.Explain the main reason why Link State routing protocols generate less gratuitous traffic than Distance Vector Protocols.

9.Quality of Service assumes that it is possible to build up a stable average service level from a minimum level of granularity. Suppose we are switching packets at a rate of ω bits per second. We can model a stream of switches as a function that changes in time between 1 and 0 at this frequency. The simplest signal function with these properties is:

S(t) =

1

(1

+ sin(ωt)),

(10.15)

2

where t is time.

(a)Sketch this function and draw on it the time scale t = ω−1.

(b)Sketch this function over a period T ω−1.

(c)Prove that the average bit rate of eqn. (10.3), over long times T → ∞ does not depend on ω and is approximately constant, thus showing

that quality can be assured only on average over times T that are long compared with t = ω−1.

10.You are going to buy an Internet connection from a local ISP that you know owns a 2 megabit per second wireless connection. The ISP has an aggressive marketing policy for recruiting new customers. The standard Service Level Agreement you receive offers you a symmetrical transfer rate of 640kb. Does this sound like a reliable service? Explain your thoughts on this.

11.You rent space within a building that has its own network infrastructure, based on switched Ethernet. Upon investigation, you find that the building has an external Frame Relay service, with a gigabit connection rate, and a single gateway router. The computing services management offers a guaranteed connection rate of 10mb/s to all its customers. Does this sound like a reasonable agreement? Explain your reasoning. Can the company guarantee you this level of service at all times?

12. The speed of light in copper wire is measured to be of the order of 2 × 108ms−1. Use the conditional formula N λ ≥ 2L for predictable collision behavior in Ethernet frames to work out the maximum length of a cable, for the three Ethernet types: 1) f = 10Mbps, 2) f = 100Mbps, 3) f = 1000Mbps, given that the minimum packet size is fixed at 512 bits.