60
We Have Learned Last Time CSci4211: Weekly Summary 1 Weekly Summary Part II

We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

Embed Size (px)

Citation preview

Page 1: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

We Have Learned Last Time

CSci4211: Weekly Summary

1

Weekly SummaryPart II

Page 2: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

2

Reminders (Oct 23)

• Take-Home Quiz I: posted to class mailing list on Tuesday Oct 21, due Friday Oct 24 11:59pm!• please work on it on your own!• will answer any clarifying questions in the

beginning of today’s lecture• please submit electronically via the Moodle site!

• Programming Project #2: posted on the class website, due Monday Nov 3, 11:59pm• please take a look at it – if have questions, send email

to [email protected]• Please start working on it soon

Page 3: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

3

What We Learned Last Week (Oct 16)• Network Layer !

• basic functions: addressing, routing & forwarding• IP addresses and IP prefixes:

• 32 bits, dot notation• two-level hierarchy: network part & host part

• how to determine network part?• “classful” addressing scheme• “classless” addressing scheme: CIDR

• Where do you get an IP address?• manual config., or via DHCP -- how does it

work?• Where do you get an IP prefix?• Network Service Model: IP Datagram service

• destination-based, hop-by-hop, forwarding• forwarding (routing) table • table look-up: longest prefix matching

Page 4: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

4

IP Addressing: Network vs. Host

• Two-level hierarchy – network part (high order

bits)– host part (low order bits)

• What’s a network ? (from IP address perspective)

– device interfaces with same network part of IP address

– can physically reach each other without intervening router

223.1.1.1

223.1.1.3

223.1.1.4

223.1.2.2223.1.2.1

223.1.2.6

223.1.3.2223.1.3.1

223.1.3.27

223.1.1.2

223.1.7.0

223.1.7.1223.1.8.0223.1.8.1

223.1.9.1

223.1.9.2

multi-accessLAN

point-to-point link

Page 5: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

5

“Classful” IP Addressing

32 bits

0network host

10 network host

110 network host

1110 multicast address

A

B

C

D

class1.0.0.0 to127.255.255.255

128.0.0.0 to191.255.255.255

192.0.0.0 to223.255.255.255

224.0.0.0 to239.255.255.255

77 15 23 31

• Disadvantage: inefficient use of address space, address space exhaustion

• e.g., class B net allocated enough addresses for 65K hosts, even if only 2K hosts in that network

Page 6: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

6

Classless Addressing: CIDR CIDR: Classless InterDomain Routing• Network portion of address is of arbitrary

length• Addresses allocated in contiguous blocks

– Number of addresses assigned always power of 2• Address format: a.b.c.d/x

– x is number of bits in network portion of address

11001000 00010111 00010000 00000000

networkpart

hostpart

200.23.16.0/23

Page 7: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

7

Routing & Forwarding:Logical View of a Router

A

ED

CB

F

22

13

1

1

2

53

5

Page 8: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

8

Datagram Networks: the Internet model

• no call setup at network layer• routers: no state about end-to-end connections

– no network-level concept of “connection”• packets forwarded using destination host

address– packets between same source-dest pair may take

different paths, when intermediate routes change!

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1. Send data 2. Receive data

Page 9: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

9

Datagram vs. Virtual Circuit • Objective of both: move packets through routers from

source to destination• Datagram Model:

– Routing: determine next hop to each destination a priori

– Forwarding: destination address in packet header, used at each hop to look up for next hop

• routes may change during “session”– analogy: driving, asking directions at every gas station,

or based on the road signs at every turn • Virtual Circuit Model (will be studied today!):

– Routing: determine a path from source to each destination

– “Call” Set-up: fixed path (“virtual circuit”) set up at “call” setup time, remains fixed thru “call”

– Data Forwarding: each packet carries “tag” or “label” (virtual circuit id, VCI), which determines next hop

– routers maintain ”per-call” state

Page 10: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part I

10

IP Forwarding Table4 billion possible entries! (in reality, far less, but can still have millions of “routes”)

forwarding table entry format destination network next-hop (IP address) link interface (1st IP address , network mask ) 11001000 00010111 00010000 00000000, 200.23.16.1 0 11111111 11111111 11111000 00000000

11001000 00010111 00011000 00000000, - (direct) 1 11111111 11111111 11111111 00000000

