Sheet6 ch6

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

King Saud University

College of Computer and Information Sciences

Information Technology Department

First Semester 1442


IT328, Network principles
Sheet# 6 (Chapter6: The Link Layer and LANs)

Question1:
Suppose nodes A, B, and C each attach to the same broadcast LAN (through their adapters). If A
sends thousands of IP datagrams to B with each encapsulating frame addressed to the MAC
address of B, will C’s adapter process these frames? If so, will C’s adapter pass the IP datagrams
in these frames to the network layer C? How would your answers change if A sends frames with
the MAC broadcast address?
Question2:
Why is an ARP query sent within a broadcast frame? Why is an ARP response sent within a
frame with a specific destination MAC address?
Question3:
For the network in the below Figure, the router has two ARP modules, each with its own ARP
table. Is it possible that the same MAC address appears in both tables?

Question4:

Suppose the information content of a packet is the bit pattern 1010 0111 0101 1001 and an even
parity scheme is being used. What would the value of the field containing the parity bits be for
the case of a two-dimensional parity scheme?
Question5:
Consider the divisor 10011, and suppose that the data-word has the value 1010101010. What is
the value of CRC? What will be the sent code-word?
Repeat the problem, but suppose that data-word has the value
a. 1001010101.
b. 0101101010.
c. 1010100000.
Question6:
1. Suppose the receiver receives
01110011 00011010 01001001
Check if the data received has error or not by (Checksum).
2. The following block is received by a system using two-dimensional even parity. Is there
any error in the block?
10110101 01001101 11010010 11001111

Question7:

Looking at the bellow figure,

Station Station
A B

LAN1 Station
E
1
LAN3
3
Switch

2
Station
LAN2 F

Station Station
C D

Complete the Switch table below, and mention the action (forward, flood, and drop) using the
following scenario:

a) Station A sends a frame to station D.


b) Station B sends a frame to station F.
c) Station E sends a frame to station A.
d) Station C sends a frame to station F.
e) Station D sends a frame to station C.
Switch Table

(station) Por action


t

Question8:
Looking at the bellow figure, host A initially sends a frame to host F. This is followed by a frame
from host C to host A and then a third frame from host E to host C. Show the Switch table for
both Switches, and mention the action (forward, flood and drop)?
Switch1 Switch2

MAC Address Station


71:2B:13:45:61:41 A
71:2B:13:45:61:42 B
64:2B:13:45:61:12 C
64:2B:13:45:61:13 D
34:2B:13:45:61:61 E
34:2B:13:45:61:62 F
Switch 1 action Switch 2 action

Address Por Address Port


t

Question9:
In the bellow figure, the Sale, HR, and ENG stations of the same floor belong to the same
physical LAN.
All Sales in this building belong to one VLAN, all HRs in this building belong to another
VLAN and all ENGs of this building belong to a third VLAN.
a. If the ENG station in the 2nd Floor sends a broadcast message to inform
all and only, the stations in the 2nd floor about a mechanical problem in
the 2nd floor, which stations will receive that message?

b. If the HR station in the 3rd Floor sends a broadcast message to inform all
the HR stations in the building about a new employee in the building,
which stations will receive that message?

Question10:

Consider three LANs interconnected by two routers, as shown in bellow Figure.


a) Assign IP addresses to all of the interfaces. For Subnet 1 use addresses of the form
192.168.1.xxx; for Subnet 2 uses addresses of the form 192.168.2.xxx; and for Subnet 3
use addresses of the form 192.168.3.xxx.
b) Assign MAC addresses to all of the adapters.
c) Consider sending an IP datagram from Host E to Host B. Suppose all of the ARP tables
are up to date. Enumerate all the steps, as done for the single-router example in Section
5.4.1.
d) Repeat (c), now assuming that the ARP table in the sending host is empty (and the other
tables are up to date).
Question11

