Nothing Special   »   [go: up one dir, main page]

Chapter 4 Questions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

SECTION 4.

1
R1. Let's review some of the terminology used in this textbook. Recall that the name of a transport-layer packet
is segment and that the name of a link-layer packet is frame. What
is the name of a network-layer packet? Recall that both routers and link-layer switches are called packet
switches. What is the fundamental difference between a router and link-layer switch? -

Answer: The network layer packet is called a datagram. The difference between a router and a link-layer switch
is that a router forwards the packet based on the packet's IP address and a link-layer switch forwards a packet
based on its MAC address. and another difference we can say based on the layers the packet switch is servicing with.

R2. We noted that network layer functionality can be broadly divided into data plane functionality and control
plane functionality. What are the main functions of the data plane? Of the control plane? -

A data plane is also known as forwarding plane. The main responsibility of a data
Answer: Data Plane: plane is forwarding the packets or data between different clients of the network.
(forwarding an arriving packet on router's input port to router's output port.)
- forwards traffic
• A control plane is responsible for determining how a datagram is routed among
routers along end-end path from source host to destination host.
- switching
• A control plane makes decisions about how a packet can be carry forwarded in the
- go through router network. It uses different protocols and makes the routers and switches to exchange
their routing information with the next router or switch. This information could be the
Control plane: routing tables containing which is the shortest path to reach the next router.

- makes decisions where traffic is sent Thus decisions made by control plane are used by data plane to manage the
network traffic and to transfer the data.
- routing protocols

R3. We made a distinction between the forwarding function and the routing function performed in the network
layer. What are the key differences between routing and forwarding? -

Answer: Forwarding is moving packets from a router's input link to the appropriate router's output link using the
Answer: The key differences between routing and forwarding is that forwarding is a router's local action of
generated forwarding table by a specific routing algorithm (it's a local action of transferring the packets and it's
transferring
implemented packets from its
in hardware input
since interfaces
it takes to aitsvery
place at output
shortinterfaces, whilerouting
time). whereas forwarding
is thetakes place
process of at very short
timescales, which is the
determining/planning typically implemented
route taken by packetsin from
hardware.
source to Routing refers
destination. (it'stoa the
globalnetwork-wide
action and it'sprocess that in
implemented
determines the itend-to-end
software since takes placepaths that timescales).
at longer packets take from sources to destinations. Routing takes place on much
longer timescales, and is often implemented in software.

R4. What is the role of the forwarding table within a router? –

Answer:
Answer:routing-
The roledetermines the end
of the forwarding -to within
table routesabetween
router is source and destinations (software)
to hold entries
to determine the outgoing link interface to which an arriving packet will be
forwarding - moving packets from within router I/O
forwarded via switching fabric.
R5. We said that a network layer's service model "defines the characteristics of end-to-end transport of packets
between sending and receiving hosts." What is the service model of the Internet's network layer? What
guarantees are made by the Internet's service model regarding the host-to-host delivery of datagrams? -

"send and hope for the best".


Answer: The service model is the best-effort service. With it, there is no guarantee that packets will be received
in the order they were sent. There is also no guarantee of their delivery and on its end-to-end delay, and no
minimal bandwidth guarantee.

SECTION 4.2
R6. In Section 4.2 , we saw that a router typically consists of input ports, output ports, a switching fabric and a
routing processor. Which of these are implemented in hardware and which are implemented in software? Why?
Returning to the notion of the network layer's data plane and control plane, which are implemented in hardware
and which are implemented in software? Why? -

Answer:
Input ports, output ports and switching fabric are implemented in hardware; routing
processors are implemented in software. Those implemented in hardware are done so because
their datagram-processing functionality is too fast for software implementation. Software is used
for routing processors(in a traditional router) to execute routing protocols, to maintain routing
tables and attached link state information, and to compute the forwarding table of a router. A
routing processor(in a SDN router) relies on software for communication with a remote controller
in order to receive forwarding table entries and install them in the router's input ports.

