M. Dahshan - TCOM52721 TCOM 5272 Telecomm Lab Dr. Mostafa Dahshan OU-Tulsa 4W 2 nd floor
M. Dahshan - TCOM52722 Acknowledgements Most of the notes and figures in this presentation are imported from Notes by Dr. Anindya Das Textbook supplemental material CCNA Intro Exam Certification Guide
M. Dahshan - TCOM52723 The TCP/IP Protocol TCP/IP combination TCP (Transmission Control Protocol) IP (Internet Protocol) TCP/IP has become most widely used protocol suite
M. Dahshan - TCOM52724 TCP/IP Features Used worldwide on most networks and the Internet Influences design of wide range of network devices Main protocol of most computer operating systems Subject to many troubleshooting and network analysis tools Understood by large body of network professionals
M. Dahshan - TCOM52725 TCP/IP Protocol Suite
M. Dahshan - TCOM52726 How TCP Works TCP is Layer 4 (Transport Layer) protocol Establishes sessions between network nodes Sequences and acknowledges frames For reliable end-to-end delivery Sequence number placed in TCP frame header Shows frame sequence in stream of frames Indicates amount of data in frames Sequence number checked for frame correctness Sliding window: number of data bytes in frame May be dynamically adjusted if two nodes agree
M. Dahshan - TCOM52727 TCP Frame Format TCP segment: header and data payload in TCP frame TCP header contains 11 fields
M. Dahshan - TCOM52728 Common TCP Port Numbers Full list available at
M. Dahshan - TCOM52729 User Datagram Protocol (UDP) Operates at OSI Layer 4 (like TCP) Connectionless protocol No flow control, sequencing, or acknowledgment Relies only on checksum to ensure reliability Alternative to TCP when high reliability not required
M. Dahshan - TCOM UDP Frame Format Frame has four-field header and data
M. Dahshan - TCOM Internet Protocol (IP) IP Functions Data transfer Packet addressing Packet routing Fragmentation Detection of errors
M. Dahshan - TCOM IP Packet Format Datagram: TCP/UDP segment formatted with IP header IP packet header consists of 13 fields
M. Dahshan - TCOM527213
M. Dahshan - TCOM IP Addressing Dotted decimal notation: IP address format Four fields totaling 32 bits Fields are decimal values representing 8-bit binary octets Part of address is network ID, part is host ID Example in decimal format: Three types of transmission Unicast: packet sent to each requesting client Multicast: packet sent to group of requesting clients Broadcast: communication sent to all network nodes
M. Dahshan - TCOM Address Classes
M. Dahshan - TCOM Address Classes (2)
M. Dahshan - TCOM Subnet Mask TCP/IP requires configured subnet mask Subnet mask used for two purposes Show class of addressing used Divide networks into subnetworks to control traffic Example of a subnet mask: ( ) Indicates Class A network Ones represent network/subnet identification bits Zeroes represent host identification bits
M. Dahshan - TCOM Network Addresses Is the address of the “wire” Each router interface must be on a separate subnet Each subnet is its own broadcast domain Routing tables store information about network addresses, not host addresses
M. Dahshan - TCOM IP Subnetting Subnetting allows larger number of network addresses, unrestricted by traditional address classes Classes A,B,C can be subdivided into smaller non-overlapping subnet groups
M. Dahshan - TCOM Why Subnetting? Number of networks is limited We need 10 LANs but we have only 1 class C network Reduce broadcast domain traffic Can you imagine what the network traffic overhead would be like on a network with 254 hosts trying to discover each others MAC addresses?
M. Dahshan - TCOM Subnetting Example Class B network with subnetting Address formats with subnetting
M. Dahshan - TCOM Subnet Calculation To correctly subnet a given network address into subnet addresses, ask yourself the following questions: 1.How many bits do I need to borrow? 2.What’s the subnet mask? 3.What’s the “magic number” or multiplier? 4.What are the first three subnet addresses? Let’s look at each of these questions in detail
M. Dahshan - TCOM How many bits to borrow? First, you need to know how many bits you have to work with Second, you must know either how many subnets you need or how many hosts per subnet you need Finally, you need to figure out the number of bits to borrow
M. Dahshan - TCOM How many bits to borrow? How many subnets or hosts do I need? A simple formula: Total Bits = Bits Borrowed + Bits Left TB = BB + BL I need x subnets: I need x hosts: Remember: we need to subtract two to provide for the subnetwork and broadcast addresses
M. Dahshan - TCOM How many bits to borrow? Class C Example: Design goals specify at least 5 subnets so how many bits do we borrow? How many bits in the host portion do we have to work with (TB)? What’s the BB in our TB = BB + BL formula? (8 = BB + BL) 2 to the what power will give us at least 5 subnets? = 6 subnets
M. Dahshan - TCOM How many bits to borrow? How many bits are left for hosts? TB = BB + BL 8 = 3 + BL BL = 5 So how many hosts can we assign to each subnet? = 30 hosts
M. Dahshan - TCOM How many bits to borrow? Class B Example: Design goals specify no more than 126 hosts per subnet, so how many bits do we need to leave (BL)? How many bits in the host portion do we have to work with (TB)? What’s the BL in our TB = BB + BL formula? (16 = BB + BL) 2 to the what power will insure no more than 126 hosts per subnet and give us the most subnets? = 126 hosts
M. Dahshan - TCOM How many bits to borrow? How many bits are left for subnets? TB = BB + BL 16 = BB + 7 BL = 9 So how many subnets can we have? = 510 subnets
M. Dahshan - TCOM What’s the subnet mask? We determine the subnet mask by adding up the decimal value of the bits we borrowed. In the previous Class C example, we borrowed 3 bits. Below is the host octet showing the bits we borrowed and their decimal values. We add up the decimal value of these bits and get 224. That’s the last non-zero octet of our subnet mask So our subnet mask is
M. Dahshan - TCOM What’s the “magic number?” To find the “magic number” or the multiplier we will use to determine the subnetwork addresses, we subtract the last non-zero octet from 256 In our Class C example, our subnet mask was is our last non-zero octet Our magic number is = 32
M. Dahshan - TCOM Last Non-Zero Octet Memorize this table. You should be able to: Quickly calculate the last non-zero octet when given the number of bits borrowed. Determine the number of bits borrowed given the last non-zero octet. Determine the amount of bits left over for hosts and the number of host addresses available.
M. Dahshan - TCOM What are the subnets? We now take our “magic number” and use it as a multiplier Our Class C address was We borrowed bits in the fourth octet, so that’s where our multiplier occurs 1st subnet: nd subnet: rd subnet: We keep adding 32 in the fourth octet to get all six available subnet addresses
M. Dahshan - TCOM Host & Broadcast Addresses Now you can see why we subtract 2 when determining the number of host address Let’s look at our 1st subnet: What is the total range of addresses up to our next subnet, ? to or 32 addresses.32 cannot be assigned to a host. Why?.63 cannot be assigned to a host. Why? So our host addresses are or 30 host addresses--just like we figured out earlier
M. Dahshan - TCOM CIDR Notation Classless Interdomain Routing is a method of representing an IP address and its subnet mask with a prefix For example: /27 What do you think the 27 tells you? 27 is the number of 1 bits in the subnet mask Therefore, Also, you know 192 is a Class C, so we borrowed 3 bits!! Finally, you know the magic number is = 32, so the first useable subnet address is !! Let’s see the power of CIDR notation
M. Dahshan - TCOM /26 Subnet mask? Bits borrowed? Class C so 2 bits borrowed Magic Number? = 64 First useable subnet address? Third useable subnet address? = 192, so
M. Dahshan - TCOM /30 Subnet mask? Bits borrowed? Class C so 6 bits borrowed Magic Number? = 4 Third useable subnet address? = 12, so Second subnet’s broadcast address? = 11, so
M. Dahshan - TCOM /28 What kind of address is ? Class C, so 4 bits borrowed Last non-zero octet is 240 Magic number is = is a multiple of 16 so is a subnet address--the second subnet address!! What’s the broadcast address of ? = 47, so
M. Dahshan - TCOM /29 What kind of address is ? Class C, so 5 bits borrowed Last non-zero octet is 248 Magic number is = 8 Subnets are.8,.16,.24,.32, ect. So belongs to the third subnet address ( ) and is a host address. What broadcast address would this host use to communicate with other devices on the same subnet? It belongs to.24 and the next is.32, so 1 less is.31 ( )
M. Dahshan - TCOM No Worksheet Needed! After some practice, you should never need a subnetting worksheet again The only information you need is the IP address and the CIDR notation For example, the address /26 You can quickly determine that the first subnet address is How? Class C, 2 bits borrowed = 64, so For the rest of the addresses, just do multiples of 64 (.64,.128,.192).
M. Dahshan - TCOM Activity 1: Practice On Your Own Below are some practice problems. Take out a sheet of paper and calculate... Bits borrowed Last non-zero octet Second subnet address and broadcast address / / / / /28 6.Challenge: /19 7.Challenge: /16
M. Dahshan - TCOM527241
M. Dahshan - TCOM Router’s Functions A router is responsible for determining the packet’s path and switching the packet out the correct port. A router does this in five steps: 1.De-encapsulates the packet 2.Performs the ANDing operation 3.Looks for entry in routing table 4.Re-encapsulates packet into a frame 5.Switches the packet out the correct interface
M. Dahshan - TCOM Routed Protocols Routed protocols are protocols that enable data to be transmitted across a collection of networks or internetworks using a hierarchical addressing scheme Examples include IP, IPX and AppleTalk A routable protocol provides both a network and node number to each device on the network. Routers AND the address to discover the network portion of the address An example of a protocol that is not routable is NetBEUI because it does not have a network/node structure
M. Dahshan - TCOM Routing Protocols A routing protocol is a protocol that determines the path a routed protocol will follow to its destination Routers use routing protocols to create a map of the network These maps allow path determination and packet switching Maps become part of the router’s routing table Examples of routing protocols include: RIP, IGRP, EIGRP, & OSPF
M. Dahshan - TCOM Multi-protocol Routing Routers are capable of running multiple routing protocols (RIP, IGRP, OSPF, etc.) as well as running multiple routed protocols (IP, IPX, AppleTalk) For a router to be able use different routing and routing protocols, you must enable the protocols using the appropriate commands.
M. Dahshan - TCOM Dynamic Routing Dynamic routing refers to the process of allowing the router to determine the path to the destination Routing protocols enable dynamic routing where multiple paths to the same destination exist
M. Dahshan - TCOM Static Routing Static routing means that the network administrator directly assigns the path router are to take to the destination Static routing is most often used with stub networks where only one path exists to the destination
M. Dahshan - TCOM Default Routes A default route is usually to a border or gateway router that all routers on a network can send packets to if they do not know the route for a particular network
M. Dahshan - TCOM Routing Protocol Classes Distance–vector: determines the route based on the direction (vector) and distance to the destination Link-state: each node recreates an exact topology of the network in its routing table Hybrid: combines aspects of both
M. Dahshan - TCOM Distance-Vector Routing Each router receives a routing table periodically from its directly connected neighboring routers. For example, in the graphic, Router B receives information from Router A. Router B adds a distance-vector number (such as a number of hops), and then passes this new routing table to its other neighbor, Router C
M. Dahshan - TCOM Link-State Routing Link-state protocols maintain complex databases that summarize routes to the entire network Each time a new route is added or a route goes down, each router receives a message and then recalculates a spanning tree algorithm and updates its topology database
M. Dahshan - TCOM Comparison DISTANCE-VECTOR LINK-STATE Views network topology from neighbor’s perspective Gets common view of entire network topology Adds distance vectors from router to router Calculates the shortest path to other routers Frequent, periodic updates: slow convergence Event triggered updates: fast convergence Passes copies of routing tables to neighbors Passes link-state routing updates to all routers in the system.
M. Dahshan - TCOM Hybrid Routing Cisco’s proprietary routing protocol, EIGRP, is considered a hybrid EIGRP uses distance-vector metrics. However, it uses event-triggered topology changes instead of periodic passing of routing tables
M. Dahshan - TCOM Example Routing Protocols Distance-Vector Routing Information Protocol (RIP) Interior Gateway Routing Protocol (IGRP) Link-State Open Shortest Path First (OSPF) Integrated IS-IS Hybrid Enhanced IGRP (EIGRP)
M. Dahshan - TCOM Convergence Convergence means that all routers share the same information about the network. In other words, each router knows its neighbor routers routing table Every time there is a topology change, routing protocols update the routers until the network is said to have converged again The time of convergence varies depending upon the routing protocol being used
M. Dahshan - TCOM527256
M. Dahshan - TCOM Homework Homework problems will be posted on D2L