Sie sind auf Seite 1von 54

IP Routing

(What IS Routing?)

www.ine.com
What is “Routing”?
» Process of forwarding packets between
networks.
» Basic components needed to route:
• Routable Packet (IPv4, IPv6, etc)
• Network address
• Subnet mask
• Next Hop
• Metric
Copyright © www.INE.com
Routing: What Happens to the Packet (1)

1.2.1.254 1.2.1.253 1.3.1.253


1.3.1.254
MAC = CC MAC = DD L2-Addr = XX
L2-Addr = ZZ
Fast0/0 Fast0/0 WAN2 WAN1
D 1.2.1.0 /24 F
E 1.3.1.0 /24
Fast1/1 Fast0/0
1.1.1.254 1.4.1.254
MAC = BB MAC = EE

1.4.1.0 /24
1.1.1.0 /24
1.1.1.1 1.4.1.1
MAC = AA MAC = AF

Copyright © www.INE.com
Routing: What Happens to the Packet (2)

1.2.1.254 1.2.1.253 1.3.1.253


1.3.1.254
MAC = CC MAC = DD L2-Addr = XX
L2-Addr = ZZ
Fast0/0 Fast0/0 WAN2 WAN1
D 1.2.1.0 /24 E F
1.3.1.0 /24
Fast1/1 Fast0/0
1.1.1.254 1.4.1.254
I need to send a packet to MAC = EE
MAC = BB
1.4.1.1.
That address is not on my network. Who
should I direct my Ethernet Frame to?? My
default gateway!!

1.4.1.0 /24
1.1.1.0 /24
1.1.1.1 1.4.1.1
MAC = AA MAC = AF

Copyright © www.INE.com
Routing: What Happens to the Packet (3)
= L2 Header
= L3 Header
1.2.1.254 1.2.1.253 1.3.1.253
1.3.1.254
MAC = CC MAC = DD L2-Addr = XX
L2-Addr = ZZ
Fast0/0 Fast0/0 WAN2 WAN1
D 1.2.1.0 /24 F
E 1.3.1.0 /24
Fast1/1 Fast0/0
1.1.1.254 1.4.1.254
MAC = BB MAC = EE

D=BB D=1.4.1.1
S=AA S=1.1.1.1
1.4.1.0 /24
1.1.1.0 /24
1.1.1.1 1.4.1.1
MAC = AA MAC = AF

Copyright © www.INE.com
Routing: What Happens to the Packet (4)
I’m not connected to anything that looks But router 1.2.1.253 has told me HE
like 1.4.x.x knows how to get to 1.4.x.x!!

1.2.1.254 1.2.1.253 1.3.1.253


1.3.1.254
MAC = CC MAC = DD L2-Addr = XX
L2-Addr = ZZ
Fast0/0 Fast0/0 WAN2 WAN1
D 1.2.1.0 /24 F
E 1.3.1.0 /24
D=BB D=1.4.1.1 Fast0/0
S=AA S=1.1.1.1 1.4.1.254
Fast1/1 MAC = EE
1.1.1.254
MAC = BB

1.4.1.0 /24
1.1.1.0 /24
1.1.1.1 1.4.1.1
MAC = AA MAC = AF

Copyright © www.INE.com
= L2 Header = L3 Header
Routing: What Happens to the Packet (5)
1.2.1.254 1.2.1.253
MAC = CC MAC = DD
Fast0/0 Fast0/0 1.3.1.253
1.3.1.254
D=1.4.1.1 D=DD L2-Addr = XX
L2-Addr = ZZ
S=1.1.1.1 S=CC WAN2 WAN1
D 1.2.1.0 /24 E F
1.3.1.0 /24
Fast0/0
1.4.1.254
Fast1/1 MAC = EE
1.1.1.254
MAC = BB

1.4.1.0 /24
1.1.1.0 /24
1.1.1.1 1.4.1.1
MAC = AA MAC = AF

Copyright © www.INE.com
= L2 Header = L3 Header
Routing: What Happens to the Packet (6)
I’m not connected to anything that looks But router 1.3.1.254 has told me HE
like 1.4.x.x knows how to get to 1.4.x.x!!

1.2.1.254 1.3.1.253
1.2.1.253 1.3.1.254
MAC = CC L2-Addr = XX
MAC = DD L2-Addr = ZZ
Fast0/0 Fast0/0 WAN2 WAN1
D 1.2.1.0 /24 E F
1.3.1.0 /24
D=1.4.1.1 D=DD Fast0/0
S=1.1.1.1 S=CC 1.4.1.254
Fast1/1 MAC = EE
1.1.1.254
MAC = BB

