1 Internet Networking Spring 2003 Tutorial 4 ICMP (Internet Control Message Protocol) usage TBRPF (Topology Broadcast based on Reverse Path Forwarding)
2 MTU Discovery When a router get a datagram that requires fragmentation, but the IP header fragment flag is turned on, than the router drop the packet and sends ICMP unreachable error - Fragmentation Required to the sender Newer router also returns next hop MTU value that caused the packet dropping, insides of ICMP message Type (3)Code (4)Checksum IP header (can include options) + first 8 bytes of datagram Unused (must be 0) MTU of next-hop network (0 if not supported)
3 MTU Discovery Algorithm: –We send packets with don’t fragment bit set –The size of the first packet we send will be equal the MTU of the outgoing interface –Whenever we receive an ICMP “can’t fragment” error we will reduce the size of the packet: If the router sending ICMP error, returns MTU that caused the drop than we will use this value Otherwise we we will try the next smallest MTU (RFC defines only a limited number of MTUs)
4 Ping Program A program for checking if host is alive –Exists in most Operation Systems Sends ICMP message of type Echo Request Receiver answers with ICMP messages of type Echo Reply Enables also to see the Round Trip Time from a sender to a destination
5 Ping (Example)
6 Traceroute Program Lets see the route that IP datagrams follow from one host to another –There is no guaranty that two that two consecutive IP datagrams from the same source to the same destination follow the same route, but most of the time they do Sends a sequence of datagrams with TTL set to 1,2,etc. These datagrams are UDP packets sent to some unused port.
7 Traceroute Program (cont.) When intermediate router receives a packet with TTL=1 it throws the packet and sends back ICMP “time exceeded” message In such way we can discover all routers in the was between source and destination The process finishes, when a destination host gets the packet and sends back ICMP “port unreachable” message Many sites now put firewalls that don’t give traceroute/ping packets get through
8 Traceroute (Example) Time complexity: O(n 2 )
9 Traceroute (Example) traceroute from ack.berkeley.edu to 1 vlan206.inr-203-eva.Berkeley.EDU ( ) ms ms ms 2 vlan210.inr-202-doecev.Berkeley.EDU ( ) ms ms ms 3 gigE3-0.inr-000-eva.Berkeley.EDU ( ) ms ms ms 4 pos3-0.c2-berk-gsr.Berkeley.EDU ( ) ms ms ms 5 SUNV--BERK.POS.calren2.net ( ) ms ms ms 6 Abilene--QSV.POS.calren2.net ( ) ms ms ms 7 losa-snva.abilene.ucaid.edu ( ) ms ms ms 8 hstn-losa.abilene.ucaid.edu ( ) ms ms ms 9 atla-hstn.abilene.ucaid.edu ( ) ms ms ms 10 ipls-atla.abilene.ucaid.edu ( ) ms ms ms 11 ILAN-Abeline.ilan.net.il ( ) ms ms ms 12 chi-gp3-fe-i2.ilan.net.il ( ) ms ms ms 13 tau-gp2-s0.ilan.net.il ( ) ms ms ms 14 tau-gp1-fe-i2.ilan.net.il ( ) ms ms ms 15 technion-gp1-mag.ilan.net.il ( ) ms ms ms
10 TBRPF Algorithm Intend to broadcast network topology to all nodes at ad-hok networks (subject to dynamic changes). Uses less communication than the topology dissemination algorithm. However, it might take longer time to converge (up to a factor of 2 in the worst case). Paper can be downloaded at the course site.
11 Assumptions (u,v) is up (v,u) is up Failure is detected in finite time Link layer that guards FIFO There is s a time point t 0 followed by no changes at the network.
12 Network Updates G = (V,E) Every undirectional edge = both (u,v) and (v,u) directional edges U is responsible for updating (u,:) changes to neighbors Topology update: (u,v,c,sn): (u,v) : the edge whose state has changed c : new cost sn: sequence number.
13 Database each node holds: TT i : topology table: most updated (u,v,c,sn) for each (u,v). N i : list of neighbor nodes For each src ≠ i : P i (src) : the next node from node i to src on MINIMUM HOP route, as obtained from the TT i List of children i (src) Sn i (src) : most recent link state change originated from node src.
14 Updates: cont. Update is accepted if both conditions hold: its received from p i (src) has a larger sn then sn i (src) I know of. If accepted: forward to all nodes in children i (src)
15 Parent changing After: topology update existence of a new neighbor loss of connectivity to an old neighbor link-state update expired recomputed your parent for each node.
16 Parent related Messages if parent changed: send CANCEL_PARENT(src) to the old parent if exist; send NEW_PARENT(src,sn) to your new parent The new parent: Sends topology messages with sequence number > sn.
17 Different Link changes Link up: Execute LINK_UP (article) Send link state message for all children i (i) recomputed your parent for each node. Similar to is LINK_DOWN (article) LINK_CHANGE (article) does not recomputed parents (why?)
18 Example: p q (u) = u p k (u) = i sn i (u) = 5 sn k (u) = 5 (i,j) fails. node i: i calculates new p i (u) = p sends NEW_PARENT(u,5) to p node k: learns of this failure since k children i (i) sends NEW_PARENT(u,5) to p, CANCEL_PARENT(u) to node i p sends all the changes in its TT p with sequence_number > 5 to both k and i all subsequence changes originating from node u and i, since they are now in children p (u). only i and k sent a NEW_PARENT(u,5) to other nodes.
19 Correctness Proof Lemma 1: At any time t and for any different nodes i and u, if lsu = (u,v,c,sn) is the most recent update with sn ≤ sn i (u)[t] that node u generated for link (u,v), then lsu is in TT i [t] by contradiction for the 2 possible cases to receive lsu. Theorem 1: There is a time t f ≥ t 0 such that, under the preceding assumptions, each nodes knows the correct topology for all t ≥ t f by induction over the distance between the source and node i.
20 Communication Complexity Message unit: number of bits in node ID or sequence number (≥ O(logV)) Link cost change: O(V) message units O(E) in flooding. Link down: O(V 2 ) in the worst case O(E) in flooding. In simulations average complexity is much smaller ( without exact proof). Link up, no new connected sub-graph: similar Link up, new connected sub-graph: O(EV), O(E 2 ) in flooding
21 Time complexity: D: Network Diameter Link cost: D Link Down/Link up without partition recovery : D+2 Link up with partition recovery : 2D 2D time units: 1 time unit to send new parent message 1 time unit to receive updates.
22 Computational and Storage Complexity Computational Complexity O(E) time for BFS after any update. None of any TRBF procedures costs more than O(E) time. O(E) total. Storage Complexity E entries for topology table V for parents for each node O(V*N i ) for children assignment