11001000 00010111 00011001 00000000, 200.23.25.6 2 11111111 11111111 11111000 00000000

otherwise 128.30.0.1 3

Page 11: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

Network Layer4-11

Route aggregation: Shrinking the forwarding table

“Send me anythingwith addresses beginning 200.23.0.0/20”

200.23.2.0/23

200.23.4.0/23

200.23.14.0/23

UMN

Organization 0

CSE DepartmentInternet

Organization 1

200.23.6.0/23Organization 2

...

...Port 1

Port 0

Port 7

CSci4211: Network Layer: Part I

Page 12: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

Network Layer4-12

Route aggregation with more specific routes

UMN-FAST has a more specific route to CSE department

“Send me anythingwith addresses beginning 200.23.0.0/20”

200.23.2.0/23

200.23.14.0/23

UMN

Organization 0

CSE DepartmentInternet

UMN-FAST “Send me anythingwith addresses beginning 200.23.14.0/23”

200.23.4.0/23Organization 2

...

...

CSci4211: Network Layer: Part I

Page 13: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

13

Forwarding Table &Longest Prefix Matching

Prefix Match Link Interface 11001000 00010111 00010 0 11001000 00010111 00011000 1 11001000 00010111 00011 2 otherwise 3

Equivalently:

CSci4211: Network Layer: Part I

13

Prefix Match Link Interface 200.23.16.0/21 0 200.23. 24.0/? 2 200.23.?.?/? 1 otherwise 3

Page 14: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part I

14

Longest Prefix Matching Prefix Match Link Interface 11001000 00010111 00010 0 11001000 00010111 00011 2 11001000 00010111 00011000 1 otherwise 3

DA: 11001000 00010111 00011000 10101010

Examples

DA: 11001000 00010111 00010110 10100001 interface 0

interface 1

But not interface 2, the 3rd entry is also a match, but longer!

Interface 2?

Page 15: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part I

15

IP Forwarding: Destination in Same Net

Starting at A, send IP datagram addressed to B:

• look up net. address of B in forwarding table

• find B is on same net. as A• link layer will send datagram

directly to B inside link-layer frame– B and A are directly

connected

miscfields223.1.1.1223.1.1.3data

Dest. Net. next router Nhops

223.1.1 1223.1.2 223.1.1.4 2223.1.3 223.1.1.4 2

223.1.1.1

223.1.1.2

223.1.1.3

223.1.1.4 223.1.2.9

223.1.2.2

223.1.2.1

223.1.3.2223.1.3.1

223.1.3.27

A

BE

forwarding table in A

Page 16: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part I

16

IP Forwarding: Destination in Diff. Net

Starting at A, dest. E:• look up network address of

E in forwarding table• E on different network

– A, E not directly attached• routing table: next hop

router to E is 223.1.1.4 • link layer sends datagram

to router 223.1.1.4 inside link-layer frame

• datagram arrives at 223.1.1.4

• continued…..

miscfields223.1.1.1223.1.2.3 data

Dest. Net. next router Nhops

223.1.1 1223.1.2 223.1.1.4 2223.1.3 223.1.1.4 2

223.1.1.1

223.1.1.2

223.1.1.3

223.1.1.4 223.1.2.9

223.1.2.2

223.1.2.1

223.1.3.2223.1.3.1

223.1.3.27

A

BE

forwarding table in A

Page 17: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part I

17

IP Forwarding: Destination in Diff. Net …

Arriving at 223.1.4, destined for 223.1.2.2

• look up network address of E in router’s forwarding table

• E on same network as router’s interface 223.1.2.9 – router, E directly attached

• link layer sends datagram to 223.1.2.2 inside link-layer frame via interface 223.1.2.9

• datagram arrives at 223.1.2.2!!! (hooray!)

miscfields223.1.1.1223.1.2.3 data

Dest. Net router Nhops interface

223.1.1 - 1 223.1.1.4 223.1.2 - 1 223.1.2.9

223.1.3 - 1 223.1.3.27

223.1.1.1

223.1.1.2

223.1.1.3

223.1.1.4 223.1.2.9

223.1.2.2

223.1.2.1

223.1.3.2223.1.3.1

223.1.3.27

A

BE

forwarding table in router

Page 18: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

18

Page 19: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

19

Announcements & Reminders (Oct 30)

• Homework Assignment #2 postedDue due Friday Nov 21 11:59pm

• 7 big problems + 1 bonus problem

