internet networking spring 2003

22
1 Internet Networking Spring 2003 Tutorial 4 ICMP (Internet Control Message Protocol) usage TBRPF (Topology Broadcast based on Reverse Path Forwarding)

Upload: brigid

Post on 15-Jan-2016

31 views

Category:

Documents


0 download

DESCRIPTION

Internet Networking Spring 2003. Tutorial 4 ICMP (Internet Control Message Protocol) usage TBRPF (Topology Broadcast based on Reverse Path Forwarding). MTU Discovery. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Internet Networking   Spring 2003

1

Internet Networking Spring 2003

Tutorial 4 ICMP (Internet Control Message

Protocol) usageTBRPF (Topology Broadcast based

on Reverse Path Forwarding)

Page 2: Internet Networking   Spring 2003

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

0 7 8 15 16 31

IP header (can include options) + first 8 bytes of datagram

Unused (must be 0) MTU of next-hop network (0 if not supported)

Page 3: Internet Networking   Spring 2003

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)

Page 4: Internet Networking   Spring 2003

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

Page 5: Internet Networking   Spring 2003

5

Ping (Example)

Page 6: Internet Networking   Spring 2003

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.

Page 7: Internet Networking   Spring 2003

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

Page 8: Internet Networking   Spring 2003

8

Traceroute (Example)Time complexity: O(n2)

Page 9: Internet Networking   Spring 2003

9

Traceroute (Example)traceroute from ack.berkeley.edu to www.technion.ac.il1 vlan206.inr-203-eva.Berkeley.EDU (128.32.206.1) 0.573 ms 0.595 ms 0.507 ms2 vlan210.inr-202-doecev.Berkeley.EDU (128.32.255.9) 0.816 ms 0.546 ms 0.553 ms3 gigE3-0.inr-000-eva.Berkeley.EDU (128.32.0.201) 0.357 ms 0.253 ms 0.242 ms4 pos3-0.c2-berk-gsr.Berkeley.EDU (128.32.0.90) 0.345 ms 0.345 ms 0.294 ms5 SUNV--BERK.POS.calren2.net (198.32.249.14) 1.565 ms 1.670 ms 1.515 ms6 Abilene--QSV.POS.calren2.net (198.32.249.162) 1.853 ms 1.716 ms 1.725 ms7 losa-snva.abilene.ucaid.edu (198.32.8.18) 9.297 ms 9.087 ms 9.143 ms8 hstn-losa.abilene.ucaid.edu (198.32.8.22) 40.695 ms 40.786 ms 40.651 ms9 atla-hstn.abilene.ucaid.edu (198.32.8.34) 59.921 ms 59.719 ms 59.941 ms10 ipls-atla.abilene.ucaid.edu (198.32.8.41) 69.950 ms 79.609 ms 69.786 ms11 ILAN-Abeline.ilan.net.il (192.114.98.2) 74.505 ms 74.324 ms 74.205 ms12 chi-gp3-fe-i2.ilan.net.il (192.114.101.33) 75.376 ms 74.741 ms 74.375 ms13 tau-gp2-s0.ilan.net.il (192.114.99.66) 265.863 ms 264.125 ms 264.264 ms14 tau-gp1-fe-i2.ilan.net.il (192.114.99.34) 264.943 ms 265.664 ms 265.047 ms15 technion-gp1-mag.ilan.net.il (128.139.203.13) 271.842 ms 269.802 ms 286.051 ms

Page 10: Internet Networking   Spring 2003

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.

Page 11: Internet Networking   Spring 2003

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 t0 followed by no changes at the network.

Page 12: Internet Networking   Spring 2003

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.

Page 13: Internet Networking   Spring 2003

13

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.

Page 14: Internet Networking   Spring 2003

14

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 children i(src)

Page 15: Internet Networking   Spring 2003

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.

Page 16: Internet Networking   Spring 2003

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.

Page 17: Internet Networking   Spring 2003

17

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?)

Page 18: Internet Networking   Spring 2003

18

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 pnode 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.

Page 19: Internet Networking   Spring 2003

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 ≤ 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.

Page 20: Internet Networking   Spring 2003

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(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

Page 21: Internet Networking   Spring 2003

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.

Page 22: Internet Networking   Spring 2003

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*Ni) for children assignment