Presentation is loading. Please wait.

Presentation is loading. Please wait.

Jump to first page 1 CICS 515 (Part 2) University of British Columbia CICS 515 (Part 2) Computer Networks Lecture 5 – IP (Ch 4) Instructor: Dr. Son T.

Similar presentations


Presentation on theme: "Jump to first page 1 CICS 515 (Part 2) University of British Columbia CICS 515 (Part 2) Computer Networks Lecture 5 – IP (Ch 4) Instructor: Dr. Son T."— Presentation transcript:

1 Jump to first page 1 CICS 515 (Part 2) University of British Columbia CICS 515 (Part 2) Computer Networks Lecture 5 – IP (Ch 4) Instructor: Dr. Son T. Vuong The World Connected

2 CICS515 Summer 2012 Instructor: Dr. Son Vuong 2 Ch 4: Network Layer and Routing  The IP Protocol  IP Format, Addressing, fragmentation,  Internet Control Protocols (ICMP) (next lecture)  Routing  RIP (Routing Information Protocol)  OSPF (Open Shortest Path First)  The Interior Gateway Routing Protocol  BGP – The Exterior Gateway Routing Protocol  IPv6  Internet Multicasting  Mobile IP

3 CICS515 Summer 2012 Instructor: Dr. Son Vuong 3 ISO Architecture Application Presentation Session Transport End host One or more nodes within the network Network Data link Physical Network Data link Physical Network Data link Physical Application Presentation Session Transport End host Network Data link Physical IP

4 CICS515 Summer 2012 Instructor: Dr. Son Vuong 4 Internet Architecture n Defined by Internet Engineering Task Force (IETF) n Hourglass Design n Application vs Application Protocol (FTP, HTTP) … FTPHTTPNV TFTP TCP UDP IP NET 1 2 n TCPUDP IP Network Application

5 CICS515 Summer 2012 Instructor: Dr. Son Vuong 5 Design Principles for Internet n Make sure it works. n Keep it simple. n Make clear choices. n Exploit modularity. n Expect heterogeneity. n Avoid static options and parameters. n Look for a good design; it need not be perfect. n Be strict when sending and tolerant when receiving. n Think about scalability. n Consider performance and cost.

6 CICS515 Summer 2012 Instructor: Dr. Son Vuong 6 Collection of Subnetworks The Internet = interconnected collection of many networks.

7 CICS515 Summer 2012 Instructor: Dr. Son Vuong 7 Example TCP/IP internet R1 ETH FDDI IP ETH TCP R2 FDDI PPP IP R3 PPP ETH H1 IP ETH TCP H8 R2 R1 H4 H5 H3 H2 H1 Network 2 (Ethernet) Network 1 (Ethernet) H6 Network 3 (FDDI) Network 4 (point-to-point) H7R3H8 IP

8 CICS515 Summer 2012 Instructor: Dr. Son Vuong 8 IP Service Model n Packet Delivery Model u Connectionless (datagram-based) u Best-effort delivery (unreliable service) F Loss, out-of-order, duplication F long, variable delay n Global Addressing Scheme u IP Addresses u Routing info provided within header, no set up phase. n IP runs over any Layer 2/3 network u Ethernet, FDDI, ATM, Point to Point, etc.

9 CICS515 Summer 2012 Instructor: Dr. Son Vuong 9 IP Packet Format VersionHLen TOSLength IdentFlagsOffset TTLProtocolChecksum DestinationIPAddr Options (variable) Pad (variable) Data SourceIPAddr

10 CICS515 Summer 2012 Instructor: Dr. Son Vuong 10 The IP Protocol (2) Some of the IP options. 5-54

11 CICS515 Summer 2012 Instructor: Dr. Son Vuong 11 IP Packet Details n Datagram format u Version (4) - Currently set to 4 (IPv4). We’ll discuss IPv6. u Hlen (4) - Number of 32-bit words in the header (allows for a variable number of options) u TOS (8) - Type of service (not widely used) u Length (16) - Number of bytes in this datagram - Maximum size is 64KB. u Ident (16) - Used for fragmentation u Flags(3)/Offset(13) (16) - Used for fragmentation (offset in units of 8 bytes)

12 CICS515 Summer 2012 Instructor: Dr. Son Vuong 12 IP Packet Details cont. u TTL (8) - Number of hops this datagram can travel (defaults to 64). Originally was intended to count seconds, but impossible without a central clock. u Protocol (8) - Demultiplexing key for higher level protocols (TCP=6, UDP=17) u Checksum (16) - Of the header only, using Internet Checksum method (as in UDP and TCP) u DestAddr & SrcAddr (32) - See later. u Options, e.g. timestamp, record route, (strict/loose) source routing

13 CICS515 Summer 2012 Instructor: Dr. Son Vuong 13 Fragmentation and Reassembly n Each Layer 2/3 network has a Maximum Transmission Unit (MTU) e.g. Ethernet is 1500, FDDI is 4500 n Unreasonable to make all IP packets small enough to fit within all possible MTUs. n Strategy u Fragment only when necessary (MTU < Datagram) u Try to avoid fragmentation at source host u Fragments are self-contained IP datagrams u Reassembly of fragments at destination host.

14 CICS515 Summer 2012 Instructor: Dr. Son Vuong 14 Fragmentation Example

