Chapter 07 The IP address and Routing Protocol

  • Slides: 56
Download presentation
Chapter 07 The IP address and Routing Protocol

Chapter 07 The IP address and Routing Protocol

Introduction • An IP (Internet Protocol) address is a unique identifier for a node

Introduction • An IP (Internet Protocol) address is a unique identifier for a node or host connection on an IP network. • Every machine on the Internet has a unique number assigned to it, called an IP address. • Without a unique IP address on your machine, you will not be able to communicate with other devices, users, and computers on the Internet. • You can look at your IP address as if it were a telephone number, each one being unique and used to identify a way to reach you and only you.

IPv 4 and IPv 6 Addresses • There are two flavors of IP Addresses

IPv 4 and IPv 6 Addresses • There are two flavors of IP Addresses that can be used on a network. The first, and the version that the Internet and most routers are currently configured for, is IPv 4 or Internet Protocol version 4. • This version uses 32 -bit addresses, which limits the amount of addresses to 4, 294, 967, 296 possible unique addresses. Some of these addresses, about 290 million, are also reserved for special purposes. • Due to the popular growth of the Internet there has been concern that the pool of possible addresses would be exhausted in the near future.

IPv 4 and IPv 6 Addresses (cont. ) • With this in mind, a

IPv 4 and IPv 6 Addresses (cont. ) • With this in mind, a new version of IP addresses was developed called IPv 6, or Internet Protocol version 6, that would change the address size from 32 -bit address to 128 -bit addresses. • This change would allow for generous IP address allocations to networks without any foreseeable problem with the amount of addresses available. • In order to use IPv 6 addresses, though, existing routers and hardware would need to be upgraded or configured to use this new version of IP addresses.

Quick Review of Binary Math

Quick Review of Binary Math

IP Address Version 4 • An IP address is a 32 bit binary number

IP Address Version 4 • An IP address is a 32 bit binary number usually represented as 4 decimal values, each representing 8 bits, in the range 0 to 255 (known as octets) separated by decimal points. • This is known as "dotted decimal" notation. • Example: 10. 20. 1 • It is sometimes useful to view the values in their binary form.

Address Classes • There are 5 different address classes. You can determine which class

Address Classes • There are 5 different address classes. You can determine which class any IP address is in by examining the first 4 bits of the IP address. Class Start address Finish address A 0. 0 126. 255 B 128. 0. 0. 0 191. 255 C 192. 0. 0. 0 223. 255 D 224. 0. 0. 0 239. 255 E 240. 0 254. 255

IP Address Version 4 (cont. ) • Default Network: The special network 0. 0

IP Address Version 4 (cont. ) • Default Network: The special network 0. 0 is generally used for routing. • Class A: From the table above you see that there are 126 class A networks. These networks consist of 16, 777, 214 possible IP addresses that can be assigned to devices and computers. This type of allocation is generally given to very large networks such as multinational companies. • Loopback: This is the special 127. 0. 0. 0 network that is reserved as a loopback to your own computer. These addresses are used for testing and debugging of your programs or hardware.

IP Address Version 4 (cont. )

IP Address Version 4 (cont. )

IP Address Version 4 (cont. ) • Class B: This class consists of 16,

IP Address Version 4 (cont. ) • Class B: This class consists of 16, 384 individual networks, each allocation consisting of 65, 534 possible IP addresses. These blocks are generally allocated to Internet Service Providers and large networks, like a college or major hospital. • Class C: There is a total of 2, 097, 152 Class C networks available, with each network consisting of 255 individual IP addresses. This type of class is generally given to small to mid-sized companies. • Class D: The IP addresses in this class are reserved for a service called Multicast. it will not be discussed in this tutorial. • Class E: The IP addresses in this class are reserved for experimental use. it will not also be discussed in this tutorial. • Broadcast: This is the special network of 255, and is used for broadcasting messages to the entire network that your computer resides on. .

IP Address Version 4 (cont. ) • Every IP address consists of two parts,

IP Address Version 4 (cont. ) • Every IP address consists of two parts, one identifying the network and one identifying the node. • The Class of the address and the subnet mask determine which part belongs to the network address and which part belongs to the node address.

IP Address Version 4 (cont. ) • Now we can see how the Class

IP Address Version 4 (cont. ) • Now we can see how the Class determines, by default, which part of the IP address belongs to the network (N, in blue) and which part belongs to the node (n, in red). – Class A -- NNNN. nnnnnnnn – Class B -- NNNNNNNN. nnnn – Class C -- NNNNNNNN. nnnn

IP Address Version 4 (cont. )

IP Address Version 4 (cont. )

IP Address Version 4 (cont. ) • In the example, 140. 179. 220. 200

