CCNA R&S: Introduction To Networks

Transcription

CCNA R&S: Introduction to NetworksChapter 6:The Network LayerFrank Schneemann

6.0.1.1 Introduction

6.0.1.2 Activity – The Road Less Traveled

6.1.1.1 The Network LayerThe network layer, or OSI Layer 3,provides services to allow end devicesto exchange data across the network.To accomplish this end-to-endtransport, the network layer uses fourbasic processes: Addressing Encapsulation Routing De-encapsulation

6.1.1.2 Network Layer ProtocolsOther legacy networklayer protocols that arenot widely usedinclude: Novell InternetworkPacket Exchange (IPX) AppleTalk ConnectionlessNetwork Service(CLNS/DECNet)

6.1.2.1 Characteristics of IPThe basiccharacteristics of IPare: Connectionless - Noconnection withthe destination isestablished beforesending datapackets. Best Effort(unreliable) Packet delivery isnot guaranteed. Media Independent Operation isindependent of themedium carryingthe data.

6.1.2.2 IP – ConnectionlessIP is connectionless and,therefore, requires noinitial exchange of controlinformation to establishan end-to-end connectionbefore packets areforwarded. IP also doesnot require additionalfields in the protocol dataunit (PDU) header tomaintain an establishedconnection.

6.1.2.3 IP – Best Effort DeliveryUnreliable simply meansthat IP does not have thecapability to manage andrecover from undeliveredor corrupt packets. This isbecause while IP packetsare sent with informationabout the location ofdelivery, it contains noinformation that can beprocessed to inform thesender whether deliverywas successful. There is nosynchronization dataincluded in the packetheader

6.1.2.4 IP – Media Independentone major characteristic of themedia that the network layerconsiders: the maximum size of thePDU that each medium cantransport. This characteristic isreferred to as the maximumtransmission unit (MTU). Part ofthe control communicationbetween the data link layer and thenetwork layer is the establishmentof a maximum size for the packet.The data link layer passes the MTUvalue up to the network layer. Thenetwork layer then determineshow large packets should be

6.1.2.5 Encapsulating IP Data Segments Packets Frames Bits

6.1.2.6 Activity - IP Characteristics

6.1.3.1 IPv4 Packet Header Version - Contains a 4-bit binary valueidentifying the IP packet version. ForIPv4 packets, this field is always set to0100. Differentiated Services DS field is an 8bit field used to determine the priorityof each packet. Time-to-Live (TTL) - Contains an 8-bitbinary value that is used to limit thelifetime of a packet. Protocol - This 8-bit binary valueindicates the data payload type thatthe packet is carrying Source IP Address - Contains a 32-bitbinary value that represents the sourceIP address of the packet. Destination IP Address - Contains a 32bit binary value that represents thedestination IP address of the packet.

6.1.3.2 IPv4 Header Fields Internet Header Length (IHL) - Contains a 4bit binary value identifying the number of32-bit words in the header. Total Length - Sometimes referred to as thePacket Length, this 16-bit field defines theentire packet (fragment) size Header Checksum - The 16-bit field is usedfor error checking of the IP headerA router may have to fragment a packet whenforwarding it from one medium to anothermedium that has a smaller MTU. Identification - This 16-bit field uniquelyidentifies the fragment of an original IPpacket. Flags - This 3-bit field identifies how thepacket is fragmented. Fragment Offset - This 13-bit field identifiesthe order in which to place the packetfragment in the reconstruction of theoriginal unfragmented packet.

6.1.3.3 Sample IPv4 HeadersWireshark is a usefulnetwork monitoringtool for anyoneworking withnetworks and can beused with most labsin the Cisco CertifiedNetwork Associate(CCNA) courses fordata analysis andtroubleshooting. Itcan be used to viewsample valuescontained in IPheader fields.

6.1.3.4 Activity - IPv4 Header Fields

6.1.4.1 Limitations of IPv4 IP address depletion - IPv4 has a limited number of unique public IPaddresses available. Although there are approximately 4 billion IPv4addresses, the increasing number of new IP-enabled devices, always-onconnections, and the potential growth of less-developed regions haveincreased the need for more addresses. Internet routing table expansion - A routing table is used by routers to makebest path determinations. As the number of servers (nodes) connected to theInternet increases, so too does the number of network routes. These IPv4routes consume a great deal of memory and processor resources on Internetrouters. Lack of end-to-end connectivity - Network Address Translation (NAT) is atechnology commonly implemented within IPv4 networks. NAT provides a wayfor multiple devices to share a single public IP address. However, because thepublic IP address is shared, the IP address of an internal network host ishidden. This can be problematic for technologies that require end-to-endconnectivity.

