+ All Categories
Home > Documents > CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17...

CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17...

Date post: 22-Dec-2015
Category:
View: 215 times
Download: 1 times
Share this document with a friend
Popular Tags:
32
CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM – TCP Today’s lecture same format as last time Bring questions and answers to class Thursday! hint, hint. April 19th: router project assigned due May 8th April 30th: Thread Safe Queue due (7 bonus pts) with two test cases and working against the posted test case
Transcript
Page 1: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Announcements!• GUEST SPEAKER: 4pm TODAY! PT 203• April 17 EXAM

– TCP– Today’s lecture– same format as last time

• Bring questions and answers to class Thursday!– hint, hint.

• April 19th: router project assigned– due May 8th

• April 30th: Thread Safe Queue due (7 bonus pts)– with two test cases and working against the posted test case

Page 2: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Network Layer

Chapter 5Section 5.1, 5.3, 5.5, 5.6

Page 3: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Network with Routers

zeus.cs.pacificu.edu you.yourISP.com

Router

TCP

IP

HTTP

TCP

IP

HTTP

Router

RouterRouter

Router

Page 4: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Network Layer• What are the layers in the network model?

• The layer that actually moves data from one computer to another

• Finds a path from one computer to another• We call this routing• Routers may be standard computers running routing

software– this was the standard for the early days of the ‘Net– http://vyatta.com - open source software you can download and

run on a PC

• Routers may be specialized hardware– http://www.cisco.com– on Safari: “Cisco IOS in a Nutshell, 2nd Edition”

Page 5: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Connection vs Datagram• Just like TCP/UDP, some network layers are connection

based, some are datagram based– for connection based networks each router keeps track of every

connection running through it– for datagram based networks, no state for the connection is kept

at the router• the Internet is datagram based (which is why implementing TCP is

so much work!)

– why might connection based networks be good? bad? ugly?

– why might datagram based networks be good? bad? ugly?

– mainly concerned with datagram based networks in this class

Page 6: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Network Service Models

• The network layer may provide different levels of service– guaranteed delivery– guaranteed delivery with bounded delay– in order packet delivery– guaranteed minimal bandwidth– guaranteed maximum jitter

• The Internet provides– best effort service– “Sure, I’ll try to get it there, but I’m not making any promises.”– why?– layers: provide only what you need

• you can build anything on top of it Internetworking!

Page 7: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Internet Protocol (v4) (RFC 791)

Tanenbaum, Fig 5-53, p434

• Network layer for the Internet• Designed with internetworking in mind

– many underlying datalink layers may be used– the IP header is what the router looks at to route the data

Not identical to the pseudo header in the UDP RFC

Page 8: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Network with Routers

zeus.cs.pacificu.edu you.yourISP.com

Router

TCP

IP

HTTP

TCP

IP

HTTP

Internetworking:Each of the links may be adifferent underlying datalinklayer. Ethernet, wireless,fiber optics, carrier pigeon, smoke signal, token ring, PPP, SLIP

Page 9: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Router Operations• Forwarding

– router local operation– data arrives on the input port– sent to one of the output ports

• based on final destination address• decision based on a forwarding table• look for longest common prefix• tables created by routing algorithms• what are some of the issues that may be

involved with the design/implementation of the forwarding table?

pacificu.edu

umd.edu

mit.edu

12

3

Interface

Destination

Address

1 pacificu.edu

2 umd.edu

3 mit.edu

Forwarding Table

Routers really use IPaddresses rather than

DNS addresses

Page 10: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Router Operations• Routing

– network-wide process– network layer determines the path to use between two computers– uses routing algorithms– builds forwarding tables at each router– Internet routing protocols:

• RIP• OSPF• BGP

– Internet Control Message Protocol• used to transfer network-layer

information• technically between IP and

Transport layer

RFC 792

Tanenbaum, Figure 5-61, p 449

Page 11: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

IPv4 Address• 32 bit addresses: 64.59.233.197

– how many addresses?– every computer and router on the ‘Net has at least one IP

