Network Layer Goals Overview r understand principles r
- Slides: 36
Network Layer Goals: Overview: r understand principles r network layer services behind network layer services: m m routing (path selection) dealing with scale how a router works advanced topics: IPv 6, multicast r instantiation and implementation in the Internet r routing principle: path selection r hierarchical routing r IP r Internet routing protocols reliable transfer m m intra-domain inter-domain r what’s inside a router? r IPv 6 r multicast routing 4: Network Layer 1
Network layer functions r transport packet from sending to receiving hosts r network layer protocols in every host, router (Recall transport layer is end-to-end) three important functions: r path determination: route taken by packets from source to dest. Routing algorithms r switching: move packets from router’s input to appropriate router output r call setup: some network architectures (e. g. telephone, ATM) require router call setup along path before data flow application transport network data link physical network data link physical network data link physical application transport network data link physical 4: Network Layer 2
Protocol stack: packet forwarding Host A Host B Router R Router W HTTP TCP IP ethernet link IP link ethernet IP ethernet 4: Network Layer 3
Network service model service abstraction Q: What service model for “channel” transporting packets from sender to receiver? The most important abstraction provided by network layer: r guaranteed bandwidth? r preservation of inter-packet timing (no jitter)? r loss-free delivery? r in-order delivery? r congestion feedback to sender? Which things can be “faked” at the transport layer? ? ? ? virtual circuit or datagram? 4: Network Layer 4
Virtual circuits “source-to-dest path behaves much like telephone circuit” m m performance-wise network actions along source-to-dest path r call setup, teardown for each call before data can flow; associates VC identifier with the path r each packet carries VC identifier (not destination host OD) r every router on source-dest path s maintain “state” for each passing connection m transport-layer connection only involved two end systems r link, router resources (bandwidth, buffers) may be allocated to VC m to get circuit-like performance 4: Network Layer 5
Virtual circuits: signaling protocols r used to setup, maintain teardown VC r setup gives opportunity to reserve resources 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 6. Receive data application 3. Accept call transport 2. incoming call network data link physical 4: Network Layer 6
Datagram networks: the Internet model 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 typically routed using destination host ID m packets between same source-dest pair may take different paths r Best effort application transport network data link 1. Send data physical application transport 2. Receive data network data link physical 4: Network Layer 7
Best Effort What can happen to datagrams? r Corrupted at the physical level r Datagrams dropped because of full buffers r Destination unreachable r Routing loops 4: Network Layer 8
Datagram or VC network: why? Datagram (Internet) r data exchange among computers Virtual Circuit (ATM) r evolved from telephony “elastic” service, no strict r human conversation: timing req. m strict timing, reliability r “smart” end systems (computers) requirements m can adapt, perform control, error recovery m need for guaranteed m simple inside network core, service complexity at “edge” r “dumb” end systems r many link types m telephones m different characteristics m complexity inside m uniform service difficult m network 4: Network Layer 9
The Internet Network layer Host, router network layer functions: Transport layer: TCP, UDP Network layer IP protocol • addressing conventions • datagram format • packet handling conventions Routing protocols • path selection • RIP, OSPF, BGP routing table ICMP protocol • error reporting • router “signaling” Link layer physical layer 4: Network Layer 10
Internet Protocol r The Internet is a network of heterogeneous networks: m m using different technologies (ex. different maximum packet sizes) belonging to different administrative authorities (ex. Willing to accept packets from different addresses) r Goal of IP: interconnect all these networks so can send to end without any knowledge of the intermediate networks r Routers, switches, bridges: machines to forward packets between heterogeneous networks 4: Network Layer 11
IP Addressing: introduction r IP address: 32 -bit identifier for host, router interface: connection between host and physical link m m m router’s must have multiple interfaces host may have multiple interfaces IP addresses (unicast addresses) associated with interface, not host, router 223. 1. 1. 1 223. 1. 1. 2 223. 1. 1. 4 223. 1. 1. 3 223. 1. 2. 1 223. 1. 2. 9 223. 1. 3. 27 223. 1. 2. 2 223. 1. 1. 1 = 11011111 00000001 223 1 1 4: Network Layer 1 12
IP Addressing r IP address: m 32 bits m network part (high order bits) m host part (low order bits) m Defined by class of IP address? m Defined by subnet mask r What’s a network ? (from IP address perspective) m device interfaces with same network part of IP address m can physically reach other without intervening router 223. 1. 1. 1 223. 1. 1. 2 223. 1. 1. 4 223. 1. 1. 3 223. 1. 2. 1 223. 1. 2. 9 223. 1. 3. 27 223. 1. 2. 2 LAN 223. 1. 3. 2 network consisting of 3 IP networks (223. 1. 1, 223. 1. 2, 223. 1. 3) 4: Network Layer 13
IP Addressing How to find the networks? r Detach each interface from router, host r create “islands of isolated networks 223. 1. 1. 2 223. 1. 1. 1 223. 1. 1. 4 223. 1. 1. 3 223. 1. 9. 2 223. 1. 7. 0 223. 1. 9. 1 223. 1. 7. 1 223. 1. 8. 0 223. 1. 2. 6 Interconnected system consisting of six networks 223. 1. 2. 1 223. 1. 3. 27 223. 1. 2. 2 223. 1. 3. 2 4: Network Layer 14
IP Addresses (Classes) given notion of “network”, let’s re-examine IP addresses: “class-full” addressing class Unicast A 0 network B 10 C 110 Multicast D 1110 Reserved E 1111 1. 0. 0. 0 to 127. 255 host network 128. 0. 0. 0 to 191. 255 host network multicast address reserved 32 bits host 192. 0. 0. 0 to 223. 255 224. 0. 0. 0 to 239. 255 240. 0 to 255 4: Network Layer 15
IP Address Space Allocation CAIDA 1998 4: Network Layer 16
Unicast vs Broadcast vs Multicat r Unicast Addresses m IP Datagram destined for single host m Type of IP address you normally thing of m Class A-C + some special IP addresses r Broadcast m IP Datagram sent to all hosts on a given network m Some unicast network id + special host id m Some part of reserved E class r Multicast m IP Datagram sent to a set of hosts belonging to a “multicast” group m Class D m We will return to IP multicast later 4: Network Layer 17
Special IP Addresses: Unicast and Broadcast net ID Subnet ID Host ID Can be source? Can be dest? Description 0 0 Y N This host on this net 0 Hostid Y N Specified host on this net 127 Any Y Y Loopback -1 -1 N Y 255 Limited broadcast (do not forward!) Netid -1 N Y netid. 255 Net directed broadcast to netid Netid Subnetid -1 N Y Subnet directed broadcast to netid, subnetid Netid -1 -1 N Y All subnets directed broadcast to netid 4: Network Layer 18
Broadcast r Limited Broadcast m 255 m Not forwarded! r Net-directed Broadcast m netid. 255 r Subnet-directed Broadcast m All bits in host portion 1’s m Requires knowledge of subnet mask m 128. 1. 2. 255 is a subnet-directed broadcast with subnet mask 255. 0 but not with 255. 254. 0 r All-subnets-directed Broadcast m All bits in host and subnet portions are 1’s m Need to know subnet mask to distinguish from netdirected 4: Network Layer 19
Note r Broadcast and multicast make sense for UDP and not for TCP 4: Network Layer 20
IP addressing: CIDR r classful addressing: m m inefficient use of address space, address space exhaustion e. g. , class B net allocated enough addresses for 65 K hosts, even if only 2 K hosts in that network r CIDR: Classless Inter. Domain Routing m m network portion of address of arbitrary length address format: a. b. c. d/x, where x is # bits in network portion of address network part host part 11001000 00010111 00010000 200. 23. 16. 0/23 4: Network Layer 21
Recall: How to get an IP Address? r Answer 1: Normally, answer is get an IP address from your upstream provider m This is essential to maintain efficient routing! r Answer 2: If you need lots of IP addresses then you can acquire your own block of them. m IP address space is a scarce resource - must prove you have fully utilized a small block before can ask for a larger one and pay $$ (Jan 2002 - $2250/year for /20 and $18000/year for a /14) 4: Network Layer 22
How to get lots of IP Addresses? Internet Registries RIPE NCC (Riseaux IP Europiens Network Coordination Centre) for Europe, Middle-East, Africa APNIC (Asia Pacific Network Information Centre ) for Asia and Pacific ARIN (American Registry for Internet Numbers) for the Americas, the Caribbean, sub-saharan Africa Note: Once again regional distribution is important for efficient routing! Can also get Autonomous System Numbers (ASNs) from these registries 4: Network Layer 23
Classful vs Classless r Class A = /8 r Class B = /16 r Class C = /24 4: Network Layer 24
IP addresses: how to get one? revisted Network (network portion): r get allocated portion of ISP’s address space: ISP's block 11001000 00010111 00010000 200. 23. 16. 0/20 Organization 0 11001000 00010111 00010000 200. 23. 16. 0/23 Organization 1 11001000 00010111 00010010 0000 200. 23. 18. 0/23 Organization 2. . . 11001000 00010111 00010100 0000 …. 200. 23. 20. 0/23 …. Organization 7 11001000 00010111 00011110 0000 200. 23. 30. 0/23 4: Network Layer 25
Hierarchical addressing: route aggregation Hierarchical addressing allows efficient advertisement of routing information: Organization 0 200. 23. 16. 0/23 Organization 1 200. 23. 18. 0/23 Organization 2 200. 23. 20. 0/23 Organization 7 . . . Fly-By-Night-ISP “Send me anything with addresses beginning 200. 23. 16. 0/20” Internet 200. 23. 30. 0/23 ISPs-R-Us “Send me anything with addresses beginning 199. 31. 0. 0/16” 4: Network Layer 26
Hierarchical addressing: more specific routes ISPs-R-Us has a more specific route to Organization 1 Organization 0 200. 23. 16. 0/23 Organization 2 200. 23. 20. 0/23 Organization 7 . . . Fly-By-Night-ISP “Send me anything with addresses beginning 200. 23. 16. 0/20” Internet 200. 23. 30. 0/23 ISPs-R-Us Organization 1 200. 23. 18. 0/23 “Send me anything with addresses beginning 199. 31. 0. 0/16 or 200. 23. 18. 0/23” 4: Network Layer 27
IP Address Allocation r CIDR is great but must work around existing allocations of IP address space m m Company 1 has a /20 allocation and has given out sub portions of it to other companies University has a full class B address Company 2 has a /23 allocation from some other class B ALL use the same upstream ISP – that ISP must advertise routes to all these blocks that cannot be described with a simple CIDR network ID and mask! r Estimated reduction in routing table size with CIDR m m If IP addresses reallocated, CIDR applied to all, IP addresses reallocated based on geographic and service provider divisions that current routing tables with 10000+ entries could be reduced to 200 entries [Ford, Rekhter and Brown 1993] How stable would that be though? Leases for all? 4: Network Layer 28
Current Allocation r Interesting to exam current IP address space allocation (who has class A’s ? Etc) m Who has A’s? m Computer companies around during initial allocation (IBM, Apple) m Universities (Stanford, MIT) m CAIDA has info on complete allocation 4: Network Layer 29
IP datagram format IP protocol version Number header length “type” of data max number remaining hops (decremented at each router) upper layer protocol to deliver payload to 32 bits type of ver head. len service length fragment 16 -bit identifier flgs offset time to upper Internet layer live checksum total datagram length (bytes) for fragmentation/ reassembly 32 bit source IP address 32 bit destination IP address Options (if any) data (variable length, typically a TCP or UDP segment) E. g. timestamp, record route taken, pecify list of routers to visit. 4: Network Layer 30
IP Header: Version and Header Length r Version number (4 -bit ) m 4 for IPv 4, 6 for IPv 6 m Fields that follow can vary based on this number r Header length (4 -bit ) m Number of 32 bit words (24 -1 32 bits = 60 bytes) m Includes length of options (40 bytes max) 4: Network Layer 31
IP Header: TOS r Type-of-service (TOS) field m 3 Bit precedence field m 4 TOS bits (only one may be turned on) m 1 • • Minimize delay Maximize throughput Maximize reliability Minimize monetary cost unused bit r Many implementations ignore; most implementations don’t allow application to set this to indicate preference anyway 4: Network Layer 32
IP Header r Total length field (16 bits) m Length in bytes m Max Total length 216 -1 = 65535 bytes m Max Data = 65535 –Header Length r Can you really send that much? m Link layer might not be enough to handle that much; Various link layer technologies have different limits m As pass over various link layers, IP datagram will be fragmented if necessary m Total length field will change when fragmented 4: Network Layer 33
Next time r Continue with details of IP Fragmentation 4: Network Layer 34
Outtakes 4: Network Layer 35
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 no no no yes yes yes no no (inferred via loss) no congestion yes no no r Internet model being extended: Intserv, Diffserv m KR Chapter 6 4: Network Layer 36
- Strategic goals tactical goals operational goals
- Strategic goals tactical goals operational goals
- Nat translation table
- Goals of network layer
- Goals of network layer
- Goals of network layer
- Goals of network layer
- Goals of network layer
- Goals of network layer
- Goals of network layer
- Goals of network layer
- Goals of network layer
- Goals of network layer
- Goals of network layer
- Goals of network layer
- Goals of network layer
- Goals of network layer
- Goals of network layer
- Goals of network layer
- Goals of network layer
- To understand recursion you must understand recursion
- General goals and specific goals
- Motivation in consumer behaviour
- Design goals of transport layer protocol
- Pigmented layer and neural layer
- Chemical digestion
- Secure socket layer and transport layer security
- Presentation layer functions
- Secure socket layer and transport layer security
- Secure socket layer and transport layer security
- Secure socket layer and transport layer security
- Layer 2 e layer 3
- Layer-by-layer assembly
- Layer 2 vs layer 3 bitstream
- Gsm lecture
- Goals of network management
- Encapsulation and decapsulation in osi model