IP Address Version 4 (cont. ) • In the example, 140. 179. 220. 200 is a Class B address so by default the Network part of the address (also known as the Network Address) is defined by the first two octets (140. 179. x. x) and the node part is defined by the last 2 octets (x. x. 220. 200). • In order to specify the network address for a given IP address, the node section is set to all "0"s. • In our example, 140. 179. 0. 0 specifies the network address for 140. 179. 220. 200. • When the node section is set to all "1"s, it specifies a broadcast that is sent to all hosts on the network. 140. 179. 255 specifies the example broadcast address. Note that this is true regardless of the length of the node section.

IP Address Version 4 (cont. ) • Private Addresses – There also blocks of

IP Address Version 4 (cont. ) • Private Addresses – There also blocks of IP addresses that are set aside for internal private use for computers not directly connected to the Internet. – These IP addresses are not supposed to be routed through the Internet, and most service providers will block the attempt to do so. – These IP addresses are used for internal use by company or home networks that need to use TCP/IP but do not want to be directly visible on the Internet.

IP Address Version 4 (cont. ) These Private Address ranges are: Class Private Start

IP Address Version 4 (cont. ) These Private Address ranges are: Class Private Start Address Private End Address A 10. 0 10. 255 B 172. 16. 0. 0 172. 31. 255 C 192. 168. 0. 0 192. 168. 255 • If you are on a home/office private network and want to use TCP/IP, you should assign your computers/devices IP addresses from one of these three ranges.

IP Address Version 4 (cont. ) • Private addresses may be used by any

IP Address Version 4 (cont. ) • Private addresses may be used by any organization, without any requirement for registration. • Because private addresses are ambiguous - caŶ’t tell where they’re coŵiŶg froŵ or goiŶg to because anyone can use them – private addresses are not permitted to be routed across the Internet. • ISPs block private addresses from being routed across their infrastructure.

Public Address

Public Address

IP Address Version 4 (cont. ) • Common Problems and Resolutions – The most

IP Address Version 4 (cont. ) • Common Problems and Resolutions – The most common problem people have is by accident assigning an IP address to a device on your network that is already assigned to another device. When this happens, the other computers will not know which device should get the information, and you can experience erratic behavior. On most operating systems and devices, if there are two devices on the local network that have the same IP address, it will generally give you a "IP Conflict" warning. If you see this warning, that means that the device giving the warning, detected another device on the network using the same address. – The best solution to avoid a problem like this is to use a service called DHCP that almost all home routers provide. DHCP, or Dynamic Host Configuration Protocol, is a service that assigns addresses to devices and computers. You tell the DHCP server what range of IP addresses you would like it to assign, and then the DHCP server takes the responsibility of assigning those IP addresses to the various devices and keeping track so those IP addresses are assigned only once.

Subnetting • Subnetting an IP Network can be done for a variety of reasons,

Subnetting • Subnetting an IP Network can be done for a variety of reasons, including organization, use of different physical media (such as Ethernet, WAN, etc. ), preservation of address space, and security. • Subnetting is a technique used to break down (or partition) networks into subnets. The subnets are created through the use of subnet masks. • The most common reason is to control network traffic. In an Ethernet network, all nodes on a segment see all the packets transmitted by all the other nodes on that segment. Performance can be adversely affected under heavy traffic loads, due to collisions and the resulting retransmissions.

Subnetting (cont. ) • A router is used to connect IP networks to minimize

Subnetting (cont. ) • A router is used to connect IP networks to minimize the amount of traffic each segment must receive. • A Subnet mask used to determine what network address an IP address belongs to. Network Address = IP Address AND Subnet Mask. • Subnets are created by borrowing bits from the host portion of the IP address. • The network portion of the IP address and the new subnet bits are used to define the new subnet.

Example • An organization has been assigned the network number 193. 1. 1. 0/24

Example • An organization has been assigned the network number 193. 1. 1. 0/24 and it needs to define six subnets. The largest subnet is required to support 25 hosts. • The first step is to determine the number of bits required to define the six subnets. Since a network address can only be subnetted along binary boundaries, subnets must be created in blocks of powers of two [ 2 (21), 4 (22), 8 (23), 16 (24), etc. ]. • Thus, it is impossible to define an IP address block such that it contains exactly six subnets. For this example, the network administrator must define a block of 8 (2^3) and have two unused subnets that can be reserved for future growth.

Example (cont. ) • Since 8 = 23, three bits are required to enumerate

Example (cont. ) • Since 8 = 23, three bits are required to enumerate the eight subnets in the block. In this example, the organization is subnetting a /24 so it will need three more bits, or a /27, as the extended-network-prefix. A 27 -bit extended-network-prefix can be expressed in dotted-decimal notation as 255. 224.

Example (cont. )

Example (cont. )

Example (cont. ) • • Network Address : 193. 1. 1. 0 Class :

