Sunteți pe pagina 1din 4

Data Communications & Network Principles

UNIVERSITY OF HERTFORDSHIRE
Faculty of Engineering and Information Sciences
School of Electronic, Communication & Electrical Engineering
Data Communications & Network Principles (MELE0025)
Tutorial Sheet 2 - Solutions
Q. 1

For the network in figure 1 A, B, , F represent


nodes. The links are labelled with relative costs;
give the datagram forwarding table for nodes A, B,
C, D, E, & F ensuring that the packets are
forwarded via the lowest-cost path to its
destination.

A
8

6
1

B
2

D
2

Figure 1: Network with links labelled


with relative costs
Node A
Destination
B
C
D
E
F
Node C
Destination
A
B
D
E
F
Node E
Destination
A
B
C
D
F

Next Hop
C
C
C
C
C

Node B
Destination
A
C
D
E
F

Next Hop
E
E
E
E
E

Next Hop
A
E
E
E
F

Node D
Destination
A
B
C
E
F

Next Hop
E
E
E
E
E

Next Hop
C
B
C
D
C

Node F
Destination
A
B
C
D
E

Next Hop
C
C
C
C
C

ECEE, University of Hertfordshire

Data Communications & Network Principles

Q. 2

Suppose a router has built up the routing table shown in the table 1.
Describe what the router
does with a packet
addressed to each of the
following destinations:
(a) 128.96.39.10
(b) 128.96.40.12
(c) 128.96.40.151
(d) 192.4.153.17
(e) 192.4.153.90
a) D1 = 128.96.39.10
D1SM1 = 128.96.39.0

Subnet Number
Subnet Mask
128.96.39.0
255.255.255.128
128.96.39.128
255.255.255.128
128.96.40.0
255.255.255.128
192.4.153.0
255.255.255.192
<default>
Table 1: Routing table

Next Hop
Interface 0
Interface 1
R2
R3
R4

Interface 0

b) D2 = 128.96.40.12
D2SM1 = 128.96.40.0
Jump to next entry in Subnet Mask (SM2)
D2SM2 = 128.96.40.0
Jump to next entry in Subnet Mask (SM3)
D2SM3 = 128.96.40.0 R2
c) D3 = 128.96.40.151
D3SM1 = 128.96.40.128
Jump to next entry in Subnet Mask (SM2)
D3SM2 = 128.96.40.128
Jump to next entry in Subnet Mask (SM3)
D3SM3 = 128.96.40.128
Jump to next entry in Subnet Mask (SM4)
D3SM4 = 128.96.40.128
Jump to last entry R4
d) D4 = 192.4.153.17
D4SM1 = 192.4.153.0
Jump to next entry in Subnet Mask (SM2)
D4SM2 = 192.4.153.0
Jump to next entry in Subnet Mask (SM3)
D4SM3 = 192.4.153.0
Jump to next entry in Subnet Mask (SM4)
D4SM4 = 192.4.153.0
R3
e) D5 = 192.4.153.90
D5SM1 = 192.4.153.0
Jump to next entry in Subnet Mask (SM2)
D5SM2 = 192.4.153.0
Jump to next entry in Subnet Mask (SM3)
D5SM3 = 192.4.153.0
Jump to next entry in Subnet Mask (SM4)
D5SM4 = 192.4.153.64
Jump to last entry R4
ECEE, University of Hertfordshire

Data Communications & Network Principles

Q. 3
a)

If the subnet mask is 255.255.240.0, how many hosts can be connected?


1 subnet/network
0 host
255.255.240.0 = 255.255.1111 0000.0000 0000
12 bits for host
No of hosts = 212 2 = 4094

b) If the subnet mask is 255.255.255.204, how many hosts can be connected?


255.255.255.204 = 255.255.255.11 00 11 00
4 bits for host
No of hosts = 2 2 2 = 14
c)

List the host addresses in subnet 147.197.204.0 if this subnet mask


(255.255.255.204) is used.
Subnet Number = 147.197.204.0
Destination AND subnet mask = subnet number
D 255.25..255.204 = 147.197.204.0
D:
SM:
SN:

147.
255.
147.

197.
255.
197.

204.
255.
204.

147.197.204.00 00 00 01
147.197.204.00 00 00 10
147.197.204.00 00 00 11
147.197.204.00 01 00 00
147.197.204.00 01 00 01
147.197.204.00 01 00 10
147.197.204.00 01 00 11
147.197.204.00 10 00 00
147.197.204.00 10 00 01
147.197.204.00 10 00 10
147.197.204.00 10 00 11
147.197.204.00 11 00 00
147.197.204.00 11 00 01
147.197.204.00 11 00 10

=
=
=
=
=
=
=
=
=
=
=
=
=
=

0
1
0

0
1
0

x
0
0

x
0
0

0
1
0

0
1
0

x
0
0

x
0
0

147.197.204.1
147.197.204.2
147.197.204.3
147.197.204.16
147.197.204.17
147.197.204.18
147.197.204.19
147.197.204.32
147.197.204.133
147.197.204.34
147.197.204.35
147.197.204.48
147.197.204.49
147.197.204.50

Q. 4

There are two approaches to the implementation of fragmentation and reassembly: intranet fragmentation and internet fragmentation.
i) Compare and contrast the implementations of these two approaches.

Intranet fragmentation

With intranet fragmentation, the IP in the source host first fragments the data
into a number of individually addressed datagrams as dictated by the network to
which it is attached. It initiates the sending of these to the IP in the first
intermediate node. On receipt of each datagram, the IP in the intermediate
node reassembles the data. Next it fragments the reassembled data into a
ECEE, University of Hertfordshire

Data Communications & Network Principles

possibly different set of individually addressed datagrams as dictated by the


maximum packet size of the second network. This procedure is repeated at
each intermediate node until the datagram reaches the destination where IP in
the destination host reassembles the data.

Internet fragmentation

With internet fragmentation, IP in the source host carries out the same
fragmentation procedure as in intranet fragmentation and sends the resulting
datagrams to the IP in the first intermediate node. However, this time the IP in
the intermediate node does not reassemble the data. Instead it either modifies
the appropriate fields and sends the received datagrams directly onto the
second network (if the latter can support the size of datagram or larger) or refragments the datagram into smaller fragments (datagrams). In the latter case,
the IP will segment each datagram it receives into a number of smaller
datagrams, each with the same source and destination addresses. This
procedure is repeated at each intermediate node until the datagram reaches the
IP in the destination host where the data is again reassembled.
ii) Using your answer in (i), evaluate the pros and cons of each approach.
The pros and cons of each approach can be summarised as follows:

Intranet fragmentation

The advantage of intranet fragmentation is that each time the maximum


allowable packet size of the network is used such that there is efficient use of
the available resources of the network. However the disadvantage of intranet
fragmentation is that time is wasted at each intermediate node to re-assemble
the data.

Internet fragmentation

The advantage of internet fragmentation is that no time is wasted at each


intermediate node to re-assemble the data. However the disadvantage is that
we do not always make maximum use of the capacity of each network.

Nandini Alinier, 27th October 2005

ECEE, University of Hertfordshire

S-ar putea să vă placă și