Download presentation
Presentation is loading. Please wait.
Published byGary Miles Modified over 8 years ago
1
Stejarel Veres Network Layer Fundamentals 3 rd Tutorial Session for CEG3180B February 1 st, 2005
2
2Stejarel Veres The ISO OSI Model A conceptual, layered model for designing networked systems (i.e., both the hardware and software components that relate to networking a certain system) 7 Layers (from top to bottom): Application, Presentation, Session, Transport, Network, Data Link, Physical The higher the layer, the more abstract its functions are with respect to the actual physical transmission
3
3Stejarel Veres The ISO OSI Model A conceptual, layered model for designing networked systems (i.e., both the hardware and software components that relate to networking a certain system) 7 Layers (from top to bottom): Application, Presentation, Session, Transport, Network, Data Link, Physical The higher the layer, the more abstract its functions are with respect to the actual physical transmission
4
4Stejarel Veres The ISO OSI Model (cont’d) Allows for transparent peer-to-peer communication between same layers of two networked systems Top four layers: “network layers”; the other three layers: “host layers” Beginning with the upmost half of the Data Link Layer (the LLC Sub-Layer), operations are media-independent
5
5Stejarel Veres The Network Layer Two fundamental functions: Logical network topology and Addressing Path determination (i.e., Datagram routing) The rest of this discussion focuses on the IP (Internet Protocol), version 4 (IPv4) of the TCP/IP Protocol Stack
6
6Stejarel Veres Original IPv4 Addressing 32-bit addresses (010010111…) Most of the times written in the “dotted-decimal” format: 4 numbers between 0 and 255, separated by dots E.g., 137.122.14.100 Theoretically to yield 2 32 ~ 4.3 billion addresses
7
7Stejarel Veres Original IPv4 Addressing (cont’d) Address space divided into “classes of addresses” based on the size of the networks it was supposed to be allocated to: Class A – large size networks Class B – medium size networks Class C – small size networks Class D – special (multicast) Class E – special (reserved)
8
8Stejarel Veres Original IPv4 Addressing (cont’d) Address space divided into “classes of addresses” based on the size of the networks it was supposed to be allocated to: Class A – large size networks Class B – medium size networks Class C – small size networks Class D – special (multicast) Class E – special (reserved)
9
9Stejarel Veres Path Determination I.e., datagram (packet) routing The “hop-by-hop” routing paradigm: packet passes from router to router, each step bringing it closer to the destination If a packet travels too many hops, it is discarded (in order to prevent routing loops)
10
10Stejarel Veres Path Determination I.e., datagram (packet) routing The “hop-by-hop” routing paradigm: packet passes from router to router, each step bringing it closer to the destination If a packet travels too many hops, it is discarded (in order to prevent routing loops)
11
11Stejarel Veres Path Determination (cont’d) Routers maintain “routing tables” containing, for each known destination network address: The output interface for that destination The next hop address for that destination Routing tables updated statically (“by hand”) or dynamically (by using dynamic routing protocols)
12
12Stejarel Veres Static vs. Dynamic Routing Static is: Simpler to configure, yet more difficult to maintain Very low CPU time-consuming and memory- consuming Not at all suited for large networks and only marginally suited for redundant topologies Dynamic is: More difficult to configure, but need not be manually maintained up to date Usually more CPU time-consuming and memory- consuming Virtually a must for redundant topologies and larger networks
13
13Stejarel Veres Simple Routing Algorithm 1.Examine destination address to determine if class A, B or C 2.Extract the network part from the address 3.Search for the destination network in the routing table 4.If found, and next hop is reachable: route out the specified interface to the next hop 5.Otherwise, discard the packet and send ICMP Destination Host/Network Unreachable message to the sender
14
14Stejarel Veres Original IPv4 Addressing Issues 1.Inefficient address space allocation - a large part of the address space is being wasted 2.Inefficient routing – large routing tables, routing processes very CPU intensive
15
15Stejarel Veres Solutions Devised 1.Subnetting 2.Default routing; Classless Inter- Domain Routing (CIDR), also known as “Supernetting”
16
16Stejarel Veres Subnetting “Borrowing” bits from the host portion for the network portion of the address Network addresses expressed as pairs of “address” and “subnet mask” The concept of “classes” becomes obsolete, yet designs have sometimes to accommodate older equipment with no knowledge of subnetting
17
17Stejarel Veres “Borrowing” bits from the host portion for the network portion of the address Network addresses expressed as pairs of “address” and “subnet mask” The concept of “classes” becomes obsolete, yet designs have sometimes to accommodate older equipment with no knowledge of subnetting Subnetting
18
18Stejarel Veres Subnet Masks 32-bit strings with a contiguous left side of 1’s and a contiguous right side of 0’s The number of 1’s (the “length” of the subnet mask): how many bits of the address corresponds to the network part
19
19Stejarel Veres Subnet Masks (cont’d) Written either in dotted-decimal format, or as /number_of_1’s (/length) Original classes of addresses: A – 255.0.0.0 (/8) B – 255.255.0.0 (/16) C – 255.255.255.0 (/24)
20
20Stejarel Veres Default Routing Specifies a way to handle packets for which no specific entry exists in the routing table “Fall-back”: the packed is routed via a “default gateway” that is supposed to know better what to do with it Especially useful for “stub networks” Helps keeping routing tables small Default route entry: 0.0.0.0/0
21
21Stejarel Veres Classless Inter-Domain Routing Grouping a number of contiguous network addresses into a larger routing table entry E.g., 192.168.8.0/24 through 192.168.15.0/24 can be written as 192.168.8.0/21 Helps keeping routing tables small
22
22Stejarel Veres Modified Routing Algorithm 1.For each routing table entry: perform AND between destination address and entry subnet mask; if result equals the entry network address and entry more specific (i.e., longer subnet mask) than the previous one, keep it and discard the other 2.If matched, and next hop is reachable: route out the specified interface to the next hop 3.Otherwise, discard the packet and send ICMP Destination Host/Network Unreachable message to the sender
23
23Stejarel Veres Subnetting Examples Given the following two address/mask pairs, how can we tell whether they are on the same subnet or not? 192.168.0.5/28 and 192.168.0.18/28 1.AND 192.168.0.5 and 255.255.255.240 (/28) = 192.168.0.0 2.AND 192.168.0.18 and 255.255.255.240 = 192.168.0.16 NO (192.168.0.0 != 192.168.0.16)
24
24Stejarel Veres Subnetting Examples (cont’d) Given the following two address/mask pairs, how can we tell whether they are on the same subnet or not? 192.168.0.66/26 and 192.168.0.90/26 1.AND 192.168.0.66 and 255.255.255.192 (/26) = 192.168.0.64 2.AND 192.168.0.90 and 255.255.255.192 = 192.168.0.64 YES (192.168.0.64 == 192.168.0.64)
25
25Stejarel Veres Subnetting Examples (cont’d) Given the following address/mask pair, can you determine the subnet address and the address range for that subnet? 192.168.32.115/29 1.AND 192.168.32.115 and 255.255.255.248 (/29) = 192.168.32.112 (subnet address) 2.OR 192.168.32.112 and NOT 255.255.255.248 = 192.168.32.119 (broadcast address) Address range: 192.168.32.112-119 (6 usable addresses, 113-118)
26
26Stejarel Veres Routing Table Example Given the following routing table: 192.168.1.0 255.255.255.0 Serial0 192.168.1.0 255.255.255.240 Serial1 0.0.0.0 0.0.0.0 Serial2 Address 192.168.1.20 will route by entry 1 Address 192.168.1.5 will route by entry 2 Address 192.168.3.35 will route by entry 3 (via the default gateway)
27
27Stejarel Veres Dynamic Routing Protocols Can be classified from multiple points of view By the algorithm they use for building routing tables: Distance Vector: use “distance” metrics Link State: use “cost” metrics and SPF algorithms Hybrid By the way they use and advertise subnet information: Classless: they accept and advertise subnets Classful: they ignore and don’t advertise subnets By their intended use: Exterior Gateway Protocols (EGP): inter-AS Interior Gateway Protocols (IGP): intra-AS
28
28Stejarel Veres Examples of Routing Protocols RIPv1: IGP, distance vector, classful RIPv2: IGP, distance vector, classless IGRP (Cisco): IGP, distance vector, classful EIGRP (Cisco): IGP, advanced distance vector (sometimes called “hybrid”), classless OSPF, IS-IS: IGP, link state, classless BGP-4: EGP, hybrid, classless
29
29Stejarel Veres Distance Vector vs. Link State Distance Vector are: Simpler Less CPU time-consuming and often less memory- consuming Slower-converging More bandwidth-consuming Less scalable Link State are: More complicated CPU and memory intensive Faster-converging Less bandwidth-consuming Very scalable
30
30Stejarel Veres So, Which One To Choose? Distance vector: in small and simple networks, or in networks with slower- CPU and small-sized memory routers Link state: in large networks, and in networks requiring Shortest Path Tree calculation for the purpose of Traffic Engineering (i.e., MPLS-TE)
31
31Stejarel Veres Our Labs Will consist of configuring Cisco routers for Static Routing (Lab 2), for OSPF routing within a single area (Lab 3), and for OSPF routing within a multi-area topology (Lab 4) Technical documentation to be consulted listed in the References section of this presentation
32
32Stejarel Veres References 1.J. Postel, STD0005/RFC0791: Internet Protocol 2.J. Postel, STD0005/RFC0792: Internet Control Message Protocol 3.J. C. Mogul, J. Postel, STD0005/RFC0950: Internet Standard Subnetting Procedure 4.Y. Rekhter, T. Li, RFC1518: An Architecture for IP Address Allocation with CIDR 5.IANA, RFC3330: Special-Use IPv4 Addresses 6.Y. Rekhter, B. Moskowitz, D. Karrenberg, G. J. de Groot, E. Lear, RFC1918: Address Allocation for Private Internets 7.Cisco IOS IP Command Reference, Volume 1 of 4: Addressing and Services, Release 12.3 http://www.cisco.com/univercd/cc/td/doc/product/software/ios12 3/123cgcr/ipras_r/ip1bookg.pdf 8.Cisco IOS IP Command Reference, Volume 2 of 4: Routing Protocols, Release 12.3 http://www.cisco.com/univercd/cc/td/doc/product/software/ios12 3/123cgcr/iprrp_r/ip2bookg.pdf
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.