midterm review. lab 4: dynamic routing protocols

26
Midterm Review

Upload: arthur-dennis

Post on 11-Jan-2016

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Midterm Review. Lab 4: dynamic routing protocols

Midterm Review

Page 2: Midterm Review. Lab 4: dynamic routing protocols

Lab 4: dynamic routing protocols

Page 3: Midterm Review. Lab 4: dynamic routing protocols

3

Typo on Page 144

• Table 4.2– Should be router 4 instead of router 1

Page 4: Midterm Review. Lab 4: dynamic routing protocols

4

How Cost is Set on a Router

• The default cost each router adds is 1.• When Router B announces to Router C the network 10.0.2.0/24, the cost

metric is 1.• Offset-list 0 in value Iface (increases the metric of incoming RIP packets)• Offset-list 0 out value Iface (increases the metric of outgoing RIP packets)• At router B, if we run offset-list 0 out 10 eth1, then the metric for

10.0.2.0/24 is 11; if we run offset-list 0 in 10 eth1, then the metric for the network 10.0.3.0/24 announced by C becomes 11.

Router A Router B Router C

10.0.2.0/24 10.0.3.0/2410.0.4.0/2410.0.1.0/24

.2.2.2.2 .1.1.1

eth0 eth1

Page 5: Midterm Review. Lab 4: dynamic routing protocols

5

Exercise (4B): count-to-infinity

• Time consuming to reproduce, but interesting.• Why does count-to-infinity still exist with split horizon?• Lab report due after midterm

Router2

Router4

Router3

Router1101

1

11

1

Page 6: Midterm Review. Lab 4: dynamic routing protocols

6

Why does count-to-infinity still exist with split horizon?

Router2Router4

Router3

Router1101

1

11X1

10.0.1.0/24

Router3’s routing table:10.0.1.0/24 ?? 1

Router2’s routing table:10.0.1.0/24 ?? 1

Router4’s routing table:10.0.1.0/24 Router3 3

Router2 is not Router4’s next hop.Router4 sends to router2 the routing update

Router2’s routing table:10.0.1.0/24 Router 4 4

This lie will be told to Router3 andCirculates in the system count-to-infinity

Suppose updates happen in the following sequence:1. The update from PC3 arrives at Router 32. The update from Router 3 arrives at Router 23. The update from Router 4 arrives at Router 2

PC3

Page 7: Midterm Review. Lab 4: dynamic routing protocols

Midterm review

Page 8: Midterm Review. Lab 4: dynamic routing protocols

8

What you’ll be tested on

• Basic lab commands– E.g., ping, traceroute, tcpdump, ethereal, ifconfig, how to

copy a file, how to list a directory• Basic trouble shooting

– E.g., I cannot ping 128.195.1.150, why?• Basic networking concepts

– E.g., layering principle, multiplexing, and encapsulation• Protocols we’ve covered so far

– ARP– ICMP– IP

• How to design a protocol

Page 9: Midterm Review. Lab 4: dynamic routing protocols

9

Address translation protocol

• What is it used for?• What is an ARP cache used for?• Proxy ARP• ARP is “hop-by-hop”

Page 10: Midterm Review. Lab 4: dynamic routing protocols

10

Address Translation with ARP

ARP Request: Argon broadcasts an ARP request to all stations on the network: “What is the hardware address of 128.143.137.1?”

Argon128.143.137.144

00:a0:24:71:e4:44

Router137128.143.137.1

00:e0:f9:23:a8:20

ARP Request:What is the MAC addressof 128.143.71.1?

Page 11: Midterm Review. Lab 4: dynamic routing protocols

11

Address Translation with ARP

ARP Reply: Router 137 responds with an ARP Reply which contains the hardware address

Argon128.143.137.144

00:a0:24:71:e4:44

Router137128.143.137.1

00:e0:f9:23:a8:20

ARP Reply:The MAC address of 128.143.71.1is 00:e0:f9:23:a8:20

Page 12: Midterm Review. Lab 4: dynamic routing protocols

12

ARP Packet Format

Destinationaddress

6

ARP Request or ARP Reply

28

Sourceaddress

6 2

CRC

4

Type0x8060

Padding

10

Ethernet II header

Hardware type (2 bytes)

Hardware addresslength (1 byte)

Protocol addresslength (1 byte)

Operation code (2 bytes)

Target hardware address*

Protocol type (2 bytes)

Source hardware address*

Source protocol address*

Target protocol address*

* Note: The length of the address fields is determined by the corresponding address length fields

Page 13: Midterm Review. Lab 4: dynamic routing protocols

13

Example

• ARP Request from Argon:

Source hardware address: 00:a0:24:71:e4:44Source protocol address: 128.143.137.144Target hardware address: 00:00:00:00:00:00Target protocol address: 128.143.137.1

• ARP Reply from Router137:

Source hardware address: 00:e0:f9:23:a8:20 Source protocol address: 128.143.137.1 Target hardware address: 00:a0:24:71:e4:44Target protocol address: 128.143.137.144

Page 14: Midterm Review. Lab 4: dynamic routing protocols

14

ARP Cache

