jueves, 12 de junio de 2014

CCNA v5.0 modul 2 Chapter: 4 - Routing Concepts

11. Routing Concepts
1.1 Introduction

A router connects one network to another network. The router is responsible for the delivery of packets across different networks.

The router uses its routing table to determine the best path to use to forward a packet. It is the responsibility of the routers to deliver those packets in a timely manner.
     
 1.2 Characteristics of a Network
Speed, Cost, Security, Availability, Scalability, Reliability.
     
1.3 Router is a computer
RAM: IP routing table, Ethernet ARP table) and buffers for packet processing
ROM(firmware): storage for bootup, basic diagnostic software, and a limited IOS.
NVRAM: Startup-config
Flash: IOS and other system-related files.
Ports: LAN(local) or WAN, AUX, CONSOLE, USB.

1.4 Routers Choose Best Paths
The primary functions of a router are to: 
·      Determine the best path to send packets (routing table)
·      Forward packets toward their destination

When the router receives a packet, it examines the destination address of the packet and uses the routing table to search for the best path to that network. The routing table also includes the interface to be used to forward packets for each known network. When a match is found, the router encapsulates the packet into the data link frame of the outgoing or exit interface, and the packet is forwarded toward its destination.

The Data link encapsulation depends on the type of interface on the router and the type of medium to which it connects. Ethernet, PPP, Frame Relay, DSL, cable, and wireless (802.11, Bluetooth).

1.5 Packet Forwarding Mechanisms




Slow
packet-triggered / Fast
change-triggered /  Very fast

-       Process switching: older packet forwarding mechanism. Packet->control plane (CPU matches the destination with routing table) and then determines the exit interface and forwards the packet.
Process for every packets slow and rarely implemented.
-       Fast Switching: fast-switching cache to store next-hop information. Flow information stored.
-       Cisco Express Forwarding(CEF): most recent and preferred packet forwarding. CEF builds a Forwarding Information Base (FIB), and an ADJACENCY TABLE. The FIB contains pre-computed reverse lookups, next hop information for routes including the interface and Layer 2 information.

2.     Connect devices
2.1 Connect to a network
Network devices and end users typically connect to a network using a wired Ethernet or wireless connection
2.2 Defaut Gateway
To enable network access, devices must be configured:
-       IP address: identifies a unique host on a local network.
-       Subnet mask: Identifies with which network subnet the host can communicate.
-       Default gateway: dentifies the router to send a packet to when the destination is not on the same local network subnet.

The default gateway is the destination that routes traffic from the local network to devices on remote networks
Note: A router is also usually configured with its own default gateway. This is sometimes known as the Gateway of Last Resort. (could be also IP address of another router!)

2.3 Document Network Addressing
When designing the documentation is important with this minimum details: Devices name, IP address and subnet mask, Default gateway.
Topology diagram - Provides a visual reference that indicates the physical connectivity and logical Layer 3 addressing. VISIO

DHCP services can be provided by a Cisco Catalyst switch or a Cisco ISR.



2.4
Devices LEDs



2.5 Console Access
infrastructure devices are commonly accessed remotely using Secure Shell (SSH) or HyperText Transfer Protocol Secure (HTTPS). Console access is really only required when initially configuring a device, or if remote access fails.
Console access requires: 
-       Console cable - RJ-45-to-DB-9 console cable
-       Terminal emulation software - Tera Term, PuTTY, HyperTerminal
The Cisco ISR G2 supports a USB serial console connection. To establish connectivity, a USB Type-A to USB Type-B (mini-B USB)
   ßà  
   (Driver is required download at cisco.com)

2.6 Enable IP on a Switch
Configuring VLAN 1 with IP address and mask also a ip gateway is needed.

2.7 Configure Basic Router Settings
Cisco routers and Cisco switches have many similarities.
When configuring a Cisco switch or router, the following basic tasks should be performed first: 
-       Name the device - Distinguishes it from other routers.
-       Secure management access - Secures privileged EXEC, user EXEC, and Telnet access, and encrypts passwords to their highest level.
-       Configure a banner - Provides legal notification of unauthorized access.

2.8 Configure an IPv4 Router Interface
R1(config)# interface GigabitEthernet0/1
R1(config-if)# description xxxxxx
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown

In case of interface serial DCE:  (IN DTE= ERROR)
R1(config-if)# Clock rate 64000

2.9 Configure an IPv6 Router Interface
R1(config)# interface GigabitEthernet0/1
R1(config-if)# description xxxxxx
R1(config-if)#ipv6 address  x:x:x:x:x:x:x:x/YY
R1(config-if)#no shutdown

In case of interface serial DCE:  (IN DTE= ERROR)
R1(config-if)# Clock rate 64000
Note: An interface can generate its own IPv6 link-local address without having a global unicast address by using the ipv6 enable interface configuration command.
- IPv6 interfaces will typically have more than one IPv6 address
- IPv6 also supports the ability for an interface to have multiple IPv6 global unicast addresses from the same subnet.

