Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Layer 3: Protocols Honolulu Community College Cisco Academy Training Center Semester 1 Version 2.1.1.

Similar presentations


Presentation on theme: "1 Layer 3: Protocols Honolulu Community College Cisco Academy Training Center Semester 1 Version 2.1.1."— Presentation transcript:

1 1 Layer 3: Protocols Honolulu Community College Cisco Academy Training Center Semester 1 Version 2.1.1

2 2 Overview n Router passes data packets between networks based on Layer 3 addresses. u Make decisions regarding the best path for delivery of data on the network. n How routers use a Layer 3 addressing scheme to make forwarding decisions. n ARP and RARP. n Routed vs Routing Protocols. n Distance-vector, link-state, and hybrid routing approaches.

3 3 Routers n Two addressing schemes used in networking: u MAC address, a data link (Layer 2) address; u Logical or network address (Layer 3); e.g. IP. n IP addresses are implemented in software. n Router use layer 3 addresses. u Path selection. u Routing updates (path information). u Switching function. n Routers are used to connect separate networks and to access the worldwide Internet.

4 4 Router Operation n Data (frames), from network A, reaches router. n Router strips off data link header. n Examines destination network address. n Checks routing table. n Encapsulate data in appropriate data link frame. n Sends data out interface B1.

5 5 Router Interface / Port n Router’s connection to a network is called an interface or port. n In IP routing, each interface has an address on a separate, unique network (or subnetwork). n Interface requires a valid address on the network it is connected to.

6 6 Assigning IP Addresses n Two general way to assign IP addresses: u static addressing. u dynamic addressing. n Static Addressing u Manually configure IP address for each device. n Dynamic Addressing u RARP - Reverse address resolution protocol. u BootP - BOOTstrap Protocol. u DHCP - Dynamic Host Configuration Protocol.

7 7 RARP - Reverse Address Resolution Protocol n Some devices don’t know their own IP address. u like diskless workstations, dummy terminals. n RARP - used to determine its own IP address knowing only its own MAC address. n RARP requires a RARP server. n Device sends RARP request (broadcast), and RARP server responds with correct IP address.

8 8 BOOTP - bootstrap protocol n Used by client at startup, to obtain IP address. n BOOTP uses UDP. n Client sends a broadcast using destination IP address of all 1s - 255.255.255.255. n BOOTP server responds with a broadcast. n Client checks MAC address of broadcast, if it matches, it takes IP address in the datagram. n Like RARP, but BOOTP datagrams can include IP address, default gateway, address of server, and a vendor-specific field. n Not designed to provide dynamic addresses.

9 9 DHCP - dynamic host configuration protocol n Successor to BOOTP; uses UDP. n DHCP allows a host to obtain an IP address quickly and dynamically. n Requires a defined range of IP addresses on a DHCP server. n As hosts come online they request an address from DHCP server. n DHCP server allocates address to host. u entire computer’s configuration can be obtained in one message (IP address and subnet mask).

10 10 DHCP Initialization Sequence To DHCP Server

11 11 DHCP Initialization Sequence n Client boots, enters an initialize state. n Sends DHCPDISCOVER broadcast. u UDP packets with BOOTP port number. n Enters into the select state. u collects DHCPOFFERs from DHCP server. u selects first response and negotiates lease time by sending a DHCPREQUEST. n DHCP server acknowledges with DHCPACK. n client enters bound state, begins using address.

12 n For communications: need two addresses: u MAC and IP. n Devices maintain an ARP table or cache, which maps IP to MAC addresses for all devices on its LAN. n When a source knows IP address of destination, it consults its ARP table to find MAC address for the destination. Communications

13 13 ARP- address resolution protocol n If IP address is known, but MAC address is unknown, communication cannot take place. n ARP is used to find the destination MAC address. n Source sends ARP Request.

14 14 ARP Request n A broadcast - to all nodes. u Has broadcast MAC address. n Contains source’s MAC and IP addresses (used by other devices to update ARP tables). n Device with specified IP address will respond (uni-cast) with its MAC address.

15 15 ARP Reply n A uni-cast - to only the workstation that sent ARP request. n Contains both workstations MAC and IP addresses. n When source has MAC & IP of destination, communications can occur.

16 16 Default Gateway n To communicate with a destination on another network, a device needs a default gateway. u IP address of router interface it is connected to. n With no default gateway, communication is possible only on the local network segment. n Source checks destination IP address and its own ARP table. u If no match, it needs a default IP address to use. n Without default gateway, source has no destination MAC address, and message is undeliverable.