• Project #2: due Monday (Nov 3) 11:59pm • if you have troubles w/ the project, ask TAs for help!

• Final Exam date has been set: Dec 16 (Tuesday): 6:30pm to 8:30pm Classroom: STSS 230 (see map) (Science Teaching & Student Services 230, 222 Pleasant Street SE)

• If the final exam date and time conflict with another class of yours, please email us – we’ll arrange a make-up exam for you!

Page 20: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

20

Take Home Quiz 1 Stats & Other Tidbits

• Take-Home Quiz I: graded (rather leniently)!• statistics: Max. 103, Median 92, Mean 90.4, Min. 63

• Please feel free to talk to us if you have questions, especially if you didn’t do well

• Please check “Important Dates” for upcoming deadlines!

Points # people103 6[93,103) 35[83,93) 29[73,83) 9[64, 73) 5 63 1Total 85

Page 21: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

21

What We Learned Last Time (Oct 24)• Review IP addressing & datagram forwarding

• network prefix, dest-based forwarding, longest prefix matching

• IP datagram format: TTL, datagram id, offset, flags, …• MTU & IP fragmentation & reassembly• NAT; brief overview of IPv6• router architecture: interconnect fabric, in/output

processing • Virtual Circuit

• connection-oriented network service• between hosts (or ingress/egress routers)• need to connect set-up (“signaling”) before any data can

be transmitted• connection set-up (signaling) process:

• given a route/path, select (locally unique, outgoing) VCI, & set up VCI translation table at each router

• data forwarding: • based on VCI carried in packets, perform VCI translation

Page 22: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part I

22

IP Datagram Format

ver length

32 bits

data (variable length,typically a TCP

or UDP segment)

16-bit identifier

Internet checksum

time tolive

32 bit source IP address

IP protocol versionnumber

header length (bytes)

max numberremaining hops

(decremented at each router)

forfragmentation/reassembly

total datagramlength (bytes)

upper layer protocolto deliver payload to

head.len

type ofservice

“type” of data flgs fragment offset

upper layer

32 bit destination IP address

Options (if any) E.g. timestamp,record routetaken, specifylist of routers to visit.

how much overhead with TCP?

• 20 bytes of TCP• 20 bytes of IP• = 40 bytes +

app layer overhead

Page 23: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part I

23

IP Fragmentation and Reassembly: Exp

ID=x

offset=0

fragflag=0

length=4000

ID=x

offset=0

fragflag=1

length=1500

ID=x

offset=185

fragflag=1

length=1500

ID=x

offset=370

fragflag=0

length=1040

One large datagram becomesseveral smaller datagrams

Example• 4000 byte datagram• MTU = 1500 bytes

• offset in the second fragment:

185x8=1480 (why not 1500 bytes =length?)• offset in the third

fragment: 370x8=2960

Except for last fragment, IP fragment payload size (i.e., excluding IP header) must be multiple of 8!

Page 24: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

24

Virtual Circuit: Signaling Protocols

• used to setup, maintain teardown VC• used in ATM, frame-relay, X.25• used in part of today’s Internet: Multi-Protocol Label

Switching (MPLS) operated at “layer 2+1/2” (between data link layer and network layer) for “traffic engineering” purpose

application

transportnetworkdata linkphysical

application

transportnetworkdata linkphysical

1. Initiate call 2. incoming call

3. Accept call4. Call connected5. Data flow begins 6. Receive data

Page 25: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

25

During data packet forwarding phase, input VCI is used to look up the table, and is “swapped” w/ output VCI (VCI translation, or “label swapping”)

VCI translation table (aka “forwarding table”), built at call set-up phase

1

2

13

1

2 2

1

four “calls” going thru the router, each entry corresponding one call

green call

purple call

blue call

orange call

Page 26: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

26

Virtual Circuit: Example

0

13

2

0

1 3

2

0

13

2

511

4

7

Router 3

Host B

Router 2

Host A

Router 1

Router 4

“call” from host A to host B along path: host A router 1 router 2 router 3 host B

• each router along path maintains an entry for the call in its VCI translation table

• the entries piece together a “logical connection” for the call

• Exercise: write down the VCI translation table entry for the call at each router

Page 27: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

27

Page 28: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

28

Announcements & Reminders (Nov 6) Please start working on your homework assignment

#2 • Due Friday 11:59pm Nov 21