Create a global unicast or link-local IPv6 address: 
- ipv6 address ipv6-address / prefix-length - Creates a global unicast IPv6 address as specified.
- ipv6 address ipv6-address / prefix-length eui-64 - Configures a global unicast IPv6 address with an interface identifier (ID) in the low-order 64 bits of the IPv6 address using the EUI-64 process.
- ipv6 address ipv6-address / prefix-length link-local - Configures a static link-local address on the interface that is used instead of the link-local address that is automatically configured when the global unicast IPv6 address is assigned to the interface or enabled using the ipv6 enable interface command. Recall, the ipv6 enable interface command is used to automatically create an IPv6 link-local address whether or not an IPv6 global unicast address has been assigned.

3. Configure an IPv4 Loopback Interface
The loopback interface is a logical interface internal to the router. It is not assigned to a physical port and can therefore never be connected to any other device. It is considered a software interface that is automatically placed in an UP state, as long as the router is functioning.

(OSPF) routing process. The router use loopback for identification instead IP address assigned in port that may goes down.

Configure:
R1 (config)# interface loopback number  ß unique number. Router accept  various loopback.
R1 (config-if)# ip address ip-address  subnet-mask 
R1 (config-if)# exit
4      Verify Connectivity of Directly Connected Networks
4.1   Verify IPv6 Interface Settings
R1#show ipv6 interface brief
R1#show ipv6 interface gigabitethernet
R1#show ipv6 route

4.2   Filter Show Command Output
Command, enter a pipe (|) character after the show (section, include, exclude, begin)

4.3   Command History Feature
To recall commands: UP arrow or Crt+p
To recall Most recent commands: Down arrow or Ctrl+N
R1#show history
R1#terminal history size <0-256>  Size of history buffer

5. Routing decisions
Switching Packets Between Networks
5.1 Router Switching Function

Router:
Primary function = forwarding packets

Accomplished by using a switching function, which is the process used by a router to accept a packet on one interface and forward it out of another interface.

Note: In this context, the term “switching” literally means moving packets from source to destination and should not be confused with the function of a Layer 2 switch.

5.2 Send a Packet

AND operation is performed to check if the destination is in the same network.
[  IPv4 address + subnet mask  ]

PC1 have ARP cache for the MAC address

If not:
ARP request to acquire the address

IPv4: ARP process
IPv6: ICMPv6 process

5.3 Forward to the Next Hop
The following processes take place when Router receives the Ethernet frame from PC:
1)Examines the destination MAC address, which matches the MAC address of the receiving interface. copies the frame into its buffer.
2)Identifies the Ethernet Type field as: 0x800 (Ethernet frame contains an IPv4 packet)
3)Ethernet frame contains an IPv4 packet
4)The destination IPv4 address of the packet does not match any of the directly connected networks, the router consults its routing table to route this packet. With a network , next-hops and exit interface the router encapsulate the ipv4 packet in a new Ethernet frame with the destination MAC address of the IPv4 address of the next-hop router.

For the exit of this packet a  new ARP request is performed for the next-hops address.

5.4  Packet Routing
Same process of the previous example but the exit in this case is a Serial interface he doesn’t need to
resolve the next-hop IPv4 address with a destination MAC address.
Example in point-to-point (P2P) serial connection Frame addressing:
Address: 0x8F  (source address)
Control: 0x00   (destination address)

When the interface is a point-to-point (P2P) serial connection, the router encapsulates the IPv4 packet into the proper data link frame format used by the exit interface (HDLC, PPP, etc.). Because there are no MAC addresses on serial interfaces, R2 sets the data link destination address to an equivalent of a broadcast.

5.5 Reach the Destination
The following processes take place when the frame arrives


1)copies the data link PPP frame into its buffer.
2) de-encapsulates the data link PPP frame
3) Searches the routing table for the destination IPv4 address of the packet. The routing table has a route to a directly connected network on R3. This means that the packet can be sent directly to the destination device and does not need to be sent to another router.

6. Path Determination
6.1  Routing Decisions


The routing table search results in one of three path determinations:
·      Directly connected network : packet is a host address on the same network as the interface of the router.
·      Remote network: Remote networks can only be reached by forwarding packets to another router.
·      No route determined: A Gateway of Last Resort is set when a default route is configured on a router.

6.2 Best Path
Determining the best path involves the evaluation of multiple paths.
value metric= quantitative value used to measure the distance to a given network
The best path to a network is the path with the lowest metric.

Dynamic routing protocols typically use their own rules and metrics to build and update routing tables

The routing algorithm generates a value, or a metric, for each path through the network.

Metrics can be based on either a single characteristic or several characteristics of a path.

Some routing protocols can base route selection on multiple metrics, combining them into a single metric.

Dynamic protocols and the metrics they use:
·      Routing Information Protocol (RIP) - Hop count
·      Open Shortest Path First (OSPF) - Cisco’s cost based on cumulative bandwidth from source to destination
·      Enhanced Interior Gateway Routing Protocol (EIGRP) - Bandwidth, delay, load, reliability

