Sie sind auf Seite 1von 41

Routing

A Router connects one network two another network

A router is responsible for delivery of packet across different networks


Ensure 24/7 availability Router use alternate paths in case the primary path fails Router use Qos prioritization if IP packet to ensure real-time traffic such as voice and video

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

Routers at the network center


A router connects multiple networks , this means that it has multiple interfaces that each belong to a different IP network The interface that the router uses to forward the packet may be the network of the final destination of the packet or it may be a network connected to another router that used to reach the destination network LANs are commonly Ethernet networks that contain devices such as PCs , Printers, Servers WANs are used to connect networks over a large geographical area

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

Routers determine the best path


The primary responsibility of a router is to direct packets destined for local and remote networks by : - Determining the best path to send packets - Forwarding packets toward their destination The router use its routing table to determine the best path to forward the packet When the router receives a packet it examine its destination IP address and searches for the best match with a network address in the routers routing table

Static Routes and dynamic routing protocols are used by routers to learn a bout remote networks and build their routing tables
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

Router CPU and Memory


Like a PC a router also includes :

- Central processing unit - Random access memory - Read only memory

CPU :
CPU executes operating system instructions

RAM :
RAMs stores the instructions and data needed to be executed by the CPU

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

RAM is used to store these components


Operating system :
The Cisco IOS (internetwork operating system) is copied into ram during bootup

Running configuration file :


This is the configuration file that stores the configuration commands that the router IOS is Currently using All commands configured on the router are stored in the running configuration file known as running-config
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

IP Routing Table
This file stores information a bout directly connected and remote networks , it is used to the best path to forward the packet

ARP cache : this cache contains the IPv4 address to MAC address mapping Packet Buffer :
packets are temporarily stored in a buffer when received on an inter face or before they exit an interface

RAM is volatile memory and loses its content when the router is powered down or restarted

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

ROM :
Is a form of permanent storage cisco devices ROM Store :

1 bootstrab instructions 2- Basic diagnostic software 3- Version of IOS


ROM includes the software that does not normally need to be modified or upgraded such as bootup instructions ROM does not lose its contents when a router loses power or is restarted

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

Flash Memory :
Flash memory is nonvolatile computer memory that can be electrically stored and erased Flash is used as permanent storage for the operating system cisco IOS The IOS is permanently stored in flash memory and copied into RAM during the boot process , where it is then executed by the CPU Flash memory does not loses its contents when the router loses power or is restarted

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

NVRAM (Nonvolatile RAM ) :


Nonvolatile RAM does not lose its information when power is turned off NVRAM is used by the cisco IOS as permanent storage of the

startup

configuration file
All configuration changes are stored in the running - config file in RAM , so IOS save those changes is case the router is restarted or loses power the

running-config must be copied to NVRAM where it is stored as the start up config file

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

10

Internetwork Operating System (IOS)


Cisco IOS has its own user Interface , the common line interface (CLI) is the much more common method of configuring cisco routers Upon boot up the startup-config file in NVRAM is copied into RAM and stored as the running

config file

IOS executes the configuration commands in the running-config , and changes entered by the network administrator are stored in the running-config and are immediately implemented by the IOS

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

11

Router bootup Process 1- performing the post :


The Power on self test (post) , the post process is used to test the router hardware After the post has been completed the router executes the bootstrap program

Loading the bootstrap program :


After the POST the bootstrap program is copied from ROM into the RAM once in RAM the CPU executes the instructions in the bootstrap program
The main task of the bootstrap program is to locate the cisco IOS and load it into RAM
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

12

Loading and locating cisco IOS