Project # 3 description posted on the class website• also due Friday 11:59pm Nov 21; please take a look at it!• TAs will discuss the project on next Thursday’s class

Take-Home Quiz II: hand-out Mon Nov 24, due Mon Dec1

Final Exam: Dec 16 (Tuesday): 6:30pm to 8:30pm Classroom: STSS 230 (see map) (Science Teaching & Student Services 230, 222 Pleasant Street SE)

• If the final exam date and time conflict with another class of yours, please email us – we’ll arrange a make-up exam for you!

Next Thursday’s Lecture: “Hands-on” Labs• Jeopardy Game; Project #3 overview; IP & ICMP, DHCP, Ethernet

and ARP in Action; Wireshark Exercises; if time, GENI Experiments

Page 29: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

29

What We Learned Last Time (Oct 30) Network Layer Routing

• basic issues: exchange routing info & compute routes Two Basic (Distributed) Routing Algorithms: Link State vs. Distance Vector

• How does Link State (LS) work?• How does Distance Vector (DV) work?• Issue with DV: county-to-infinity & possible hacks

Routing in Internet: two-level Intra-domain routing (RIP, OSPF, IS-IS) – performance-based vs. Inter domain routing: BGP – policy routing

Today’s Class: more on BGP -- ISP business models & AS relations BGP path vector routing, route filtering & selection processes,

etc.

Data Link Layer:• MAC address & relation w/ IP: ARP• local area networks & bridging/switching algorithm (if time!)

Page 30: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part II

30

Link State Algorithm

• Basic idea: Distribute to all routers– Topology of the network

• Cost of each link in the network

• Each router independently computes optimal paths– From itself to every destination– Routes are guaranteed to be loop free if

• Each router sees the same cost for each link• Uses the same algorithm to compute the best

path

Page 31: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part II

31

Topology Dissemination

• Each router creates a set of link state packets (LSPs)– Describing its links to neighbors– LSP contains

• Router id, neighbor’s id, and cost to its neighbor

• Copies of LSPs are distributed to all routers– Using controlled flooding

• Each router maintains a topology database– Database containing all LSPs

Page 32: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part II

32

A

ED

CB

F

2

2

13

1

1

2

53

5

Topology Database: Example

link state database

Page 33: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part II

33

Constructing Routing Table:Dijkstra’s Algorithm

• Given the network topology– How to compute shortest path to each destination?

• Some notation– X: source node– N: set of nodes to which shortest paths are known so

far• N is initially empty

– D(V): cost of known shortest path from source X– C(U,V): cost of link U to V

• C(U,V) = if not neighbors

Page 34: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part II 34

Algorithm (at Node X)

• Initialization– N = {X}– For all nodes V

• If V adjacent to X, D(V) = C(X,V) else D(V) =

• Loop– Find U not in N such that D(U) is smallest– Add U into set N– Update D(V) for all V not in N

• D(V) = min{D(V), D(U) + C(U,V)}– Until all nodes in N

Page 35: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part II 35

Dijkstra’s Algorithm: Example

Step012345

start NA

ADADE

ADEBADEBC

ADEBCF

D(B),p(B)2,A2,A2,A

D(C),p(C)5,A4,D3,E3,E

D(D),p(D)1,A

D(E),p(E)infinity

2,D

D(F),p(F)infinityinfinity

4,E4,E4,E

A

ED

CB

F

2

2

13

1

1

2

53

5

Page 36: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part II

36

A

ED

CB

F

2

2

13

1

1

2

5

3

5

Routing Table Computation

dest next

B BC DD DE DF D

Page 37: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part II

37

Distance Vector Routing

• A router tells neighbors its distance to every router– Communication between neighbors only

• Based on Bellman-Ford algorithm– Computes “shortest paths”

• Each router maintains a distance table– A row for each possible destination– A column for each neighbor

• DX(Y,Z) : distance from X to Y via Z• Exchanges distance vector with neighbors

– Distance vector: current least cost to each destination

Page 38: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part II

38

Distance Table: Example

A

E D

CB7

8

1

2

1

2

D ()

A

B

C

D

A

1

7

6

4

B

14

8

9

11

D

5

5

4

2

Ecost to destination via

des

tin

atio

n

Page 39: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part II

39

Distance Vector Routing Algorithm

iterative:• continues until no

nodes exchange info.• self-terminating: no

“signal” to stop

