CS 4470 Computer Networking Protocols 7 Network layer

  • Slides: 22
Download presentation
CS 4470 Computer Networking Protocols 7. Network layer Huiping Guo Department of Computer Science

CS 4470 Computer Networking Protocols 7. Network layer Huiping Guo Department of Computer Science California State University, Los Angeles

Outline r Network layer overview r Forwarding and routing r Network service model r

Outline r Network layer overview r Forwarding and routing r Network service model r Virtual-circuits networks and datagram networks 7. Network layer CS 470 7 -2

Network layer overview Transport layer H Data Transport layer Data Network layer Link layer

Network layer overview Transport layer H Data Transport layer Data Network layer Link layer H Data datagram H H Data frame 7. Network layer CS 470 7 -3

Network layer overview (cont. ) r Achieve communication between two hosts m The two

Network layer overview (cont. ) r Achieve communication between two hosts m The two hosts may not be physically connected r Make use of services provided by the link layer m Get a datagram from link layer r Provide services to the transport layer m Network layer of the Internet--IP • Connectionless, Best effort services 7. Network layer CS 470 7 -4

Network layer application transport network data link physical r transport a packet from sending

Network layer application transport network data link physical r transport a packet from sending r r to receiving host on sending side encapsulates packets into datagrams on receiving side, delivers packets to transport layer network layer protocols in every host, router examines header fields in all IP datagrams passing through it 7. Network layer network data link physical network data link physical network data link physical CS 470 network data link physical application transport network data link physical 3 -5

Forwarding and routing r Forwarding m When a datagram arrives at a router’s input

Forwarding and routing r Forwarding m When a datagram arrives at a router’s input link, the router must move the datagram to the appropriate output link m Router-local action of transferring a datagram from an input link interface to the appropriate output link interface r Routing m Network-wide process determines the end-to-end paths that datagrams take from source to destination m Routing algorithms 7. Network layer CS 470 7 -6

Forwarding and routing Analogy: r Routing m process of planning trip from source to

Forwarding and routing Analogy: r Routing m process of planning trip from source to dest r Forwarding m process of getting through single interchange r Forwarding table m m m Every router has a forwarding table Router does the forwarding based on the table Routing algorithm decides the content of the table 7. Network layer CS 470 7 -7

Interplay between routing and forwardi routing algorithm determines end-path through network local forwarding table

Interplay between routing and forwardi routing algorithm determines end-path through network local forwarding table header value output link forwarding table determines local forwarding at this router 0100 0101 0111 1001 3 2 2 1 value in arriving packet’s header 0111 1 3 2 7. Network layer CS 470 3 -8

Connection setup r 3 rd important function in some network architectures: m ATM, frame

Connection setup r 3 rd important function in some network architectures: m ATM, frame relay, X. 25 r before datagrams flow, two end hosts and intervening routers establish virtual connection m routers get involved r network vs transport layer connection service: m network: between two hosts (may also involve intervening routers in case of VCs) m transport: between two processes 7. Network layer CS 470 7 -9

Network service model Q: What service model for “channel” transporting datagrams from sender to

Network service model Q: What service model for “channel” transporting datagrams from sender to receiver? example services for a flow of individual datagrams: v guaranteed delivery with less than 40 msec delay 7. Network layer r in-order datagram delivery r guaranteed minimum bandwidth to flow r restrictions on changes in inter-packet spacing CS 470 7 -10

Network layer service models: Network Architecture Internet Service Model Guarantees ? Congestion Bandwidth Loss

Network layer service models: Network Architecture Internet Service Model Guarantees ? Congestion Bandwidth Loss Order Timing feedback best effort none ATM CBR ATM VBR ATM ABR ATM UBR constant rate guaranteed minimum none 7. Network layer no no no yes yes yes no no (inferred via loss) no congestion yes no no CS 470 7 -11

IP is Best Effort Delivery r Does not guarantee to prevent m Duplicate datagrams

IP is Best Effort Delivery r Does not guarantee to prevent m Duplicate datagrams m Delayed or out-of-order delivery m Corruption of data m Datagram loss r Reliable delivery provided by transport layer r Network layer - IP - can detect and report errors without actually fixing them 7. Network layer CS 470 7 -12

