Presentation is loading. Please wait.

Presentation is loading. Please wait.

Routing and the IP v4 Address Space BSAD 141 Dave Novak Sources: Network+ Guide to Networks, Dean 2013.

Similar presentations


Presentation on theme: "Routing and the IP v4 Address Space BSAD 141 Dave Novak Sources: Network+ Guide to Networks, Dean 2013."— Presentation transcript:

1 Routing and the IP v4 Address Space BSAD 141 Dave Novak Sources: Network+ Guide to Networks, Dean 2013

2 Outline Routing How routers work Routing tables Static and Dynamic routing IP address space overview

3 Last Time We Discussed… Concept of internetworking and routing Why TCP/IP is so important in terms of universal service and encapsulation The TCP/IP model and how it relates to OSI IP –vs- MAC Address resolution using ARP What do we mean by connectionless versus connection-based service in a data network The IP datagram

4 Routing Routers Can translate between different data link layer protocols and can connect dissimilar networks Ethernet to token ring Why can’t “basic” switches connect dissimilar networks?

5 Routing Basic functionality at Layer 3 of OSI Forwards packets from source LAN to destination LAN If LANs are not adjacent, the router forwards packets to another router, and so on until the router associated with the destination LAN is reached On an internetwork (or the Internet), packets typically traverse many routers Each router exchange is referred to as a “hop”

6 Routing versus switching Generalization: Routers manages packet flow between different networks (or subnets) Switches manage packet flow within a particular network (or subnet)

7 Routers and Gateways Router/Gateway is a term used in TCP/IP Default gateway (Layer 3) Application gateway (Layer 7)

8 Routers Routers are selective with respect to forwarding packets Do not forward broadcasts Work with IP datagrams (at layer 3) Routers have routing tables, which contain addressing information about networks around it Send packets directly to destination router OR forwards packets to “best” router

9 Routing – packet switching concept Data are divided into packets Theoretically, each packet can take a different route to destination, although this packets aren’t routed Individually in practice 2 10 3 6 8 1 7 11 9 5 Source Destination LAN Internet LAN

10 Routing logic Simplified routing example for Router A DestinationNext HopCostOut port 137.99.105.98B51 145.85.99.101D32 unknownDefault (D)32 Example network A, B, C, D, E – a router 1, 2, 3 – a port on a router Red number – cost on link A B C DE 1 2 1 3 2 1 2 12 3 1 2 5 3 6 4 8 4 145.85.99.101 137.99.105.98

11 Internet routing On a small internetwork a router simply separates local traffic from remote traffic What traffic stays on the network – what traffic is sent off the network On larger, more complex internetworks, the router must select the “best” or most efficient path from source to destination Often measured by fewest hops

12 Routing tables All TCP/IP devices have some type of routing table A table to determine where to send packets MAC address mapped to IP address Systems store local address mappings and can usually transmit local packets directly to the receiving system Systems typically use a default address ( the IP address of an edge router ) for non local transmission

13 Routing tables Network Address NetmaskGateway Address Interface 0.0.0.0 192.168.2.99192.168.2.2 127.0.0.0255.0.0.0127.0.0.1 192.168.2.0255.255.255.0192.168.2.2 255.255.255.255127.0.0.1 192.168.2.255255.255.255.255192.168.2.2 224.0.0.0 192.168.2.2 255.255.255.255 192.168.2.2 List of networks (and maybe hosts) and addresses of the other routers that a system will use to reach them

14 Routing decision tree

15 Internet routing Routers populate their routing tables with destination IP address and best route info Two broad categories of routing 1) Static – routes that do not change Network admin creates table manually 2) Dynamic – system changes routing table information over time Router uses routing protocols to exchange information with routers around it to learn optimal routes to different destinations

16 IP datagram Size of IP datagram header is fixed Size of IP datagram payload is variable The sending application selects payload of datagram Why is a variable IP datagram payload important in the context of WAN/internetworking usage?

17 IP datagram v4 IP Datagram header contains IP addresses IP Datagram can contain Min of 1 byte excluding header Max of 65,535 bytes including header IP Datagram header is fixed size 20 bytes Contains IP address of sender IP address of receiver

18 IP datagram http://www.inetdaemon.com/tutorials/i nternet/ip/datagram_structure.shtml

19 MTU and datagram size Max amount of data one frame can carry is specified by each separate networking technology (layer 2) Limit is know as maximum transmission unit (MTU) Network hardware will not accept frames larger than MTU Token ring frames don’t work with Ethernet hardware – not only are addressing schemes different, TR frames are much larger than Ethernet frames

20 MTU and datagram size Review: The IP Datagram needs to fit into the payload area of any type of frame Why? How?

21 MTU and datagram size Different hardware will specify different MTUs Token ring (802.5) frame Max size 4500 Bytes Ethernet (802.3) frame Max size 1526 Bytes ATM frame Max size 53 Bytes

22 Fragmentation Breaking up or subdividing datagram Router divides original IP datagram into smaller pieces called fragments and routes each fragment separately IP fragments are packaged into frames (like other data)

23 Fragmentation

24 Reassembly Process of re-creating copy of original IP datagram from fragments is called reassembly

25 Identifying datagram Since IP does not guarantee delivery (IP provides best-effort, connectionless service), we have a potential problem Fragments can be lost or arrive out of order How can packets arrive out of order?