6.3 Load Balancing

In routing table 2 equally cost metric  path the reach the same destination = equal cost load balancing
                                              FOR STATIC ROUTING AND DYNAMIC ROUTING
Router forwards packets using the multiple exit interfaces listed in the routing table.

Load balancing can increase the effectiveness and performance of the network.
Note: Only EIGRP supports unequal cost load balancing.

6.4 Administrative Distance

Router with different protocols for routing.
This table helps for the decision.

Example: We have a routing table filled and the router is configured with static, RIP and EIGRP the decision chosen will be static


7. Routing operations
7.1 the Routing Table (Stored in RAM)

Routing table of a router stores information about: 

·      Directly connected routes - These routes come from the active router interfaces. Routers add a directly connected route when an interface is configured with an IP address and is activated.

·      Remote routes - These are remote networks connected to other routers. Routes to these networks can either be statically configured or dynamically configured using dynamic routing protocols.


7.2 Routing Table Sources
The show ip route display IPv4 routing table of a router.

AND provides additional route information, including how the route was learned, how long the route has been in the table, and which specific interface to use to get to a predefined destination.

Entries in the routing table can be added as: 
-       Local Route interfaces - Added when an interface is configured and active. This entry is only displayed in IOS 15 or newer for IPv4 routes and all IOS releases for IPv6 routes.
-       Directly connected interfaces - Added to the routing table when an interface is configured and active.
-       Static routes - Added when a route is manually configured and the exit interface is active.
-       Dynamic routing protocol - Added when routing protocols that dynamically learn about the network, such as EIGRP or OSPF, are implemented and networks are identified.

CCNA CODE:

 L - Identifies the address assigned to a router’s interface. This allows the router to efficiently determine when it receives a packet for the interface instead of being forwarded.
C - Identifies a directly connected network.
S - Identifies a static route created to reach a specific network.
D - Identifies a dynamically learned network from another router using EIGRP.
O - Identifies a dynamically learned network from another router using the OSPF routing protocol.

7.3 Remote Network Routing Entries

1)Route source:
2)Destination network:
3)Administrative distance (AD):
4)Metric:
4)Next-hop:
5)Route timestamp:
6)Outgoing interface:


8. Directly Connected Routes
8.1 Directly Connected Interfaces
A new deployed router without a configuration doesn’t have routing table.

Before an interface is considered UP/UP most have:

-       Be assigned a valid IPv4 or IPv6 address

-       Be activated with the no shutdown command


-       Receive a carrier signal from another device (router, switch, host, etc.)

8.2 Directly Connected Routing table Entries
An active, properly configured, directly connected interface actually creates two routing table entries.

Route source - how the route was learned. Directly connected interfaces have two route source codes. ‘C’ identifies a directly connected network. ’L’ identifies the IPv4 address assigned to the router’s interface.
Destination network - remote network.
Outgoing interface - exit interface

NOTE: Prior IOS 15 (L) Not displayed.

IPV6: show ipv2  route 2001:db8:acad:1::/64

9. Static Routes  (CODE: “S”)
After directly connected interfaces are configured and added to the routing table, then static or dynamic routing can be implemented. Static routes are manually configured.

Two common types of static routes in the routing table: 
-       Static route to a specific network
-       Default static route
IPv4:
R1(config)#ip route network mask {next-hop-ip | exit-intf}
R1(config)#ip route 0.0.0.0 0.0.0.0 {exit-intf | next-hop-ip}        Default candidate “*”
IPv6:
R1(config)#ipv6 route x:x:x:x:x:x:x:x /mask  {ipv6-address | interface-type interface-number}
R1(config)#ipv6 route ::/0 {ipv6-address | interface-type interface-number} ßDefault 0.0.0.0 0.0.0.0(ipv4)

10. Dynamic Routing Protocols
10.1 Dynamic Routing
Dynamic routing protocols perform several activities, including network discovery and maintaining routing tables. These networks, and the best path to each, are added to the routing table of the router, and identified as a network learned by a specific dynamic routing protocol.

10.2 IPv4 Routing Protocols

Cisco ISR routers supported ipv4 protocols:
-       EIGRP - Enhanced Interior Gateway Routing Protocol    (CCNA)
-       OSPF - Open Shortest Path First                                       (CCNA)
-       IS-IS - Intermediate System-to-Intermediate System
-       RIP - Routing Information Protocol

To find with one is supported by our router:
R1(config)# router ?

The entry beginning with ‘D*EX’ identifies that the source of this entry was EIGRP (‘D’). The route is a candidate to be a default route (‘*’), and the route is an external route (‘*EX’) forwarded by EIGRP.





10.3 IPv6 Routing Protocols
-       RIPng (RIP next generation)
-       OSPFv3
-       EIGRP for IPv6
To enable IPv6 routers to forward traffic

R1(config)# ipv6 unicast-routing

No hay comentarios:

Publicar un comentario