asynchronous:• nodes need not

exchange info/iterate in lock step!

distributed:• each node talks only

with directly-attached neighbors

Distance Table data structure

• each node has its own• row for each possible destination• column for each directly-attached

neighbor to node• example: in node X, for dest. Y via

neighbor Z:

D (Y,Z)X

distance from X toY, via Z as next hop

c(X,Z) + min {D (Y,w)}Z

w

=

=

Page 40: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part II 40

Distance Vector Routing: Overview

Iterative, asynchronous: each iteration caused by:

• local link cost change • message from neighbor:

its least cost path change from neighbor

Distributed:• each node notifies

neighbors only when its least cost path to any destination changes– neighbors then notify

their neighbors if necessary

wait for (change in local link cost or msg from neighbor)

recompute distance table

if least cost path to any

dest has changed, notify neighbors

Each node:

Page 41: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part II

41

Distance Vector Algorithm: Example

X Z12

7

Y

D (Y,Z)X

c(X,Z) + min {D (Y,w)}w=

= 7+1 = 8

Z

D (Z,Y)X

c(X,Y) + min {D (Z,w)}w=

= 2+1 = 3

Y

Page 42: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part II 42

Distance Vector Algorithm: Example

X Z12

7

Y

Page 43: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Network Layer: Part II

43

Routing in the Internet• The Global Internet consists of Autonomous

Systems (AS) interconnected with each other:– Stub AS: small corporation: one connection to other AS’s– Multihomed AS: large corporation (no transit): multiple

connections to other AS’s– Transit AS: provider, hooking many AS’s together

• Two-level routing: – Intra-AS: administrator responsible for choice of

routing algorithm within network– Inter-AS: unique standard for inter-AS routing: BGP

Page 44: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Introduction 44

Internet Structure

LANs

International lines

Regional or local ISP local ISPs

company university

National or tier-1 ISP

National or tier-1 ISP

IXPsor private peering

Regional ISPs

company

access via WiFi hotspots

Internet: “networks of networks”!

Home users

Internet eXcangePoints

Home users

Page 45: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

45

Page 46: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

46

Announcement & Reminder (Nov 20)• Project #3 due time extended to this Sunday Nov 23 11:59pm

• Hw #2 due: Friday Nov 21 11:59pm

• Programming Project # 4 has also been posted

Due Friday Dec 5 11:59pm

• Take-Home Quiz II: email to you Monday evening Nov 24, due Mon Dec 1 11:59pm

• similar to (& easier than?) Hw #2 & sample Quiz II

• Extra office hours: (e.g., Q&A on sample Quiz II)

Monday Nov 24: 3-4pm

Page 47: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

47

What We Learned Last Times (Nov 6 & 13)

• Wrap up basic routing algorithms• count-to-infinity problem in DV

• Routing in the Internet• two-level hierarchy; notion of AS• intra-domain: RIP, OSPF, IS-IS

-- collection of them referred to as IGP (interior gateway protocol)• inter-domain: BGP, path-vector, policy-based

• AS relationship: provider-customer; peering• routing policies: e.g., prefer customer routes

• Data Link Layer• basic functions: framing, access control, etc.

• MAC addresses and ARP• What is MAC address? How it differs from IP address• Why do we need ARP? How does ARP work?

Page 48: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

48

eBGP vs. iBGP Sessions • eBGP: between (usually directly-connected) routers in

different Ass• iBGP: between (BGP-speaking) routers in same AS• Different (operational) rules and polices apply!

AS 7007XP

AS 1239

AS 6079

AS 701

AS 4006

CSci4211: Routing and Network Layer Part II

Page 49: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

49

iBGP (different from IGP such as OSPF)

AS 3847

• iBGP speakers are (usually) fully meshed: why?

B

A

C

CSci4211: Routing and Network Layer Part II

D

E

eBGP session

iBGP sessionboth running on top of TCP!

F

Page 50: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

50CSci4211: Routing and Network Layer Part II

eBGP vs. iBGP: Key DifferenceseBGP Rules:• By default, only talks to directly-connected

router.• Sends the one best BGP route for each

destination.• Sends all of the important “attributes”; omits

the “local preference” attribute.• Adds (prepends) the speaker’s ASN to the “AS-

Path” attribute.• Usually rewrites the “next-hop” attribute.

Page 51: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

51