Example (cont. ) • • Network Address : 193. 1. 1. 0 Class : C Default Subnet Mask: 255. 0 Total number of subnets: 2^3 = 8 Number of bits borrowed: 3 Custom subnet mask: 255. 224 Number of usable addresses: (2^5)-2=30

Example (cont. )

Example (cont. )

Subnetting (cont. ) • There are several pros and cons of the subnetting. By

Subnetting (cont. ) • There are several pros and cons of the subnetting. By organizing hosts into logical groups, subnetting can improve network security and performance. • But while improving network performance, subnetting increases routing complexity, since each locally connected subnet is typically represented by one row in the routing tables in each connected router. • However, subnetting allows the network to be logically divided regardless of the physical layout of a network, since it is possible to divide a physical network into several subnets by configuring different host computers to use different routers.

More Exercises on Subnetting Network Address Number of Subnets 118. 0. 0. 0 126

More Exercises on Subnetting Network Address Number of Subnets 118. 0. 0. 0 126 178. 100. 0. 0 2048 200. 175. 14. 0 4 128. 77. 0. 0 62 198. 100. 10. 0 4 101. 0. 0. 0 256 218. 35. 50. 0 8 172. 56. 0. 0 16 172. 59. 0. 0 1024 23. 0. 0. 0 524288 192. 10. 0 16 165. 100. 0. 0 1024

Router ម ន Hardware នង softwareដចជ ៖ CPU, RAM, ROM, Operating System

Router ម ន Hardware នង softwareដចជ ៖ CPU, RAM, ROM, Operating System

Interface of Package Tracer

Interface of Package Tracer

Start configure Router (con) ក រលចឡ ងតបងគ User Mode ដ លអនញញ តអ យបងហ ញ

Start configure Router (con) ក រលចឡ ងតបងគ User Mode ដ លអនញញ តអ យបងហ ញ State of router Router> The enable Command តរវប នបរ សរ បចលកនង privileged exec mode ដ លអនអនញញ តអ យ User អ ចចល Configuration ល Router prompt បតរព ”#” ។ Router>enable Router# ហ យដ មបកណតល Router#Config t Router(Config)# Router គតរវចលទ Global Mode ។ “>” ទ

Static Route ជ Commandធមមត នងមនតរវក រ Processing ចរ នទ ហ យបរ ដ មប Configure

Static Route ជ Commandធមមត នងមនតរវក រ Processing ចរ នទ ហ យបរ ដ មប Configure អ យ Router សគ លគន ។វ មនម នជ Protocol ទ គវ បរ សរ បដ ក IPaddress for route ន កនង device route ន កនង Table ដ យឆលងក តក រ counfigure ដ យដ ។ Static routing is not really a routing protocol. Static routing is simply the process of manually entering routes into a device's routing table via a configuration file that is loaded when the routing device starts up. As an alternative, these routes can be entered by a network administrator who configures the routes manually Use static routing when you have very few devices to configure (<5) and when you know the routes will probably never change.

Static route configure When we change name and put Ip ddress hery…we must be

Static route configure When we change name and put Ip ddress hery…we must be configure route ip do below: R 1#(config)ip route 192. 168. 2. 0 255. 0 172. 16. 1. 2 R 2#(config)ip route 192. 168. 1. 0 255. 0 172. 16. 1. 1 R 1#end IP serial =172. 16. 1. 1 Fast Eternet=192. 168. 1. 1 R 2#end IP serial =172. 16. 1. 2 Ip Fast. Ethernet: 192. 168. 2. 1 Dubble click on it hery Static ip Ip: 192. 168. 1. 2 Dubble click on it hery Static ip Ip: 192. 168. 2. 2 Subnet 255. 0 Get way : 192. 168. 1. 1 Get way : 192. 168. 2. 1 After that ping to eaochother.

Routing Protocols’ Evolution and Classification

Routing Protocols’ Evolution and Classification

Dynamic Routing Dynamic routing protocols are supported by software applications running on the routing

Dynamic Routing Dynamic routing protocols are supported by software applications running on the routing device (the router) which dynamically learn network destinations and how to get to them and also advertise those destinations to other routers. This advertisement function allows all the routers to learn about all the destination networks that exist and how to those networks.

Dynamic Routing (con) A router using dynamic routing will 'learn' the routes to all

Dynamic Routing (con) A router using dynamic routing will 'learn' the routes to all networks that are directly connected to the device. Next, the router will learn routes from other routers that run the same routing protocol (RIP, RIP 2, EIGRP, OSPF, IS-IS, BGP etc). Each router will then sort through it's list of routes and select one or more 'best' routes for each network destination the router knows or has learned.

Routing Information Protocol RIP(RIP) is a distance vector protocol which uses hop count to