Consider the same Figure in Question10. Now we replace the router between subnets 1 and 2
with a switch S1, and label the router between subnets 2 and 3 as R1.
a. Suppose E would like to send an IP datagram to B, and assume that E’s ARP cache does
not contain B’s MAC address. Will E perform an ARP query to find B’s MAC address?
Why? In the Ethernet frame (containing the IP datagram destined to B) that is delivered
to router R1, what are the source and destination IP and MAC addresses?
b. Suppose Host A would like to send an IP datagram to Host B, and neither A’s ARP cache
contains B’s MAC address nor does B’s ARP cache contain A’s MAC address. Further
suppose that the switch S1’s forwarding table contains entries for Host B and router R1
only. Thus, A will broadcast an ARP request message. What actions will switch S1
perform once it receives the ARP request message? Will router R1 also receive this ARP
request message? If so, will R1 forward the message to Subnet 3? Once Host B receives
this ARP request message, it will send back to Host Aan ARP response message. But will
it send an ARP query message to ask for A’s MAC address? Why? What will switch S1
do once it receives an ARP response message from Host B?
Question12

Consider the previous problem, but suppose now that the router between subnets 2 and 3 is
replaced by a switch. Answer questions (a) and (b) in the previous problem in this new context.
Question13

Consider the Figure in problem P10. Provide MAC addresses and IP addresses for the interfaces
at Host A, both routers, and Host F. Suppose Host A sends a datagram to Host F. Give the source
and destination MAC addresses in the frame encapsulating this IP datagram as the frame is
transmitted (i) from A to the left router, (ii) from the left router to the right router, (iii) from the
right router to F. Also give the source and destination IP addresses in the IP datagram
encapsulated within the frame at each of these points in time.
Question14

Suppose now that the leftmost router in Figure 5.33 is replaced by a switch. Hosts A, B, C, and D
and the right router are all star-connected into this switch. Give the source and destination MAC
addresses in the frame encapsulating this IP datagram as the frame is transmitted (i) from A to
the switch, (ii) from the switch to the right router, (iii) from the right router to F. Also give the
source and destination IP addresses in the IP datagram encapsulated within the frame at each of
these points in time.

Question15

Let’s consider the operation of a learning switch in the context of a network in which 6 nodes
labeled A through F are star connected into an Ethernet switch. Suppose that (i) B sends a frame
to E, (ii) E replies with a frame to B, (iii) A sends a frame to B, (iv) B replies with a frame to A.
The switch table is initially empty. Show the state of the switch table before and after each of
these events. For each of these events, identify the link(s) on which the transmitted frame will be
forwarded, and briefly justify your answers.
Question16

In this problem, you will put together much of what you have learned about Internet protocols.
Suppose you walk into a room, connect to Ethernet, and want to download a Web page. What are
all the protocol steps that take place, starting from powering on your PC to getting the Web
page? Assume there is nothing in our DNS or browser caches when you power on your PC.
(Hint: the steps include the use of Ethernet, DHCP, ARP, DNS, TCP, and HTTP protocols.)
Explicitly indicate in your steps how you obtain the IP and MAC addresses of a gateway router.
Answer:
(The following description is short, but contains all major key steps and key protocols involved.)
Your computer first uses DHCP to obtain an IP address. Your computer first creates a special IP
datagram destined to 255.255.255.255 in the DHCP server discovery step, and puts it in an
Ethernet frame and broadcast it in the Ethernet. Then following the steps in the DHCP protocol,
your computer is able to get an IP address with a given lease time. A DHCP server on the
Ethernet also gives your computer a list of IP addresses of first hop routers, the subnet mask of
the subnet where your computer resides, and the addresses of local DNS servers (if they exist).
Since your computer’s ARP cache is initially empty, your computer will use ARP protocol to get
the MAC addresses of the first-hop router and the local DNS server. Your computer first will get
the IP address of the Web page you would like to download. If the local DNS server does not
have the IP address, then your computer will use DNS protocol to find the IP address of the Web
page. Once your computer has the IP address of the Web page, then it will send out the HTTP
request via the first-hop router if the Web page does not reside in a local Web server. The HTTP
request message will be segmented and encapsulated into TCP packets, and then further
encapsulated into IP packets, and finally encapsulated into Ethernet frames. Your computer
sends the Ethernet frames destined to the first-hop router. Once the router receives the frames, it
passes them up into IP layer, checks its routing table, and then sends the packets to the right
interface out of all of its interfaces. Then your IP packets will be routed through the Internet until
they reach the Web server. The server hosting the Web page will send back the Web page to
your computer via HTTP response messages. Those messages will be encapsulated into TCP
packets and then further into IP packets. Those IP packets follow IP routes and finally reach your
first-hop router, and then the router will forward those IP packets to your computer by
encapsulating them into Ethernet frames.

You might also like