Professional Documents
Culture Documents
Key NWC 1
Key NWC 1
(a) Suppose the university has one Class B address. Design an appropriate subnet
addressing scheme.
(b) Design an appropriate CIDR addressing scheme.
Lời Giải:
Class B's address has 14 bits for the network ID and 16 bits for the host ID. We need to
decide how many bits to allocate to the subnet id versus the host id for designing an
appropriate subnet addressing scheme. We can choose either 7 bits or 8 bits to identify
the hosts.
The CIDR addressing scheme involves generating a prefix length that indicates the length
of the network mask.
Sau khi para:
The address of class B consists of 16 bits for the host ID and 14 bits for the network ID.
Choosing the number of bits to assign to the subnet ID in comparison to the host ID is
necessary in order to create a suitable subnet addressing scheme. To identify the hosts,
we have a choice of seven or eight bits.
The process of creating a prefix length that represents the length of the network mask is
part of the CIDR addressing scheme.
Lời Giải:
a) A) In a three-way handshake procedure, one must ensure the selection of the initial
sequence number is always unique. If station B receives an old SYN segment from A,
B will acknowledge the request based on the old sequence number. When A receives
the acknowledge segment from B, A will find out that B received a wrong sequence
number. A will discard the acknowledgement packet and reset the connection.
b)
b) If an old SYN segment from A arrives at B, followed by an old ACK segment from A
to a SYN segment from B, the connection will also be rejected. Initially, when B
receives an old SYN segment, B will send a SYN segment with its own distinct
sequence number set by itself. If B receives the old ACK from A, B will notify A that
the connection is invalid since the old ACK sequence number does not match the
sequence number previously defined by B. Therefore, the connection is rejected.
Sau khi para :
a) One must make sure the initial sequence number chosen in a three-way handshake
protocol is always unique. Station B will respond to a request based on the old
sequence number if it gets an old SYN segment from station A. A will discover that B
received the incorrect sequence number when it receives the acknowledgement
section from B. A will reset the connection and throw away the acknowledgment
packet.
b) The connection will likewise be refused if an outdated SYN segment from A arrives at
B, followed by an outdated ACK segment from A to a SYN segment from B. Initially, B
sends a SYN segment with a unique sequence number that it sets on its own when it
gets an old SYN segment. When B receives the outdated ACK from A, B will inform A
that the connection is not valid since the sequence number in the outdated ACK
differs from the one that B had previously specified. The connection is so refused.
3. A bit stream 1101011011 is transmitted using the standard CRC method. The polynomial
generator is x+ x + 1. What is the actual bit string transmitted? Show the major steps to
your answer.
Lời Giải:
Bitstream is 1101011011
The polynomial generator is x+x=1
The Bit form = 111
Thus, n=3.
Lời Giải:
Đổi cái đám nhị nhân 16 bit ra decimal, ra số âm xong lấy 65536 (16 bit thì là 2^16) rồi
cộng cho số âm đó.
Lời Giải:
IP convention can be utilized since the IP convention is a lot of necessities for tending to
also as directing information on the Internet. Since the computer can't run principles-
based TCP without IP, TCP uses IP addresses. There is a need to utilize an individual
custom streaming convention. that depends on Ethernet or another link layer as a lower
layer.
6. (1) The figures below show the TCP/UDP communication pattern diagrams. Which
diagram works for TCP? Why?
(2) Fill the missing steps (blank boxes) in both diagrams for TCP/UDP correspondingly.
Lời Giải:
(1) Diagram (b) will work for TCP since it is a network protocol that shows the details of
how data is sent as well as received.
(2) Missing steps : (a) bind, connect , (b) bind>listen>accept, connect.
Sau khi para :
(1) Since TCP is a network protocol that displays the specifics of data transmission and
reception, Diagram (b) will function for it.
(2) Omission of steps: Bind, connect in (a) and bind, listen, accept, connect in (b).
7. Suppose that two peer-to-peer processes provide a service that involves the transfer of
discrete messages. Suppose that the peer processes are allowed to exchange PDUs that
have a maximum size of M bytes including H bytes of header. Suppose that a PDU is not
allowed to carry information from more than one message.
Lời Giải:
a) To convert arbitrary sizes, large contents must be split into bytes of each length that
will be transmitted in multiple PDUs.
b) Peer-to-peer processes move information allowing messages to be aggregated.
c) A PDU must be attached to the sequence ID, to process each sequence
independently when a message is selected. This stream ID can be dodged if the
source and target work for them to process a content transfer at a certain time.
Sau khi para :
a) Large contents must be divided into bytes of each length that will be sent in
numerous PDUs in order to convert them to arbitrary sizes.
b) Peer-to-peer systems transfer data, making it possible to aggregate
communications.
c) In order to handle each sequence individually when a message is chosen, a PDU
has to be connected to the sequence ID. If the source and target cooperate to
perform a content transfer at a specific moment, they can avoid this stream ID.
8. Consider a network link that has distance of 100 meters, and signal traverses at the
speed of light in cable 2.5 x 10^8 meters per second. The link has transmission
bandwidth of 100 megabits/second (100 x 10^6 bits per second). The packet size is 400
bits. What is the signal propagation delay?
Lời Giải:
(Cách đổi đơn vị: 100 megabits / second = 100 x 10^3 kilobits / seconds, đổi ngược lại thì
chia cho 1000)
d = 100 megabits / second
v = 2.5 x 10^8 meters per / second
(Đề này cho đã cùng đơn vị sẵn nên không cần phải đổi, lấy chia luôn.)
Công thức Signal propagation delay (seconds):
=> t(prop) = d / v = 100 / (2.5x10^8) = 4x10^(-7) seconds
9. Consider a network link that has distance of 100 meters, and signal traverses at the
speed of light in cable 2.5 x 10^8 meters per second. The link has transmission
bandwidth of 100 megabits/second (100 x 10^6 bits per second). The packet size is 400
bits. What is the packet transmission delay?
Lời Giải:
L = 400 bits (packet size)
R = 100 x 10^6 (bit / sec)
Đề này cho đã cùng đơn vị sẵn nên không cần phải đổi, lấy chia luôn.
Công thức Packet transmission delay (seconds):
=> t(trans) = L / R = 400 / (100 x 10^6) = 4 x 10^(-6) seconds
10. Suppose an application layer entity wants to send an L-byte message to its peer process,
using an existing TCP connection. The TCP segment consists of the message plus 20 bytes
of header. The segment is encapsulated into an IP packet that has an additional 20 bytes
of header. The IP packet in turn goes inside an Ethernet frame that has 18 bytes of
header and trailer. What percentage of the transmitted bits in the physical layer
correspond to message information, if L = 100 bytes, 500 bytes, 1000 bytes
Lời Giải:
Đây cũng là cách trình bày để lấy trọn vẹn 3 điểm của bài.
TCP / IP over Ethenet allows data frames with a payload size up to 1460 bytes.
Therefore, L = 100, 500, 1000 are within this limit (chưa biết nếu vượt limit thì khác thế
nào, nhưng mình nghĩ đề ra sẽ không vượt limit đâu).
Therefore:
L = 100 bytes, 100 / (100 + 20 + 20 + 18) = 63% efficiency
L = 500 bytes, 500 / ( 500 + 20 + 20 + 18) = 90% efficiency
L = 500 bytes, 1000 / ( 1000 + 20 + 20 + 18) = 95% efficiency
Lời Giải:
Cách 1:
ảnh sau khi cắt như trên |>>
Câu c: (Đề kêu 1:6 thì chỉ việc nhân thêm cho 6 ở chỗ tốc độ là xong, nếu trường ra đề
1:10 thì nhân 10)
=> T (32k) = (1 x 1024 x 1024 x 8) / (32 x 1000 x 6) = 43.69 (seconds)
=> T (1M) = (1 x 1024 x 1024 x 8) / (1 x 1000 x 1000 x 6) = 1.4 (seconds)
12. Sender A wants to send 100111010011011 to receiver B. This transmission uses CRC
algorithm for error detection with generator polynomial bits string is 10111. What is bits
string will be transmitted on the medium. Show your all steps to have result.
Lời Giải:
Step 1: Add 0000 to data bits string. It will be 1001110100110110000 (0.5 điểm)
Step 3: Lấy 4 số cuối của step 2, thay số 4 số 0000 ở step 1, ta được kết quả cuối cùng.
The transmitted bits string is 1001110100110110010. (0.5 điểm)
13. 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
Câu a) What does the router do if a packet with an IP address 135.46.63.10 arrives?
Câu b) What does the router do if a packet with an IP address 135.46.57.14 arrives?
Lời Giải:
a) The router will forward the packet to Interface 1 if a packet with an IP address
135.46.63.10 arrives.
b) The packet will be forwarded to Interface 0 if a packet with an IP address
135.46.57.14 arrives.
Cách nhận biết:
Xét 135.46.63.10 có 135.46 giống Interface 0 và 1.
135.46.63 lớn hơn Interface 1 thì chọn Interface 1, ngược nếu ví dụ như đề câu b chỉ có
57 (lớn hơn 56 nhưng nhỏ hơn 60) -> chọn Interface 0.
Nếu đề hỏi khác nữa như cho 10.10.10.10 không giống cái nào ở Interface 0, 1 hay
Router 1 thì mặc định chọn Default -> Router 2.
14. A router has the following (CIDR) entries in its routing table:
For each of the following IP addresses, what does the router do if a packet with that
address arrives?
(a) 135.46.63.10
(b) 135.46.57.14
(c) 135.46.52.2
(d) 192.53.40.7
(e) 192.53.56.7
Lời Giải:
Bước 1:
Calculate the ranges of all the entries in the table.
Interface 0 starts at 135.46.56.0, and uses 22 bits for the network, so 10 bits for the
hosts.
The starting IP address in binary is: 10000111.00101110.00111000.00000000.
To get the last IP address of the range set the last 10 bits to 1
e.g. 10000111.00101110.00111011.11111111.
The last IP address of interface 0 in decimal is 135.46.59.255.
Bước 2
Interface 1 starts at 135.46.60.0 and also uses 22 bits for the network, so 10 bits for the
hosts.
The starting IP address in binary is: 10000111.00101110.00111100.00000000.
To get the last IP address of the range set the last 10 bits to 1
e.g. 10000111.00101110.00111111.11111111
The last IP address of interface 1 in decimal is 135.46.63.255.
Bước 3
Router 1 starts at 192.53.40.0 and uses 23 bits for the network, so 9 bits for the hosts.
The starting IP address in binary is: 11000000.00110101.00101000.00000000.
To get the last IP address of the range set the last 10 bits to 1
e.g. 11000000.00110101.00101001.11111111.
The last IP address of interface 1 in decimal is 192.53.41.255.
Bước 4
Interface 0's range is from 135.46.56.0 - 135.46.59.255.
Interface 1's range is from 135.46.60.0 - 135.46.63.255.
Router 1's range is from 192.53.40.0 - 192.53.41.255.
Bước 5
a) The packet IP address is 135.46.63.10, so it is sent to Interface 1.
(b) The packet IP address is 135.46.57.14, so it is sent to Interface 0.
(c) The packet IP address is 135.46.52.2, since it doesn't match any range it is sent to the
default hop, which is Router 2.
(d) The packet IP address is 192.53.40.7, so it is sent to Router 1.
(e) The packet IP address is 192.53.56.7, since it doesn't match any range it is sent to
Router 2.
Kết quả
a) Interface 1 b) Interface 0 c) Router 2 d) Router 1 e) Router 2
Connection Less:
o Connectionless service comes with a single free-standing data unit for all
transmissions.
o In this, each unit contains all of the protocols that control information necessary
for delivery perspective, but this also contains no provision for sequencing or
flow control.
Acknowledged:
o This is achieved by the use of ACK and NAK control messages.
o These types of protocols are well suited for communication over the network,
where high layers are very sensitive to loss and can have a significant probability
of error in these underlying networks.
o Example: HDLC, which offers for unnumbered acknowledgment service (setup
and release).
Unacknowledged:
o This comes with a very simpler version and provides faster communication for
networks, which are inherently reliable or provide service to a higher layer, that
can tolerate loss in the information, or which has built-in error control/recovery
feature
Sau khi para :
Connection Less:
A single free-standing data unit is provided for every transmission with connectionless
service.
o While every unit in this has all the procedures required to regulate information from a
delivery standpoint, sequencing and flow control are not included.
Acknowledged:
o The use of ACK and NAK control messages makes this possible.
o These protocols perform well for network communication, since high layers can have a high
error rate and are very susceptible to loss in the underlying networks.
o HDLC is one example; it provides unnumbered acknowledgment services (setup and release).
Unacknowledged:
There is a very basic version of this that facilitates quicker communication for networks that
have built-in error control/recovery features, can withstand information loss, or are intrinsically
trustworthy or serve a higher layer.
Connection-oriented:
o In this type of service, a setup phase will be initialized between sender
and receiver, to establish a context for transferring the information
o This connection is provided to the sender for all SDUs.
o This service requires a stateful protocol, which is used to keep track of
sequence numbers, and timers.
Connectionless:
o Here, there will be no prior context provided for transferring the
information between sender and receiver.
o The sender will pass its SDU to an underlying layer without any notice.
o And in this, the sender requires an acknowledgment of SDU delivery.
o The protocols are very different in these services this service also does
not require transmitting protocols to track the acknowledgment of PDU.
o After receiving the PDU, the receiver needs to send acknowledgment, If
notreceived in time, then it will return failure
Sau khi para :
Connectionless:
In this case, the sender and the recipient will not be providing any
previous context for the information transfer.
o Without warning, the sender will transfer its SDU to an underlying layer.
o In addition, the sender needs a confirmation that the SDU was sent.
o These services use quite different protocols. Additionally, transmission
protocols are not needed for this service to track PDU acknowledgment.
o The recipient must provide an acknowledgment after receiving the PDU;
if one is not received in a timely manner, the PDU will return failure.
Cách 3:
Definition:
HDLC is a bit-oriented code-transparent synchronous data link layer protocol developed by ISO.
But, PPP is a data link layer communication protocol used to establish a direct connection
between two nodes.
Stands for:
HDLC stands for High-Level Data Link Control, while PPP stands for Point to Point.
Protocol Type;
HDLC is a bit-oriented protocol, whereas PPP is a byte-oriented protocol. Thus, this is the main
difference between HDLC and PPP.
Communication:
Moreover, another important difference between HDLC and PPP is that HDLC supports point to
point and multipoint links, whereas PPP only supports point to point links.
Authentication:
Compatibility:
Besides, HDLC cannot be used with non-cisco devices, while PPP can be used with non-cisco
devices.
Conclusion;
The main difference between HDLC and PPP is that HDLC is a bit-oriented protocol for
communication over a point to point and multipoint links while PPP is a byte-oriented protocol
for communication over a point to point links. In brief, HDLC is bit oriented while PPP is byte
oriented.
18. A 1.5 Mbps communications link is to use HDLC to transmit information to the moon.
What is the smallest possible frame size that allows continuous transmission? The
distance between earth and the moon is approximately 375,000 km, and the speed of
light is 3 x 108 meters/second.
Lời Giải:
Go-Back-N 7 127
Selective Repeat 4 64
D 2 ( 375∗10 m )
6
2t ¿ =2 c
=
3∗10
8
=2.50 s
We know that
N × nf 2t × R
=2t ¿ ⇒ n f = ¿ (¿)
R N
In which, n f is Possible Frame Size (bits), Mbps is the number of Megabyte Per Second.
R = 1,5 Mbps so that R = 1,5 x 106 bps.
Substitute to (*) then we have
Go-Back-N:
7 nf
If N = 7 : 1.5 Mbs =2.5 s → nf =535715 bits
127 nf
If N = 127 : 1.5 Mbs =2.5 s → nf =29528 bits
Selective Repeat:
4 nf
If N = 4 : 1.5 Mbs =2.5 s → nf =973500 bit
64 nf
If N = 64 : 1.5 Mbs =2.5 s → nf =58594 bits
19. Suppose HDLC is used over a 1.5 Mbps geostationary satellite link. Suppose that 250-
byte frames are used in the data link control. What is the maximum rate at which
information can be transmitted over the link?
Lời Giải:
R = 1.5 Mbps or R = 1,5 x 106 bps , and nf =250 bytes or 2000 bits (250 x 8).
The distance that the information must travel is the earth-to-satellite distance, or
D 36,000 km
= 3,6 x 10^6m .
The speed of light c is 3 x 108 . We can calculate the propagation delay and
processing rate as follows:
6
D 3 ,6 × 10
t ¿= = 8
=0 , 12 s=120 ms
c 3× 10
nf 2000
tf = = =0,00133 s=1 ,33 ms
R 1 ,5 ×10 6
We can use either Go-Back-N or Selective Repeat ARQ. The default window size
is N = 7 (with a 3- bit sequence number).(không viết vào0 1 2 3 4 5 6 7 …)
The maximum information rate is achieved with no error, and hence, no
retransmission.
t cycle= minimum time to transmit a group of N packets
20. Suppose that a multiplexer receives constant-length packet from N = 60 data sources.
Each data source has a probability p = 0.1 of having a packet in a given T-second period.
Suppose that the multiplexer has one line in which it can transmit eight packets every T
seconds. It also has a second line where it directs any packets that cannot be transmitted
in the first line in a T-second period. Find the average number of packets that are
transmitted on the first line and the average number of packets that are transmitted in
the second line.
Lời Giải:
Firstly, we find out the probability of the k packets that have reached the T- second.
It can be computed with the help of binomial distribution that has parameters as
N=60 and shows the probability of p=0.1.
The average number for the arrivals of the packets can be given as Np=6. Now,
calculate the average number of packets received through the first line as below:
X=
Now, the average number of packets received is 4.59 that gets transmitted through
the first line. The remaining will get transmitted by the second line. Now, the
average number of packets transmitted through the second line per T second can be
obtained as below:
Y= Np – X = 6 – 4,59 = 1,41
Therefore, it will transmit 1.41 packets on average per T second from the second
line.
21. Consider the transfer of a single real-time telephone voice signal across a packet
network. Suppose that each voice sample should not be delayed by more than 20 ms.
a. Discuss which of the following adaptation functions are relevant to meeting the
requirements of this transfer: handling of arbitrary message size; reliability and
sequencing; pacing and flow control; timing; addressing; and privacy, integrity and
authentication.
b. Compare a hop-by-hop approach to an end-to-end approach to meeting the
requirements of the voice signal.
Lời Giải:
- Sequencing is essential because each packet must arrive in the same order in which it
was generated. Reliability is moderately important since voice transmission may
withstand some loss and error.
- Pacing and flow control are less critical since the synchronous nature of the voicesignal
indicates that the speed of the end systems will be same.
- Timing, for real-time voice transfer, is important since this adaption function helps to
limit the jitter in the delivered signal.
- cách 1: If we assume virtual circuit packet switching technique, addressing occurs only
during the connection setup phase. Cách 2: Addressing is only during the connection
setup phase if we assume some form of virtual circuit packet switching method
- Privacy, integrity, and authentication have traditionally not been as important as the
other issues listed above.
b/ - If the underlying network is reliable, the end-to-end approach is preferable sincethe
probability of error is very low, allowing processing at the edge suffices to provide
acceptable performance.
- If the underlying network is unreliable, the hop-by-hop approach may be necessary. For
example, if the probability of error is very high, as in a wireless channel, error recovery
at each hop may be required to ensure effective communication.
22. Consider the Stop-and-Wait protocol as described. Suppose that the protocol is modified
so that each time a frame is found in error at either the sender or receiver, the last
transmitted frame is immediately resent.
Lời Giải:
a/The sender in the stop-and-wait protocol described in the chapter retransmits a frame
when an acknowledgment is not received in time. The modified protocol says that the
frame is retransmitted every time the sender or receiver sees an error.
Therefore, the only difference is that frames are retransmitted sooner. So, the protocol
will work correctly.
b/ No. The state transition diagram will stay the same.
c/ The error recovery process will be faster with this modified protocol.
23. Suppose that two peer-to-peer processes provide a service that involves the transfer of
discrete messages. Suppose that the peer processes are allowed to exchange PDUs that
have a maximum size of M bytes including H bytes of header. Suppose that a PDU is not
allowed to carry information from more than one message.
Lời Giải:
a) To exchange messages of arbitrary size, large messages must be segmented into parts
of M-H bytes each in length to be transmitted in multiple PDUS. Small messages must be
placed in a single PDU.
b) The peer processes need to communicate information that allows for the reassembly
of messages at the receiver. For example, the first PDU may contain the message length.
The last PDU may contain and end-of-message marker. Sequence numbers may also be
useful to detect loss in connection-oriented networks and to help in reconstruction of
the messages in connectionless networks. Lastly, since variable size PDUS are permitted,
the size of the PDU must be transmitted in the PDU header.
c) A PDU must be attached to the sequence ID, to process each sequence independently
when a message is selected. This stream ID can be dodged if the source and target work
for them to process a content transfer at a certain time.
24. A 1 Mbyte file is to be transmitted over a 1 Mbps communication line that has a bit error
rate of p = 10−6.
a) What is the probability that the entire file is transmitted without errors? Note for n
large and p very small,( 1−P )n ≈ ⅇ−np.
b) The file is broken up into N equal-sized blocks that are transmitted separately. What is
the probability that all the blocks arrive correctly without error? Does dividing the file
into blocks help?
c) Suppose the propagation delay is negligible, explain how Stop-and-Wait ARQ can help
deliver the file in error-free form. On the average how long does it take to deliver the file
if the ARQ transmits the entire file each time?
We assume the following:
= basic time to send a frame and receive the ACK/NAK ttimeout
= total transmission time until success
Lời Giải:
1Mbyte = 106 byte = 8 x bits because 1 byte = 8 bits
The file length n = 8 x 106 bits, the transmission rate R = 1 Mbps = 106 bps and p = 10−6
= = (
= (1 -
Given i transmissions : |=i*
E[ ]= P[nt = i] =
= =
Here , = n >> thus = n/R ; and
=1
E[total] = n/R(1 - = 8 / (3.35 x 10-4) = 23847 seconds = 6,62
hours
The file gets through, but only after many retransmissions.
25.
In this activity, you are given the network address of 192.168.1.0/24 to subnet and
provide the IP addressing for the Packet Tracer network. Each LAN in the network
requires at least 25 addresses for end devices, the switch and the router. The connection
between R1 to R2 will require an IP address for each end of the link.
a. Based on the topology, how many subnets are needed?
b. How many bits must be borrowed to support the number of subnets in the topology
table?
c. How many subnets does this create?
d. How many usable hosts does this create per subnet?
Lời Giải:
a,
We saw that S1, S2, S3, S4, S0/0/0 are the subnets needed, so that there is 5
subnets are needed.
b, We call N is the number of bits, then N is the smallest number that satisfies
Then we got N = 3.
(4 because 4 is subnet S1, S2, S3 , S4 not S0/0/0)
c, We saw that number of bits N = 3, then the number of subnets does this create is
d. How many usable hosts does this create per subnet? 28-n – 2 = 28-3 – 2 = 30
26. Five stations (S1-S5) are connected to an extended LAN through transparent bridges
(B1- B2), as shown in the following figure. Initially, the forwarding tables are empty.
Suppose the following stations transmit frames: S1 transmits to S5, S3 transmit to S2, S4
transmits to S3, S2 transmits to S1, and S5 transmits to S4. Fill in the forwarding tables
with appropriate entries after the frames have been completely transmitted.
Lời Giải:
Firstly, we know that we have 3 types of LAN, and each LAN is arranged follow BUS.
Then, if a device sends data, it will send according to broardcast type (send to any device
and internet port).
B1
Address Port
Step 1 S1 => S5 S1 1
Step 2 S3 => S2 S3 2
Step 3 S4 => S3 S4 2
Step 4 S2 => S1 S2 1
Step 5 S5 => S4
B2
Address Port
Step 1 S1 => S5 S1 1
Step 2 S3 => S2 S3 2
Step 3 S4 => S3 S4 2
Step 4 S2 => S1 1
Step 5 S5 => S4 S5
27.
a. Use the Dijkstra algorithm to find the set of shortest paths from node 4
to other nodes.
We call that node that have number N is V(N) (i.e the green one is V(4))
Lời Giải:
Cách 1: (nên dùng cách 1)
Dijkstras Algorithm:
Starting vertex is 4
So the last row value is the shortest path from node 4 to all other nodes.
Each time it updates the path using relaxation:
if(dist(u) + cost(u, v) < dist(v))
then update the dist(v) = dist(u) + cost(u, v)
dist(u) is distance of vertex u from starting vertex
cost(u, v) is cost/weight of the edge uv
dist(v) is distance of vertex u from starting vertex
a)
Iteration N D1 D2 D3 D5 D6
Initial {4} ~ ~ ~ ~ ~
1 {4,2} (5,4) (1,4) (2,4) (3,4) ~
6 {4,2,3,5,6,1} (4,2) - - - -
b)
Destination Cost Next Hop
1 (chính là D1) 4 2
2 1 2
3 2 3
5 3 5
6 3 3
Cách 2:
a)
Iteration N D1 D2 D3 D5 D6
Initial 0 ~ ~ ~ ~ ~
D4,D2,D3,D5,D6,D1 - 4,D2 - - - -
b) Find the set of associated routing table entries (Destination, Next Hop, Cost)
28.
You are a network technician assigned to install a new network for a customer. You must create
multiple subnets out of the 192.168.0.0/24 network address space to meet the following
requirements:
- The first subnet is the LAN-A network. You need a minimum of 50 host IP
addresses.
- The second subnet is the LAN-B network. You need a minimum of 40 host
IP addresses.
- You also need at least two additional unused subnets for future network
expansion.
Note: Variable length subnet masks will not be used. All of the device subnet masks
should be the same length.
Answer the following questions to help create a subnetting scheme that meets the stated
network requirements:
a. How many host addresses are needed in the largest required subnet?
b. What is the minimum number of subnets required?
c. The network that you are tasked to subnet is 192.168.0.0/24. What is the /24 subnet mask in
binary?
d. The subnet mask is made up of two portions, the network portion, and the host portion. This
is represented in the binary by the ones and the zeros in the subnet mask.
In the network mask, what do the ones and zeros represent?
e. When you have determined which subnet mask meets all of the stated network
requirements, derive each of the subnets. List the subnets from first to last in the table.
Remember that the first subnet is 192.168.0.0 with the chosen subnet mask.
Lời Giải:
a. Cách1: The largest required subnet is LAN-A, which needs a minimum of 50 host IP
addresses.
Soln: 50 (đang kiểm chứng)
Cách 2: Numbers of host addresses required = 2^6 – 2 = 62
Explanation: Numbers of subnets required = 4 which is implies that the network is
divided into 4 parts and the give IP address i.e 192.168.12.0 is a Class C IP address.
Therefore, the max number of hosts possible in each subnet is 62.
b. Soln : According to the question , two subnet are required for LAN-A and LAN-B and two
subnets are needed to be left for future use Therefor the total number of subnets are 4 .
d. Soln : In the nerwork mask, the ones represent the network portion and the zeroes represent
the host portion.
e. When you have determined which subnet mask meets all of the stated network
requirements, derive each of the subnets. List the subnets from first to last in the table.
Remember that the first subnet is 192.168.12.0 with the chosen subnet mask.
29. Suppose that Selective Repeat ARQ is modified so that ACK messages contain a list of the
next m frames that it expects to receive.
Lời Giải:
a) 2 things are needed to be changed:
The frame header needs to be modified to recieve the list of frames and Since the
reciever explicitly indicates which frames are needed to be transmitted.
Change in transmitter operation is needed. If the recieved list contains m oldest frames
that are yet to be recieved , then it can be used to skip retransmission of frames that
have already been received.
b) Performance will surely increase if the error rate is high or delay is high. A single
frame can ask for the retransmission of several frames.
The complexity of the protocol will surely increase relative to the unchanged Selective
repeat ARQ
Sau khi para:
a) Two things must be altered:
Since the receiver specifically states which frames must be delivered, the frame header
must be changed in order to receive the list of frames.
30. 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
(a) What does the router do if a packet with an IP address 135.46.63.10 arrives?
(b) What does the router do if a packet with an IP address 135.46.57.14 arrives?
Lời Giải:
Cách 1:
a)Taking the first 22 bits of the above IP address as network address, we have
135.46.60.0.
It matches the network address of 135.46.60.0/22. So, the router will forward the
packet to Interface 1.
b) Taking the first 22 bits of the above IP address as network address, we have
135.46.56.0.
It matches the network address of 135.46.56.0/22. The packet will be forwarded to
Interface 0.
Cách 2:
a) Ans:(a)135.46.63.10
Taking the first 22 bits of 135.46.63.10 as network address, we have
135.46.60.0.The bit pattern of 135.46.63.10 is
10000111.00101110.00111111.00001010
When we perform the bit and operation with 22 leading bit 1s and 10 bit 0s,
it isequivalent of making the last 10 bit zero. We get the following network address
bitpattern: 10000111.00101110.00111100.00000000. The first two bytes are not
changed.
The 3rd type changes from 63 to 60 while the 4th byte become
zero.Match with network address in the routing table. The 2rd row matches. The
router willforward the packet to Interface 1.
31. A Large number of consecutive IP address are available starting at 198.16.0.0. Suppose
four organizations, A, B, C, D request 4000, 2000, 4000, and 8000 addresses,
respectively. For each of these organizations, give:
Lời Giải:
IP addresses will be allocated in blocks of power of 2. So the four organizations will be
allocated IPs as A-4096, B-2048, C-4096 and D-8192. Remaining unused IPs are wasted.
IPs will be allocated to the organizations contiguously
A has 2^12 hosts. So lower order 12 bits will denote host ID and higher order 32-12=20
bits denotes network ID
A's first IP=198.16.0.0 (Host IP part contains all Os)
A's last IP=11000110.00010000.00001111.11111111 (Host ID part contains all
1s=198.16.15.255)
A's Mask=198.16.15.255
------------------------------------------------------------------------------------------------------------
B has 2^11 hosts. So lower order 11 bits will denote host ID and higher order 32-11=21
bits denotes network ID
B's first IP=198.16.16.0
B's last IP=11000110.00010000.00010111.11111111=198.16.23.255
B's Mask=198.16.16.0/21
------------------------------------------------------------------------------------------------------------
C has 2^12 hosts. So lower order 12 bits will denote host ID and higher order 32-12=20
bits denotes network ID
C's first IP=198.16.24.0
C's last IP=11000110.00010000.00011111.11111111=198.16.31.255
C's Mask=198.16.24.0/20
--------------------------------------------------------------------------------------------------------------
D has 2^13 hosts. So lower order 13 bits will denote host ID and higher order 32-13=19
bits denotes network ID
D's first IP=198.16.32.0
D's last IP=11000110.00010000.00111111.11111111=198.16.63.255
D's Mask=198.16.32.0/19
32. Suppose two hosts, A and B, are separated by 20,000 kilometers and are connected by a
direct link of R = 2 Mbps. Suppose the propagation speed over the link is 2.5 x 10^8
meters/sec.
a. Calculate the bandwidth-delay product, R _ dprop.
b. Consider sending a file of 800,000 bits from Host A to Host B. Suppose the file is sent
continuously as one large message. What is the maximum number of bits that will be in
the link at any given time?
c. Provide an interpretation of the bandwidth-delay product.
d. What is the width (in meters) of a bit in the link? Is it longer than a football field?
e. Derive a general expression for the width of a bit in terms of the propagation
speed s, the transmission rate R, and the length of the link m.
Lời Giải:
line
33. Consider the 7-bit generator, G=10011, and suppose that D has the value
a) 1010101010.
b) 1001010101.
c) 0101101010.
d) 1010100000.
What is the value of R?
Lời Giải:
a)
So, the 7-bit generator, G=10011, and D has the value 1010101010.
then the value of R is 0100.
b)
c)
d)
34. A packet switch receives a packet and determines the outbound link to whichthe packet
should be forwarded. When the packet arrives, one other packetis halfway done
being transmitted on this outbound link and four otherpackets are waiting to be
transmitted. Packets are transmitted in order ofarrival. Suppose all packets are 1,500
bytes and the link rate is 2 Mbps. What is thequeuing delay for the packet? More
generally, what is the queuing delaywhen all packets have length L, the
transmission rate is R, x bits of thecurrently-being-transmitted packet have been
transmitted, and n packetsare already in the queue?
Lời Giải:
35. Let g(x)=x^3 + ×^2 + 1. Consider the information sequence (1,1,0,1,1,1). Find the
codeword corresponding to the preceding information sequence. Using polynomial
arithmetic we obtain
Lời Giải:
36. 13.Let g1(x) = x + 1 and let g2(x) = x^3 + x^2 + 1. Consider the information bits
(1,1,0,1,1,1).
a. Find the codeword corresponding to these information bits if g1 (x) is used as the
generating polynomial.
b. Find the codeword corresponding to these information bits if g2(x) is used as the
generating polynomial.
Lời Giải:
a)
b)
37. Consider the following network Figure I. With the indicated link costs, use Dijkstra's
shortest-path algorithm to compute the shortest path from u to all network nodes. Show
how the algorithm works by computing a table.
Lời Giải:
38. Let g(x)=x3+x+1. Consider the information sequence 1001. Find the codeword
corresponding to the preceding information sequence. Using polynomial arithmetic
we obtain
Note: Explain your answer in details.
Solu:
Codeword = 1 0 0 1 1 1 0
39. The ability to work with IPv4 subnets and determine network and host information based
on a given IP address and subnet mask is critical to understanding how IPv4 networks
operate. The first part is designed to reinforce how to compute network IP address
information from a given IP address and subnet mask. When given an IP address and
subnet mask, you will be able to determine other information about the subnet.
Fill out the tables below with appropriate answers given the IPv4 address, original subnet
mask, and new subnet mask.
Solution:
Given:
Find:
Solution:
FIND
Number of Subnet Bits 5
40.
41. Let g1(x) = x + 1 and let g2(x) = x + x + 1.
3 2
x+x +x +x
6 5 3 2
x+1
x^6 +x^5 x^5+x^2
x^3+x^2
x^3+x^2
0 -> FCS
x+x +x +x
8 7 5 4
x
3
+x +1 2
-> 110110101