220 likes | 382 Views
Internet Networking Spring 2003. Tutorial 4 ICMP (Internet Control Message Protocol) usage TBRPF (Topology Broadcast based on Reverse Path Forwarding). MTU Discovery.
E N D
Internet Networking Spring 2003 Tutorial 4 ICMP (Internet Control Message Protocol) usage TBRPF (Topology Broadcast based on Reverse Path Forwarding)
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 MTUvalue that caused the packet dropping, insides of ICMP message 0 7 8 15 16 31 Type (3) Code (4) Checksum Unused (must be 0) MTU of next-hop network (0 if not supported) IP header (can include options) + first 8 bytes of datagram
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)
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
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.
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
Traceroute (Example) Time complexity: O(n2)
Traceroute (Example) traceroute from ack.berkeley.edu to www.technion.ac.il 1 vlan206.inr-203-eva.Berkeley.EDU (128.32.206.1) 0.573 ms 0.595 ms 0.507 ms 2 vlan210.inr-202-doecev.Berkeley.EDU (128.32.255.9) 0.816 ms 0.546 ms 0.553 ms 3 gigE3-0.inr-000-eva.Berkeley.EDU (128.32.0.201) 0.357 ms 0.253 ms 0.242 ms 4 pos3-0.c2-berk-gsr.Berkeley.EDU (128.32.0.90) 0.345 ms 0.345 ms 0.294 ms 5 SUNV--BERK.POS.calren2.net (198.32.249.14) 1.565 ms 1.670 ms 1.515 ms 6 Abilene--QSV.POS.calren2.net (198.32.249.162) 1.853 ms 1.716 ms 1.725 ms 7 losa-snva.abilene.ucaid.edu (198.32.8.18) 9.297 ms 9.087 ms 9.143 ms 8 hstn-losa.abilene.ucaid.edu (198.32.8.22) 40.695 ms 40.786 ms 40.651 ms 9 atla-hstn.abilene.ucaid.edu (198.32.8.34) 59.921 ms 59.719 ms 59.941 ms 10 ipls-atla.abilene.ucaid.edu (198.32.8.41) 69.950 ms 79.609 ms 69.786 ms 11 ILAN-Abeline.ilan.net.il (192.114.98.2) 74.505 ms 74.324 ms 74.205 ms 12 chi-gp3-fe-i2.ilan.net.il (192.114.101.33) 75.376 ms 74.741 ms 74.375 ms 13 tau-gp2-s0.ilan.net.il (192.114.99.66) 265.863 ms 264.125 ms 264.264 ms 14 tau-gp1-fe-i2.ilan.net.il (192.114.99.34) 264.943 ms 265.664 ms 265.047 ms 15 technion-gp1-mag.ilan.net.il (128.139.203.13) 271.842 ms 269.802 ms 286.051 ms
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.
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 t0 followed by no changes at the network.
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.
Database each node holds: • TTi : topology table: most updated (u,v,c,sn) for each (u,v) . • Ni : list of neighbor nodes • For each src ≠ i : • Pi(src) : the next node from node i to src on MINIMUM HOP route, as obtained from the TTi • List of childreni(src) • Sni(src) : most recent link state change originated from node src.
Updates: cont. Update is accepted if both conditions hold: • its received from pi(src) • has a larger sn then sni(src) I know of. If accepted: forward to all nodes in childreni(src)
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.
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.
Different Link changes Link up: • Execute LINK_UP (article) • Send link state message for all childreni(i) • recomputed your parent for each node. • Similar to is LINK_DOWN (article) • LINK_CHANGE (article) does not recomputed parents (why?)
Example: • pq(u) = u • pk(u) = i • sni(u) = 5 • snk(u) = 5 (i,j) fails. node i: • i calculates new pi(u) = p • sends NEW_PARENT(u,5) to p node k: • learns of this failure since k childreni(i) • sends NEW_PARENT(u,5) to p, CANCEL_PARENT(u) to node i • p sends all the changes in its TTp with sequence_number > 5 to both k and i • all subsequence changes originating from node u and i, since they are now in childrenp(u). only i and k sent a NEW_PARENT(u,5) to other nodes.
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 ≤ sni(u)[t] that node u generated for link (u,v) , then lsu is in TTi[t] • by contradiction for the 2 possible cases to receive lsu. Theorem 1: There is a time tf ≥ t0 such that, under the preceding assumptions, each nodes knows the correct topology for all t ≥ tf • by induction over the distance between the source and node i.
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(V2) 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(E2) in flooding
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.
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*Ni) for children assignment