Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 CSCD58 W INTER 2018 W EEK 6 - N ETWORK L AYER P ART 1 Brian Harrington University of Toronto Scarborough February 13, 2018
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 A DMIN • Assignments • Midterm after reading week (Feb 27) • In class • Covering everything up-to transport layer (i.e., not this week’s material) • No lecture or tutorials that week
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 C ONNECTION VS C ONNECTION - LESS • Recall: In Transport layer we had 2 options: • UDP: Connectionless - just send data out • TCP: Connection-oriented: establish a connection first • In Network Layer, we also have 2 options: • Datagram: Let the data find its own way • Virtual Circuit (VC): Establish end-to-end pathway first • Actually... we don’t have any choice. Network is either Datagram or VC, implemented in network core.
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 V IRTUAL C IRCUIT N ETWORKS • Try to emulate behaviour of circuit switched network • Set up call before (tear down after) • Each VC path segment has unique number • Packet only has to hold VC number (not source or dest) • Routers keep state of each VC • Can allocate resources (bandwidth, buffers, etc) to each VC = predictable, reliable circuit-switching-like performance • Example
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 V IRTUAL C IRCUIT
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 D ATAGRAM • No call setup • Routers don’t need to keep any state info • At each point, packets are forwarded using host address • Routers can’t know all 4 billion + IP addresses • List range instead • Example
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 D ATAGRAM E XAMPLE • 11001000 00010111 00010110 10100001 • 11001000 00010111 00011000 10101010 • 11001000 00010111 00001011 00110101
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 D ATAGRAM OR VC? • VC • Smart network core, dumb end systems • Complexity inside network • Can provide timing, reliability guarantees • Used in Asynchronous Transfer Mode (ATM) networks • Network World 2001: “I give Ethernet six months before the whole thing is gone”... “This is just not going to work, ATM is going to dominate” • Datagram • Smart end systems, dumb core • “Complexity at the edge” • Elastic/flexible • Most importantly? Cheap! • Internet standard
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 F ORMAT OF IP D ATAGRAM
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 F ORMAT OF IP D ATAGRAM
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 IP F RAGMENTATION • Not everyone can carry packets of the same size • Ethernet: 1500 bytes • WLAN (802.11): 7891 bytes • Some WANs: 576 bytes • Sometimes we’ll need to fragment packets and put them back together later
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 IP F RAGMENTATION
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 IP F RAGMENTATION
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 IP: I NTERNET P ROTOCOL • Note: Focusing on IP v4 (we’ll discuss IPv6 later) • Each interface identified by 32-bit number • Interface: connection between host/router and physical link • routers usually have many interfaces • hosts usually have 1-2 (e.g,. ethernet + wifi) • 223.1.2.1 = 11011111 00000001 00000010 00000001
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 S UBNETS • subnet: group of device interfaces with same higher order part of IP address • interfaces on a subnet can talk to each other without intervening router
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 S UBNETS • subnet: group of device interfaces with same higher order part of IP address • interfaces on a subnet can talk to each other without intervening router
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 S UBNETS • Pop quiz: how many subnets? What are their masks?
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 DHCP: D YNAMIC H OST C ONFIGURATION P ROTOCOL • Hosts should be mobile • Want to dynamically obtain IP address from local network server when you join a network • Each host leases an address (can renew periodically) • Allows reuse of addresses (when lease expires, address is up-for-grabs
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 DHCP • Basic Steps: • host broadcasts: DHCP discover [optional] • DHCP server responds: DHCP offer [optional] • host requests: DHCP request • DHCP server sends: DHCP ack
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 DHCP • 255.255.255.255 = broadcast to entire subnet
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 CIDR: C LASSLESS I NTER D OMAIN R OUTING • So how do we get IP addresses in the first place? • ISP gets allocated a block by ICANN (Internet Corporation for Assigned Names and Numbers) http://www.icann.org/ • Organization (could also be ISP) gets a sub-block 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
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 CIDR • Hierarchical Addressing • Allows efficient advertising of routing information • But what if an organization wants to move?
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 CIDR • No problem, just go with whoever has the most specific route
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 NAT: N ETWORK A DDRESS T RANSLATION • Not every interface needs a unique IP • Not enough addresses to go around • IPv4 - 2 32 ∼ 4.2 billion addresses • Too much work to keep track of every update • Solution: “hide” network behind a single ISP • To the rest of the world: whole network has 1 address • Inside network: We’ve got loads of room
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 NAT: N ETWORK A DDRESS T RANSLATION
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 NAT: N ETWORK A DDRESS T RANSLATION
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 NAT: N ETWORK A DDRESS T RANSLATION • Benefits of NAT • Only need 1 IP address from ISP • Can change addresses of local devices without notifying outside world • Can change ISPs without affecting local network • Devices inside network not directly accessible/visible to outside world (good for security)
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 NAT: N ETWORK A DDRESS T RANSLATION • Idea: Translate each local IP + port number into public port number • Outgoing: nat _ source ip + nat _ source port → external ip + external port • Incoming: external ip + external port → nat _ source ip + nat _ source port
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 NAT: N ETWORK A DDRESS T RANSLATION
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 NAT: N ETWORK A DDRESS T RANSLATION
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 NAT: N ETWORK A DDRESS T RANSLATION
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 NAT: N ETWORK A DDRESS T RANSLATION
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 NAT: N ETWORK A DDRESS T RANSLATION
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 ICMP: I NTERNET C ONTROL M ESSAGE P ROTOCOL Type Code description 0 0 echo reply (ping) • Simple messages sent at 3 0 dest. network unreachable 3 1 dest host unreachable network level 3 2 dest protocol unreachable 3 3 dest port unreachable • Sort of like a pseudo-layer 3 6 dest network unknown 3 7 dest host unknown between Transport and 4 0 source quench (congestion control - not used) Network layers 8 0 echo request (ping) 9 0 route advertisement • Useful for a lot of low-level 10 0 router discovery 11 0 TTL expired functions 12 0 bad IP header
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 ICMP & T RACEROUTE • Traceroute is implemented in ICMP • Less overhead to use bandwidth/mess up timings • Idea: use TTL field • When TTL expires, router sends back ICMP 11-0: TTL expired , with router info attached • Send out UDP segment with TTL = 1, get info of first router • Send out UDP segment with TTL = 2, get info of second router • Eventually, reach destination, pick unlikely port#. Host will send back ICMP 3-3: Dest port unreachable
Admin VC vs Datagram IP DHCP Break CIDR NAT ICMP IPv6 IP V 6 • IPv4’s 32-bit address space “soon to be” used up • (actually practically exhausted in 2011) • Updated header format to improve speed • Better processing, faster forwarding, get rid of unused fields • Can add QoS info
Recommend
More recommend