• Since sending an ARP request/reply for each IP datagram is inefficient, hosts maintain a cache (ARP Cache) of current entries. The entries expire after a time interval.

• Contents of the ARP Cache:(128.143.71.37) at 00:10:4B:C5:D1:15 [ether] on eth0

(128.143.71.36) at 00:B0:D0:E1:17:D5 [ether] on eth0

(128.143.71.35) at 00:B0:D0:DE:70:E6 [ether] on eth0

(128.143.136.90) at 00:05:3C:06:27:35 [ether] on eth1

(128.143.71.34) at 00:B0:D0:E1:17:DB [ether] on eth0

(128.143.71.33) at 00:B0:D0:E1:17:DF [ether] on eth0

Page 15: Midterm Review. Lab 4: dynamic routing protocols

15

Proxy ARP

• Proxy ARP: Host or router responds to ARP Request that arrives from one of its connected networks for a host that is on another of its connected networks.

128.143.137.1/1600:e0:f9:23:a8:20

128.143.71.1/24

128.143.0.0/16Subnet

128.143.71.0/24Subnet

Router137

ARP Request:What is the MAC addressof 128.143.71.21?

128.143.137.144/16128.143.171.21/2400:20:af:03:98:28

Argon Neon

ARP Reply:The MAC address of128.143.71.21 is00:e0:f9:23:a8:20

Page 16: Midterm Review. Lab 4: dynamic routing protocols

16

ICMP

• What is it used for?– E.g. error reporting, route redirect

• When will an ICMP message be triggered?• Application programs that use ICMP

– Ping, traceroute

Page 17: Midterm Review. Lab 4: dynamic routing protocols

17

IP

• Network order versus host order• Structure of an IP address• CIDR addressing• Route aggregation• Longest prefix match• Fragmentation

Page 18: Midterm Review. Lab 4: dynamic routing protocols

18

An IP address is often written in dotted decimal notation

• Each byte is identified by a decimal number in the range [0..255]:

1000111110000000 10001001 10010000

1st Byte

= 128

2nd Byte

= 143

3rd Byte

= 137

4th Byte

= 144

128.143.137.144

Page 19: Midterm Review. Lab 4: dynamic routing protocols

19

Structure of an IP address

network prefixnetwork prefix host numberhost number

• An IP address encodes both a network number (network prefix) and an interface number (host number).

– network prefix identifies a network

– the host number identifies a specific host (actually, an interface on the network).

– All hosts on the same single segment network have the same network prefix.

0 31

Page 20: Midterm Review. Lab 4: dynamic routing protocols

20

Network prefix is variable length

• A network mask specifies the number of bits used to identify a network in an IP address.

1000111110000000 10001001 10010000

1111111111111111 1111111 00000000

128 143 137 144

255 255 255 0

Addr

Mask

Page 21: Midterm Review. Lab 4: dynamic routing protocols

21

CIDR notation

• CIDR notation of an IP address:– 128.143.137.144/24

– /24 is the prefix length. It states that the first 24 bits are the network prefix of the address (and the remaining 8 bits are available for specific host addresses)

Page 22: Midterm Review. Lab 4: dynamic routing protocols

22

Network prefix versus address prefix

• CIDR notation can nicely express blocks of addresses– An address block – [128.195.0.0, 128.195.255.255]– can be represented by an address prefix

128.195.0.0/16 – All addresses whose first 16 bits are the same as those in

128.195.0.0 are in the address block or match the address prefix 128.195.0.0/16

– How many addresses are there in a /x address block?• 2 (32-x)

• A network prefix is the first n bits in an IP address that identifies a single-segment network.

Page 23: Midterm Review. Lab 4: dynamic routing protocols

23

How to assign network prefixes from an address prefix

• An organization obtains an address prefix 10.0.0.0/16• The organization has two LANS. LAN1 has at most 500

hosts; LAN2 has at most 100 hosts.• Assign network prefixes to each LAN.

• Algorithm1. Figure out the length of the network prefix

– 232-x1 ¸ 500 x1 = 23

– 232-x2 ¸ 100 x2 = 252. Allocate subdivisions of 10.0.0.0/16 to each LAN

– 10.0.0.0/23 [10.0.0.0,10.0.1.255] LAN1– 10.0.2.0/25 [10.0.2.0, 10.0.2.127] LAN2

Page 24: Midterm Review. Lab 4: dynamic routing protocols

24

Protocol Design

human protocols:• “what’s the time?”• “I have a question”• introductions

… specific msgs sent

… specific actions taken when msgs received, or other events

network protocols:• machines rather than

humans• all communication activity in

Internet governed by protocols

protocols define format, order of msgs sent and received among

network entities, and actions taken on msg transmission,

receipt

Page 25: Midterm Review. Lab 4: dynamic routing protocols

25

What’s a protocol?

a human protocol and a computer network protocol:

Q: Other human protocols?

Hi

Hi

Got thetime?

2:00

TCP connection req

TCP connectionresponseGet http://www.awl.com/kurose-ross

<file>time

Page 26: Midterm Review. Lab 4: dynamic routing protocols

26

How to review

• Lecture notes• Lab and pre-lab• Sample midterm