The cisco IOS stored in Flash Memory Cisco router copy the IOS into RAM for execution by the CPU Once the IOS begins to load you may see a string of pounds signs (#) while the image decompresses

Locating and loading the configuration file


After the IOS is loaded the bootstrap program searches for the startup configuration file known as start-config in NVRAM This file has the previously saved configuration command and parameters Including ( addresses ,routing information , passwords and other configuration saved by the network admin
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

13

If the startup configuration file is found in NVRAM the IOS loads it into RAM

The default running config does not contain any interface address, routing information , passwords or other specific configuration information

Management ports
Routers have physical connectors that are used to manage the router Unlike Ethernet and serial interfaces , management ports are not used for packet forwarding The most common management port is the console port , the console port is used to configure the router without the need for network access to that router Another management port is the auxiliary port , but not all routers have auxiliary port
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

14

Router interfaces
Refer to physical connectors on the router , who main purpose to receive and forward packets For example : a Router usually has fast Ethernet interfaces for connection to different LANs and various types of WANs interfaces to connect varity of serial links including T1, DSL , ISDN

Basic router Configuration


The first prompt the user mode prompt Router> The second prompt the privileged mode prompt Router>enable Router#
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

15

Global configuration mode prompt Router# conf t Router(config)#

Router Rename
Router>enable Router# conf t Router(config)# hostname r1 R1(config)#

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

16

Examining Router interfaces


Physically connecting a WAN interface The WAN physical layer describes the interface between the data terminal equipment (DTE) and the data circuit-terminating equipment (DCE) The DCE is the service provider and the DTE is the attached device The router is the DTE device and is connected to a CSU/DSU which is the DCE device The DCE device (CSU/DSU) is used to convert the data from the router (DTE device ) into a form acceptable to the WAN service provider

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

17

The (CSU/DSU) DCE device is also responsible for converting the data from the WAN service provider into a form acceptable by the router (DTE)device Router is usually connected to the (CSU/DSU) using a serial DTE cable Serial interfaces require a clock signal to control the timing of the communication In most environments the service provider (DCE) device such as (CSU/DSU) will provide the clock by default However in a lab environment we are not using any (CSU/DSU) and we don not have ISP Configure the clock signal on the serial interface using the clock rate command You can distinguish DTE from DCE by looking at the connector between the two cables , the DTE cable has a male connectors and DCE has a female connectors
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

18

You can use the show controllers command to determine which end of the cable is attached to the interface Example : R1#show controllers serial0/0/0 The available clock rate in bit per second 1200, 2400, 9600, 19200, 38400, 56000, 64000, 72000, 125000, 148000, 500000, 800000, 1000000, 1300000, 2000000, and 4000000. Some bit rates might not be available on certain serial interfaces. Because Serial 0/0/0 interface on R1 has the DCE cable attached, we will configure that interface with a clock rate. R1(config)#interface serial 0/0/0 R1(config-if)#clock rate 64000

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

19

Router Interface Configuration


R1>enable R1# conf t R1(config)#interface serial 0/0/0 R1(config-if)# ip address 192.168.2.1 255.255.255.0 R1(config-if)# no shutdown R1(config-if)#exit

Verifying basic router configuration


R1#show ip interface brief

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

20

Configuring an Ethernet Interface


R1>enable R1# conf t R1(config)#interface fastethernet 0/0 R1(config-if)#ip address 172.16.3.1 255.255.255.0 R1(config-if)#no shutdown

Changing IP Address
R1>enable R1# conf t R1(config)#interface serial 0/0/0 R1(config-if)# shutdown R1(config-if)# no ip address

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

21

Introducing the Routing Table


The primary function of a router is to forward a packet toward its destination network, which is the destination IP address of the packet. To do this, a router needs to search the routing information stored in its routing table. A routing table is a data file in RAM that is used to store route information about directly connected and remote networks. The routing table contains network/next hop associations. These associations tell a router that a particular destination can be optimally reached by sending the packet to a specific router that represents the "next hop" on the way to the final destination. The next hop association can also be the outgoing or exit interface to the final destination.
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

22

Routing table Principals

1- every router makes its decision alone , based on the information it has in its own routing table 2- the fact that one router has certain information in its routing table does not mean that other routers have the same information 3- routing information a bout a path from one network to another does not provide routing information about the reverse or return path

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

23

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

24

The command for configuring a static route is ip route


Router(config)#ip route network-address subnet-mask {ip-address (Next Hop)| exit-interface }

Configuring a static route with the next hop :


R1(config)#ip route 192.168.1.0 255.255.255.0 172.16.2.2 R1(config)#ip route 192.168.2.0 255.255.255.0 172.16.2.2

Configuring a static route with the exit interface :


R1(config)#ip route 192.168.1.0 255.255.255.0 serial0/0/0 R1(config)#ip route 192.168.2.0 255.255.255.0 serial0/0/0
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

25

Modifying static routes


R1(config)#no ip route 192.168.2.0 255.255.255.0 172.16.2.2

Examining Routing Table


R1#Show ip rout Is used to display the routing table

R1#ping 192.168.2.4

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

26

Dynamic routing Protocols


Routing protocols are used to facilitate the exchange of routing information between routers Routing protocols allow routers to dynamically share information about remote networks and automatically add this information to their own routing tables Routing protocols determine the best path to each network which is then added to the routing table One of the primary benefits to using a dynamic routing protocols is that routers exchange routing information whenever there is a topology change
ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

27

Compared to static routing , dynamic routing protocols require less administrative overhead . However the expense of using dynamic routing protocols is dedicating part of routers resources for protocol operation including CPU and network link bandwidth

The purpose of dynamic routing protocols :


- Discovery of remote networks

- Maintaining up to data routing information


- Choosing the best path to destination networks - Ability to find a new best path if the current path is no longer a available
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

28

Autonomous system (AS) otherwise known as a routing domain AS : Is a collection of routers under a common administration Ex. : companys internal network and an ISPs Network , So we need interior and exterior routing protocols Interior gateway protocols (IGP) : are used for intra Autonomous system routing - routing inside an Autonomous system Exterior gateway protocols (EGP) : are used for inter- Autonomous system routing routing between Autonomous systems

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

29

Characteristics of IGP and EGP routing protocols IGP s : are used for routing within a routing domain , those networks within the control of a single organization An autonomous system is commonly comprised of many individual networks belonging to companies An IGP is used to route within the autonomous system and also used to route with the individual networks themselves IGPs Include ( RIP , IGRP , EIGRP , OSPF , IS-IS ) Routing protocols uses a metric to determine the best path to a network the metric used by the routing protocol RIP is a hop count , which is the number of routers that a packet must traverse in reaching another network
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

30

OSPF Protocol uses a bandwidth to determine the shortest path EGP : are designed for use between different autonomous systems that are under the control of different administrations BGP : is the only currently viable EGP and is the routing protocol used by the internet BGP is typically used between ISPs and between a company and ISP

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

31

Interior Gateway Protocols (IGPs) can be Classified as two types :


1- Distance Victor 2- Link state Distance Victor : means that the routes are advertised as vectors of distance and direction - Distance is defined in terms of a metric such as hop count and direction is simply the next hop router or exit interface Link state protocol domain : - Using a link state routing protocol is like having a complete map of the network topology
ITE PC v4.0 Chapter 1

- Usually occurring in large networks


2007 Cisco Systems, Inc. All rights reserved. Cisco Public

32

Metric
Purpose of metric : There are cases when routing protocol learns of more than one route to the same destination

To select the best path , the routing protocol must be able to evaluate and differentiate between available paths
For this reason a metric is used

A metric is used to determine which path is most preferable when there are multiple paths to the same remote networks
Ex.: RIP uses hop count , EIGRP uses a compilation of bandwidth and delay , OSPF uses bandwidth
ITE PC v4.0 Chapter 1 2007 Cisco Systems, Inc. All rights reserved. Cisco Public

33

R1(config)#router ?

R1(config)#router rip R1(config-router)#network 192.168.1.0 R1(config-router)#network 192.168.2.0

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

34

Telnet Command
Router (config)#enable password 123 Router(config)#line vty 0-15 Router(config-line)#password hossam Router(config-line)#login Router(config-line)#do wr >telnet IP Address Enable mode Password Connections Telnet password

in pc command prompt

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

35

RIP v1 Broadcast Classful No authentication

RIP v2 Multicast classless authentication

RIP Protocol Passive Interface


R1(config)#router rip R1(config-router)#network 192.168.1.0 R1(config-router)#network 173.100.100.0

Default Route
R1(config)#ip route 0.0.0.0 0.0.0.0 next hop

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

36

OSPF
Link state Link state updates Neighbors table Topology table Routing table (Bandwidth)

- Router ID

- Physical port - Loopback interface

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

37

Area 0
Backbone router

Area 1
ABR area border router

Area 2
ABR area border router

Internal Router

Internal Router

Topology Table

Topology Table

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

38

OSPF metric

(cost) = 10^8/bandwidth

OSPF Topology
- Point to point
- Broadcast multi-access - Nonbroadcast multi-access

hello message 10 s.
hello message 10 s. hello message 30 s.

dead message 40 s
dead message 40 s dead message 120 s

DR Router and BDR Router


ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

39

DR Router and BDR Router (interface number from 0 to 255) The highest interface number DR and the second BDR OSPF Multicast protocol Router(config)#router ospf 1 #network 192.168.2.2 0.0.0.255 area 1 process number(1-65535) c. network wild card area

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

40

Password recovery
1- Reboot Router 2- press ctrl+break 3- change confreg to 0x2142 4-reset

default = 0x2102

DHCP
#Ip dhcp pool hossam #network 192.168.2.0 255.255.255.0 #default-router 192.168.2.1 #do wr

ITE PC v4.0 Chapter 1

2007 Cisco Systems, Inc. All rights reserved.

Cisco Public

41

Das könnte Ihnen auch gefallen