address– more specific, left to right

• Previously on The Internet...– Classful addresses were given out– a.b.c.d– Class A: a.x.x.x– Class B: a.b.x.x– Class C: a.b.c.x

• first octet (a) denoted which class of address• U of Maryland: 128.8.x.x -- Class B• MIT: 18.x.x.x -- Class A

– how many addresses does each class of address contain?– why might this be a problem?

Page 12: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

IPv4 Addressing• Classless InterDomain Routing (CIDR)

– 64.59.233.0/24• the 24 bits on the left are significant (to the outside world)• the 8 bits on the right are used to route internally

– 255.255.255.0 subnet mask– clever way of organizing addresses helps in routing– we don’t need an entry in the forward table for each machine

• just one for the subnet

64.59.233.197 zeus

64.59.233.204 circe

64.59.233.194 laser printer

64.59.233.205 homer

64.59.233.1 router

64.59.232.1 router

Send me data for64.59.233.0/24

Page 13: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Forwarding tables• Forwarding table works on the IP

addresses• Only concerned with the

significant bits• Look for longest prefix match

Interface

Destination Address

1 64.59.192.0/18 (0100 0000 0011 1011 11)

2 128.8.0.0/16 (1000 0000 0000 1000)

3 18.0.0.0/8 (0001 0010)

4 64.59.224.0/19 (0100 0000 0011 1011 111)

pacificu.edu

umd.edu

mit.edu

12

3

cs360.edu

Input Packet Output Interface

64.59.192.1

64.59.193.2

64.59.223.2

Page 14: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Internet Protocol• Designed with internetworking in mind

– places no restriction on the service provided by the lower layers– datalink/physical

• Fragmentation– each type of datalink network may have a different MTU– maximum transfer unit (max frame size)

• Ethernet: 1500 bytes• FDDI: 4500 bytes

– data starting on a FDDI connection and going through an Ethernet connection causes problems

• the FDDI IP packet is too big– router breaks up the IP packet and sends it in smaller chunks– reassembled at the final destination– all hosts must be able to handle packets of size 576 bytes

Page 15: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Network with Routers

zeus.cs.pacificu.edu you.yourISP.com

Router

TCP

IP

HTTP

TCP

IP

HTTP

Ethernet

FDDI

PPP

8000 bytes

data

Ethernet

Page 16: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Fragmentation

Tanenbaum, Fig 5-53, p434

• Set the MF bit for each fragment but the last one• Copy Identification number to each fragment• Set the Fragment Offset• If the destination does not receive one of the fragments, what

should it do?• DF bit means ‘Don’t Fragment Me!’

Page 17: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Network Address Translation– IP addresses are scarce – present one IP address to the rest of the world via a firewall/router– assign your own IP addresses in your local network

• these IP addresses are NOT visible to the rest of the world• map internal address:port to ISP assignedAddress:port• this mapping is not permanent

– this is how the wireless router your ISP sends you works– some purists object to this. Why? When might this cause problems?

192.168.1.1

192.168.1.2192.168.0.159.64.233.1

ssh zeus.cs.pacificu.edu

ssh naur.cs.wvu.edu

zeus

naur

Visible Port Internal Machine

9999 192.168.1.1:2034

9998 192.168.1.2:8972

59.64.233.1 zeus

9999 22NAT box

Page 18: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

ARP• Address Resolution Protocol• Mapping IP address to Ethernet addresses

– each Ethernet card has a unique 48 bit address hardwired in– MAC address

• The link layer (Ethernet) only knows about these MAC addresses

• When sending data to someone on your subnet you need to know their MAC address

• ARP: Who owns IP address 192.168.1.2?• Owner of that IP address responds with MAC address• Send the Ethernet Frame• Cache address mapping

Page 19: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

DHCP• How do you get an IP address when you plug into the

wall?• Dynamic Host Configuration Protocol (RFC 2131/2132)

– formerly BOOTP– formerly RARP

• Your wireless router at home does this as well

http://en.wikipedia.org/wiki/Image:DHCP_session_en.svg