15 CICS515 Summer 2012 Instructor: Dr. Son Vuong 15 Fragmentation cont. n If one fragment is lost, discard all other fragments. Higher layers will recover. n The IP header has fields for handling this type of fragmentation. u Set the M bit (in flags) to indicate that more data is coming. u Set the offset to indicate where each of the fragmented blocks starts. u Set the ident field to identify related packets.

16 CICS515 Summer 2012 Instructor: Dr. Son Vuong 16 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 n 4000 byte datagram n MTU = 1500 bytes 1480 bytes in data field offset = 1480/8 length = 4000 – 2*1480 = = 1040

17 CICS515 Summer 2012 Instructor: Dr. Son Vuong 17 IP Fragmentation– Peer Instruction – Question 5.1 n A 1300-byte IP datagram sent through a network with 500-byte MTU must be fragmented into 3 fragments with the following respective values in the header: A.,, B.,,. C., D.,, E. None of the above

18 CICS515 Summer 2012 Instructor: Dr. Son Vuong 18 Global Addresses n Properties of IP addresses. u Globally unique - No confusion about where to send a packet. u Hierarchical - Network component and host number. n Normally written in “Dot notation” (4 byte values, total 32 bits) u u u u (cascade.cs.ubc.ca)

19 CICS515 Summer 2012 Instructor: Dr. Son Vuong 19 IP Addresses IP address formats.

20 CICS515 Summer 2012 Instructor: Dr. Son Vuong 20 Address Notation n Binary u n Hex Colon u C0:05:30:03 n Dotted Decimal u

21 CICS515 Summer 2012 Instructor: Dr. Son Vuong 21 Class Ranges n Dotted Decimal w.x.y.z n Class A: w= 0 thru 127 n Class B: w= 128 thru 191 n Class C: w= 192 thru 223 n Class D: w= 224 thru 239 n Class E: w= 240 thru 255

22 CICS515 Summer 2012 Instructor: Dr. Son Vuong 22 Class Formats n Class A: 128 Networks, hosts each n Class B: Networks, hosts each n Class C: Networks, 256 hosts each n The plan was to give each organization (company or university) a network number that is appropriate for their size, and let them allocate host numbers. n Example: UBC has several class B and C addresses. u E.g and n In reality, variations on this method are used.

23 CICS515 Summer 2012 Instructor: Dr. Son Vuong 23 IP Addresses (2) Special IP addresses.

24 CICS515 Summer 2012 Instructor: Dr. Son Vuong 24 Subnets A campus network consisting of LANs for various departments.

25 CICS515 Summer 2012 Instructor: Dr. Son Vuong 25 Subnets (2) A class B network subnetted into 64 subnets.

26 CICS515 Summer 2012 Instructor: Dr. Son Vuong 26 CIDR – Classless InterDomain Routing A set of IP address assignments  address format: a.b.c.d/x subnet portion of arbitrary length x subnet part host part /23

27 CICS515 Summer 2012 Instructor: Dr. Son Vuong 27 NAT – Network Address Translation Placement and operation of a NAT box.

28 CICS515 Summer 2012 Instructor: Dr. Son Vuong 28 Datagram Forwarding n Using these IP address, how do we route messages? n Strategy u every datagram contains destination's address u if directly connected to destination network, then forward to host u if not directly connected to destination network, then forward to some router u forwarding table maps network number into next hop u each host has a default router u each router maintains a forwarding table n A forwarding table maps network numbers into router addresses.

29 CICS515 Summer 2012 Instructor: Dr. Son Vuong 29 Example: Forwarding Table for R2 Network Next Hop R3 R1 interface 1 interface 0 For Router R2 R2 R1 H4 H5 H3 H2 H1 Network 2 (Ethernet) Network 1 (Ethernet) H6 Network 3 (FDDI) Network 4 (point-to-point) H7R3H8

30 CICS515 Summer 2012 Instructor: Dr. Son Vuong 30 Examples n Sending from H1 to H2: u Same network, so send an Ethernet frame to the Ethernet address for H2 n Sending from H1 to H8: u Send an Ethernet frame from H1 to R1 u Send an FDDI packet from R1 to R2 u Send a point to point message from R2 to R3 u Send an Ethernet frame from R3 to H8

31 CICS515 Summer 2012 Instructor: Dr. Son Vuong 31 Scalability n In reality, it’s not possible to list an appropriate router for every network on the internet. The table will get too big. n Commonly we’ll have a list of well-known networks, but use a default router for all other networks. n For example: Network 3 could get to Network 2 via R1, and will use R2 for all other networks. n Sometimes, we only have a single default router on each network.

32 CICS515 Summer 2012 Instructor: Dr. Son Vuong 32 Internet Control Message Protocol (ICMP) n If something goes wrong with an IP packet, a control message is sent back to the sender: u Echo (ping) Request/Reply u Timestamp Request/Reply u Redirect (from router to source host) u Source quench u Destination unreachable (protocol, port, or host) u TTL exceeded (so datagrams don't cycle forever) u Checksum failed u Reassembly failed u Cannot fragment

33 CICS515 Summer 2012 Instructor: Dr. Son Vuong 33 Summary - What have we covered? n internetworks n IP (Layer 3.5) n packets and fragmentation n addressing and address classes n packet forwarding n ICMP


Download ppt "Jump to first page 1 CICS 515 (Part 2) University of British Columbia CICS 515 (Part 2) Computer Networks Lecture 5 – IP (Ch 4) Instructor: Dr. Son T."

Similar presentations


Ads by Google