Beruflich Dokumente
Kultur Dokumente
The network layer supervises the handling of the y p g f packets by the underlying physical networks. We networks. define this handling as the delivery of a packet. packet.
2222-2 FORWARDING
Forwarding means to place the packet in its route to g p p its destination. Forwarding requires a host or a router destination. to have a routing table. When a host has a packet to table. send or when a router has received a packet to be forwarded, it looks at this table to find the route to the final destination. destination. Topics discussed in this section:
Forwarding Techniques Forwarding Process Routing Table
Example 22.1
Make a routing table for router R1, using the configuration in Figure 22.6. Note Solution Table 22 1 shows the corresponding table 22.1 table.
10
11
12
Example 22.2
Show the forwarding process if a packet arrives at R1 in Figure 22.6 with the destination address 180.70.65.140. Solution The router performs the following steps: p f f g p 1. The first mask (/26) is applied to the destination address. The result is 180.70.65.128, which does not match the corresponding network address. di k dd 2. The second mask (/25) is applied to the destination address. address The result is 180 70 65 128 which matches the 180.70.65.128, corresponding network address. The next-hop address and the interface number m0 are passed to ARP for f p f further processing.
13
Example 22.3
Show the forwarding process if a packet arrives at R1 in Figure 22.6 with the destination address 201.4.22.35. Solution S l ti The router performs the following steps: 1. The first mask (/26) is applied to the destination address. The result is 201.4.22.0, which does not match the corresponding network address. p g 2. The second mask (/25) is applied to the destination address. The result is 201.4.22.0, which does not match the corresponding network address ( h h di k dd (row 2) 2).
14
Example 22.4
Show the forwarding process if a packet arrives at R1 in Figure 22.6 with the destination address 18.24.32.78. Solution This time all masks are applied, one by one, to the destination address, but no matching network address is found. Wh it reaches th end of th t bl th module f d When h the d f the table, the d l gives the next-hop address 180.70.65.200 and interface number m2 to ARP This is probably an outgoing package ARP. that needs to be sent, via the default router, to someplace else in the Internet.
16
3. The third mask (/24) is applied to the destination address. The result is 201.4.22.0, which matches the corresponding network address. The destination address of the packet and the interface number m3 are passed to ARP.
15
17
18
Example 22.5
As an example of hierarchical routing, let us consider Figure 22.9. A regional ISP is granted 16,384 addresses starting f t ti from 120 14 64 0 Th regional ISP h d id d 120.14.64.0. The i l has decided to divide this block into four subblocks, each with 4096 addresses. addresses Three of these subblocks are assigned to three local ISPs; the second subblock is reserved for future use. Note that the mask for each block is /20 because the f original block with mask /18 is divided into 4 blocks. The first local ISP has divided its assigned subblock into 8 smaller blocks and assigned each to a small ISP. Each small ISP provides services to 128 households, each using p g four addresses.
19
20
21
22
Example 22.6
One utility that can be used to find the contents of a routing table for a host or router is netstat in UNIX or LINUX. The next slide shows the list of the contents of a default server. We have used two options, r and n. The option r indicates that we are interested in the routing table, and the option n indicates that we are looking for numeric addresses. N t th t thi i a routing t bl f a i dd Note that this is ti table for host, not a router. Although we discussed the routing table for a router throughout the chapter, a host also needs a routing table.
The destination column here defines the network address. The term gateway used by UNIX is synonymous with router. This column actually defines the address of the next hop. hop The value 0 0 0 0 shows that the delivery is direct The 0.0.0.0 direct. last entry has a flag of G, which means that the destination can be reached through a router (default router). The Iface defines the interface.
24
23
25
26
Graph abstraction p
5
v
3 3 1
output link
3 2 2 1
2 2 1
x
5 1
y
Graph: G = (N,E)
value in arriving packets header
N = set of routers = { u, v, w, x, y, z }
0111
1
3 2
E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w z) (u v) (u x) (v x) (v w) (x w) (x y) (w y) (w,z),
Remark: Graph abstraction is useful in other network contexts Example: P2P, where N i set of peers and E is set of TCP connections E l P2P h is t f d i t f ti
27
28
Static or dynamic?
Static: routes change slowly over time Dynamic: routes change more ou es a ge o e quickly periodic update in response to link cost changes
2 2 1
x
5 1
y
- e.g., c(w,z) = 5
z
Cost of path (x1, x2, x3,, xp) = c(x1,x2) + c(x2,x3) + + c(xp-1,xp) Question: Whats the least-cost path between u and z ?
Routing algorithm: algorithm that finds least-cost path
29
33
34
Note
In di t I distance vector routing, each node t ti h d shares its routing table with its immediate neighbors periodically and i di t i hb i di ll d when there is a change.
35
36
37
38
RIP Protocol
When to Share The question now is, When does a node send its partial routing table (only two columns) to all its immediate neighbors? The table is sent both periodically and when there is a change in the table. Periodic Update: A node sends its routing table, normally every 30 s, in a periodic update. The period depends on the protocol that is using distance vector routing. Triggered Update: A node sends its two-column routing table to its neighbors any- time there is a change in its routing table. This is called a triggered update. The change can result from the following.
A node receives a table from a neighbor, resulting in changes in its own table after updating. A node detects some failure in the neighboring links which results in a distance d d t t f il i th i hb i li k hi h lt i di t change to infinity
The Routing Information Protocol (RIP) is an intra-domain intra domain routing protocol used inside an autonomous system. It is a very simple protocol based on distance vector routing. RIP implements distance vector routing directly with some considerations: 1. In an autonomous system, we are dealing with routers and networks (links). The routers have routing tables; networks do not. 2. The destination in a routing table is a network, which g , means the first column defines a network address. 3. The metric used by RIP is very simple; the distance is defined as the number of links (networks) to reach the destination. For this reason, the metric in RIP is called a hop count. 4. I fi it i d fi d 4 Infinity is defined as 16, which means that any route in an 16 hi h th t t i autonomous system using RIP cannot have more than15 hops
41
42
43
44
45
46
Figure 22.23 Example of formation of shortest path tree Table 22.2 Routing table for node A
47
48
49
50
51
52
53
54
Figure 22.30 Initial routing tables in path vector routing - speaker node
55
56
Note
In i I unicasting, the router forwards the ti th t f d th received packet through only one of its interfaces. l f it i t f
59
60
Note
In I multicasting, the router may lti ti th t forward the received packet through several of its interfaces. th h l f it i t f
61
62
Note
Emulation of multicasting through E l ti f lti ti th h multiple unicasting is not efficient and may create long delays, d t l d l particularly with a large group.
63
64
Note
In i I unicast routing, each router in the t ti h t i th domain has a table that defines a shortest path tree to possible h t t th t t ibl destinations.
65
66
Note
In I multicast routing, each involved lti t ti hi l d router needs to construct a shortest path tree for each group. h t t th t f h
67
68
Note
In th I the source-based tree approach, each b dt h h router needs to have one shortest path tree f each group. t for h
69
70
Note
In th I the group-shared tree approach, only h dt h l the core router, which has a shortest path tree for each group, is involved in th t f h i i l di multicasting.
71
72
Note
Note
Multicast link state routing uses the M lti t li k t t ti th source-based tree approach.
73
74
Note
75
76
77
78
Note
RPB creates a shortest path broadcast tree f t from th source to each destination. the t h d ti ti It guarantees that each destination receives recei es one and only one copy onl cop of the packet.
79
80
Note
RPM adds pruning and grafting to RPB to t create a multicast shortest t lti t h t t path tree that supports dynamic membership changes. changes
81
82
Note
In CBT, the source sends the multicast packet ( (encapsulated in a unicast packet) to the core router. The core router d decapsulates the packet and l h k d forwards it to all interested interfaces.
83
84
Note
Note
PIM-DM PIM DM uses RPF and pruning and d i d grafting strategies to handle multicasting. lti ti However, it is independent of the underlying unicast protocol. d l i i t t l
85
86
Note
Note
87
88
89
90
70
60
50
40
30
20
10
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
Mean StandardError Median Mode StandardDeviation SampleVariance Kurtosis Skewness k Range Minimum Maximum Sum Count
92
91