cs 453 computer networks n.
Skip this Video
Loading SlideShow in 5 Seconds..
CS 453 Computer Networks PowerPoint Presentation
Download Presentation
CS 453 Computer Networks

CS 453 Computer Networks

121 Vues Download Presentation
Télécharger la présentation

CS 453 Computer Networks

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. CS 453Computer Networks Lecture 20 Layer 3Network Layer Network Layer of the Internet

  2. Internet – Network Layer The Internet is a world-wide economic, social, educational and cultural force It has literally changed the we conduct our daily lives IP protocol is the foundation of the Internet It’s the glue that makes it all work

  3. Internet – Network Layer Design principles behind the IP protocol It has to work – build and test prototypes before committing the standards Simplicity – don’t add unnecessary features and keep the “necessary” ones to a minimum Don’t create options – have a way to do something, not several ways Modularity – keep design in modules Deal with heterogeneity – complex networks are going to mixes of technology – design for this

  4. Internet – Network Layer Design principles behind the IP protocol Negotiable parameters – allow devices to negotiate parameters, don’t have fixed parameters Don’t shoot for perfect – don’t try to deal with every possible wrinkle, strange requirements Sender adheres to standard, receiver tries to adapt Scalability – design must be scalable Cost/performance – must be within acceptable limits

  5. Internet – Network Layer From: Tanenbaum, 2003, pg 433

  6. Internet See previous diagram from Tanenbaum Interconnection of network Across organizations Across countries Across continents Across oceans IP Protocol is the common thread IP protocol was designed from its inception to deal with networks of networks IP stands for internet protocol – with a little i

  7. 0.0001% of the Internet– according to From:

  8. From:

  9. IP ProtocolIPv4 Header From:

  10. IP ProtocolIPv4 Header From:

  11. IPv4 Header Header has 20 bytes of fixed fields + a variable length option part Transmitted in Big-endian order

  12. IPv4 Header Header fields Version – 4 bits – identify the version of datagram – lets routers know how to handle the packet Header length – 4 bits because header has optional part length can vary, must declare header length – in N of 4 byte words – so max header length = 60 bytes Type Of Service (TOS) – allows for differentiated services – low delay, high throughput – allows routes to decide what to do

  13. IPv4 Header Header fields Datagram length – length of entire datagram – 16 bits so max datagram length = 65,535, but usually 1500 or less (why?) Identifier – 16 bits – ids the datagram, so devices will know which datagram fragments belong to Flags – 3 bits – fragmentation flags Bit 16 = 0 Bit 17 = DF (don’t fragment) Bit 18 = MF (more fragments coming)

  14. IPv4 Header Header fields Fragment offset – 13 bits – defines the fragment’s slot in the datagram (for reassembly) In 8 byte slots 8192 slots = max datagram = 65,536 Time to Live (TTL) – measures life of datagram in router hops – each hop TTL-1 If TTL reaches 0 datagram trashed and warning sent to source

  15. IPv4 Header Header fields Transport Layer Protocol – what transport layer process should receive the datagram (TCP, UDP, …) Header Checksum – calculated check sum but just for the header portion of the packet Must be recalculated on each router hop Source address – 32 bit address of packet source Destination address – 32 bit address of packet destination recipient

  16. IPv4 Header Header fields Option – variable length– intended to allow things not in the design Some predefined options originally – list has grown To see list go to

  17. IPv4 Then the payload

  18. IP Addressing All communications has a source and a destination (or more) IP address scheme defines source and destination IP address in IP Packet, not in frame Each device on Internet has an IP address Each address is unique – in theory (but not really)

  19. IP Addressing Each address represents a network interface …not a host IP address has 32 bits… Represented (to us) in Dotted quad notation Dotted decimal notation

  20. IP Addressing But really it a string of bits So this is – 10011101.10110110.0101111.01111000 Which internally is – 1001110110110110010111101111000

  21. IP Addressing Class addressing Originally IP address were defined in terms of classes Since the 32 address defines all hosts/interfaces in the Internet… … the Internet is a network of networks Fixed portion of the IP address were defined to represent a network… …i.e. the first x bits The network address was defined on even octet boundries --- 8 bits, 16 bits, 24 bit The left x bits is the network address The right y bits is the host address x+y=32

  22. IP Addressing Class addressing From: Tanenbaum, 2003, pg. 437

  23. IP Addressing Class addressing Special Addresses From: Tanenbaum, 2003, pg. 438

  24. IP Addressing Class addressing …was a bit of problem If WVU was assigned a Class B address (as it was sometime ago… …then the first 16 bits was the network address …the right 16 bits was for the address of all of the hosts in the network …and every host at WVU was on the the same network, right? …maybe for a few days

  25. IP Addressing Class addressing We need someway of defining smaller networks (subnets) for departments, buildings, etc. And be able to aggregate these into the designated network (left x bits) That is called classless addressing

  26. IP Addressing Classless addressing Generalize the idea of classes, … but make them hierarchical …and arbitrary size ( number of bits) For example, suppose the left 16 bits represent a network… …the next 8 bits represent network addresses within that network – or subnets Since 8 bits can be left for the host address part of the address There can be ? Hosts in such a subnet

  27. IP Addressing Classless addressing At any given level an IP address needs to look like a network address and a host address At the highest network level – 157.182 is the network address … and 95.120 is the host address… But…

  28. IP Addressing Classless addressing subnet mask A string of bits that acts as a bitmap Left x bits are set to 1 to say this many bit is the network address Right x bit is set to 0 to say this many bits is the host address… 11111111.11111111.11111111.00000000 Or…

  29. IP Addressing Classless addressing This subnetting process can be done recursively University gets a network College creates a subnet Department creates a subsubnet Lab creates a subsubnet

  30. IP Addressing Classless addressing Subnet mask is used as a bit mask ANDed with address to see if Address in in local network or .. Needs to be routed to another network

  31. IP Addressing Classless addressing Subnet mask is used as a bit mask ANDed with address to see if Address in in local network or .. Needs to be routed to another network

  32. IP Network Address Translation NAT NAT

  33. IP Network Address Translation NAT NAT From: Tanenbaum, 2003, 446

  34. IP Network Address Translation NAT NAT NAT really irks a lot in the IP community Violates the IP unique address rule IP is connectionless, NAT creates a connection Must track state Violates protocol layer convention Dips into IP header (port address) Breaks on some protocols (payload imbedded addresses Might not be able to scale to large subnet