6.1.4.2 Introducing IPv6Improvements that IPv6provides include: Increased addresses Improved packet Eliminates the need forNAT Integrated security IPv6 natively supportsauthentication andprivacy capabilities

6.1.4.3 Encapsulating IPv6

6.1.4.4 IPv6 Packet Header

6.1.4.5 Sample IPv6 HeaderWhen viewing IPv6 Wiresharkcaptures, notice that the IPv6header has markedly fewer fieldsthan an IPv4 header. This makesthe IPv6 header easier andquicker for the router to process.The IPv6 address itself looks verydifferent. Because of the larger128-bit IPv6 addresses, thehexadecimal numbering system isused to simplify the addressrepresentation. IPv6 addressesuse colons to separate entriesinto a series of 16-bit hexadecimalblocks.

6.1.4.6 Activity - IPv6 Header Fields

6.2.1.1 Host Forwarding Decision Itself - A host can ping itself by sending a packet to aspecial IPv4 address of Local host - This is a host on the same network as thesending host. The hosts share the same networkaddress. Remote host - This is a host on a remote network.The hosts do not share the same network address.

6.2.1.2 Default GatewayIt is important to note thatthe default route, andtherefore, the defaultgateway, is only used when ahost must forward packets toa remote network. It is notrequired, nor even needs tobe configured, if only sendingpackets to devices on thelocal network

6.2.1.3 IPv4 Host Routing TableEntering the netstat -rcommand or the equivalentroute print command, displaysthree sections related to thecurrent TCP/IP networkconnections: Interface List – IPv4 Route Table – IPv6 Route Table -

6.2.1.4 IPv4 Host Routing EntriesTo help simplify the output,the destination networkscan be grouped into fivesections as identified by thehighlighted areas on thefollowing slide:

0.0.0.0The local default route; that is, all packets with destinations that do not match other specified addresses in the routingtable are forwarded to the gateway. Therefore, all non-matching destination routes are sent to the gateway with IP address192.168.10.1 (R1) exiting from the interface with IP address 192.168.10.10. Note that the final destination addressspecified in the packet does not change; rather, the host simply knows to forward the packet to the gateway for furtherprocessing.127.0.0.0 – 127.255.255.255These loopback addresses all relate to the direct connection and provide services to the local host.192.168.10.0 - 192.168.10.255These addresses all relate to the host and local network. All packets with destination addresses that fall into this categorywill exit out of the 192.168.10.10 interface. 192.168.10.0 - The local network route address; represents all computers on the 192.168.10.x network. 192.168.10.10 - The address of the local host. 192.168.10.255 - The network broadcast address; sends messages to all hosts on the local network route.224.0.0.0These are special multicast class D addresses reserved for use through either the loopback interface (127.0.0.1) or the hostIP address (192.168.10.10).255.255.255.255The last two addresses represent the limited broadcast IP address values for use through either the loopback interface(127.0.0.1) or the host IP address (192.168.10.10). These addresses can be used to find a DHCP server before the local IP isdetermined

6.2.1.5 Sample IPv4 Host Routing Tableif PC1 wanted to send a packet to192.168.10.20, it would:1. Consult the IPv4 Route Table.2. Match the destination IP addresswith the 192.168.10.0 NetworkDestination entry to reveal that thehost is on the same network (Onlink).3. PC1 would then send the packettoward the final destination usingits local interface (192.168.10.10).

6.2.1.5 Sample IPv4 Host Routing TableIf PC1 wanted to send a packet to aremote host located at 10.10.10.10, itwould:1. Consult the IPv4 Route Table.2. Find that there is no exact match forthe destination IP address.3. Choose the local default route(0.0.0.0) to reveal that it shouldforward the packet to the192.168.10.1 gateway address.4. PC1 then forwards the packet to thegateway for using its local interface(192.168.10.10). The gateway devicethen determines the next path forthe packet to reach the finaldestination address of 10.10.10.10.