Datagram networks vs Virtualcircuit networks r datagram network provides network-layer connectionless service r virtual-circuit

Datagram networks vs Virtualcircuit networks r datagram network provides network-layer connectionless service r virtual-circuit network provides network-layer connection service 7. Network layer CS 470 7 -13

Virtual circuits “source-to-dest path behaves much like telephone circuit” m performance-wise m network actions

Virtual circuits “source-to-dest path behaves much like telephone circuit” m performance-wise m network actions along source-to-dest path r call setup, teardown for each call before data can flow r each packet carries VC identifier (not destination host address) r every router on source-dest path maintains “state” for each passing connection r link, router resources (bandwidth, buffers) may be allocated to VC (dedicated resources = predictable service) 7. Network layer CS 470 7 -14

VC implementation r a VC consists of: m path from source to destination m

VC implementation r a VC consists of: m path from source to destination m VC numbers, one number for each link along path m entries in forwarding tables in routers along path r packet belonging to VC carries VC number (rather than dest address) r VC number can be changed on each link. m new VC number comes from forwarding table 7. Network layer CS 470 7 -15

VC forwarding table 22 12 1 VC number interface number forwarding table in northwest

VC forwarding table 22 12 1 VC number interface number forwarding table in northwest router: Incoming interface 1 2 3 1 … Incoming VC # 12 63 7 97 … 2 32 3 Outgoing interface Outgoing VC # 3 1 2 3 22 18 17 87 … … VC routers maintain connection state inform 7. Network layer CS 470 7 -16

Virtual circuits: signaling protocols r used to setup, maintain teardown VC r used in

Virtual circuits: signaling protocols r used to setup, maintain teardown VC r used in ATM, frame-relay, X. 25 r not used in today’s Internet application transport 5. data flow begins network 4. call connected data link 1. initiate call physical 7. Network layer 6. receive data application 3. accept call 2. incoming call CS 470 transport network data link physical 7 -17

Datagram networks r no call setup at network layer r routers: no state about

Datagram networks r no call setup at network layer r routers: no state about end-to-end connections m no network-level concept of “connection” r packets forwarded using destination host address application transport network 1. send datagrams data link physical 7. Network layer application transport 2. receive datagrams network data link physical CS 470 7 -18

Datagram forwarding table 4 billion IP addresses, so rather than list individual destination address

Datagram forwarding table 4 billion IP addresses, so rather than list individual destination address list range of addresses (aggregate table entries) routing algorithm local forwarding table dest address output link address-range 1 address-range 2 address-range 3 address-range 4 3 2 2 1 IP destination address in arriving packet’s header 1 3 2 7. Network layer CS 470 7 -19

Datagram forwarding table Destination Address Range Link Interface 11001000 00010111 00010000 through 11001000 00010111

Datagram forwarding table Destination Address Range Link Interface 11001000 00010111 00010000 through 11001000 00010111 1111 0 11001000 00010111 00011000 0000 through 11001000 00010111 00011000 1111 1 11001000 00010111 00011001 0000 through 11001000 00010111 00011111 2 otherwise 3 7. Network layer CS 470 7 -20

Longest prefix matching longest prefix matching when looking forwarding table entry for given destination

Longest prefix matching longest prefix matching when looking forwarding table entry for given destination address, use longest address prefix that matches destination address. Destination Address Range Link interface 11001000 00010111 00010*** ***** 0 11001000 00010111 00011000 ***** 1 11001000 00010111 00011*** ***** 2 otherwise 3 examples: DA: 11001000 00010111 00010110 10100001 DA: 11001000 00010111 00011000 1010 7. Network layer CS 470 which interface? 7 -21

Datagram or VC network: why? Internet (datagram) r data exchange among computers m “elastic”

Datagram or VC network: why? Internet (datagram) r data exchange among computers m “elastic” service, no strict timing req. r many link types m different characteristics m uniform service difficult r “smart” end systems ATM (VC) r evolved from telephony r human conversation: m strict timing, reliability requirements m need for guaranteed service r “dumb” end systems m telephones m complexity inside network (computers) m m can adapt, perform control, error recovery simple inside network, complexity at “edge” 7. Network layer CS 470 7 -22