Professional Documents
Culture Documents
方钧同 2021011783
Exercise 1 (R3)
Routing is the process of determining the route of packets from source to route, while forwarding
is the process of moving packets from the router's input to the router's output according to the
routing table.
Exercise 2 (R21)
Link state is a global algorithm based on Dijkstra algorithm, which updates routes with the lowest
cost to different nodes every time when the cost of a single path changes.
Distance vector is a decentralized algorithm mainly using the dynamic programming idea. Each
node possessing a distance vector, recording the shortest distances to its neighbor. Periodically,
each node sends its distance vector to all its neighbors in case that the cost of path may change.
And when a nodes receive the distance vector, it needs to update its own distance vector
according to the Bellman-Ford equation.
Exercise 3 (P5)
a.
b.
There are four links in each VC and each link has two available VC numbers. So there are
combinations in all.
Exercise 4 (P10)
a.
11100000 01000000 1
11100000 00 0
11100001 1 3
1110000 2
otherwise 3
b.
Since my table is ordered descend by the length of prefix, so we just need to find the first table
item that can match the datagram's destination address from the top to the bottom.
The first datagram's destination address can't match anything so it will be forwarded to interface
3.
The second datagram's destination address matches the fourth one so it will be forwarded to
interface 2.
The third datagram's destination address matches the third one so it will be forwarded to
interface 3.
Exercise 5 (P11)
Exercise 6 (P12)
Exercise 7 (P17)
a.
b.
Exercise 8 (P19)
Exercise 9(P28)
u v x y z
u 0 1 / / /
v 1 0 3 / 6
x / 3 0 3 2
y / / 3 0 /
z / 6 2 / 0
And we should update the table according to the Bellman-Ford Equation, which is
u v x y z
z 6 5 2 5 0