Homework 2 Assignment For ECE671: You Get A Wrong Answer, You Can Get Partial Credit If You Show Your Work. If You Make A
Homework 2 Assignment For ECE671: You Get A Wrong Answer, You Can Get Partial Credit If You Show Your Work. If You Make A
Figure 1. Network Layout
Figure 2. Congestion window of TCP 1 and TCP 2.
ECE671: Homework 2 3
Seq #:1200
ACK
Seq #:2400
Figure 3. TCP segments exchange
Solution:
c) Reno recovers faster.
d) It allows the receiver to signal the sender how much unacknowledged data can be
in flight.
Solution to a) and b)
Solution to e)
ECE671: Homework 2 5
Problem 3 (20 Points):
Suppose two nodes, A and B, are attached to opposite ends of an 1200m cable, and
that they each have one frame of 1,500 bits (including all headers and preambles) to
send to each other. Both nodes attempt to transmit at time t=0. Suppose there are
four repeaters between A and B, each inserting a 40-bit delay. Assume the
transmission rate is 100 Mbp, and CSMA/CD with backoff intervals of multiples of
512 bits times is used. After the collision, A draws K=0 and B draws K=1 in the
exponential backoff protocol. Ignore the jam signal in this case.
a. What is the one-way propagation delay (including repeater delays) between
A and B in seconds? Assume the signal propagation speed is 2*108 m/sec.
b. At what time (in seconds) is A’s packet completely delivered at B?
c. Now suppose that only A has a packet to send and that the repeaters are
replaced with switches. Suppose that each switch has a 20-bit processing
delay in addition to a store-and-forward delay. At what time, in seconds, is
A’s packet delivered at B?
Solution:
a)
𝟏𝟐𝟎𝟎𝒎 𝟒𝟎𝒃𝒊𝒕𝒔
𝟖
+𝟒∗
𝟐 ∗ 𝟏𝟎 𝒎/𝒔𝒆𝒄 𝟏𝟎𝟎 ∗ 𝟏𝟎𝟔 𝒃𝒑𝒔
b)
First note, the transmission time of a single frame is given by 1500/(100Mbps) =15
microsecond, longer than the propagation delay of a bit.
• At time t = 0 , both A and B transmit.
• At time t = 7.6µ sec , both A and B detect a collision, and then abort.
• At time t = 15.2µ sec last bit of B 's aborted transmission arrives at A .
• At time t = 22.8µ sec first bit of A 's retransmission frame arrives at B .
1500bits
• At time t = 22.8µ sec+ = 37.8µ sec A 's packet is completely
100 ×10 6 bps
delivered at B .
c) The line is divided into 5 segments by the switches, so the propagation delay between
𝟏𝟐𝟎𝟎𝒎/𝟓
switches or between a switch and a host is given by 𝟐∗𝟏𝟎𝟖 𝒎/𝒔𝒆𝒄 = 𝟏. 𝟐𝒎𝒊𝒄𝒓𝒐𝒔𝒆𝒄.
The delay from Host A to the first switch is given by 15 microseconds (transmission
delay), longer than propagation delay. Thus, the first switch will wait 16.4=15+1.2+0.2
(note, 0.2 is processing delay) till it is ready to send the frame to the second switch. Note
that the store-and-forward delay at a switch is 15 microseconds. Similarly, each of the
other 3 switches will wait for 16.4 microsecond before ready for transmitting the frame.
The total delay is:
16.4*4 + 15+1.2 =81.8 microsecond.
Problem 4 (20 Points):
Consider the single switch VLAN in Figure 4, and assume an external router is
connected to switch port 1. Assign IP addresses to the EE and CS hosts and router
interface. Trace the steps taken at both the network layer and the link layer to
transfer and IP datagram from an EE host to a CS host.
Figure 4
For this problem, keep the following in mind:
• Assume the IP addressing scheme for the EE and CS nodes follows the one
indicated in Error! Reference source not found..
• Assume that the EE VLAN has ID 11 and the CS VLAN has ID 12.
• The first figure at the following link gives you an idea of the logical setup for
such a scenario: http://gcharriere.com/blog/?p=620
a. Assign IP addresses to the three nodes in the EE VLAN and to the three nodes
in the CS VLAN. What’re the subnet masks for these two VLAN, if each
department should be capable to host 200 hosts?
b. Describe how the router interface has to be set up. What 802.1q VLAN ID will
be added to a frame that comes from subnet 111.111.1/24? What 802.1q
VLAN ID will be added to a frame that comes from subnet 111.111.2/24?
c. Suppose that host A in the EE department would like to send an IP datagram
to host B in CS department. What would be the steps taken at both the
network layer and the link layer?
ECE671: Homework 2 7
Figure 5
Solution:
a. The IP addresses for those three computers (from left to right) in EE
department are: 111.111.1.1, 111.111.1.2, 111.111.1.3. The subnet mask is
111.111.1/24.
The IP addresses for those three computers (from left to right) in CS
department are: 111.111.2.1, 111.111.2.2, 111.111.2.3. The subnet mask is
111.111.2/24.
b. The router’s interface card that connects to port 1 can be configured to
contain two sub-interface IP addresses: 111.111.1.0 and 111.111.2.0. The
first one is for the subnet of EE department, and the second one is for the
subnet of CS department. Each IP address is associated with a VLAN ID.
Suppose 111.111.1.0 is associated with VLAN 11, and 111.111.2.0 is
associated with VLAN 12. This means that each frame that comes from
subnet 111.111.1/24 will be added an 802.1q tag with VLAN ID 11, and each
frame that comes from 111.111.2/24 will be added an 802.1q tag with VLAN
ID 12.
c. Suppose that host A in EE department with IP address 111.111.1.1 would like
to send an IP datagram to host B (111.111.2.1) in CS department. Host A first
encapsulates the IP datagram (destined to 111.111.2.1) into a frame with a
destination MAC address equal to the MAC address of the router’s interface
card that connects to port 1 of the switch. Once the router receives the frame,
then it passes it up to IP layer, which decides that the IP datagram should be
forwarded to subnet 111.111.2/24 via sub-interface 111.111.2.0. Then the
router encapsulates the IP datagram into a frame and sends it to port 1. Note
that this frame has an 802.1q tag VLAN ID 12. Once the switch receives the
frame on port 1, it knows that this frame is destined to VLAN with ID 12, so
the switch will send the frame to Host B which is in CS department. Once
Host B receives this frame, it will remove the 802.1q tag.
Problem 5 (20 Points):
C
BB:89:34:E7:01:3B
1
(3)
Switch 4 Switch 3
2
10:D4:E1:A8:97:F0 3 B
AA:10:F3:5C:01:04
R1
(1) (2)
Switch 1 1 3 Switch 2
A 20:FF:3A:BC:01:4E
2
Consider the network shown above.
a. Consider an ARP request send by node B for node A. Whose IP-to MAC
address translation is being queried?
b. What is the destination MAC address on the frame containing the ARP
request?
c. After B receives the ARP reply, what is contained in switch 3’s switching
table?
d. Assign IP addresses and subnet masks to hosts A, B, C, and interfaces 1 and 3
of R1. Note: Each of the subnets should be able to host a maximum of 17
hosts.
e. Now consider the frame containing the B-to-A IP datagram. What are the
MAC source and destination address of this frame and the IP source and
destination addresses in the encapsulated IP datagram at points (1), (2), and
(3).
Solution:
a. The right router interface “3”.
b. The MAC address of the right router interface (10:D4:E1:A8:97:F0).
c. Switch 3 knows that B is reachable via interface 2 (as a result of the ARP
request sent by B) and that the router R1 is reachable via interface 3 (as a
result of the ARP reply sent by R1)
d. Because each subnet should be able to host a maximum of 17 hosts, five
address bits are needed for each subnet. So, let’s assign the left subnet
XX.YY.ZZ.xx0*****/27, where the XX, YY, and ZZ are 8 bit numbers. Each x
is a bit and the five *’s correspond to the five address bits for this network.
For the right subnet, well use XX.YY.ZZ.xx1*****/27. Any address in the
range XX.YY.ZZ.xx000001 to XX.YY.ZZ.xx011110 can be used for A, C, and
interface 1. Any address in the range XX.YY.ZZ.xx100001 to
XX.YY.ZZ.xx111110 can be used for B and interface 1.
e. (1) MAC-D: AA:10:F3:5C:01:04, MAC-S: 20:FF:3A:BC:01:4E, IP-D: e.g.,
XX.YY.ZZ.xx000001 , IP-S: e.g., XX.YY.ZZ.xx100001
ECE671: Homework 2 9
(3) MAC-D: 10:D4:E1:A8:97:F0, MAC-S: BB:89:34:E7:01:3B, IP-D: : e.g.,
XX.YY.ZZ.xx000001, IP-S: e.g., XX.YY.ZZ.xx100001; (2) same as (1).
Problem 6 (10 Points):
This problem focuses on the new approach of Software Defined Networking (SDN).
a. Explain what happens when a packet arrives at the switch and no
matching flow table for that packet exists on the switch?
b. What information is contained in a flow table entry?
c. Name the header fields that can be used for matching in the case of
OpenFlow?
d. What happens if a flow rule times out?
e. What OpenFlow message is used to add a new flow table in a switch?
What message does the switch use to let the controller know that it
received a packet for which it does not have a matching rule?
Solution:
a. Packet will be sent from the switch to the controller. Controller checks if a
new flow table should be installed in the switch after checking the packet.
If so, new flow table entry is sent to the switch and the packet is sent to
the switch including information on which port of the switch it should be
sent out.
b.
Match Action Counter Priority Time-out
c.
Switch VLAN VLAN MAC MAC Eth IP IP IP IP L4 L4
Port ID pcp src dst type Src Dst ToS Prot sport dport
d. It will be removed from the switch. A packet that would have matched
that rule will go through the routine described in a).
e. Flow-mod, Packet-in.