26 Identifying datagram How are fragmented datagrams tracked? Unique ID number for each IP datagram When datagram is fragmented, ID number is copied into each fragment Receiver can use ID number + IP source address to reconstruct fragment A separate field in IP datagram header provides fragment order

27 Fragment loss IP is connectionless – possible to lose fragments When individual fragments arrive at destination, they are stored in memory until entire datagram can be reconstructed If entire datagram cannot be reconstructed, all fragments are discarded A timer is set by the receiving computer once the first fragment arrives. If all fragments arrive before timer expires, the timer is stopped and the host reassembles the datagram If not, fragments are discarded

28 IPv4 addressing scheme Unique 32-bit number Contains both IP address for source and destination You have to know the IP address of the recipient to contact remote host Use DNS to map URL to remote host IP address IP address divided into 2 parts Prefix – the network identifier Suffix – the host identifier

29 IP Address Assignments Every device on a network (or subnet) must have The same network identifier as the other devices on the network (or subnet) A unique host identifier to differentiate between each and every device on that network

30 IP Address Assignments The Internet Assigned Numbers Authority (IANA) assigns network identifiers ( http://www.iana.org/), but you typically obtain network addresses from an Internet Service Provider (ISP) http://www.iana.org/ Prefix (network ID) assigned globally Network administrators assign host identifiers Suffixes (host ID) assigned locally

31 IPv4 addresses Dotted decimal –way that humans view IP addresses 137.99.101.22 Binary – the way hardware/software reads addresses 10001001.01100011.01100101.00010110 4 separate octets divided by a dot or period An octet = Byte Each octet contains 8 bits

32 The IP address decomposed 32-bit – comprised of 4 separate 8-bit parts 137.99.101.22 10001001.01100011.01100101.00010110 10001001 = 137 One “octet” – 8 bits each bit can EITHER be a zero or one This represents an octet All bits in network ID and host ID CANNOT be set to 0 or 1 0 and 255 are NOT valid network addresses or valid host addresses

33 IP addresses decomposed We have 256 possible values for each octet 2 8 = 256 The values are 0 – 255 The octet 00000000 = 0 The octet 11111111 = 255 Working with base 2 numbering system 8 bits in each octet – 8 possible variations of 1 or 0

34 IP addresses decomposed Decompose 137.99.101.22

35 Classes of IP addresses There are different classes of IP addresses Determined by how many octets in prefix and how many in suffix IPv4 addresses have 32 total bits – 4 octets How octets are allocated between prefix / suffix IP addresses divided into 3 primary classes where each class has a different size prefix and suffix

36 Classes of IP addresses Classes A, B, and C are primary classes Used for host addresses Class D is used for multicast The class is determined by boundary between the network prefix and the suffix

37 Classes of IP addresses All IPv4 addresses have 32 TOTAL bits – 4 octets with 8 bits in each octet. The class determination dictates where the boundary between the network portion and the host portion of address is drawn.

38 Classes and dotted decimal Any value in range ALWAYS will have “0” as first bit Any value in range ALWAYS will have “10” as first two bits Any value in range ALWAYS will have “110” as first three bits Example: Class A – 119.x.x.x = 01110111 Example: Class B – 190.x.x.x = 10111110 Example: Class C – 200.x.x.x = 11001000

39 Division of address space IP address scheme doesn’t divide 32-bit address space into classes of equal size For example, class A, B, and C do NOT have the same number of addresses Half of ALL IP addresses lie in class A networks, but class A can only contain 126 networks

40 Classes of IP addresses You can tell which class by the first few bits Class A – 1 st bit always = 0 01100101 Class B – first bit always = 1, second bit always = 0 10111101 Class C – first 2 bits always = 1, third bit always = 0 11000011

41 IP Address Class Network and Host Bits ClassNetwork ID Bits Host ID Bits Number of Networks Number of Hosts A82412616,777,214 B16 16,38265,534 C2482,097,150254 7 14 21

42 Subnets As the Internet grew, original class-based addressing scheme proved insufficient The IPv4 class-based addressing scheme is very inflexible The choice of network class (size) is limited to either A, B, or C So, networks support fixed number of hosts: A) 16.77 million hosts / network B) 65,534 hosts / network C) 254 hosts / network

43 Subnets Subnetting or classless addressing allows division of boundary between suffix and prefix Effectively add more unique addresses within a given class More efficient allocation of addresses Provides additional flexibility within class- based addressing Administrators can “shift” or move the boundary between suffix and prefix

44 Subnet masks Subnetting requires the use of an additional piece of information called a subnet mask 32-bit value that specifies boundary between suffix and prefix Can change the class boundary Specifies which bits of an IP address are the network ID and which are the host ID The 1 bits are the network identifier bits The 0 bits are the host identifier bits

45 Default subnet masks ClassSubnet Mask A255.0.0.0 B255.255.0.0 C255.255.255.0 For class B, the first two octets represent the network ID – leaving the last two octets for host identification

46 Summary Routing How routers work Routing tables Static and Dynamic routing IP address space overview (most of lecture focuses on IPv4 address space, address decomposition, and subnetting


Download ppt "Routing and the IP v4 Address Space BSAD 141 Dave Novak Sources: Network+ Guide to Networks, Dean 2013."

Similar presentations


Ads by Google