eBGP vs. iBGP: Key DifferencesiBGP Rules:• Can talk to routers many hops away by default.• Can only send routes it “injects”, or routes heard directly

from an external peer.• Thus, requires a full mesh.• Sends all attributes.• Leaves the “as-path” attribute alone.• Doesn’t touch the “next hop” attribute. • With iBGP, next-hop is not a router directly connected.

– So a “recursive lookup” is needed.– After the next-hop is found, a second lookup is made to

figure out how to send the packet “in the direction” of the next-hop.

CSci4211: Routing and Network Layer Part II

Page 52: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

52

Page 53: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

53

Announcement & Reminder (Dec 4)• Project #4 due tomorrow (Friday)

• Optional Lecture: Thursday Dec 10 • wrap up, review, & Q&A, etc.

• Extra office hours: • Monday Dec 15: 3:30 – 4:30pm; • Tuesday Dec 16: 4:00 – 6:00pm

• Final Exam: • Tuesday Dec 16: 6:30pm to 8:30pmVenue: STSS  (Science Teaching & Student Services) 230• similar to Quiz II, but comprehensive (cover everything)• open-book, open-note, open-Internet

• Final conflict: please email us, and let us your availability – we’ll arrange a make-up exam for you!

Page 54: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

54

What We Learned Last Time (Nov 20)• Review & Finish up (layer-2) switches/bridges

• how does a switch build its switching table? -- self-learning algo: use src MAC; forward using dst MAC• loops in topology and “broadcast storm” -- spanning tree algorithm: rooted at a particular switch

• Media Access Control: shared media -- issues and difficulties ?

• Taxonomy of MAC protocols• Random access control:

• ALOHA and Slotted ALOHA: collision? efficiency?• CSMA: listen before talking:

-- non-persistent vs. p-persistent• CSMA/CD: collision detection – listen while talking

-- maximum time to detect collision?• Ethernet and its Evolution: 10-base, 100-base, Gigabit,

… -- why minimum frame size constraint?• “Taking Turns” Protocols: example – Token Ring• Protocol Efficiency: Heavy vs. light loads? Other Issues?

Page 55: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Weekly Summary

55

Questions?

Page 56: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

Data Link Layer Summary & What We Learned Last Time (Dec 5)

Data Link Layer Basic functions: framing, access control, etc.

MAC addresses and ARP (interactions of layers 2 &3) What is MAC address?

• How it differs from IP address Why do we need ARP How does ARP work?

Bridges & Switches: connecting multiple LAN segments “plug-&-play”: cf. layer-1 repeater or layer-3 routers basic functions: forwarding/filtering frames bridge/switch forwarding table & self-learning alg. looping issue: bride spanning tree

Ethernet Switches vs. WiFi Access Points/Switches transparent vs. translational bridges/switches

CSci4211: Weekly Summary 56

Page 57: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

Data Link Layer Summary & What We Learned Last Time (Dec 5)

Media Access Control: Shared media issues and difficulties

Taxonomy of MAC Protocols Random Access Control:• ALOHA and Slotted ALOHA• CSMA: nonpersistent vs. p-persistent• CSMA/CD• What are they? How do they work?

Adaptive Controlled Access:• token passing vs. polling

Efficiency of MAC protocols: light vs. heavy load Ethernet (802.3)• MAC: 1-persistent CSMA/CD, binary random backoff• collision domain, bit-time and min. frame size • 10BaseT, 100 BaseT (Fast Ethernet), Gigabit Ethernet

CSci4211: Weekly Summary 57

Page 58: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

Data Link Layer Summary & What We Learned Last Time (Dec 5)

Token Ring (802.5)• token passing• ring maintenance issues

802.11b and Wireless LAN: key issues & difficulties:

• hidden terminal problem, power saving requirement receiver acknowledgement needed!

• how does it work? SIFS < DIFS CSMA/CA: how does it work? RTS, CTS, NAV 802.11 frame format & frame forwarding via Aps

• Why 3 (or 4) addresses? How are they used? PPP: point-to-point link layer protocol -- byte

stuffing Optional: (LAN & wide-area) mobility; cellular

networks CSci4211: Weekly Summary 58

Page 59: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

Questions?

CSci4211: Weekly Summary 59

Page 60: We Have Learned Last Time CSci4211: Weekly Summary1 Weekly Summary Part II

CSci4211: Key Notes 60

A Simplified Illustration of Internet