ECE 158A - Data Networks MIDTERM
Tuesday November 20th, 2012
NAME:
PID:
Problem 1 (15 points):
Problem 2 (20 points):
Problem 3 (15 points):
TOTAL (50 points):
1
Problem 1 - Queue (15 points)
Consider an ATM machine that is operative 24 hours a day, 7 day
IP Subnet or Host
A subnet is a collection of ip address with a common prefix
CIDR: a.b.c.d/n
The internet is organized into subnets.
Concept of protocol layering . Internet is a bunch of layered protocol.
Middle layer center : internet protocol
A packet
ECE 158A - Data Networks
Homework 2 - due Tuesday Nov 5 in class
Problem 1 - Clustering coecient and diameter
In this problem, we will compute the diameter and the clustering coecient of
a set of simple networks. Given a network N , recall that the diamet
ECE 158A - Homework 3 - Midterm review SOLUTIONS
Problem 1 - Coding for Erasures
1) What is the minimum M below which it is not possible to recover p1 , . . . , pN ?
We need to receive M N packets (so the minimum is N ). If M < N we
cannot build a N N mat
UCSD ECE 158A
Data Networks I
TuTh 8:009:20
Fall 2014
Thursday, October 2, 2014
Paolo Minero
Data Networks I
Instructor: Paolo Minero
Contact: Calit2 4304, Phone: (858)-531-4233, e-mail: pminero@ucsd.edu
Oce hours: Friday 9:00-10:00AM or by appointment
UCSD ECE 158A
Data Networks I
TuTh 8:009:20
Homework # 5
Tuesday, December 4, 2014
Paolo Minero
Homework Set #5
Due: Thursday, December 11, 2014
Theoretical Problems:
1. P3.1 from the textbook
2. P3.2 from the textbook
3. P3.5 from the textbook
4. P3.6 fr
UCSD ECE 128A
TuTh 8:009:20
Homework # 4 Data Networks I
Tuesday, November 18, 2014
Paolo Minero
Homework Set #4 - SOLUTIONS
1- a) As T1 = T2 /2, the window of flow 1 (W1 ) increases twice as fast as the window
of flow 2 (W2 ). We assumed that the rates o
UCSD ECE 158A
Data Networks I
TuTh 8:009:20
Homework # 4
Tuesday, Novermber 11, 2014
Paolo Minero
Homework Set #4
Due: Tuesday, November 18, 2014
Theoretical Problems:
1. P7.3 from the textbook
2. Refer to Figure 7.8 from the texbook illustrating the conv
UCSD ECE 128A
TuTh 8:009:20
Homework # 5 Data Networks I
Thursday, December 11, 2014
Paolo Minero
Homework Set #5 - SOLUTIONS
1- There are two issues. The first is that, if a node momentarily has nothing to transmit,
then the corresponding time slot is wa
UCSD ECE 128A
Data Networks I
TuTh 8:009:20
Homework # 1
Tuesday, October 14, 2014
Paolo Minero
Homework Set #3 - SOLUTIONS
Homework Problems (from textbook):
1) A) The propagation time from C to E is given by:
Tprop =
108 m
= 1/3s.
3 108 m/s
The roundtri
UCSD ECE 128A
Data Networks I
TuTh 8:009:20
Homework # 1
Tuesday, October 14, 2014
Paolo Minero
Homework Set #1: Solutions
Prepared by Lorenzo Coviello
Homework Problems (from textbook):
P1.1 How many hosts can one have on the Internet if each one needs a
UCSD ECE 158A
Data Networks I
TuTh 8:009:20
Homework # 1
Tuesday, October 7, 2014
Paolo Minero
Homework Set #1
Due: Tuesday, October 14, 2014
Homework Problems (from textbook):
P1.1 How many hosts can one have on the Internet if each one needs a distinct
ECE 158A - Data Networks
Homework 1 - due Tuesday 10/15/2013 in class
Problem 1 - A single fast server, or multiple slower servers?
In this problem we will compare two queues that are apparently very similar: a
queue with a single server, and one with c d
Homework 1 - SOLUTION
Problem 1
M/M/1 Queue
1) Use the fact above to express k , k > 0, as a function of 0 .
k =
k
0
2) Using < and the fact that all k s sum to 1, compute 0 (as a function
of and ).
k = 0
1=
k=0
k=0
k
= 0
1
,
1 /
because the sum converges
Datagram service: type UDP? Udp datagram
TCP: byte stream service can deliver any ip address to any ip and TCp?
TCP attach to a TCP port.
TCP its like a phone call. TCP is bi directional : send back and forth to hosts
http: web browser, every time u go to
How the internet works in general
TCP: one byte in , one byte out another side
GET index.html HTTP/1.0
Ur browser in the background open a sockets and does these things
Head, only get the headers
Post, put something, get also works?
POST name of cgi scrip
http:/en.wikipedia.org/wiki/Ip_(struct)
struct ip cfw_
unsigned int
ip_hl:4; /* both fields are 4 bits */ like a 4
bit field, allocate 4 bits
unsigned int
ip_v:4;
uint8_t
ip_tos;
uint16_t
ip_len;
uint16_t
ip_id;
uint16_t
ip_off;
uint8_t
ip_ttl;
uint8_t
ip
-| Black Box| - - Queuing System
Packet Switch store and hope long term rate is less then 20 or drop ackets
How do you define and measure rate?
R(t) = total # of bits entering the system from 0 to t
a e-at t>= 0
1 common choice: h(t) = cfw_0
t<0
h(t) = T
If U is a uniform RV on [0,1] (random variable)
Prob(U<= x)=xo if x0 <= 1 and xo >= 0
Went want to generate a random variable (R.V.) X such that Prob( X<= x)=F(x) for some F(x)
One way to get tme stamps is to do system calls.
Gettimeof day
Y=0 then get 15
One way to go to sleep is use the select call
One way is to use NULL for readfds, writefds, exceptfds, and put a value for timeout, call the
select, wont return until it times out
Nc see if it sends, send out one packet, telnet dump
For server, parsed all
proxytcp
has a port that it listens on, listenport
you specify two things dest_IP dest_port
specify port and redirecting things
build a system where takes an input and delivery it and in between theres something really bad
<form method = POST enctype= mul
Keep track of the departure time, when the first packet arrives, when any packet arrives, well
take the current time add d seconds to it which is the best candidate departure time, can possible
be later than that b/c look at last time of departure so keep
Suppose we have two TCP flows passing through some router
- Assume that rate of packet loss for stream 1 = p1
- Rate of others for stream 2 = p2
- Last time T(Throughput) = MTU/RTT
Bleh bleh bleh of top
modified go back n
Rules for A:
While in state i
- I
ECE 158A - Data Networks MIDTERM
SOLUTIONS
Problem 1 - Queue ()
Consider two dierent links that can be modeled as M/M/1 queues, denoted
respectively as Q1 and Q2. Q1 has a server with service rate 1 = 200 packets
per second (in this problem, we assume all
ECE 158A - Data Networks MIDTERM
Tuesday November 26, 2013
NAME:
PID:
Problem 1 (40 points):
Problem 2 (30 points):
TOTAL (70 points):
1
Problem 1 - Queues and fairness (40 points)
Consider two dierent links that can be modeled as M/M/1 queues, denoted
re
MM IVCCM/ d4m
511w]? 57mm 5:§QJ,Z,3,43
+WUL5¢JDWL r(oi0)= F(O,i) :F(0,7I): :1 fella: L
f(4-(%):f(9(2_)= Fan); Fora) :4 5
ight? awn/Em
+ (9&1') Wu? F
(615% E QWvjrwb
CM Ma Mulcvwwm
Ir.,1r¢,..,1r*) IT'- F: Eng Tl" TIL T41 A 0 0 a e
0 A 0 e 0
O o
ECE 158A - Data Networks MIDTERM
SOLUTIONS
Problem 1 - Queue (15 points)
Consider an ATM machine that is operative 24 hours a day, 7 days a week, where
customers arrive randomly to withdraw money from their accounts. Luckily,
there is enough space in fron
UCSD ECE 158A
Data Networks I
TuTh 8:009:20
Homework # 3
Tuesday, October 28, 2014
Paolo Minero
Homework Set #3
Due: Tuesday, November 4, 2014
Theoretical Problems:
1. P7.2
(postponed to next assignment)
P
7.4
2.
3. Answer true or false to the following