Document Details

CredibleChrysoprase428

Uploaded by CredibleChrysoprase428

2013

Tags

network layer routing IP protocols computer networking

Full Transcript

CCNA Routing and Switching Overview June 2013 © 2012 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2 Chapter 5 Network Layer CCNA Routing and Switching Introduction to Networks ITE PC v4.0 Chapter 1...

CCNA Routing and Switching Overview June 2013 © 2012 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2 Chapter 5 Network Layer CCNA Routing and Switching Introduction to Networks ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 3 Objectives ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 4 1. Introduction ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 5 2. The Network Layer  The network layer, or OSI Layer 3, provides services to allow end devices to exchange data across the network. To accomplish this end-to-end transport, the network layer uses four basic processes: – Addressing end devices - end devices must be configured with a unique IP address for identification on the network. – Encapsulation - The network layer receives a protocol data unit (PDU) from the transport layer. The network layer adds IP header information, such as the IP address of the source (sending) and destination (receiving) hosts. The PDU is called a packet. – Routing - The network directs packets to a destination host on another network. To travel to other networks. The role of the router is to select paths for and direct packets toward the destination host in a process known as routing – De-encapsulation - When the packet arrives at the network layer of the destination host, the host checks the IP header of the packet. If the destination IP address within the header matches its own IP address, the IP header is removed from the packet. This process of removing headers from lower layers is known as de- ITE encapsulation. PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 6 3. Network Layer Protocols  There are several network layer protocols in existence; however, only the following two are commonly implemented as show in the figure: –Internet Protocol version 4 (IPv4) –Internet Protocol version 6 (IPv6)  Other legacy network layer protocols that are not widely used include: –Novell Internetwork Packet Exchange (IPX) –AppleTalk –Connectionless Network Service (CLNS/DECNet) ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 7 4. Characteristics of IP  The basic characteristics of IP are: –Connectionless - No connection with the destination is established before sending data packets. –Best Effort (unreliable) - Packet delivery is not guaranteed. –Media Independent - Operation is independent of the medium carrying the data. ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 8 4.1 IP – Connectionless  IP is connectionless, meaning that no dedicated end-to-end connection is created before data is sent.  Connectionless communication is conceptually similar to sending a letter to someone without notifying the recipient in advance.  Connectionless data communications work on the same principle. ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 9 4.2 IP – Best Effort Delivery  IP is often referred to as an unreliable or best-effort delivery protocol. This does not mean that IP works properly sometimes and does not function well at other times, nor does it mean that it is a poor data communications protocol.  Unreliable simply means that IP does not have the capability to manage and recover from undelivered or corrupt packets. This is because while IP packets are sent with information about the location of delivery, it contains no information that can be processed to inform the sender whether delivery was successful. There is no synchronization data included in the packet header for tracking the order of packet delivery. There are also no acknowledgments of packet delivery with IP, and there is no error control data to track whether packets were delivered without corruption. Packets may arrive at the destination corrupted, out of sequence, or not at all. Based on the information provided in the IP header, there is no capability for packet retransmissions if errors such as these occur.  If out-of-order or missing packets create problems for the application using the data, then upper layer services, such as TCP, must resolve these issues. ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 10 4.3 IP – Media Independent  IP operates independently of the media that carry the data at lower layers of the protocol stack.  It is the responsibility of the OSI data link layer to take an IP packet and prepare it for transmission over the communications medium. This means that the transport of IP packets is not limited to any particular medium.  There is, however, one major characteristic of the media that the network layer considers: the maximum size of the PDU that each medium can transport. This characteristic is referred to as the maximum transmission unit (MTU). Part of the control communication between the data link layer and the network layer is the establishment of Router may have to fragment a a maximum size for the packet. The data link layer passes the MTU value up to the packet when forwarding it from network layer. The network layer then one medium to another medium determines how large packets should be. ITE PC v4.0 Chapter 1 that has a smaller MTU. © 2007 Cisco Systems, Inc. All rights reserved. 11Cisco Public 5.  Encapsulating IP IP encapsulates, or packages, the transport layer segment by adding an IP header. This header is used to deliver the packet to the destination host. The IP header remains in place from the time the packet leaves the network layer of the source host until it arrives at the network layer of the destination host.  The process of encapsulating data layer by layer enables the services at the different layers to develop and scale without affecting other layers. This means that transport layer segments can be readily packaged by IPv4 or IPv6 or by any new protocol that might be developed in the future.  Routers can implement these different network layer protocols to operate concurrently over a network to and from the same or different hosts.  The routing performed by these intermediate device only considers the contents of the packet header that encapsulates the segment. In all cases, the data portion of the packet, that is, the encapsulated transport layer PDU, remains unchanged ITE PC v4.0 Chapter 1 during the network layer processes.© 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 12 6. IPv4 Packet  Projects Agency Network (ARPANET), which was the precursor to the Internet. The Internet is largely based on IPv4, which is still the most widely-used network layer protocol.  An IPv4 packet has two parts: – IP Header - Identifies the packet characteristics. – Payload - Contains the Layer 4 segment information and the actual data.  An IPv4 packet header consists of fields containing important information about the packet. These fields contain binary numbers which are examined by the Layer 3 process. The binary values of each field identify various settings of the IP packet.  Significant fields in the IPv4 header include: – Version - Contains a 4-bit binary value identifying the IP packet version. For IPv4 packets, this field is always set to 0100. – Differentiated Services (DS) - Formerly called the Type of Service (ToS) field, the DS field is an 8- bit field used to determine the priority of each packet. The first 6 bits identify the Differentiated Services Code Point (DSCP) value that is used by a quality of service (QoS) mechanism. The last 2 bits identify the explicit congestion notification (ECN) value that can be used to prevent dropped packets during times of network congestion. – Time-to-Live (TTL) - Contains an 8-bit binary value that is used to limit the lifetime of a packet. It is specified in seconds but is commonly referred to as hop count. The packet sender sets the initial time-to-live (TTL) value and is decreased by one each time the packet is processed by a router, or hop. If the TTL field decrements to zero, the router discards the packet and sends an Internet Control Message Protocol (ICMP) Time Exceeded message to the source IP address. The traceroute command uses this field to identify the routers used between the source and destination. ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 13 6. IPv4 Packet (cont.) – Protocol - This 8-bit binary value indicates the data payload type that the packet is carrying, which enables the network layer to pass the data to the appropriate upper- layer protocol. Common values include ICMP (0x01), TCP (0x06), and UDP (0x11). – Source IP Address - Contains a 32-bit binary value that represents the source IP address of the packet. – Destination IP Address - Contains a 32-bit binary value that represents the destination IP address of the packet.  The two most commonly referenced fields are the source and destination IP addresses. These fields identify where the packet is from and where it is going. Typically these addresses do not change while travelling from ITE PC v4.0 Chapter 1 the source to the destination. © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 14 6.1 IPv4 Header Fields  The fields used to identify and validate the packet include: – Internet Header Length (IHL) - Contains a 4- bit binary value identifying the number of 32- bit words in the header. The IHL value varies due to the Options and Padding fields. The minimum value for this field is 5 (i.e., 5×32 = 160 bits = 20 bytes) and the maximum value is 15 (i.e., 15×32 = 480 bits = 60 bytes). – Total Length - Sometimes referred to as the Packet Length, this 16-bit field defines the entire packet (fragment) size, including header and data, in bytes. The minimum length packet is 20 bytes (20-byte header + 0 bytes data) and the maximum is 65,535 bytes. – Header Checksum - The 16-bit field is used for error checking of the IP header. The checksum of the header is recalculated and compared to the value in the checksum field. If the values do not match, the packet is ITE discarded. PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 15 6.1 IPv4 Header Fields  A router may have to fragment a packet when forwarding it from one medium to another medium that has a smaller MTU.  When this happens, fragmentation occurs and the IPv4 packet uses the following fields to keep track of the fragments: – Identification - This 16-bit field uniquely identifies the fragment of an original IP packet. – Flags - This 3-bit field identifies how the packet is fragmented. It is used with the Fragment Offset and Identification fields to help reconstruct the fragment into the original packet. (DF – MF) – Fragment Offset - This 13-bit field identifies the order in which to place the packet fragment in the reconstruction of the original unfragmented packet. ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 16 6.2 Sample IPv4 Headers  Wireshark is a useful network monitoring tool for anyone working with networks and can be used with most labs in the Cisco Certified Network Associate (CCNA) courses for data analysis and troubleshooting. It can be used to view sample values contained in IP header fields.  The three figures contain sample captures of various IP packets: – Figure 1 displays the contents of packet number 2 in this sample capture. Note that the Source is listed as 192.168.1.109 and the Destination is listed as 192.168.1.1. The middle window contains information about the IPv4 header, such as the header length, total length, and any flags that are set. – Figure 2 displays the contents of packet number 8 in this sample capture. This is an HTTP packet. Also notice the presence of information beyond the TCP section. – Finally, Figure 3 displays the contents of packet number 16 in this sample capture. The sample packet is a ping request from host 192.168.1.109 to host 192.168.1.1. Notice how there is no TCP or UDP information because this is an Internet Control Chapter 1 Message Protocol (ICMP) packet. ITE PC v4.0 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 17 6.3 Limitations of IPv4  Through the years, IPv4 has been updated to address new challenges. However, even with changes, IPv4 still has three major issues:  IP address depletion - IPv4 has a limited number of unique public IP addresses available. Although there are approximately 4 billion IPv4 addresses, the increasing number of new IP-enabled devices, always-on connections, and the potential growth of less-developed regions have increased the need for more addresses.  Internet routing table expansion - A routing table is used by routers to make best path determinations. As the number of servers (nodes) connected to the Internet increases, so too does the number of network routes. These IPv4 routes consume a great deal of memory and processor resources on Internet routers.  Lack of end-to-end connectivity - Network Address Translation (NAT) is a technology commonly implemented within IPv4 networks. NAT provides a way for multiple devices to share a single public IP address. However, because the public IP address is shared, the IP address of an internal network host is hidden. This can be problematic for technologies that require end-to-end connectivity. ITE PC v4.0 Chapter 1 18 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 7. Introducing IPv6  In the early 1990s, the Internet Engineering Task Force (IETF) grew concerned about the issues with IPv4 and began to look for a replacement. This activity led to the development of IP version 6 (IPv6). IPv6 overcomes the limitations of IPv4 and is a powerful enhancement with features that better suit current and foreseeable network demands.  Improvements that IPv6 provides include: – Increased address space - IPv6 addresses are based on 128-bit hierarchical addressing as opposed to IPv4 with 32 bits. – Improved packet handling - The IPv6 header has been simplified with fewer fields. This improves packet handling by intermediate routers and also provides support for increased scalability/longevity. – Eliminates the need for NAT - With such a large number of public IPv6 addresses, Network Address Translation (NAT) is not needed. Customer sites, from the largest enterprises to single households, can get a public IPv6 network address. This avoids some of the NAT-induced application problems experienced by applications requiring end-to-end connectivity. – Integrated security - IPv6 natively supports authentication and privacy.  The 32-bit IPv4 address space provides approximately 4,294,967,296 unique addresses. Of these, only 3.7 billion addresses are assignable, because the IPv4 addressing system separates the addresses into classes, and reserves addresses for multicasting, testing, and other specific uses.  IP version 6 address space provides 340,282,366,920,938,463,463,374,607,431,768,211,456, or 340 undecillion addresses. ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 19 7.1 Encapsulating IPv6  The IPv4 header consists of 20 octets (up to 60 bytes if the Options field is used) and 12 basic header fields, not including the Options field and Padding field.  The IPv6 header consists of 40 octets (largely due to the length of the source and destination IPv6 addresses) and 8 header fields (3 IPv4 basic header fields and 5 additional header fields).  Figure 1 shows the IPv4 header structure. As shown in the figure, for IPv6, some fields have remained the same, some fields from the IPv4 header are not used, and some fields have changed names and positions. ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 20 7.1 Encapsulating IPv6 (cont.)  In addition, a new field has been added to IPv6 that is not used in IPv4. The IPv6 simplified header is shown in Figure 2.  The IPv6 simplified header offers several advantages over IPv4: –Better routing efficiency for performance and forwarding- rate scalability –No requirement for processing checksums –Simplified and more efficient extension header mechanisms (as opposed to the IPv4 Options field) –A Flow Label field for per-flow processing with no need to open the transport inner packet to identify the various traffic flows ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 21 7.2 IPv6 Packet Header  The fields in the IPv6 packet header include: – Version - This field contains a 4-bit binary value identifying the IP packet version. For IPv6 packets, this field is always set to 0110. – Traffic Class - This 8-bit field is equivalent to the IPv4 Differentiated Services (DS) field. It also contains a 6-bit Differentiated Services Code Point (DSCP) value used to classify packets and a 2-bit Explicit Congestion Notification (ECN) used for traffic congestion control. – Flow Label - This 20-bit field provides a special service for real-time applications. It can be used to inform routers and switches to maintain the same path for the packet flow so that packets are not reordered. – Payload Length - This 16-bit field is equivalent to the Total Length field in the IPv4 header. It defines the entire packet (fragment) size, including header and optional extensions. – Next Header - This 8-bit field is equivalent to the IPv4 Protocol field. It indicates the data payload type that the packet is carrying, enabling the network layer to pass the data to the appropriate upper-layer protocol. This field is also used if there are optional extension headers added to the IPv6 packet. – Hop Limit: - This 8-bit field replaces the IPv4 TTL field. This value is decremented by one by each router that forwards the packet. When the counter reaches 0 the packet is discarded and an ICMPv6 message is forwarded to the sending host, indicating that the packet did not reach its destination. – Source Address - This 128-bit field identifies the IPv6 address of the receiving host. – Destination Address - This 128-bit field identifies the IPv6 address of the receiving host.  An IPv6 packet may also contain extension headers (EH), which provide optional network layer information. Extension headers are optional and are placed between the IPv6 header and the payload. EHs are used for fragmentation, security, to support mobility, and more. ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 22 7.3  Sample IPv6 Header When viewing IPv6 Wireshark captures, notice that the IPv6 header has markedly fewer fields than an IPv4 header. This makes the IPv6 header easier and quicker for the router to process.  The IPv6 address itself looks very different. Because of the larger 128-bit IPv6 addresses, the hexadecimal numbering system is used to simplify the address representation. IPv6 addresses use colons to separate entries into a series of 16- bit hexadecimal blocks.  Figure 1 displays the contents of packet number 46 in this sample capture. The packet contains the initial message of the TCP 3-way handshake between an IPv6 host and an IPv6 server. Notice the values in the expanded IPv6 header section. Also notice how this is a TCP packet and that it does not contain any other information beyond the TCP section.  Figure 2 displays the contents of packet number 49 in this sample capture. The packet contains the initial HyperText Transfer Protocol (HTTP) GET message to the server. Notice how this is an HTTP packet and that it now contains information beyond the TCP section.  Finally, Figure 3 displays the contents of packet number 1 in this sample capture. The sample packet is an ICMPv6 Neighbor Solicitation message. Notice how there is no TCP ITE PC v4.0 or UDP information. Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 23 ROUTING OVERVIEW Network Fundamentals – Chapter 5 ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 24 Layer 3 devices Router : - best path determination - creating routing table - connecting different LANs All interfaces of the router are members in a multiple broadcast domain, and multiple collision domains ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 25 broadcast domains and number of collision domains  A broadcast domain is a logical division of a computer network, in which all devices can reach each other by broadcast at the data link layer. In other words, any device within a broadcast domain can receive a broadcast message sent by any other device within that same domain. Broadcast messages are typically used for network discovery, address resolution, and other network protocols.  A collision domain, on the other hand, is a logical division of a network in which two or more devices may transmit data simultaneously, resulting in a collision of the transmitted packets. In Ethernet networks, for example, all devices connected to the same physical segment share the same collision domain. When two or more devices on the same collision domain transmit data at the same time, the signals collide, causing data corruption and a loss of data. ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 26 Find number of broadcast domains and number of collision domains : Solution no. of broadcast domains = 2 no. of collision domains =4 ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 27 8. Routing 8.1 Host Forwarding Decision A host can send a packet to: – Itself - This is a special IP address of 127.0.0.1 which is referred to as the loopback interface. This loopback address is automatically assigned to a host when TCP/IP is running. The ability for a host to send a packet to itself using network functionality is useful for testing purposes. Any IP within the network 127.0.0.0/8 refers to the local host. – Local host - This is a host on the same network as the sending host. The hosts share the same network address. – Remote host - This is a host on a remote network. The hosts do not share the same network address. Whether a packet is destined for a local host or a remote host is determined by the IP address and subnet mask combination of the source (or sending) device compared to the IP address and subnet mask of the destination device. When a source device sends a packet to a remote destination device, then the help of routers and routing is needed. Routing is the process of identifying the best path to a destination. The router connected to the local network segment is referred to as the default gateway. ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 28 Dividing the networks - networks from networks  Describe the purpose of further subdividing networks into smaller networks ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 29 5.3.1 Device parameters – ip addresses  Describe the role of an intermediary gateway device in allowing devices to communicate across sub-divided networks ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 30 5.3.3 A gateway - the way out of our network ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 31 5.3.3 A gateway - the way out of our network ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 32 5.3.3 A gateway - the way out of our network  Describe the role of a gateway and the use of a simple route table in directing packets toward their ultimate destinations ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 33 5.3.3 A gateway - the way out of our network  Define a route and its three key parts ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 34 Host Routing Table netstat –r or route print  Hosts also have a local routing table.  Usually only contains: Its own network address (directly connected network) Default gateway IP address  Hosts usually do not have remote networks in their routing tables ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 35 5.3.7 Packet forwarding - moving the packet toward its destination ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 36 5.3.7 Packet forwarding - moving the packet toward its destination ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 37 5.3.7 Packet forwarding - moving the packet toward its destination ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 38 ITE PC v4.0 Chapter 1 © 2007 Cisco Systems, Inc. All rights reserved. Cisco Public 39

Use Quizgecko on...
Browser
Browser