Page 20: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Routing Algorithms

zeus.cs.pacificu.edu you.yourISP.com

Router

TCP

IP

HTTP

TCP

IP

HTTP

8000 bytes

data

First-hop Router

Source RouterDestination Router

Read section 5.2 - 5.2.6And 5.6 - 5.6.6

Page 21: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Routing Algorithms• View the network as a graph

– routers are nodes– links are edges– what may weights indicate?

• • • • •

– find the least cost path (not necessarily the shortest)– what is the least cost path from A to H?– what is the shortest (fewest hops) from A to H?

• Two types:– algorithms with global information– algorithms with local information– also: static vs dynamic, load sensitive vs load insensitive

Tanenbaum, Figure 5-7a, p 354

Page 22: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Routing Algorithms• Link State Routing

– global (complete) information– based on Dijkstra’s algorithm (read section 5.2.2)– some use Prim’s algorithm– both algorithms compute the least cost path from node X to all

other nodes in the graph (one to all)– Example!

Page 23: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Routing Algorithms• Distance Vector Routing

– local information (decentralized)– every node keeps a distance vector– DV: for every node, what is the distance from here to there?– based on the Bellman-Ford equation:

• DV(x -> y) = min { c(x, v) + d(v -> y) }, for all v such that v is a neighbor of x

– calculate your DV, then send it to your neighbors, if it changes– if you receive a new DV from a neighbor, recalculate yours– and so on.

– Example!

– Count to infinity problem:

Page 24: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Routing on the Internet• Hierarchical Routing:

– break the network up into regions so the router’s forward table does not get too large

– you know detailed information about your subnet– where to send data for other subnets

• AS: Autonomous Systems– the regions mentioned above!

• Intra-AS: RIP (not in your book) RFC 1058

• Intra-AS: OSPF RFC 2328

• Inter-AS: BGP RFC 1771

Page 25: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Network with Routers

AS

AS

AS

RIP or OSPF

BGPRIP or OSPF

Pacificu.eduumd.edu

mit.edu

Page 26: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Routing Information Protocol• Intra-AS: RIP (not in your book!) RFC 1058

– routing within an AS– very close to the idealized DV algorithm– hop count is the metric– a “hop” is moving to another subnet.– each edge has a weight of 1– maximum path length is 15– restricts size of the network– DV updates are sent every 30 seconds– runs on UDP!– lower tier ISP (local ISPs )– enterprise networks (all of Pacific U’s internal routing, maybe)

Page 27: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Open Shortest Path First• Intra-AS: OSPF RFC 2328

– routing within an AS– link state based on Dijkstra’s algorithm– each router constructs complete map of the AS– runs Dijkstra’s algorithm to find shortest path tree to all subnets– carried directly by IP (implements it own reliability!)– upper tier ISP (AT&T, Verizon, Qwest)– designed as a replacement/improvement of RIP– improvements

• security/authentication• multiple same cost path• multicast & unicast• hierarchical routing within single routing domain

Page 28: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Hierarchical Routing with OSPFThis is ALL one AS!

Area 1

Area 2 Area 3

Area BorderRouters

BackboneRouter

Internal Routers

Boundary Router

Page 29: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

OSPF• Protocol

– OSPF provides a protocol for determining the least cost path• does not define how to assigned edge weights

– edge weights are set by the network administrator• all edges are 1 to find shortest number of hops• inversely proportional to bandwidth

– router sends all link state information to all other routers• when the information changes• at least once every 30 minutes

– sends HELLO message to neighbors keep in touch– can request neighbors routing database

Page 30: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Border Gateway Protocol• Inter-AS: BGP RFC 1771

– how to I get to that AS over there?– glues the Internet together

Page 31: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

What’s in a Router?

Page 32: CS 360 – Spring 2007 Pacific University Announcements! GUEST SPEAKER: 4pm TODAY! PT 203 April 17 EXAM –TCP –Today’s lecture –same format as last time Bring.

CS 360 – Spring 2007Pacific University

Congestion Control


Recommended