1.4.1.0 /24
1.1.1.0 /24
1.1.1.1 1.4.1.1
MAC = AA MAC = AF

Copyright © www.INE.com
= L2 Header = L3 Header
Routing: What Happens to the Packet (7)

1.2.1.254 1.2.1.253 D=1.4.1.1 D=ZZ


MAC = CC MAC = DD S=1.1.1.1 S=XX
Fast0/0 Fast0/0 WAN2 WAN1
D 1.2.1.0 /24 E 1.3.1.253 1.3.1.254 F
1.3.1.0 /24
L2-Addr = XX L2-Addr = ZZ Fast0/0
1.4.1.254
Fast1/1 MAC = EE
1.1.1.254
MAC = BB

1.4.1.0 /24
1.1.1.0 /24
1.1.1.1 1.4.1.1
MAC = AA MAC = AF

Copyright © www.INE.com
= L2 Header = L3 Header
Routing: What Happens to the Packet (8)
I’m directly connected to the 1.4.x.x
network…and I’ve learned about 1.4.1.1’s
MAC address via…ARP!!
1.2.1.254 1.2.1.253
MAC = CC MAC = DD
Fast0/0 Fast0/0 WAN2 WAN1
D 1.2.1.0 /24 1.3.1.253 1.3.1.254 F
E 1.3.1.0 /24
L2-Addr = XX L2-Addr = ZZ Fast0/0
1.4.1.254
Fast1/1 MAC = EE
1.1.1.254
MAC = BB
D=1.4.1.1 D=AF
S=1.1.1.1 S=EE
1.4.1.0 /24
1.1.1.0 /24
1.1.1.1 1.4.1.1
MAC = AA MAC = AF

Copyright © www.INE.com
= L2 Header = L3 Header
IP Routing
(What is the “best”?)

www.ine.com
General Rules of Routing
» Router will only use routes with reachable “next
hops”
» Routers will only use the “best” routes
» Routes must be “believable” (how do I know this
route is still good?)
» Router will only accept routes that match its own,
active protocols
• No IPv6 routes accepted if router not an IPv6 host
Copyright © www.INE.com
Types of Routes
» Connected

» Static

» Dynamic

Copyright © www.INE.com
Routing Components
» Administrative Distance (AD)
• Defines trustworthiness of a routing protocol
• 8-bit numbering system
• Ranges from 0 through 255

Copyright © www.INE.com
Administrative Distance Values
Protocols AD Value
Connected 0
Static 1
EIGRP (Internal routes) 90
OSPF 110
IS-IS 115
RIP 120
EIGRP (External routes) 170
iBGP/eBGP 200/20
Unreachable 255
Copyright © www.INE.com
IP Routing
(IGP and EGP)

www.ine.com
Dynamic Protocols: IGP or EGP?
» Autonomous System;
• Collection of networks all under one administrative authority.
» IGP;
• Interior Gateway Protocol
• Designed to provide prefix reachability information within an
Autonomous System
» EGP;
• Exterior Gateway Protocol
• Designed to provide prefix reachability information between
different Autonomous Systems.
Copyright © www.INE.com
IP Routing
(Classifying Dynamic Routing Protocols)

www.ine.com
Protocol Characteristics (1)
» RPs can be classified into one-of-four categories
that broadly define operational characteristics;
• Distance Vector (IGPs)
• Link-State (IGPs)
• Advanced Distance Vector (Hybrid) (IGPs)
• Path Vector (EGP)

Copyright © www.INE.com
Protocol Characteristics (2)
» Once categorized, assumptions about the protocol
can be made about such things as:
• Neighbor requirements
• Route Maintenance (is this route still believable after
some prolonged time?)
• Visibility into network topology
• Necessity of different data structures (tables, databases,
etc)

Copyright © www.INE.com
Protocol Characteristics - Routing Updates
» Incremental update
• Only changes are sent in the routing update
» Full update
• All of the routing table is sent in the update
» Periodic update
• Sent in the specified time interval
» Triggered update
• Sent whenever change is detected
Copyright © www.INE.com
Distance Vector
» Neighbor requirements;
• No neighborships required
» Route Maintenance (is this route still believable after some prolonged
time?)
• Resend routes after defined interval
» Visibility into network topology
• Knowledge of topology only extends to directly-connected routers.
» Necessity of different data structures (tables, databases, etc)
• Database of learned routes
» Protocol Examples:
• RIP (v1 and v2), IGRP (deprecated)
Copyright © www.INE.com
Link State (1)
» Neighbor requirements;
• Neighborships required
» Route Maintenance (is this route still believable after some
prolonged time?)
• Periodic Hello’s between neighbors
• Regenerate LSAs after defined interval
» Visibility into network topology
• Complete visibility of entire topology for directly-connected areas.