6.2.1.6 Sample IPv6 Host Routing TableThe IPv6 Route Table section displays fourcolumns which identify: If - Lists the interface numbers from theInterface List section of the netstat –rcommand. The interface numberscorrespond to the network capableinterface on the host, including Ethernet,Wi-Fi, and Bluetooth adapters. Metric - Lists the cost of each route to adestination. Lower numbers indicatepreferred routes. Network Destination - Lists thereachable networks. Gateway - Lists the address used by thelocal host to forward packets to a remotenetwork destination. On-link indicatesthat the host is currently connected to it.

6.2.1.7 Activity - Identify Elements of a Host Routing Table Entry

6.2.2.1 Router Packet Forwarding Decision

6.2.2.2 IPv4 Router Routing TableWhen a packet arrives at therouter interface, the routerexamines the packet header todetermine the destinationnetwork. If the destinationnetwork matches a route in therouting table, the router forwardsthe packet using the informationspecified in the routing table. Ifthere are two or more possibleroutes to the same destination,the metric is used to decidewhich route appears on therouting table.

6.2.2.3 Directly Connected Routing Table EntriesThe routing table stores informationabout both directly-connected andremote routes. As with directlyconnected networks, the route sourceidentifies how the route was learned. Forexample, common codes for remotenetworks include: S - Identifies that the route wasmanually created by an administrator toreach a specific network. This is known asa static route. D - Identifies that the route waslearned dynamically from another routerusing the Enhanced Interior GatewayRouting Protocol (EIGRP). O - Identifies that the routewas learned dynamically from anotherrouter using the Open Shortest Path First(OSPF) routing protocol.

6.2.2.4 Remote Network Routing Table Entries

6.2.2.5 Next-Hop AddressPackets cannot be forwarded by therouter without a route for thedestination network in the routing table.If a route representing the destinationnetwork is not in the routing table, thepacket is dropped (that is, notforwarded).However, just as a host can use a defaultgateway to forward a packet to anunknown destination, a router can alsobe configured to use a default staticroute to create a Gateway of Last Resort.The Gateway of Last Resort will becovered in more detail in the CCNARouting course

6.2.2.6 Sample Router IPv4 Routing TableThe following examples illustratehow a host and a router makepacket routing decisions byconsulting their respectiverouting tables:Follow the various routing tablesand illustrations to learn howrouting works

6.2.2.7 Activity - Identify Elements of a Router Routing Table Entry

6.2.2.8 Lab - View Host Routing Tables

6.3.1.1 A Router is a ComputerThere are many types of infrastructure routers available. In fact, Cisco routers are designed to address theneeds of: Branch - Teleworkers, small business, and medium-size branch sites. Includes Cisco 800, 1900, 2900,and 3900 Integrated Series Routers (ISR) G2 (2nd generation). WAN - Large businesses, organizations, and enterprises. Includes the Cisco Catalyst 6500 SeriesSwitches and the Cisco Aggregation Service Router (ASR) 1000. Service Provider - Large service providers. Includes Cisco ASR 1000, Cisco ASR 9000, Cisco XR 12000,Cisco CRS-3 Carrier Routing System, and 7600 Series routers.The focus of CCNA certification is on the branch family of routers. The figure displays the Cisco 1900, 2900,and 3900 ISR G2 family of routers.Regardless of their function, size or complexity, all router models are essentially computers. Just likecomputers, tablets, and smart devices, routers also require:

6.3.1.2 Router CPU and OSThe CPU requires an OS to provide routing and switching functions. The Cisco InternetworkOperating System (IOS) is the system software used for most Cisco devices regardless ofthe size and type of the device. It is used for routers, LAN switches, small wireless accesspoints, large routers with dozens of interfaces, and many other devices.

6.3.1.3 Router Memory

6.3.1.4 Inside a RouterAlthough there are severaldifferent types and models ofrouters, every router has thesame general hardwarecomponents.The figure shows the inside of aCisco 1841 first generation ISR.Click the components to see abrief description of thecomponents.

6.3.1.5 Router Backplane Enhanced high-speed WANinterface card (EHWIC) slots Two slots that providemodularity and flexibility byenabling the router to supportdifferent types of interfacemodules, including Serial, digitalsubscriber line (DSL), switchport, and wireless.

6.3.1.6 Connecting to a Router

