TSIN02 Internetworking

Transcription

TSIN02 Internetworking
TSIN02 Internetworking
General networking
Daniel Persson
Exercise 1
Show the communication at the application layer for the following simple private internet:
Exercise 2
Show the communication at the application layer for the following simple private internet:
Exercise 3
Describe three possible reasons to why a sender does not receive an ACK for a transmitted
packet!
Exercise 4
Describe the hidden terminal problem!
Exercise 5
Describe two different ways of performing channel partitioning!
Exercise 6
You are to design a wireless system that reads railway sensor data over the Internet, and use
GSM-Railway (GSM-R) – a GSM standard for railway applications. It is important that the
system is robust. It is known that commercial GSM bands disturb GSM-R. Therefore, you
choose to use a strong link layer repetition code:
0
1
0000
1111
a) Assume that the channel and digital modulation gives you an effective binary symmetric
channel, with a transition probability less than 0.5 for a transition between 0 and 1, and
assume further that there is equal probability for that the codeword 0000 and the
codeword 1111 are used at the encoder. How do you maximum likelihood (ML)-decode
0001?
b) How do you ML-decode 1101?
c) How do you ML-decode 1100?
d) Is decoding always giving the right answer?
Exercise 7
Ethernet uses CSMA-CD. User 1 starts transmitting at time 0, and user 2 starts to transmit 1
microseconds later. The users are situated at a distance of 900 m from each other. Assume
that the propagation speed of the signal is the speed of light. The jamming signal lasts one
microsecond.
a) When does user 2 detect user 1’s signal?
b) When is the first time that user 1 can start retransmitting?
Exercise 8
Why is CSMA-CD chosen for Ethernet, while CSMA-CA is chosen for WIFI?
Exercise 9
What is the range of addresses in the following blocks:
a) 123.56.77.32/29
b) 200.17.21.128/27
c) 17.34.16.0/23
d) 180.34.64.64/30
Exercise 10
An ISP is granted a block of addresses starting with 150.80.0.0/16.
The ISP wants to distribute these blocks to customers as follows:
a) The first group has 200 medium-size businesses, each needs 128 addresses.
b) The second group has 400 small businesses, each needs 16 addresses.
c) The third group has 2048 households, each needs 4 addresses.
Design the subnets for the businesses and the households and give the slash (CIDR) notation
for each subblock. Find out how many addresses are still available after these allocations.
1
General networking
TSIN02 Internetworking
Daniel Persson
Exercise 11
A large number of consecutive IP addresses are available starting at 198.16.0.0.
Suppose that four organisations A, B, C and D request 4000, 2000, 4000, 8000
addresses respectively, and in that order. For each of these, give the first IP address
assigned, the last address assigned, and the subnetwork address in the CIDR notation.
Exercise 12
A router has the following (CIDR) entries in its routing table:
Address/mask
Next hop
135.46.56.0/22
Interface 0
135.46.60.0/22
Interface 1
192.53.40.0/23
Router 1
default
Router 2
For each of the following IP addresses, what does the router do if a packet with that
destination address arrives?
a) 135.46.63.10
b) 135.46.52.2
c) 135.46.57.14
d) 192.53.40.7
e) 192.53.56.7
Exercise 13
For a given IP address 201.14.78.65 and the subnet mask 255.255.255.224,
what is the subnet address (in slash notation)?
Exercise 14
Show the shortest form of the following IPv6 adresses:
a) 2340:1ABC:119A:A000:0000:0000:0000:0000
b) 0000:00AA:0000:0000:0000:0000:119A:A231
c) 2340:0000:2222:0000:0000:119A:A001:0000
d) 0000:0000:0000:2340:0000:0000:0000:0000
Exercise 15
The network layer divides the datagrams into smaller datagrams if they are bigger than the
MTU of a link layer over which they are to be sent.
a) Write down an advantages of having a large MTU.
b) Write down an advantage of having a small MTU.
Exercise 16
Host A sends an ICMP query message to host B, but never receives an answer.
Give three possible causes and the corresponding course of actions for host A.
Exercise 17
In the figure below, a router is connected to some (sub)networks. The figure also
shows the routing table for the router.
A datagram arrives at one of the router interfaces. To which interface is the
datagram forwarded when the destination address is
a) 145.14.192.71?
b) 135.11.80.21?
2
General networking
TSIN02 Internetworking
Daniel Persson
Exercise 18
A datagram arrives to at router R1 in the figure below. The figure also
shows the routing table for router R1. To which interface is the
datagram forwarded when the destination address is
a) 201.4.16.70?
b) 202.70.20.30?
3
General networking
TSIN02 Internetworking
Daniel Persson
Exercise 19
You will transport the final of Eurovision song contest via IP-TV to a majority of the
European households from Copenhagen 2014. The problem is that the IP network in
Copenhagen will be overloaded when unicasting such a massive flood of packets to all the
households. Instead you plan to set up a network layer multicast service. To better
understand the problem, you model the distribution network as a tree, where each node is
connecting to 2 nodes at each level, and where there are 28 levels. The households are all on
level 28, and all nodes on this level are households.
a) For every datagram that has to be delivered to the households, how many unicast packets
will need to be sent on the most charged link?
b) Same question in the case of a perfect multicast, where each node receives one datagram,
and retransmits two copies, one for each link?
Exercise 20
How does each router table look in a network with three routers A, B, and C, where all
routers connect to each other, but where the transport cost between router A and B; and A
and C are 1; while the cost between routers B and C is 3?
Exercise 21
A router has three interfaces, each of them connected to a subnet.
a) What is the computational complexity for forwarding the packet on the right interface?
What is the storage complexity associated with the sorting?
b) What would the complexity be if the IP addresses were not organized in subnets? What is
the storage complexity associated with the sorting?
Exercise 22
a) Why is fragmentation performed at the network layer?
b) Discuss why we need to reassembly at the final destination, not at each router.
Exercise 23
A home user has installed a switch to link her ADSL modem M, her two laptop computers A
and B, and her husband’s desktop H. M is on switch interface 1, A is on switch interface 2, B
is on switch interface 3, and H is on switch interface 4. How are frames forwarded by the
switch after that the following frames have been sent: A to H, B to M, M to B, M to A? The
switch’s forwarding table is initially empty. Assume that the computers know their
destination IP and MAC addresses.
Exercise 24
In the same network, assume again that the switch’s forwarding table is empty. Assume now
that the host A wants to send a message to host B, and that A knows B’s IP address, but not
B’s MAC address.
a) List the steps until the first packet is sent, if A would be using ARP. Also discuss the
switch’s behaviour!
b) List the steps if A would not be using ARP
c) Which strategy of that in (a) and that in (b) is best, and why?
Exercise 25
1/2 of the users served by an ISP tend to use real time speech communication over the
Internet, and use 10 kbit/s each. 1/4 of the users tend to like to stream mp3 songs, and use
100 kbit/s each. ¼ of the users like video applications, and use 1Mbit/s. The ISP routers
connecting to the backbone can only handle 1 Gb/s. The ISP considers two choices:
1) Continue business as usual with the TCP/IP stack
2) Take part in a worldwide initiative to implement IntServ to get QoS. The ISP would
then have to guarantee video quality to all users.
a) How many more users would the ISP be able to serve while continuing using TCP/IP
alone, compared to when IntServ is used?
b) What happens if 1/8 of the music-listeners started to prefer a new music video service if
we use TCP/IP, and with IntServ, with the user allocation in (a)?
c) What are the pros and cons of non-circuit-switched networks?
4
TSIN02 Internetworking
General networking
Daniel Persson
d) To what extent does a connection-oriented service help a non-circuit-switched network?
e) What is a virtual circuit?
Exercise 26
Which parameters does a newly added host in a network need to know in order to
communicate outside the local network?
Exercise 27
A DHCP packet in encapsulated in a UDP packet, which is encapsulated in an IP packet,
which is encapsulated in an Ethernet frame. Find the efficiency of a DHCP packet when no
option is used. The efficiency in this case is measured in the number of bytes in the DHCP
packet to the total number of bytes transmitted on the physical layer.
Exercise 28
Why does a newly added host need to know
a) the IP address of a router?
b) the IP address of a name server?
c) its subnet?
Exercise 29
Which are the two address allocations provided by DHCP? Describe when they are used!
Exercise 30
A user Ada connects a new computer to an Ethernet LAN, opens a browser, and types in
google.com. Well at google, she types in the word “guitar”. She gets a list of sites and
accesses guitar.com. What happens on the different TCP/IP stack layers?
Exercise 31
a) A name space that maps each address to a unique name can be organized in two ways.
Describe these two ways of organizing the name space!
b) What is the difference between a root server, a primary server, and a secondary server?
c) Which are the three sections of the domain name space (tree)? Describe them!
d) What does “name-address resolution” mean?
e) What is the difference between recursive resolution and iterative resolution?
Exercise 32
Is registration required if the mobile host acts as a foreign agent? Explain your answer.
Exercise 33
Redraw Figure 10.7 in the course book (also shown below) with the corresponding data
transfer path if the mobile host acts as a foreign agent.
1
4
2
3
Exercise 34
We have the following IP addresses in a mobile IP scenario shown below:
5
TSIN02 Internetworking
General networking
Daniel Persson
Mobile host home address:
Mobile host care-of address:
Remote host address:
Home agent address:
130.45.6.7/16
14.56.8.9/8
200.4.7.14/24
130.45.10.20/16
Let us define a simplified IP datagram in the following way:
HEADER |
DATA
=
O.H.F. | S.IP | D.IP |
DATA
where
O.H.F. = Other Header Fields (with details that we are not so interested in here),
S.IP = Source IP address, and
D.IP = Destination IP address.
Show the contents of a simplified IP datagram sent from the remote host to the home agent.
Exercise 35
Using the information in Exercise 11, show the contents of a simplified IP datagram sent by
the home agent to/via the foreign agent. Use tunnelling.
Exercise 36
Using the information in Exercise 11, show the contents of a simplified IP datagram sent by
the foreign agent to the mobile host.
Exercise 37
Using the information in Exercise 11, show the contents of a simplified IP datagram sent by
the mobile host to the remote host.
Exercise 38
What type of inefficiency do we have in Exercise 5? Explain your answer.
1
4
2
3
Exercise 39
Are both UDP and IP unreliable to the same degree? Why or why not?
Exercise 40
A client uses UDP to send data to a server. The data length is 16 bytes.
a) What is efficiency of this transmission at the transport layer, in terms of the ratio of
data bytes to the total number of transmitted bytes?
b) What is the corresponding efficiency at the network layer (assume no options for the IP
datagram header)?
Exercise 41
TCP is sending data at 1 megabyte per second (8Mbps). If the sequence number starts with
7000, how long does it take before the sequence number goes back to zero?
6
General networking
TSIN02 Internetworking
Daniel Persson
Exercise 42
Compare the TCP segment header and the UDP datagram header. Make a table, like the one
below, where you list all the fields in the TCP segment header and all the fields in the UDP
datagram header. Explain shortly in the rightmost column the purpose of each field.
Fields
Source port numbers
….
….
UDP

TCP

Purpose
You should fill in this field…
….
….
Exercise 43
UDP is a message-oriented protocol, TCP is a byte-oriented protocol.
If an application needs to protect the boundaries of its messages, which protocol should
be used, UDP or TCP?
Exercise 44
In a TCP connection, the value of cwnd is 3000 and the value of rwnd is 5000. The host has
sent 2.000 bytes, which has not yet been acknowledged. How many more bytes can be sent?
Exercise 45
A TCP connection is using a window size of 10.000 bytes and the previous
acknowledgement number was 22.001. It receives a segment with acknowledgement number
24.001 and a window size advertisement of 12.000. Draw a diagram to show the situation of
the window before and after.
7