Copyright © www.INE.com
Link State (2)
» Necessity of different data structures (tables, databases,
etc)
• Database of learned LSAs (Link State Database)
• Neighbor Table
• SPF Tree
» Protocol Examples:
• OSPF, ISIS

Copyright © www.INE.com
Advanced Distance Vector / Hybrid (1)
» Neighbor requirements;
• Neighborships required (Link State characteristic)
» Route Maintenance (is this route still believable after some
prolonged time?)
• Periodic Hello’s between neighbors (Link State characteristic)
» Visibility into network topology
• Knowledge of topology only extends to directly-connected routers.
(Distance Vector characteristic)

Copyright © www.INE.com
Advanced Distance Vector / Hybrid (2)
» Data structures (tables, databases, etc)
• Topology Table of learned routes (Link State
characteristic)
• Neighbor Table (Link State characteristic)
» Protocol Examples:
• EIGRP

Copyright © www.INE.com
Path Vector
» Neighbor requirements;
• Neighborships required
» Route Maintenance (is this route still believable after some prolonged
time?)
• Periodic Hello’s between neighbors
» Visibility into network topology
• No Knowledge of topology. Relies on IGP’s for this.
» Necessity of different data structures (tables, databases, etc)
• Not necessary to know at ICND1 level
» Protocol Examples:
• BGP
Copyright © www.INE.com
Routing Metric
» Used for best path selection process
» IGPs use metric for shortest path calculation
» Lower value is preferred
» Depends on the routing protocol architecture
• EIGRP metric = composite formula utilizing link
bandwidth + delay
• RIP metric = hop count
• OSPF metric = link bandwidth
Copyright © www.INE.com
Static Routing

www.ine.com
Static Routing
» Typically used in the small network
» Information on destination prefix and gateway
are required
» Can increase administrative overhead
» No dynamic fail-over
» Preferred over dynamic routing protocols
because of lower administrative distance
Copyright © www.INE.com
Implementing Static Routing
» Configuration (next-hop)
• Router(config)#ip route <destination-network>
<destination subnet mask> <next-hop>

» Configuration (outgoing interface)


• Router(config)#ip route <destination-network>
<destination subnet mask> <outgoing interface>

Copyright © www.INE.com
Verification
» Verification commands
• Router# show ip route
• Router# show ip route static
• Router# show running-config | include ip route
• Router# show ip protocol
• Router# show ip route <prefix> <mask>

Copyright © www.INE.com
Floating Static Route

www.ine.com
Floating Static Route
» Can be configured as a backup route
» Administrative distance can be increased to
make a route backup
» Provide redundancy between two statically
defined routes

Copyright © www.INE.com
Implementing Static Route Floating
» Configuration
• Router(config)#ip route <destination-network>
<destination subnet mask> <next-hop> <AD value>

Copyright © www.INE.com
Verification
» Verification commands
• Router# show ip route
• Router# show running-config | include ip route
• Router# show ip route <prefix> <mask>

Copyright © www.INE.com
Troubleshoot
» Troubleshooting commands
• Router# debug ip packet
• Router# defaut ip routing

Copyright © www.INE.com
Inter-VLAN Routing

www.ine.com
Inter-VLAN Routing
» Two ways to configure inter-VLAN routing
• Router-on-a-stick model
• Routing with SVI
» A router is usually configured using sub-
interface
» Single point of failure

Copyright © www.INE.com
Implementing Inter-VLAN Routing
» Configuring a trunk interface that is connected to
the router
• Switch(config-if)# switchport mode trunk
» Configuring sub-interface for respective VLANs
• Router(config-sub-if)# encapsulation dot1q <vlan-id>
• Router(config-sub-if)# ip address <address> <subnet
mask>

Copyright © www.INE.com
Implementing Inter-VLAN Routing (SVIs)
» Multilayer Switches can route between VLANs

» Requires a separate SVI for each VLAN


• Each SVI needs a physical port (Access or Trunk) in that
VLAN.

» Hosts point to IP address on SVI as their default


gateway.
Copyright © www.INE.com
Implementing Inter-VLAN Routing (SVIs)
» Configuration Example
Switch(config)# interface vlan 2
Switch(config-if)#ip add 2.2.2.2 255.0.0.0
Switch(config-if)#no shutdown