6.3.1.7 LAN and WAN Interfaces Console - Uses a low speedserial or USB connection toprovide direct connect, out-ofband management access to aCisco device. Telnet or SSH - Two methodsfor remotely accessing a CLIsession across an activenetwork interface. AUX port - Used for remotemanagement of the routerusing a dial-up telephone lineand modem.

6.3.1.8 Activity - Identify Router Components

6.3.1.9 Lab - Exploring Router Physical Characteristics

6.3.1.10 Packet Tracer - Exploring Internetworking Devices

6.3.2.1 Cisco IOS The IOS file itself is severalmegabytes in size and similarto Cisco IOS switches, is storedin flash memory. Using flash allows the IOS to beupgraded to newer versions orto have new features added. During bootup, the IOS iscopied from flash memory intoRAM. DRAM is much faster thanflash; therefore, copying theIOS into RAM increases theperformance of the device.

6.3.2.2 Bootset Files

6.3.2.3 Router Bootup ProcessThe curriculum illustrates the step by stepprocess of booting up

6.3.2.4 Show Version OutputYou can use the show version command toverify and troubleshoot some of the basichardware and software components of therouter. The command displays informationabout the version of the Cisco IOS softwarecurrently running on the router, the version ofthe bootstrap program, and information aboutthe hardware configuration, including theamount of system memory.

6.3.2.5 Video Demonstration - The Router Boot Process

6.3.2.6 Activity - The Router Boot Process

6.4.1.1 Router Configuration Steps

6.4.1.1 Router Configuration Steps

6.4.1.1 Router Configuration Steps

6.4.1.1 Router Configuration Steps

6.4.1.1 Router Configuration Steps

6.4.1.2 Packet Tracer - Configure Initial Router SettingsIn this activity, you willperform basic routerconfigurations. You willsecure access to the CLI andconsole port using encryptedand plain text passwords.You will also configuremessages for users logginginto the router. Thesebanners also warnunauthorized users thataccess is prohibited. Finally,you will verify and save yourrunning configuration.

6.4.2.1 Configure LAN Interfaces

6.4.2.2 Verify Interface ConfigurationOther interface verificationcommands include: show ip route - Displays thecontents of the IPv4 routing tablestored in RAM. show interfaces - Displaysstatistics for all interfaces on thedevice. show ip interface - Displays theIPv4 statistics for all interfaces on arouter.

6.4.3.1 Default Gateway on a Host

6.4.3.2 Default Gateway on a SwitchA default gateway isused by all devicesthat require the useof a router todetermine the bestpath to a remotedestination. Enddevices requiredefault gatewayaddresses, but so dointermediate devices,such as the Cisco IOSswitch.The IP address information on a switch is only necessary to manage the switchremotely. In other words, to be able to telnet to the switch, the switch must have anIP address to Telnet to. If the switch is only accessed from devices within the localnetwork, only an IP address is required.

6.4.3.3 Packet Tracer - Connect a Router to a LAN

6.4.3.4 Packet Tracer - Troubleshooting Default Gateway Issues

6.4.3.5 Lab - Initializing and Reloading a Router and Switch

6.5.1.1 Class Activity – Can You Read This Map?

6.5.1.2 Packet Tracer - Skills Integration Challenge

6.5.1.3 Summary

6.5.1.3 SummarySummaryThe network layer, or OSI Layer 3, provides services to allow end devices to exchange dataacross the network. To accomplish this end-to-end transport, the network layer uses fourbasic processes: IP addressing for end devices, encapsulation, routing, and deencapsulation.The Internet is largely based on IPv4, which is still the most widely-used network layerprotocol. An IPv4 packet contains the IP header and the payload. However, IPv4 has alimited number of unique public IP addresses available. This led to the development of IPversion 6 (IPv6). The IPv6 simplified header offers several advantages over IPv4, includingbetter routing efficiency, simplified extension headers, and capability for per-flowprocessing. Plus, IPv6 addresses are based on 128-bit hierarchical addressing as opposed toIPv4 with 32 bits. This dramatically increases the number of available IP addresses

(CCNA) courses for data analysis and troubleshooting. It can be used to view sample values contained in IP header fields. 6.1.3.4 Activity - IPv4 Header Fields. 6.1.4.1 Limitations of IPv4 IP address depletion - IPv4 has a limited number of unique public IP addresses available. Although there are approximately 4 billion IPv4