Download presentation
Presentation is loading. Please wait.
1
Ch. 4: Network Layer - Forwarding#1#1 Network Layer: a. Forwarding Goals: r understand principles behind network layer services: m forwarding m routing (path selection) m dealing with scale r instantiation and implementation in the Internet Overview: r network layer services r IP addresses & their usage r NAT r IP header r IP fragmentation r ICMP r IPv6
2
Ch. 4: Network Layer - Forwarding#2#2 Network Layer objectives r Transport packet from source to dest. o Net layer in all hosts, routers Basic functions: r Forwarding m move packets from source to destination through routers r Routing m prepare info (table) that enables finding a path for every packet/ data stream r Call setup (VC only, see later) m find path for a data session before data transfer starts m keep record of it in routers “Control plane” “Data plane”
3
Ch. 4: Network Layer - Forwarding 4-3 Interplay between routing and forwarding Forwarding Routing Build routing tables Move packets from input link to output link 1 2 3 0111 value in arriving packet’s header routing algorithm local routing table header value output link 0100 0101 0111 1001 32213221
4
Ch. 4: Network Layer - Forwarding#4#4 Network Layer issues r For users/ hosts: quality of service m guaranteed bandwidth? m Fixed delay (no jitter)? m loss-free delivery? m in-order delivery? r Interaction between hosts and network m signaling: congestion feedback?/resource reservation? r For network providers m efficiency m policy of route control m scalability
5
Ch. 4: Network Layer - Forwarding#5#5 Network service model Q: What service model for “channel” transporting packets from sender to receiver? r guaranteed bandwidth? r preservation of inter-packet timing (no jitter)? r loss-free delivery? r in-order delivery? r congestion feedback to sender? ? ? ? virtual circuit or datagram? The most important abstraction provided by network layer: service abstraction
6
Virtual circuits: signaling protocols r Signaling m used to set up, maintain, teardown VC m used in ATM, frame-relay, X.25 m not used in today’s Internet but Cisco’s MPLS builds a VC service over IP application transport network data link physical application transport network data link physical 1. Initiate call 2. incoming call 3. Accept call 4. Call connected 5. Data flow begins 6. Receive data Ch. 4: Network Layer - Forwarding#6#6 path recorded more path details r Principle m prepare a path (= VC) before moving data m each direction is a separate path
7
Virtual Circuit: call setup r Path preparation + resource allocation: m Call setup message flows from source to destination. path recorded at this time m Path determination (routing): Source based or network based. m Msg may indicate required resources: BW, latency, buffer, etc. m A router can either: accept (and commit required resources) or reject m Path accepted if all routers accept. Ch. 4: Network Layer - Forwarding#7#7
8
Virtual Circuit: Identifiers r Forward call-setup pass: m each router allocates an ID for the VC intended for incoming (I/C) packets of the VC records it + the preceding &following node of path r Backward call-setup pass: m each router tells predecessor its ID for the VC will use this ID on outgoing (O/G) packets of this VC m lists in the I/C port’s fwding table the I/C VC-ID and the corresponding O/G port+O/G ID r Runtime: when receiving a packet with an ID : m find, in the I/C port’s forwarding table, the I/C ID’s record m read from it the outgoing port & the O/G ID m send packet on the required port with new ID. Ch. 4: Network Layer - Forwarding#8#8
9
VC : identifiers preparation r Example: call setup stage Ch. 4: Network Layer - Forwarding#9#9 BW=1Mb In port VC id in Out port VC id out 1 In port VC id in Out port VC id out 1382 In port VC id in Out port VC id out 1 In port VC id in Out port VC id out 1222 In port VC id in Out port VC id out 1222xx In port VC id in Out port VC id out 138222 1 1 2 2
10
VC : identifiers usage r Example: runtime stage Ch. 4: Network Layer - Forwarding#10 VCid=38 VCid=22 VCid=xx In port VC id in Out port VC id out 1 In port VC id in Out port VC id out 1382 In port VC id in Out port VC id out 1 In port VC id in Out port VC id out 1222 In port VC id in Out port VC id out 1222xx In port VC id in Out port VC id out 138222 2 2 1 1
11
Ch. 4: Network Layer - Forwarding#11 VC : summary r call setup, teardown for each call before data can flow r each packet carries VC identifier (not destination host ID) r every router on source-dest path maintains “state” for each passing connection r link, router resources (bandwidth, buffers) may be allocated to VC m to get circuit-like performance. “source-to-dest path behaves much like telephone circuit” m similar preparations along source-to-dest path m however performance similar to datagram network unless resources are allocated using QoS protocols m only performance advantage: in-order packet arrival
12
VC implementation A VC consists of: 1. Path from source to destination 2. VC numbers, one number for each link along path 3. Entries in forwarding tables in routers along path r Data packet belonging to VC carries a VC number, no destination address. r VC number must be changed on each link. m New VC number taken from forwarding table Ch. 4: Network Layer - Forwarding#12
13
VC Forwarding table 12 22 32 1 3 2 VC number interface number Incoming interface Incoming VC # Outgoing interface Outgoing VC # 1 12 2 22 2 63 1 18 3 7 2 17 1 97 3 87 … … Forwarding table in northwest router: Routers maintain connection state information! Lecture 6: Network Layer #13 18 2963 VC number #13Ch. 4: Network Layer - Forwarding
14
#14 Datagram networks: 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 application transport network data link physical application transport network data link physical 1. Send data 2. Receive data
15
ATM: overview r Asynchronous Transfer Mode r Fixed packets size: called cells m 53 bytes = 5 header + 48 data r All virtual-circuit based r Types of virtual circuits m “virtual circuits” aggregated into “virtual paths” m Permanent or switched r Architecture is QoS-focused m Service Quality types: CBR, VBR, ABR, UBR r Access traffic policing m Typical tool: leaky-bucket access control Ch. 4: Network Layer - Forwarding#15
16
Ch. 4: Network Layer - Forwarding#16 Network Layer Quality of Service Network Architecture Internet ATM Service Model best effort CBR VBR ABR UBR Bandwidth none constant rate guaranteed rate guaranteed minimum none Loss no yes no Order no yes Timing no yes no Congestion feedback no (inferred via loss/delay) no congestion no congestion yes no Guarantees ? r Internet model is being extended: Intserv, Diffserv m multimedia networking ATM: Asynchronous Transfer Mode; CBR: Constant Bit Rate; V: Variable; A: available; U: Unspecified
17
Ch. 4: Network Layer - Forwarding#17 Datagram or VC network: why? Internet (Datagram) r data exchange among hosts m (mostly) “elastic” service, no strict timing req. r “smart” end systems m can adapt, perform control, error recovery m simple inside network, complexity at “edge” r many link types m different characteristics m uniform service difficult r Datagram benefit: m Simplicity ATM (VC) r evolved from telephony m but supports also data r human conversation: m strict timing &reliability requirements m svc guaranteed needed r “dumb” end systems m telephones m complexity inside network r VC Benefits: m Fast forwarding m Traffic Engineering. m In order delivery
18
Ch. 4: Network Layer - Forwarding#18 The Internet Network layer routing table Host, router network layer functions: Routing protocols path selection RIP, OSPF, BGP IP protocol addressing conventions datagram format packet handling conventions ICMP protocol error reporting router “signaling” Transport layer: TCP, UDP Link layer physical layer Network layer
19
Ch. 4: Network Layer - Forwarding#19 IP Addressing Scheme r We need an address to uniquely identify each destination r Routing scalability requires flexibility in aggregation of destination addresses m we should be able to aggregate a set of destinations as a single routing unit m necessary for routing table scalability r Preview: the unit of routing in the Internet is a network - the destinations in the routing protocols and tables are networks
20
Ch. 4: Network Layer - Forwarding#20 IP Addressing: introduction r IP address: 32-bit identifier for host or router interface r interface: connection between host/router and physical link m router’s typically have multiple interfaces m a host has typically a single interface m IP addresses associated with interface, not host, or router 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.2 223.1.3.1 223.1.3.27 223.1.1.1 = 11011111 00000001 00000001 00000001 223 111
21
Ch. 4: Network Layer - Forwarding#21 IP Addressing r IP address is divided into two parts: m network prefix K high order bits m host number remaining low order bits r This partitioning of the address depends on the context network in which we see this NIC m networks are nested inside each other 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.2 223.1.3.1 223.1.3.27 LAN Qn: W hat is the router’s IP address in the drawing we see?
22
Ch. 4: Network Layer - Forwarding#22 What is a network in IP view? IP network terminology: r a Subnet is: m a set of devices that can physically reach each other without intervening router(s) m e.g. a LAN r a Network is: m a subnet, or: m the union of several subnets that are interconnected by links 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.2 223.1.3.1 223.1.3.27 LAN three subnets (LANs) 223.1.1.*, 223.1.2.*, 223.1.3.*, together they form a larger network with prefix 223.1 (16 bits) (OR MORE bits?)
23
Ch. 4: Network Layer - Forwarding 4-23 IP Address Structure (CIDR method) r the network prefix consists of the K most significant bits of the address m in some cases it is called the subnet prefix (see subnets below) r the host number = the other (32-K) bits r the size K of the network prefix differs and must be specified in each case. Two methods used for this: m network mask has all 1‘s in the prefix part and all 0’s elsewhere m short notation is /K(also called the CIDR notation) 11001000 00010111 00010001 10110101 /23 Exercise 1 a) write the following IP address in dotted decimal notation b) specify corresponding netwk mask (binary and dotted decimal) c) show network prefix & host # parts of that address (binary) see solutions at end of chapter
24
Ch. 4: Network Layer - Forwarding 4-24 Special Types of IP Address network broadcast address : host # = 11...1 m means: all the hosts in the network specified in address prefix m used only as destination address of packets if dest. address = 11… 1 (32 1’s), broadcast on sender’s subnet r network address : host # = 0 (all zeros) m means: the whole network (used only in routing tables) r therefore the IP address of a host/router can not have host number = 0 or = “all ones” Exercise 2 1. write the network address of the network from Exercise 1 2. write the broadcast address for that network 3. how many IP host addresses are possible in that network? 4. write host & network address with /K notation 5. write the first and last host address on that network
25
Ch. 4: Network Layer - Forwarding 4-25 Subnets Recipe r To determine the subnets of a network, detach each interface from its host or router, creating islands of isolated networks. Each isolated network is a subnet. Divide network into subnets and give an address to each subnet Network 223.1.0.0 / 21 Example
26
Ch. 4: Network Layer - Forwarding 4-26 Solution of Example Stage 1 Subnet 223.1.1.0 / 24 Subnet 223.1.2.0 / 24 Subnet 223.1.3.0 / 24 Subnets: /24 Stage 2 Network 223.1.0.0 / 21 223.1.1.1 223.1.1.2 223.1.1.3 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 223.1.1.4
27
Ch. 4: Network Layer - Forwarding 4-27 223.1.8.2223.1.8.1 Subnet 223.1.8.0/24 Subnets o How many subnets? o Write an address for each subnet, including /K o Write an address for the whole network, including /K 223.1.1.1 223.1.1.3 223.1.1.4 223.1.2.2 223.1.2.1 223.1.2.6 223.1.3.2 223.1.3.1 223.1.3.27 223.1.1.2 223.1.7.2 223.1.7.1 223.1.9.1 223.1.9.2 Subnet 223.1.2.0/24 Subnet 223.1.3.0/24 Subnet 223.1.1.0/24 Subnet 223.1.7.0/24 Subnet 223.1.9.0/24 Whole network: 223.1.0.0/20
28
Ch. 4: Network Layer - Forwarding#28 IP Addresses 0 network host 10 network host 110 networkhost 1110 multicast address (*) A B C D class 1.0.0.0 to 127.255.255.255 128.0.0.0 to 191.255.255.255 192.0.0.0 to 223.255.255.255 224.0.0.0 to 239.255.255.255 32 bits given notion of “network”, let’s re-examine IP addresses: “classful” addressing: (does not need mask or /K indicator) (*) this range used as multicast also in CIDR method
29
Ch. 4: Network Layer - Forwarding#29 IP addressing: CIDR r classful addressing: m inefficient use of address space, address space exhaustion m e.g., class B net allocated enough addresses for 65K hosts, even if only 2K hosts in that network r CIDR: Classless InterDomain Routing m network portion of address of arbitrary length m address format: a.b.c.d/x, where x is # bits in network portion of address m Requires inclusion of mask or “/K” in routing table 11001000 00010111 00010000 00000000 network part host part 200.23.16.0/23
30
Ch. 4: Network Layer - Forwarding#30 IP addresses: how to get one? Hosts (host number): r hard-coded by system admin in a file m Can see in IPConfig r DHCP: Dynamic Host Configuration Protocol: dynamically get address: “plug-and-play” m host broadcasts “DHCP discover” msg m DHCP server responds with “DHCP offer” msg m host requests IP address: “DHCP request” msg m DHCP server sends address: “DHCP ack” msg m this is the common practice in LAN (why?) m in home access: same procedure using PPP protocol
31
Ch. 4: Network Layer - Forwarding#31 IP addresses: how to get one? Network (network prefix+mask): r get allocated portion of ISP’s address space: ISP's block 11001000 00010111 00010000 00000000 200.23.16.0/20 Organization 0 11001000 00010111 00010000 00000000 200.23.16.0/23 Organization 1 11001000 00010111 00010010 00000000 200.23.18.0/23 Organization 2 11001000 00010111 00010100 00000000 200.23.20.0/23... ….. …. …. Organization 7 11001000 00010111 00011110 00000000 200.23.30.0/23
32
Ch. 4: Network Layer - Forwarding#32 ISP r Gets a block of addresses from ICANN: A: ICANN: Internet Corporation for Assigned Names and Numbers m allocates addresses m manages DNS m assigns domain names, resolves disputes m allocates codes for the various protocols IP addresses: how to get one?
33
Ch. 4: Network Layer - Forwarding#33 Hierarchical addressing: route aggregation “Send me anything with addresses beginning 200.23.16.0/20” 200.23.16.0/23200.23.18.0/23200.23.30.0/23 Fly-By-Night-ISP Organization 0 Organization 7 Internet Organization 1 ISPs-R-Us “Send me anything with addresses beginning 199.31.0.0/16” 200.23.20.0/23 Organization 2...... Hierarchical addressing allows efficient advertisement of routing information:
34
Ch. 4: Network Layer - Forwarding#34 Hierarchical addressing: more specific routes ISPs-R-Us has a more specific route to Organization 1 “Send me anything with addresses beginning 200.23.16.0/20” 200.23.16.0/23200.23.18.0/23200.23.30.0/23 Fly-By-Night-ISP Organization 0 Organization 7 Internet Organization 1 ISPs-R-Us “Send me anything with addresses beginning 199.31.0.0/16 or 200.23.18.0/23” 200.23.20.0/23 Organization 2......
35
Routing table Destination Address Range Link Interface 11001000 00010111 00010000 00000000 through 0 11001000 00010111 00010111 11111111 11001000 00010111 00011000 00000000 through 1 11001000 00010111 00011000 11111111 11001000 00010111 00011001 00000000 through 2 11001000 00010111 00011111 11111111 otherwise 3 4 billion possible entries (*) Ch. 4: Network Layer - Forwarding#35 (*) true for IPv4; in IPv6 MUCH more
36
Network Layer 4-36 Longest prefix matching Network /K Link Interface 11001000 00010111 00010000 00000000 /21 0 11001000 00010111 00011000 00000000 /24 1 11001000 00010111 00010100 00000000 /24 2 00000000 00000000 00000000 00000000 /0 3 Examples: (a)DA: 11001000 00010111 00010110 10100001 Which interface will be used by this router for following dest addresses? (d)DA: 11001000 00010111 00011000 11101010 Network Link Interface 200.23.16.0 /21 0 200.23.24.0 /24 1 200.23.20.0 /24 2 otherwise 3 (b)DA: 11001000 00010111 00010100 10101010 (c)DA: 11001000 00010111 00011100 10111110 Routing table
37
Ch. 4: Network Layer - Forwarding#37 Getting a datagram from source to dest. IP datagram: misc fields source IP addr dest IP addr data r datagram remains unchanged (*), as it travels source to destination r addr fields of interest here m Main field : dest. IP addr Dest. Net. next router Nhops 223.1.1 1 223.1.2 223.1.5.2 2 223.1.3 223.1.5.2 2 routing table in R 223.1.1.4 223.1.1.2 R 223.1.1.1 223.1.1.3 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E S 223.1.5.1 223.1.5.2 (*) almost
38
Ch. 4: Network Layer - Forwarding#38 Getting a datagram from source to dest. Starting at A, given IP datagram addressed to B: r A looks up its /K(*) in IPConfig r Compares first K bits in dest address with those in its own r find B is on same net. as A r same prefix sane subnet r link layer will send datagram directly to B in link-layer frame r using ARP table/protocol m B and A are directly connected (*) in the form of subnet mask misc fields 223.1.1.1223.1.1.3 data A’s IPConfig: IP Addr: 223.1.1.1 Subnet /K = 24 (*) Dflt Gtwy: 223.1.1.4 A’s ARP Table: 223.1.1.3 => 223.1.1.4 => Etc. 223.1.1.4 223.1.1.2 R 223.1.1.1 223.1.1.3 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E S 223.1.5.1 223.1.5.2 (*) subnet mask = 225.225.225.0
39
Ch. 4: Network Layer - Forwarding#39 Getting a datagram from source to dest. Starting at A, dest. E: r look up network address of E r E on different network m A sees this by comparing /K prefixes of A and E r routing table: next hop router to E is 223.1.5.2 r link layer sends datagram to router 223.1.5.2 inside link- layer frame r datagram arrives at 223.1.5.2 r cont. on next slide.. misc fields 223.1.1.1223.1.2.2 data 223.1.1.4 223.1.1.2 R 223.1.1.1 223.1.1.3 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E S 223.1.5.1 223.1.5.2 Dest. Net. Next router Port Hops 223.1.1.0 /24 a 1 223.1.2.0 /24 223.1.5.2 b 2 223.1.3.0 /24 223.1.5.2 b 2 a b a b c Routing Table
40
Ch. 4: Network Layer - Forwarding#40 Getting a datagram from source to dest. Arrived at 223.1.5,2, continuing to 223.1.2.2 r look up network address of E r E on subnet directly attached to router’s interface b r link layer sends datagram to 223.1.2.2 inside link-layer frame via I/F b (223.1.2.9) r datagram arrives at 223.1.2.2!!! (hooray!) r Qn: What table consulted here? misc fields 223.1.1.1223.1.2.2 data 223.1.1.4 223.1.1.2 R 223.1.1.1 223.1.1.3 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 A B E S 223.1.5.1 223.1.5.2 Dest. Net. Next router Port Hops 223.1.1.0 /24 223.1.5.1 a 2 223.1.2.0 /24 b 1 223.1.3.0 /24 c 1 a b a b c
41
Ch. 4: Network Layer - Forwarding#41 Network Address Translation (NAT): Outline Datagrams with source or destination in this network have 192.168.1/24 address for source /destination (as usual) 192.168.1.2 192.168.1.3 192.168.1.4 192.168.1.1 138.76.29.7 local network (e.g., home network) 192.168.1.0/24 rest of Internet All datagrams leaving local network have same single source NAT IP address: 138.76.29.7, different source port numbers A local network uses just one public IP address as far as outside world is concerned Each device on the local network is assigned a private IP address
42
Ch. 4: Network Layer - Forwarding#42 NAT: Implementation NAT router must: for outgoing datagrams: m replace (source IP address, port #) of every outgoing datagram by (NAT IP address, new port #)... remote clients/servers will respond using (NAT IP address, new port #) as destination addr. m remember (in NAT translation table) every (source IP address, port #) to (NAT IP address, new port #) translation pair for incoming datagrams: m replace (NAT IP address, new port #) in dest fields of every incoming datagram with corresponding (source IP address, port #) stored in NAT table
43
Ch. 4: Network Layer - Forwarding#43 NAT: Network Address Translation 192.168.1.2 S: 192.168.1.2, 3345 D: 128.119.40.186, 80 1 192.168.1.1 138.76.29.7 1: host 192.168.1.2 sends datagram to 128.119.40.186, 80 NAT translation table WAN side addr LAN side addr 138.76.29.7, 5001 192.168.1.2, 3345 …… S: 128.119.40.186, 80 D: 192.168.1.2, 3345 4 S: 138.76.29.7, 5001 D: 128.119.40.186, 80 2 2: NAT router changes datagram source addr from 192.168.1.2, 3345 to 138.76.29.7, 5001, updates table S: 128.119.40.186, 80 D: 138.76.29.7, 5001 3 3: Reply arrives dest. address: 138.76.29.7, 5001 4: NAT router changes datagram dest addr from 138.76.29.7, 5001 to 192.168.1.2, 3345 192.168.1.3 192.168.1.4
44
Ch. 4: Network Layer - Forwarding#44 NAT: Advantages r No need to be allocated range of addresses from ISP: - just one public IP address is used for all devices m 16-bit port-number field allows 60,000 simultaneous connections with a single LAN-side address ! m can change ISP without changing addresses of devices in local network m can change addresses of devices in local network without notifying outside world r Devices inside local net not explicitly addressable, visible by outside world (a security plus)
45
Ch. 4: Network Layer - Forwarding#45 NAT: Drawbacks r If both hosts are behind distinct NATs, they will have difficulty establishing connection r NAT is controversial: m violates layer modularity principle: routers should process up to only layer 3 m causes problem for some application protocols: if application writes an explicit IP address within the L5 header, the peer application will get a useless internal IP address as an argument r proper address shortage solution : IPv6 !
46
Ch. 4: Network Layer - Forwarding#46 IP datagram format ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier Internet checksum time to live 32 bit source IP address IP protocol version number header length (bytes) max number remaining hops (decremented at each router) for fragmentation/ reassembly total datagram length (bytes) upper layer protocol to deliver payload to head. len type of service “type” of data flgs fragment offset upper layer 32 bit destination IP address Options (if any) E.g. timestamp, record route taken, specify list of routers to visit.
47
Network Layer 4-47 אפקה תשע " א ס " ב IPv6 r Initial motivation: 32-bit address space soon to be completely allocated. r Additional motivation: m IPv6 header format helps speed processing r IPv6 datagram format: m 16-byte (128 bit) IP address m fixed-length 40 byte header no options allowed inside the header each option gets its own header after the main IP header m fragmentation discouraged allowed only using an options header
48
Network Layer 4-48 אפקה תשע " א ס " ב Transition From IPv4 To IPv6 r Not all routers can be upgraded simultaneously m How will the network operate with mixed IPv4 & IPv6 routers? r Tunneling: IPv6 datagrams are carried as payload in IPv4 datagrams when travelling through IPv4 routers m source and destination network are IPv6, but need to transit an existing IPv4 network r How is tunneling done? m gateway router in source network takes the IPv6 datagram as payload and encapsulates it into an IPv4 datagram i.e. adds an IPv4 header in front of it m the IPv4 destination is the gateway router of the destination network, which removes the IPv4 header and routes by IPv6 r Gateway router must support IPv4, IPv6 and tunneling
49
Network Layer 4-49 אפקה תשע " א ס " ב Tunneling A B E F IPv6 tunnel Logical view: Physical view: A B E F IPv6 C D IPv4 Flow: X Src: A Dest: F data Flow: X Src: A Dest: F data Flow: X Src: A Dest: F data Src:B Dest: E Flow: X Src: A Dest: F data Src:B Dest: E A-to-B: IPv6 E-to-F: IPv6 B-to-C: IPv6 inside IPv4 B-to-C: IPv6 inside IPv4 IPv6
50
Network Layer 4-50 אפקה תשע " א ס " ב Usage of Tunneling r Tunneling is used to move a packet between similar networks A, B through a network C that is unable to understand its L3 header r Possible reasons: 1. C uses a different protocol (e.g. IPv6 vs IPv4) 2. A wants to encipher the data and the header (VPN application) 3. All networks use same protocol, but the destination node is currently at a foreign network (Mobile IP application)
51
Ch. 4: Network Layer - Forwarding4-51 IPv6 Header (Cont) Priority: identify priority among datagrams in flow Flow Label: identify datagrams in same “flow.” (concept of“flow” not well defined). Next header: identify upper layer protocol for data
52
Ch. 4: Network Layer - Forwarding4-52 Transition From IPv4 To IPv6 r Not all routers can be upgraded simultaneous m no “flag days” m How will the network operate with mixed IPv4 and IPv6 routers? r Tunneling: IPv6 carried as payload in IPv4 datagram among IPv4 routers
53
IPv6 status report r Operating systems – m wide support – early 2000 m Windows (2000, XP, Vista), BSD, Linux, Apple r Networking infrastructure m Cisco r Deployment m Slow r Penetration m Host - minor (less than 1%) m Used in 2008 in China Olympic games r Motivation: CIDR & NAT Ch. 4: Network Layer - Forwarding#53
54
Extra Ch. 4: Network Layer - Forwarding#54
55
Ch. 4: Network Layer - Forwarding4-55 IP Fragmentation & Reassembly r network links have MTU (max.transfer size) - largest possible link-level frame. m different link types, different MTUs r large IP datagram divided (“fragmented”) within net m one datagram becomes several datagrams m “reassembled” only at final destination m IP header bits used to identify, order related fragments fragmentation: in: one large datagram out: 3 smaller datagrams reassembly
56
Ch. 4: Network Layer - Forwarding4-56 IP Fragmentation and Reassembly 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 becomes several smaller datagrams Example r 4000 byte datagram r MTU = 1500 bytes 1480 bytes in data field offset = 1480/8
57
Ch. 4: Network Layer - Forwarding4-57 ICMP: Internet Control Message Protocol r used by hosts & routers to communicate network-level information m error reporting: unreachable host, network, port, protocol m echo request/reply (used by ping) r network-layer “above” IP: m ICMP msgs carried in IP datagrams r ICMP message: type, code plus first 8 bytes of IP datagram causing error Type Code description 0 0 echo reply (ping) 3 0 dest. network unreachable 3 1 dest host unreachable 3 2 dest protocol unreachable 3 3 dest port unreachable 3 6 dest network unknown 3 7 dest host unknown 4 0 source quench (congestion control - not used) 8 0 echo request (ping) 9 0 route advertisement 10 0 router discovery 11 0 TTL expired 12 0 bad IP header
58
Ch. 4: Network Layer - Forwarding4-58 Traceroute and ICMP r Source sends series of UDP segments to dest m First has TTL =1 m Second has TTL=2, etc. m Unlikely port number r When nth datagram arrives to nth router: m Router discards datagram m And sends to source an ICMP message (type 11, code 0) m Message includes name of router& IP address r When ICMP message arrives, source calculates RTT r Traceroute does this 3 times Stopping criterion r UDP segment eventually arrives at destination host r Destination returns ICMP “host unreachable” packet (type 3, code 3) r When source gets this ICMP, stops.
59
Ch. 4: Network Layer - Forwarding 4-59 Exercise 1 Answers 11001000 00010111 00010001 10110101 /23 Ans 2: 11111111 11111111 11111110 00000000 = 255.255.254.0 255-1 = 254 Ans 3: 11001000 00010111 00010001 10110101 NETWORK HOST Ans 1: 11001000 00010111 00010001 10110101 =200.23.17.181 128+64+8= 200 16+7= 23 16+1= 17 128+32+16+5= 181 128 64 32 16 8 4 2 1 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 128 64 32 16 8 4 2 1 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0
60
Ch. 4: Network Layer - Forwarding 4-60 Exercise 2 Answers 11001000 00010111 00010001 10110101 /23 Ans 5: first host address: 200.23.16.1/23 last host address: 200.23.17.254/23 Ans 1: 11001000 00010111 00010000 00000000 = 200.23.16.0 Ans 2: 11001000 00010111 00010001 11111111 = 200.23.17.255 Ans 3: 2 9 -2 = 510 hosts NETWORK Ans 4: network: 200.23.16.0/23 host: 200.23.17.181/23
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.