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

TCN2141 Computer Networks

Tutorial 4
Important instruction:
Print and prepare the all Solution before the Tutorial Class
Submit to tutor before class start.

1. What is Autonomous System (AS). List three types of autonomous systems (ASs)
described in the text, and make a comparison between them.

• Within the Internet, an Autonomous System (AS) is a collection of connected Internet


Protocol (IP) routing prefixes under the control of one or more network operators on
behalf of a single administrative entity or domain that presents a common, clearly
defined routing policy to the Internet.
• The three ASs described in the text are stub, multihomed, and transient.
Stub AS Multihomed AS Transient AS

Allow transient traffic


Not allow transient traffic

Similar in that they are either the sink or source of


traffic
Connected to more than
Connected to only one
one ASs
other AS

2. Explain why we can have different intradomain routing protocols in different AS but we
need only one interdomain routing protocols in the whole Internet.

• Each AS is independent, which means that it can run one of the two common
intradomain routing protocols (RIP or OSPF).
• On the other hand, the whole Internet is considered as one entity, which means that we
must run only one interdomain routing protocol (the common one is BGP). Multiple AS

3. Assume that we have an isolated AS running RIP. We can say that we have at least two
different kinds of datagram traffic in this AS. The first kind carries the messages
exchanged between hosts; the second carries messages belong- ing to RIP. What is the
difference between the two kinds of traffic when we think about source and destination IP
addresses? Does this show that routers also need IP addresses?

1 SK FIST JULY 2020


• The source and destination IP addresses in datagrams carrying payloads (data)
between the hosts are the IP addresses of the hosts; Routed Protocol
• The IP addresses carrying routing update packets between routers are IP addresses of
the routing interfaces from which the packets are sent or received.
• This shows that a router needs as many IP addresses as it has interfaces. Routing
Protocol.

4. Why do you think RIP uses UDP instead of TCP?

• RIP messages are short with clear message boundaries.


• It is not efficient to use the service of TCP with all of the connection establishment
and connection teardown overhead. Overhead

5. Router A sends two RIP messages to two immediate neighboring routers, B and C. Do the
two datagrams carrying the messages have the same source IP addresses? Do the two
datagrams have the same destination IP addresses?

• Each datagram has a different sorce IP address: the IP address of the interface from
which it is sent out (a router can have only one immediate neighbor on each interface).
• Each datagram also has a different destination IP address: the IP address of the router
interface at which it arrives.

6. Why do you think we need only one RIP update message, but several OSPF update
messages?

• In RIP, each router just needs to share its distance vector with its neighbor.
• Since each router has one type of distance vector, we need only one update
message.
• In OSPF, each router needs to share the state of its links with every other router.
• Since a router can have several types of links (a router link, a network link, ...), we
need several update messages.
• LSA-5 types:
a) Router Link
b) Network Link
c) Summary Link to Network
d) Summary Link to AS
e) Eternal Link

7. OSPF messages and ICMP messages are directly encapsulated in an IP data- gram. If we
intercept an IP datagram, how can we tell whether the payload belongs to OSPF or ICMP?
• The type of payload can be determined from the value of the protocol field.
• The protocol field value
- for ICMP is 01; || for OSPF, it is 89

2 SK FIST JULY 2020


8. Explain what type of OSPF link state is advertised in each of the following cases:

i. A router needs to advertise the existence of another router at the end of a point-to-point
link.
• Router Link
ii. A router needs to advertise the existence of two stub networks and one transient
network.
• Router Link
iii. A designated router advertises a network as a node.
• Network Link

9. Can you explain why BGP uses the services of TCP instead of UDP?
• BGP is designed to create semi-permanent communication between two BGP
speakers: this requires the service of TCP.
• A connection is made between the two speakers and remains open, while the
messages are exchanged between them.
• UDP cannot provide such as service.

10. Use Dijkstra’s algorithm to find the cost of the cheapest path between a and z in the
following weighted graph. Describe at each iteration the function L and set S.

Vertex Shortest Distance from A Previous Vertex


a 0 -
b 2 a
c 3 a
d 5 e
e 4 C
z 7 d

Min(DestValue, MarkedValue + Edge Weight)


Min (Dv, Mv + Ew)
Min (Dv ,Mv + Ew)

3 SK FIST JULY 2020


Min (∞, 0 + 2)
=2

S L(a) L(b) L(c) L(d) L(e) L(z)


∅ 0 ∞ ∞ ∞ ∞ ∞
(a) 2 3 ∞ ∞ ∞
(a,b) 3 7 5 ∞
(a,b,c) 7 4 ∞
(a,b,c,e) 5 8
(a,b,c,e,d) 7
(a,b,c,e,d,z)

At the last iteration, z ∈ 𝑆 and L(z) = 7. We conclude that the cheapest path from a to z has a
cost 7.

4 SK FIST JULY 2020

You might also like