Data plane is usually implemented in hardware due to the requirement of fast


processing, as it operates at the nanosecond time scale. Control plane is usually implemented
in software and operates at the millisecond or second timescale, for example, for executing
routing protocols, responding to attached links that go up or down, communicating with remote
controllers, and performing management functions.

R7. Discuss why each input port in a high-speed router stores a shadow copy of the forwarding table. -

Answer: Storing a shadow copy of the forwarding table allows it to be stored locally at each input port. This
avoids the need to invoke the centralized routing processor, which also avoids creating a lookup processing
bottleneck at a single point within the router.
R8. What is meant by destination-based forwarding? How does this differ from generalized forwarding (assuming
you've read Section 4.4 , which of the two approaches are adopted by Software-Defined Networking)? -

Answer: Destination-based formatting means that a datagram arriving at a router will be forwarded to an output
interface based only on the final destination of the datagram. Generalized forwarding means that besides its final
destination, other factors associated with a datagram are also considered when a router determines the output
interface for the datagram.
Software-Defined Networking adopts generalized forwarding. For example, forwarding decision can be based
on a datagram's TCP/UDP source or destination port numbers, besides its destination IP address.

R9. Suppose that an arriving packet matches two or more entries in a router's forwarding table. With traditional
destination-based forwarding, what rule does a router apply to determine which of these rules should be applied
to determine the output port to which the arriving packet should be switched? -

Answer: A router uses longest prefix matching to determine which link interface a packet will be forwarded to if
the packet's destination address matches two or more entries in the forwarding table. In this case, the packet
that has the longest prefix match with the packet's destination will be the one forwarded to the link interface.

R10. Three types of switching fabrics are discussed in Section 4.2 . List and briefly describe each type. Which,
if any, can send multiple packets across the fabric in parallel? –

Answer: Switching via memory: An input port with an arriving packet first signaled the routing
processor via an interrupt. The packet was then copied from the input port into processor
memory. The routing
1- Switching processor then extracted the destination address from the header, looked
Via Memory:
up -the
traditional computers
appropriate with
output port switching
in the under
forwarding direct
table, andcontrol
copied of
theCPU..
packet to the output port's
- the packet is copied to system's memory.
buffers.
- speed is limited by memory bandwidth.

2- Switching Via Bus:


Switching via bus:
- datagram An input portfrom
is transferred transfers
input aport
packet directly
memory totooutput
the output
port port over avia a shared bus, without the
memory
intervention
shared of the
bus, without routing processor.
intervention all output
by the routing ports
processor. receives
This the done
is typically packet
by but onlythe
having the matched
destination output port will keep the packet, others will discard it. if multiple packets arrive to the router
prepend
input port same
at the pre-pend a switch-internal
time, label (header)
each at a different to the
input port, packet
then indicating
all but one mustthewait
localsince
outputonly
portone packet can
cross this
to which at apacket
time. is being transferred and transmitting the packet onto the bus. All output
- bus contention: switching speed is limited by bus bandwidth.
ports receive the packet, but only the port that matches the label will keep the packet. The label
is then removed at the output port, as this label is only used within the switch to cross the bus. If
multiple packets arrive to the router at the same time, each at a different input port, all but one
must wait since only one packet can cross the bus at a time.

3- Switching via an interconnection network: A crossbar switch is an interconnection


network consisting of 2N buses that connect N input ports to N output ports. Each vertical bus
intersects each horizontal bus at a crosspoint, which can be opened or closed at any time by the
switch fabric controller (whose logic is part of the switching fabric itself). When a packet arrives
from port A and needs to be forwarded to port Y, the switch controller closes the crosspoint at
the intersection of busses A and Y, and port A then sends the packet onto its bus, which is
picked up (only) by bus Y. Because packets can use different input and output buses with this
approach, crossbar switches are capable of forwarding multiple packets in parallel.

R11. Describe how packet loss can occur at input ports. Describe how packet loss at input ports can be
eliminated (without using infinite buffers). -
Answer: Should
when the rate at which packets arrive at the fabric exceed the switching fabric rate, then packets will
need to queue at the input ports. Continuation of this queueing would cause overflow in the input port buffers
leading to packet loss. This can be eliminated if the switching speed is at least n times as fast as the input line
speed, where n is the number of input ports.

R12. Describe how packet loss can occur at output ports. Can this loss be prevented by increasing the switch
fabric speed? -
Answer: Packet loss can occur if the rate at which packets arrive to a single output port exceed the line speed,
regardless if both input and output line speeds are the same. As with input ports, excessive queueing can
eventually overflow the output port buffers, causing packet loss. Increasing switch fabric speed would not prevent
this from occurring.

R13. What is HOL blocking? Does it occur in input ports or output ports? -
Answer: Head-of-the-line(HOL) blocking is when a queued packet in an input queue must wait for transfer
through the fabric(even though its output port is free) because it is blocked by another packet at the head of the
line. This occurs in input ports.
- queued datagram at front of a queue prevents others from moving forward. it occurs at input ports.

depart = leave
R14. In Section 4.2 , we studied FIFO, Priority, Round Robin (RR), and Weighted Fair Queueing (WFQ) packet
scheduling disciplines. Which of these queueing disciplines ensure that all packets depart in the order in which
they arrived? –
Answer: Only FIFO ensures that all packets depart in the order in which they arrived.

R15. Give an example showing why a network operator might want one class of packets to be given priority over
another class of packets. -

Answer: A packet carrying network management information should be prioritized over regular use traffic.
R16. What is an essential different between RR and WFQ packet scheduling? Is there a case (Hint: Consider
the WFQ weights) where RR and WFQ will behave exactly the same? -

Answer: (Hint: Consider the WFQ weights) where RR and WFQ will behave exactly the same?
In RR (Round Robin) scheduling, the pckets are classified into classes and rotates the
scheduler between these classes in order to avoid starvation of packet - in round robin, all
packets get equal priority.
In WFQ (Weighted Fair Queueing) scheduling, packets are classified into classes and
the scheduler will rotate among them, based on a weight assigned to them.
The case where RR and WFQ behave equally is when the scheduler operating under
WFQ assigns equal weights to all packets, thus emulating a RR-type scheduling system.

SECTION 4.3
R17. Suppose Host A sends Host B a TCP segment encapsulated in an IP datagram. When Host B receives the
datagram, how does the network layer in Host B know it should pass the segment (that is, the payload of the
datagram) to TCP rather than to UDP or to some other upper-layer protocol? -

upper-layer protocol field

Answer: Answer: The 8-bit protocol field in the IP datagram contains information about which transport layer
protocol destination host should pass the segment to.

R18. What field in the IP header can be used to ensure that a packet is forwarded through no more than N
routers? -
Answer: Answer: Time-to-live This field is decremented by one each time the datagram is processed by
a router. If the TTL field reaches 0, a router must drop that datagram

R19. Recall that we saw the Internet checksum being used in both transport-layer segment (in UDP and TCP
headers, Figures 3.7 and 3.29 respectively) and in network-layer datagrams (IP header, Figure 4.16 ). Now
consider a transport layer segment encapsulated in an IP datagram. Are the checksums in the segment header
and datagram header computed over any common bytes in the IP datagram? Explain your answer. -

No, common bytes are used to compute the checksum in the IP datagram. Only the IP header is used to compute the
checksum at the network Layer.
Answer: No, the IP header checksum only computer's the checksum of an IS packet's IP header fields, which
At TCP/UDP segment, the IP datagram may have different protocol stacks used.
does not share any common bytes with the IP datagrams's transport layer segment part.
Therefore, when a TCP datagram is entered in the IP datagram, it is not necessary to use common byte to compute
checksum.

R20. When a large datagram is fragmented into multiple smaller datagrams, where are these smaller datagrams
reassembled into a single larger datagram? - very important
Answer: Datagrams are reassembled at the destination host before being passed to the transport layer.
R21. Do routers have IP addresses? If so, how many? -
256 128 64 32 16 8 4 2 1
223 >> 0 1 1 0 1 1 1 1 1
Answer: Yes they have one address for each interface.

8
R22. What is the 32-bit binary equivalent of the IP address 223.1.3.27? -
Answer: 11011111 00000001 00000011 00011100

R23. Visit a host that uses DHCP to obtain its IP address, network mask, default router, and IP address of its
local DNS server. List these values. -
Answer: To get info enter the following in the command line ipconfig/all

1 2 3 4 5 6 7 8

R24. Suppose there are three routers between a source host and a destination host. Ignoring fragmentation, an
IP datagram sent from the source host to the destination host will travel over how many interfaces? How many
forwarding tables will be indexed to move the datagram from the source to the destination? -
(Number of routers) * (2 interfaces per router) + 2 interfaces (one for
Answer: 8 interfaces and 3 forwarding tables. the source host and one for the destination host) = 6 + 2 = 8
3 routers means three forwarding tables will be indexed.

Formulas >> 1- Number of interfaces = (Number of routers *2) + 2


2- Number of forwarding tables = Number of routers
R25. Suppose an application generates chunks of 40 bytes of data every 20 msec, and each chunk gets
encapsulated in a TCP segment and then an IP datagram. What percentage of each datagram will be overhead,
and what percentage will be application data? - size of chunks generated = 40 bytes
time taken to generate a chunk = 20ms = 0.02 seconds
size of TCP header = 20 bytes
Answer: 50% overhead size of IP header = 20 bytes
total size of header = size of TCP header + size of IP header = 20 bytes + 20 bytes = 40 bytes
total segment size = header size + total generated data = 40 + 40 = 80 bytes
the percentage of the datagram is : total size of header / total size of segment = (40 / 80) * 100% = 50%
overhead .. Therefore, the percentage of overhead is 50% and application data is 50%
R26. Suppose you purchase a wireless router and connect it to your cable modem. Also suppose that your ISP
dynamically assigns your connected device (that is, your wireless router) one IP address. Also suppose that you
have five PCs at home that use 802.11 to wirelessly connect to your wireless router. How are IP addresses
assigned to the five PCs? Does the wireless router use NAT? Why or why not? -

Answer: usually the wireless router includes a DHCP server. DHCP is used to assign IP addresses to the five
PCs and as well to the router interface. Yes the wireless router also uses NAT as it gets only one IP address
from the ISP.

summarization

R27. What is meant by the term "route aggregation"? Why is it useful for a router to perform route aggregation?
Briefly, it's a method of minimizing the number of routing tables in an IP network >> avoiding over usage of routers to access the network. This
service provider can further subnet the addresses and assign them to organizations in hierarchical manner.

Answer: When we say route aggregation, what is actually meant is a method for aggregating
multiple specific routes and summarizing them into a singular route. In this method, the network
layer addresses are arranged in a hierarchical fashion and each ISP is assigned a continuous
block of IP addresses.
It is useful to perform route aggregation in order to further subnet any addresses and
assign them to organization in an organized manner. It reduces the number of routes used to
access the network, the size of routing tales, and depletion of routes.

R28. What is meant by a "plug-and-play" or "zeroconf" protocol?


is
Answer: A protocol in which the host in helped by being assigned IP addresses. When the protocol connects a
host to a network, they may receive the same IP all the time or receive a temporary one for each access, this is
what is known as the "plug and play" protocol.

R29. What is a private network address? Should a datagram with a private network address ever be present in
the larger public Internet? Explain. -

Answer: A private network address is its own private address assigned by an ISP, these addresses can be
assigned to a particular organization or to an individual. Datagrams with private network addresses cannot
directly be sent through to the public internet as they would not be capable of escaping the network - on the
contrary, messages from the outside coming into the private network would be able to reach the devices on the
network just fine.

R30. Compare and contrast the IPv4 and the IPv6 header fields. Do they have any fields in common? -

Answer: IPv4 and IPv6 header fields contain quite a few differences and similarities. IPv4 datagrams consists of
plenty of optional fields while IPv6 trends towards the minimum number of fields possible, IPv4 also maintains a
total header size of 20-byte while IPv6 remains a fixed 40-byte. IPv4 source and destination addresses are 32-
bits while IPv6 can be up to 128-bits in length.

Fields that both IPv4 and IPv6 have in common are the following: Version, Service Type, Time to Live, Upper-
layer protocol, source IP, destination IP, data.

• Tunneling is also known as Port Forwarding.

R31. It has been said that when IPv6 tunnels through IPv4 routers, IPv6 treats the IPv4 tunnels as link-layer
protocols. Do you agree with this statement? Why or why not? -

Answer: When IPv6 traverses through an IPv4 tunnels, they're treated as link-layers because the entire diagram
Answer:
of what IPv6 isThe
can argument herebyofIPv4.
be encapsulated IPV6 treatingonIPV4
Therefore tunnelsend
the receiving asofLink-layer protocols
the tunnel, the tunnel isis
routing
acceptable, because the entire IPv6 datagram is encapsulated in an IPv4 datagram.
an IPv4 diagram to the remaining nodes across the destination addresses of the router. I agree with the
and onthat
statement thethey're
receiving
treatedside of the tunnel,
as link-layer protocols.the tunnel routes the IPv4 datagram to the
remaining nodes according to the destination address of the router.
SECTION 4.4

R32. How does generalized forwarding differ from destination-based forwarding? -

Answer: Generalized forwarding differs from destination-based forwarding in many ways: to begin, destination
based forwarding takes an approach where data packets are forwarded based on destination addressed within
header fields. Routes are established from destination to source based to destination address and utilization of
forwarding tables. Looking up IP addresses in destination-based forwarding is done through a forwarding table
which packets are then forwarded from. On the other hand, generalized forwarding does not have a set decision
when it comes to forwarding based simply on a destination address. Remote controllers or network
administrators install match plus action tables in place of forwarding tales, and packets are routed through a
switch look up system where entries must pass through a flow table and find an appropriate match before being
forwarded.

R33. What is the difference between a forwarding table that we encountered in destination- based forwarding in
Section 4.1 and OpenFlow's flow table that we encountered in Section 4.4?

Answer: The difference between forwarding tables and OpenFlow tables are that forwarding tables are defined
by routing processors as opposed to OpenFlow taking an approach defined by a remote controller. Forwarding
tables consist of addresses or routes which can be traversed in order to arrive at the destination while a flow
table is based on information such as destination IP addresses and switch ports. Packet designations in forward
tables are identified via prefix, where the longest prefixes matching the packet is selected as a match, as opposed
to OpenFlow's header fields which match packets and take action from there.

R34. What is meant by the "match plus action" operation of a router or switch? In the case of destination-based
forwarding packet switch, what is matched and what is the action taken? In the case of an SDN, name three
fields that can be matched, and three actions that can be taken.

Answer: Match plus action means to match the header fields of incoming packets and taking the appropriate
action according to the result. In destination-based forwarding, a packet arrives at a router or a switch and is
forwarded based on the destination address of the packet. In destination-based forward packet switch, the packet
destination address is matched with the entries in the appropriate forwarding table if the match is found. In SDN,
three fields which can be matched are IP address, destination IP address, and protocol field -- three actions that
can be taken is forwarding, modifying a header, or dropping a packet.

R35. Name three header fields in an IP datagram that can be "matched" in OpenFlow 1.0 generalized forwarding.
What are three IP datagram header fields that cannot be "matched" in OpenFlow? -

Answer: Three header fields in an IP datagram that can be matched in OpenFlow are the IP source addresses,
the destination addresses for those IP's and the IP's protocol field. The three datagram headers that cannot be
matched to an openflow table are version numbers, time to live, and datagram length. There is no functionality
for these fields in OpenFlow.

You might also like