CAPITULO IV: PLAN MARKETING
4.15 Factores clave para el éxito competitivo
Solution. Both the UA (user agent) and the MTA (mail transfer agent) are part of the application layer, and as such are on hosts.
2. What is a mail exchanger ? Is it a router ?
Solution. A Mail Exchanger delivers SMTP messages from source to destination MTAs.
It is not a router. SMTP is an application layer protocol. It may be considered to be a ”mail router”. 3. Do mail exploders use multicast IP addresses ?
Solution. No. SMTP is on top of TCP which doesn’t use multicast addresses.
Exercise 4.10 1. Consider the intranet illustrated on Figure 14. There are three Ethernet segments at 10 Mb/s, each corresponding to anet:subnetprefix notedn1,n2andn3. Every Ethernet segment is connected to two routers as indicated on the figure. There is no external connection to this intranet. Each Ethernet segment has a number of hosts directly attached to it. The Ethernet segments are shared media, there is no Ethernet switching equipment.
R1 R2 R3 n1 n2 n3 x1 x2 x3
Figure 14: The firs network for Problem 4.10
(a) We assume that the IP routing tables in R1, R2 and R3 are setup in such a way that traffic from subnetni to a subnetnj, withi= j goes through exactly one router. How can the hosts and routers be configured to achieve this ? Show all the relevant routing tables. If necessary, introduce additional notation (for addresses and interfaces).
Solution. There is more than one solution to this problem. Let’s assume thateth0or the router Ri(i = 1,2,3) is connected to the network with a smaller subnet prefix (every router is con- nected to two networks). LethostXbe the host part of hostXIP address, and letRibe the host part of the routerRi(i = 1,2,3). In all the cases, the content of routing tables on the routers (obtained by RIP or OSPF) could be:
R1:
Destination Network Next Hop Interface
n1 on-link eth0
n2 on-link eth1
n3 n1.R2 eth0
R2:
Destination Network Next Hop Interface
n1 on-link eth0
n2 n3.R3 eth1
n3 on-link eth1
R3:
Destination Network Next Hop Interface
n1 n2.R1 eth0
n2 on-link eth0
n3 on-link eth1
Then, there are 3 ways to configure hosts:
hosts on network 1:
Destination Network Next Hop Interface
n1 on-link eth0
n2 n1.R1 eth0
n3 n1.R2 eth0
hosts on network 2:
Destination Network Next Hop Interface
n1 n2.R1 eth0
n2 on-link eth0
n3 n2.R3 eth0
hosts on network 3:
Destination Network Next Hop Interface
n1 n3.R2 eth0
n2 n3.R3 eth0
n3 on-link eth0
Remark: This manual and case-specific solution is inconvenient and error-prone, and it is not used in practice.
2) Using default gateways:
hosts on network 1:
Destination Network Next Hop Interface
n1 on-link eth0
Default gateway n1.R1 eth0
hosts on network 2:
Destination Network Next Hop Interface
n2 on-link eth0
Default gateway n2.R3 eth0
hosts on network 3:
Destination Network Next Hop Interface
n3 on-line eth0
Default gateway n3.R2 eth0
Note that, if using this solution, in some cases a so-called “redirection” will happen. For exam- ple, if a host on n1 sends a packet to the host on n3, the packet will first go to the default router R1. R1 will note that next hop for this packet is a router on the same subnet (R2), and it will inform the host to send subsequent packets destined for n3 directly to the router R2.
Note also that, for the given configuration and requirements, this solution works only if the default gateways are carefully chosen according the entries of the routing tables at the routers. For example, if a host directly connected to the subnetn1 sets R2 as the default router, and sends a packet to a host on n3, R2 will forward the packet to R3, and the packet will cross two routers, which is against the posed requirements. This makes the solution not only inconvenient and error-prone but also unreliable, as the routing table entries could change, for example, after rebooting one router (R1can reachn3overR2orR3in the same number of hops, the first offer that comes will be used).
So, though use of a default gateway is convenient and the only good solution in many prac- tical cases, in the concrete case it is not appropriate for achieving the specified requirements (if
some traffic passes two routers, the maximum throughput is smaller).
3) Using dynamic routing (RIP for example) on hosts, but in a promiscuous mode. Promis- cuous mode means that the routing process does not advertise itself, but only overhears the routing messages exchanged between routersR1,R2andR3, and it uses this data to compute it’s own routing tables. The resulting routing tables could be as in the first case with statically defined routes. In the concrete case, this would be the easiest and the best solution.
(b) We callxi the total traffic generated by all hosts directly attached to segmenti. We neglect the effect of collisions on one Ethernet and thus assume that the maximum amount of traffic possible on every Ethernet segment is 10 Mb/s.
We further assume that the destination of traffic originating from subnetiis uniformly distributed among the three subnets. Thus, for example, the amount of traffic originating from subnet1 which has a destination in subnet2isx31.
What is the maximum value of the total trafficx1+x2+x3which is possible with these assump- tions ?
Solution. This is an inequality-constrained optimization problem with concave objective func- tion and convex constraints:
The function to optimize (objective function) is:
f(x1, x2, x3) =x1+x2+x3 (10) The constraints are:
g1(x1, x2, x3) =x1+x2 3 + x3 3 −10≤0 (11) g2(x1, x2, x3) = x1 3 +x2+ x3 3 −10≤0 (12) g3(x1, x2, x3) = x1 3 + x2 3 +x3−10≤0 (13) g4(x1, x2, x3) =−x1 ≤0 (14) g5(x1, x2, x3) =−x2 ≤0 (15) g6(x1, x2, x3) =−x3 ≤0 (16) To find the solution, we can apply the Lagrangian approach and the Kuhn-Tucker sufficiency theorem.
The theorem (as stated in http://www.economics.soton.ac.uk/staff/aldrich/maths4.pdf ) is: Theorem 16.1 (Kuhn-Tucker sufficiency) Consider the inequality constrained optimization prob- lem with concave objective and convex constraints: i.e. to maximizef(x)(wheref :Rn→R) subject to the constraints gj(x) ≤ 0 where gj : Rn → R andj = 1, ..., m. Define L = f(x)−mj=1λjgj(x) and letx∗ be a feasible point. Suppose we can find numbers λj such that ∇L(x∗) = 0, λj ≥ 0 for allj, andλj = 0 whenevergj(x∗) < 0. Then x∗ solves the maximization problem.
In our casex= (x1, x2, x3)andL(x) =f(x)−6j=1λjgj(x), and we should findx∗andλj that satisfy the next conditions:
∂L(x) ∂x1 = 0, ∂L(x) ∂x2 = 0, ∂L(x) ∂x3 = 0 (*)
andλj ≥0, but ifgj(x)<0(the constraint is not binding) thenλj = 0 (**)
(*) and (**) together are nonlinear conditions with respect to λj, j = 1, ...,6, so we have to assume whichλjs are positive. Ifλj is positive, the corresponding constraint is binding, i.e. gj = 0, which gives us equations for finding a set of feasiblex∗that corresponds to our assump- tions onλjs. Then we can compute positiveλjs using equations (*) and binding constraints. If computedλjs andx∗ satisfy conditions (*) and (**), thenx∗ is the solution. Otherwise we should assume differently whichλjs are positive, and repeat the procedure until success (there is a theorem that says “if the objective function is concave and if each constraint is linear, the con- ditions from the previous theorem are both sufficient and necessary”, which applies in our case). In the concrete case, the symmetry of both the objective function and the constraints allows us to guess easily which constrains are binding (i.e. whichλjs are not necessarily equal to
0). The symmetry and increasing linear dependance of the objective function onx1,x2 andx3 implyx1 = x2 = x3 > 0(g4,g5 andg6) are not binding, i.e. λ4 = λ5 = λ6 = 0) andg4, g5 andg6 are all binding. The binding equations givex1 = x2 = x3 = 183, and (**) gives λ1 = λ2 = λ3 = 35. Assumed and computedλjs and computed x satisfy (*) and (**), so the computed x is the solution of the maximization problem and maximum possible throughput is
(x1+x2+x3)max= 18M b/s.
2. We consider the intranet illustrated on Figure 15. There are three Ethernet segments at 10 Mb/s, in- terconnected by means of three bridges B1, B2 and B3. There is no router and no external connection in this intranet. Each Ethernet segment has a number of hosts directly attached to it. The Ethernet segments are shared media, there is no Ethernet switching equipment apart from the three bridges B1, B2 and B3. B1 B2 B3 x1 x2 x3 segment 1 segment 2 segment 3
Figure 15: The second network for Problem 4.10
(a) How many subnets are there in principle in this intranet ? Solution. There is only one subnet.
(b) We callxi the total traffic generated by all hosts directly attached to segmenti. We neglect the effect of collisions on one Ethernet and thus assume that the maximum amount of traffic possible on every Ethernet segment is 10 Mb/s.
among the three subnets. Thus, for example, the amount of traffic originating from subnet1 which has afina destination in subnet2 isx31. We further assume that the bridges have had enough time to learn and build their forwarding tables.
What is the maximum value of the total trafficx1+x2+x3which is possible with these assump- tions ?
Solution. In this case, one of the bridges will block one of its ports in order to prevent forming the loop. We do not lose in the generality of the solution, assuming it is one of the ports of the bridge one. Now the traffic fromn1ton2and vise versa will go over the networkn3.
As in the previous case (the case with routers) have an inequality-constrained optimization prob- lem with concave objective function and convex constraints, but now it is not symmetric: The objective function is the same as in the previous case:
f(x1, x2, x3) =x1+x2+x3 (17) But the constraints are different from the previous case:
g1(x1, x2, x3) =x1+x2 3 + x3 3 −10≤0 (18) g2(x1, x2, x3) = x1 3 +x2+ x3 3 −10≤0 (19) g3(x1, x2, x3) = 2x1 3 + 2x2 3 +x3−10≤0 (20) g4(x1, x2, x3) =−x1 ≤0 (21) g5(x1, x2, x3) =−x2 ≤0 (22) g6(x1, x2, x3) =−x3 ≤0 (23)
We can use the same auxiliary function L(x), and the same conditions (*) and (**) as in the previous case (the case with routers instead of bridges).
Again, we have to assume (guess) binding constraints. Note that the bottleneck here is n3. Note also that for a feasible allocation with all thex1, x2andx3, if we decreasex3by a small valueΔ, we can increasex1+x2 by1.5Δ. So, if we want to maximize the objective function, we will tend to decreasex3to zero, if it allows for the increase ofx1andx2. So, we assume that g6 andg3 are binding. As the problem is symmetric with respect tox1andx2, and forx1 =x2 the constraintsg1andg2become equal to the constraintg3(for assumedx3= 0),g1andg2are binding as well. From the binding equations we obtainx1 =x2 = 152 . The conditions (*) give λ6 = λ3
3 andλ1,2 = 34λ3. If we chooseλ3 = 1, we obtainλ1,2 = 14 andλ6 = 13 which are all
positive, and the condition (**) is satisfied. So, (x1 = x2 = 152,x3 = 0) is the solution of the optimization problem.
The maximum possible throughput in this case is(x1 +x2 +x3)max = 15M b/s, which is less than in the case with the routers instead of the bridges (and it is achieved only if the hosts directly connected to n3 do not generate outgoing traffic).
Exercise 4.11 1. Based on what addresses (MAC addresses, IP addresses, UDP/TCP port numbers) do