Switch(config)# interface vlan 3


Switch(config-if)#ip add 3.3.3.3 255.0.0.0
Switch(config-if)#no shutdown
Copyright © www.INE.com
Verifying Inter-VLAN Routing
» Verification commands
• Switch# show mac address-table
• Router# show ip route connected
• Optionally, “ping” is the best way to test inter-VLAN
routing

Copyright © www.INE.com
Dynamic Routing with RIPv2

www.ine.com
RIP Overview
» RIP = Routing Information Protocol RFC 2453
» IGP / Distance Vector
» Metric = Hop Count
» Capable of load-balancing up to 6 equal-cost
paths.
» Routing Updates repeated every 30-seconds
• RIPv2 utilizes Multicast Destination Address
• IPv4 = 224.0.0.9
• IPv6 = FF02::9
Copyright © www.INE.com
RIP Network Topology Visibility
IPv4 Routing Table
C 5.0.0.0/8 via Interface-1
A C 6.0.0.0/8 via Interface-2
R Subnet-1 via 5.5.5.5
Subnet-2 Subnet-1 R Subnet-2 via 5.5.5.5
R Subnet-3 via 5.5.5.5
R Subnet-4 via 5.5.5.5
R Subnet-7 via 6.6.6.6
B C G

Subnet-4 Subnet-7
Subnet-3

Subnet-5 Subnet-6
D 5.5.5.5 1 E 2 6.6.6.6 F

Router-E knows about Subnets 1-4 and Subnet-7…but not what the topology looks like that
contains those subnets.
Copyright © www.INE.com
RIP Metrics

A
Subnet-1

“Subnet-1 = 1-hop”

B C G

“Subnet-1 = 1-hop” Subnet-7


“Subnet-1 = 2-hops”

“Subnet-1 = 2-hops” “Subnet-1 = 3-hops”

D 5.5.5.5 1 E 2 6.6.6.6 F

My best path to Subnet-1


is via Router-C!
Copyright © www.INE.com
IGP Dynamic Routing: Configuration Steps
1. Ensure there is at least one, functional interface
configured with an IP address on the device.
2. Enable the routing protocol
3. Define networks for which the routing protocol
will be active.
4. Enable authentication for the routing protocol
(optional).

Copyright © www.INE.com
RIP Configuration Examples
5.5.5.0 /24 6.6.6.0 /24 7.7.7.0 /24
D Fast0/0 Fast0/0 E Fast0/1 Fast0/1 F Fast0/0

Interface FastEthernet0/0 Interface FastEthernet0/0 Interface FastEthernet0/0


ip address 5.5.5.1 255.255.255.0 ip address 5.5.5.2 255.255.255.0 ip address 7.7.7.1 255.255.255.0
no shutdown no shutdown no shutdown
! ! !
Router rip Interface FastEthernet0/1 Interface FastEthernet0/1
version 2 ip address 6.6.6.1 255.255.255.0 ip address 6.6.6.2 255.255.255.0
no auto-summary no shutdown no shutdown
network 5.0.0.0 ! !
Router rip (How would YOU configure RIP
version 2 on this router to achieve end-to-
no auto-summary end IP reachability??)
network 5.0.0.0
network 6.0.0.0

Copyright © www.INE.com
Verifying RIPv2
» Verification commands
• Router# show ip route
• Router# show ip rip database
• Router# debug ip rip
• Router# show ip protocols

Copyright © www.INE.com
Implementing IPv6

www.ine.com
Configuration – Enabling IPv6
Router(config-if)# ipv6 address <address> / <prefix-length> <EUI-64>
Router(config-if)# ipv6 address autoconfig <default>
Router(config-if)# no shutdown

Router(config)# ipv6 unicast-routing


• Permits router to send ICMPv6 Router Advertisements
• Allows IPv6 routing between connected interfaces
• Allows operation of IPv6 routing protocols

Copyright © www.INE.com
IPv6 Static Routes
» Purpose is the same as IPv4 Static Routes
» Must supply destination prefix, mask and next-
hop

Router(config)#ipv6 route 2001:2:3:4::/64 2001:aa:bb:cc::77


Destination Prefix Mask Next-Hop

Router(config)# ipv6 route ::/0 2001:aa:bb:cc::77


Copyright © www.INE.com
Verifying IPv6
» Verification commands
• Router# show ipv6 interface brief
• Router# show ipv6 routers
• Router# show ipv6 route
• Router# debug ipv6 nd

Copyright © www.INE.com

Das könnte Ihnen auch gefallen