CIS 427 – COMPUTER NETWORKS

advertisement
CIS 527 – COMPUTER NETWORKS
SOLUTION – HOMEWORK #3
1. (20 points) Consider the arrangement of learning bridges shown in the following
figure. Assuming all are initially empty, give the forwarding tables for each of the
bridges B1-B4 after the following transmissions:
D sends to C; A sends to D; C sends to A
B3
A
B1
C
B2
B4
D
Solution:
When D sends to C, all bridges see the packet and learn where D is. However, when A
sends to D, the packet is routed directly to D and B3 does not learn where A is. Similarly,
when C sends to A, the packet is routed by B2 towards B1 only, and B4 does not learn
where C is.
The forwarding table for Bridge B1
Destination
Next Hop
A
A-Interface
C
B2-Interface
D
B2-Interface
The forwarding table for Bridge B2
Destination
Next Hop
A
B1-Interface
C
B3-Interface
D
B4-Interface
The forwarding table for Bridge B3
Destination
Next Hop
C
C-Interface
D
B2-Interface
The forwarding table for Bridge B4
Destination
Next Hop
A
B2-Interface
D
D-Interface
2. (10 points) Cell switching methods essentially always use virtual circuit routing
rather than datagram routing. Give a specific argument why this is so.
Solution:
The drawbacks to datagram routing for small cells are the larger addresses, which would
now take up a considerable fraction of each cell, and the considerably higher per-cell
processing costs in each router that are not proportional to cell size.
3. (10 points) The CS-PDU for AAL5 contains up to 47 bytes of padding, while the
AAL3/4 CS-PDU only contains up to 3 bytes of padding. Explain why the effective
bandwidth of AAL5 is always the same as, or higher than, that of AAL3/4, given a
PDU of particular size.
Solution:
For AAL5, the number of cells needed to transmit a packet of size x is (x + 8)/48 rounded
up to the nearest integer, or ceiling ((x + 48)/48). This rounding is essentially what the
padding does; it represents space that would be needed anyway when fitting the final
segment of the CS-PDU into a whole ATM cells. For AAL3/4 it takes (x +8)/44 cells,
again rounded up. The CS-PDU pad field is only to make the CS-PDU aligned on 32-bit
boundaries; additional padding is still needed to fill out the final cell.
 ( x  8)   ( x  8) 

Since 
for all x,
 48   44 
Then, effective bandwidth of AAL5 is always the same as, or higher than that of AAL3/4.
4. (15 points) The following table is a routing table using CIDR. Address bytes are in
hexadecimal.
Net/MaskLength
Next hop
C4.50.0.0/12
C4.5E.10.0/20
C4.60.0.0/12
C4.68.0.0/14
80.0.0.0/1
40.0.0.0/2
00.0.0.0/2
A
B
C
D
E
F
G
State to what next hop the following will be delivered.
(A) C4.5E.20.87
(B) C4.5E.1A.09
(C) C3.41.80.02
(D) C4.6D.31.2A
(E) C4.6B.31.2B
Solution:
Choose the address with longest Match
Net/MaskLength
Next hop
Binary Address
C4.50.0.0/12
C4.5E.10.0/20
C4.60.0.0/12
C4.68.0.0/14
80.0.0.0/1
40.0.0.0/2
00.0.0.0/2
A
B
C
D
E
F
G
1100.0100.0101
1100.0100.0101.1110.0001
1100.0100.0110
1100.0100.0110.10
1
01
00
Binary Address
Next Hop No. Of. Bits Match
C4.5E.20.87 = 11000100.01011110.00100000.10000111 => A;
12
C4.5E.1A.09 = 11000100.01011110.00011010.00001001 => B;
20
C3.41.80.02 = 11000011.01000001.10000000.00000010 => E;
1
C4.6D.31.2A = 11000100.01101101.00110001.00101010 => C;
12
C4.6B.31.2B = 11000100.01101011.00110001.00101011 => D;
14
5. (20 points) Suppose a TCP message that contains 2048 bytes of data and 20 bytes of
TCP header is passed to IP for delivery across two networks of the Internet. The first
network uses 14 byte headers and has a MTU of 1024 bytes; the second uses 8-byte
headers with an MTU of 512 bytes. Each network’s MTU gives the size of the largest IP
datagram that can be carried in a link-layer frame. Give the sizes and offsets of the
sequence of fragments delivered to the network layer at the destination host. Assume all
IP headers are 20 bytes. Note, the IP requires that fragmentation should always happen
on 8-byte boundaries.
Solution:
Consider the first network. Packets have room for 1024 - 20 = 1004 bytes of IP-level data;
because 1004 is not a multiple of 8 each fragment can contain at most 8× floor((1004/8)) =
1000 bytes. We need to transfer 2048 + 20 = 2068 bytes of such data. This would be
fragmented into fragments of size 1000, 1000, and 68.
Fragment
1
2
3
Size
1000
1000
68
Offest
0
1000
2000
Over the second network, the 68-byte packet would be unfragmented but the 1000-data-byte
packet would be fragmented as follows. The IP header is 20 bytes, leaving 512-20 = 492 bytes
for IP-level data. Again rounding down to the nearest multiple of 8, each fragment could contain
488 bytes of IP-level data. 1000 bytes of such data would become fragments with data sizes 488,
488, and 24.
Fragment
1
2
3
4
5
6
7
Size
488
488
24
488
488
24
68
Offest
0
488
976
1000
1488
1976
2000
6. (20 points) An organization has a class C network 196.10.10 and wants to form
subnets for five departments, which host as follows:
A.
B.
C.
D.
E.
55 hosts
50 hosts
45 hosts
25 hosts
20 hosts
There are 195 hosts in all. Design a possible arrangement of subnets to make each
department in a different subnet. For each subnet, give subnet mask and range of IP
addresses.
Solution:
Class C network: 196.10.10
Department
A: 55 Hosts
B: 50 Hosts
C: 45 Hosts
D: 25 Hosts
E: 20 Hosts
Subnet Mask
255.255.255.192
255.255.255.192
255.255.255.192
255.255.255.224
255.255.255.224
Subnet ID
196.10.10.0
196.10.10.64
196.10.10.128
196.10.10.192
196.10.10.224
Range of Address
196.10.10.0 – 196.10.10.63
196.10.10.64 – 196.10.10.127
196.10.10.128 – 196.10.10.191
196.10.10.192 – 196.10.10.223
196.10.10.224 – 196.10.10.255
Download