17 17 Default Gateway (2) n With a default gateway defined, source host compares the destination IP address and its own IP address to determine if both are on the same segment. n If not on the same segment, the source host sends the data to the default gateway.

18 18 Proxy ARP (no default gateway set) n If unknown MAC is on another subnet or network, the ARP process must go thru a router. n Broadcasts are not forwarded by routers - so ARP request will not go to another network. n (Note: ARP is a local LAN operation.) n Then, a router (that knows how to get to the IP address) acts as a “proxy” and responds to the ARP request with its own (router’s) MAC. n Source will then send data packet with given IP address and the router’s MAC.

19 19 Routed Protocols n Protocols that provide support for the network layer are called routed or routable protocols. u Define addressing scheme, and data format. n Routed protocols: IP, IPX, Appletalk. n There are non-routable protocols that do not support Layer 3. u Most common non-routable protocol is NetBEUI. u Limited to running on one segment, no logical addressing support. n Routed protocols must be able to assign a network number & host number, to each device.

20 20 Routing Protocols n Routing protocols are used to exchange ‘routing’ information, provide routing updates for maintaining routing tables. n Examples of routing protocols: RIP, IGRP, OSPF, EIGRP. n Routing protocols enable routers to create a map of other routers in the network. u this allows routing (i.e. selecting the best path, and switching) to occur. u Such maps become part of each router's routing table.

21 21 RIP - Routing Information Protocol n Most common protocol used to transfer routing information between routers on same network. u Interior Gateway Protocol (IGP). n Calculates distances to destination in hops (how many routers a packet must pass through). n Sends routing updates every 30 seconds. n Distance vector routing protocol. u Determines distance (hops) and which direction to destination.

22 22 RIP Features

23 23 n Router receives frame, strips off frame header. n Checks destination IP address (in IP header). n Router checks routing table for best path to destination. n Router re-encapsulates data in data link layer frame, and sends it out appropriate interface. n If there is no match in the routing table, packet is dropped. Data Encapsulation

24 24 Multi-protocol Routing n Routers can maintain routing tables for several routed protocols, concurrently. u allows delivery of packets from several routed protocols over the same data links. Routers pass traffic for all routed protocols over the internetwork.

25 25 Connectionless Network Services n In a connectionless system the destination is not contacted before a packet is sent. n Each packet handled separately, and is sent. n Packets may take different paths through the network, but are reassembled at destination.

26 26 Connection-oriented Network Services n A connection is established between sender and the receiver before data is transferred. n Like the telephone system. n Data sent sequentially, arrives in order.

27 27 Connectionless vs Connection-oriented n Connectionless is packet switched. u Packet is switched and may take different routes. u Packets may arrive out of sequence. n Connection-oriented is circuit switched. u Connection is established, then data is sent. u All packets travel sequentially across same (virtual) circuit, and arrive in order. n IP is connectionless, best effort delivery. n TCP adds connection-oriented services on top of IP to reliably deliver data.

28 28 IP and Transport Layer n IP is connectionless, treats each packets independently. u IP does not send files in one long data stream. u Packets arrive out of sequence, some may be lost. n Transport layer protocol must determine whether packets are lost, and request retransmission. n Transport layer is also responsible for reordering the packets.

29 29 Importance of ARP tables n If MAC addresses are not known, broadcast traffic occurs - less efficient use of network. n Current ARP tables minimizes broadcasts. u ARP entries are time stamped and “aged out” (deleted after some hold time). n Other devices update their ARP tables from any ARP request, helping to minimize broadcasts.

30 30 ARP Tables n Routers keep ARP tables to map IP to MAC. n Routers connect different networks: u They have ARP data for devices (particularly other routers) on other networks. u They also have interfaces in ARP table (to perform routing).

31 31 Router Tables n Routers connect more than one network. n Have ARP info (IP and MAC) of devices on other networks, particularly routers. n Have interfaces - to be able to route data.

32 32 Indirect Routing n When a source needs to communicate with a destination on another network, it must use the services of a router. u The router is called a default gateway. u The process is called indirect routing. n Source uses the final destination IP, and the MAC of the router. u Router will re-encapsulate and route data on.

33 33 Routed vs Routing Protocols n Routed protocols define data format so that data can be ‘routed’. u Used to direct traffic thru the network. n Examples of routed protocols: IP, IPX, Appletalk. n Routing protocols are used to exchange ‘routing’ table information (routing updates). n Examples of routing protocols: RIP, IGRP, OSPF, EIGRP.