Routing Information Protocol RIP(RIP) is a distance vector protocol which uses hop count to determine the best path through the network. The path with the fewest number of routed hops is considered the shortest path RIP គជ Command សរ បធវ អ យ Router ពររចរ នសគ លគន ។

Configuration RIP Design router and switch computer…… Give ip to R 1, R 2,

Configuration RIP Design router and switch computer…… Give ip to R 1, R 2, R 3

The Router in the middle configure (please see the table to put ip for

The Router in the middle configure (please see the table to put ip for each router) After that we configure ip for rip the same table under router in image Put the ip for compute in all subnet and ping to each other… Before ping make sure the router have ip address yet? Finish

EIGRP Enhanced Interior Gateway Routing Protocol (EIGRP) ជ distance vector classless routing protocol ដ

EIGRP Enhanced Interior Gateway Routing Protocol (EIGRP) ជ distance vector classless routing protocol ដ លតរវប នបញច ញអ យបរ ន ឆន ១៩៩២

Configuration EIGRP Router(Config)#router eigrp Autonomous-system Router(Config)#network-address Note: Autonomous-system ជ ល ខ ID ន បណត

Configuration EIGRP Router(Config)#router eigrp Autonomous-system Router(Config)#network-address Note: Autonomous-system ជ ល ខ ID ន បណត Network ដ ល EIGRP តរវអ យ Router ទ ងអសដ លន កនង Domain ដចគន តរវត Configure Autonomous-system ដចគន ទ ងអស ដ លម នល ខច បព 1 ដល 65535 ។

Se 0/0/0 =ip 10. 10. 2 Se 0/0/1 =ip 11. 11. 2 Fast 0/0

Se 0/0/0 =ip 10. 10. 2 Se 0/0/1 =ip 11. 11. 2 Fast 0/0 =ip 2. 2. 2. 1 Se 0/0/0 =ip 11. 11. 1 Se 0/0/1 =ip 12. 12. 2 Fast 0/0 =ip 3. 3. 3. 1 Se 0/0/0 =ip 10. 10. 1 Se 0/0/1 =ip 12. 12. 1 Fast 0/0 =ip 1. 1

Start to configure Router 1 In R 1 we start to configure(after we give

Start to configure Router 1 In R 1 we start to configure(after we give ip address ) so do : R 1(config)# router eigrp 1 R 1(config-router)#network 1. 1. 1. 0 R 1(config-router)#network 10. 10. 0 R 1(config-router)#network 12. 12. 0 R 1(config-router)#end R 1#wr

Configure. Router 3 In R 3 we start to configure(after we give ip address

Configure. Router 3 In R 3 we start to configure(after we give ip address ) so do : R 3(config)# router eigrp 1 R 3(config-router)#network 3. 3. 3. 0 R 3(config-router)#network 11. 11. 0 R 3(config-router)#network 12. 12. 0 R 3(config-router)#end R 3#wr

Configuration OSPF Router(Config)#router ospf 1 Router(Config-router)#Network-address wildcard-mask area-id Note: area-id សដ ល OSPF area

Configuration OSPF Router(Config)#router ospf 1 Router(Config-router)#Network-address wildcard-mask area-id Note: area-id សដ ល OSPF area ជ ករមន Router ដ លច កច យ -state information ។ Link

R 1: Fast : 172. 16. 10. 1 255. 0 Se 0/0/0 : 172.

R 1: Fast : 172. 16. 10. 1 255. 0 Se 0/0/0 : 172. 16. 20. 1 255. 0 HQ(router): Fast : 172. 16. 30. 1 255. 0 Se 0/0/0 : 172. 16. 20. 2 255. 0 se 0/0/1 : 172. 16. 40. 1 255. 0 R 2: Fast : 172. 16. 50. 1 255. 0 Se 0/0/0 : 172. 16. 40. 2 255. 0 All Client please put the ip to fit with the every fastethernet lan that we have configure

Stat to configure OSPF R 1 >enable R 1#config t R 1(config)#router ospf 1

Stat to configure OSPF R 1 >enable R 1#config t R 1(config)#router ospf 1 R 1(config-router)network 172. 16. 0. 0. 255 area 0 R 1#(config-router)end

Router HQ RHQ >enable RHQ #config t RHQ(config)#router ospf 1 RHQ(config-router)#network 172. 16. 0.

Router HQ RHQ >enable RHQ #config t RHQ(config)#router ospf 1 RHQ(config-router)#network 172. 16. 0. 0. 255 area 0 RHQ(config-router)#end

Configure R 2 >enable R 2#config t R 2(config)#router ospf 1 R 2(config-router)#network 172.

Configure R 2 >enable R 2#config t R 2(config)#router ospf 1 R 2(config-router)#network 172. 16. 0. 0. 255 area 0 R 2(config-router)#end