34 34 Routed Protocols define format n Routed protocols define the fields, sizes of fields for the data packet, as well as the structure of the network address. n The structure of the data packet and network address allow packets to be routed thru the network. IP Datagram

35 35

36 36 Interior vs Exterior Gateway Protocols n Autonomous System - collection of networks under a common administration sharing a common routing strategy. n IGP - used to route data within an autonomous system. u Examples: RIP, IGRP, OSPF, EIGRP. n EGP - used to route data between autonomous systems. u Example: BGP.

37 37 RIP - routing information protocol n Most common interior gateway protocol. n Distance vector class of protocol - gets information from neighboring routers only. n RIP uses hop count to determine best path. u Hop - number of routers the packet goes thru. u ‘Best path’ may not be the fastest. u Limitation of 15 as maximum hop count. n Routing updates occur every 30 seconds. u Updates are broadcasts. u May cause problems of excessive traffic.

38 38 IGRP & EIGRP n Cisco’s proprietary routing protocols. n IGRP is a distance vector routing protocol (IGP). u Designed for large networks, 255 is max hop. n IGRP metrics (for best path selection): u Bandwidth, load, delay, reliability. u Usually selects ‘better’ routes than RIP. n IGRP routing updates - every 90 secs. n EIGRP - enhanced IGRP (also an IGP). n EIGRP is a balanced hybrid class of protocol. u Updates are event-triggered (link state). u Uses same metrics as IGRP (distance vector).

39 39 OSPF- open shortest path first n OSPF is a link-state routing protocol (IGP). u Updates are flooded to all nodes and link-state routers build a global view of the network. n Requires more computing power than distance vector class. n For best path selection, uses cost metric which factors in: route speed, traffic, reliability, security.

40 40 Routing Tables n Routing table contains best route to destinations networks. u Static routes, Dynamic routes, Default routes. n Static routes - manually entered by administator. n Dynamic routes - learned automatically from routing updates (routing protocols). n Default routes - used when no explicit route exists in routing table.

41 41 Why Static Routing? n Useful if you want to control which path a router will select. u to test a particular link in the network. u to conserve wide area bandwidth. n Static routing is preferred method for stub networks, only one path to stub network.

42 42 Dynamic Routing n Dynamic routing occurs when routers send automatic routing updates to each other. u Automatic recalculation of new best route. u Automatic update of routing table. n Routers can adjust dynamically to changing network conditions. n Works best when bandwidth and large amounts of network traffic are not issues.

43 43 RIP Routing n Sending packet from A to Z. n A uses Z’s IP, and router 1’s MAC, and sends packet. n Router 1 gets packet, removes MAC header, and sends up to network layer. It checks routing table, and re-encapsulates with MAC of router 2, and forwards out port to subnet 4. n Note: other workstations on Subnet 1 will discard the packet since it has Router 1’s MAC addr.

44 44 RIP Routing n Sending packet from A to Z. n Router 2 gets the packet, removes MAC header and sends it up to the network layer. Again the routing table is checked, and the data is re-encapsulated with MAC of router 3, and forwarded out port to Subnet 5. n Router 3 knows MAC of Z, re- encapsulates data and forwards to subnet 8 (where host Z is).

45 45 RIP Routing n How data is routed thru a network and the OSI model.

46 46 Summary n Network layer functions include network addressing and best path selection. n ARP u To find unknown MAC from known IP address. u ARP request is MAC broadcast. n Dynamically obtaining IP addresses. u RARP, BOOTP, DHCP. n All devices, even routers,build ARP tables that map IP addresses to MAC addresses.

47 47 Summary (2) n If source wants to communicate with a destination on a different network, it will use the router as a default gateway. u Proxy ARP. u Indirect routing. n Routed protocols allow traffic to be routed thru the network. n Routing protocols provide for routing updates to main routing tables. n Connection-oriented - circuit switched. u Link established, then data sent.

48 48 Summary (2) n Connectionless - packet switched. u Packets handled individually, may take different routes, arrive out of sequence. u No acknowlegements, no setting up of link. n Interior vs Exterior Gateway Protocols. u IGP - within autonomous system u EGP - between autonomous systems. n Static vs Dynamic routing. u Static - manually entered, good for stub networks. u Dynamic - learned automatically from routing protocols. The End


Download ppt "1 Layer 3: Protocols Honolulu Community College Cisco Academy Training Center Semester 1 Version 2.1.1."

Similar presentations


Ads by Google