RSE-CH6g - wmmhicks.com

advertisement

Reaching Remote Networks Dynamically

Hey I’m R1 and I’m using EIGRP to let my neighbors know that I’m directly connected to networks:

•192.168.10.0/24

•192.168.11.0/24

•209.165.200.224/30

Internet

Hey I’m R2 and I’m using EIGRP to let my neighbors know that I’m the gateway to the Internet and that I’m directly connected to:

•10.1.1.0/24

•10.1.2.0/24

•209.165.200.224/30

1

Reaching Remote Networks Statically

Hey I’m R1 and I know about my 3 directly connected networks. I’m also a stub router so to reach any network I do not know about I will use a default static route to R2

Internet

Hey I’m R2 and I know about my 3 directly connected networks and the Internet. I need to reach the two R1 LANs therefore I will use two static routes to R1. I will also use a default static route to connect to the ISP.

.

 A static route is a manually entered route into the routing table that specifies:

 The remote network address/mask

 The next hop router

2

Static Routing Advantages

R1(config)# ip route 172.16.1.0 255.255.255.0 172.16.2.2

Don’t worry about the syntax right now

 More secure since they are not advertised over the network.

 More efficient since they use less bandwidth than dynamic routing protocols.

 No CPU cycles are used to calculate and communicate routes.

 Predictable as the path a static route uses to send data always the same.

3

Static Routing Disadvantages

R1(config)# ip route 172.16.1.0 255.255.255.0 172.16.2.2

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

R2(config)# ip route 172.16.3.0 255.255.255.0 172.16.2.1

R2(config)# ip route 192.168.2.0 255.255.255.0 192.168.1.1

R3(config)# ip route 172.16.1.0 255.255.255.0 192.168.1.2

R3(config)# ip route 172.16.2.0 255.255.255.0 192.168.1.2

R3(config)# ip route 172.16.3.0 255.255.255.0 192.168.1.2

 Initial configuration and maintenance is time-consuming.

 Configuration is error-prone, especially in large networks.

 Administrator intervention is required to maintain changing route information.

 Does not scale well with growing networks; maintenance becomes cumbersome.

 Requires complete knowledge of the whole network for proper implementation.

4

Static Routing Versus Dynamic Routing

Dynamic Routing Static Routing

Configuration

Complexity

Generally independent of the network size

Increases with network size

Topology

Changes

Scaling

Automatically adapts to topology changes

Suitable for simple and complex topologies

Administration intervention required

Suitable for simple topologies

More secure Security Less secure

Resource

Usage

Predictability

Uses CPU, memory, and link bandwidth

Route depends on the current topology

No extra resources required

Route to destination is always the same

5

When to Use Static Routes

 In small networks that are not expected to grow significantly.

 To route traffic to and from stub networks.

A stub network is a network accessed by a single route.

A stub router has only one upstream neighbor.

6

Types of Static Routes

 The following types of IPv4 and

IPv6 static routes will be discussed:

 Standard static route

 Default static route

 Summary static route

 Floating static route

 A brief explanation of each will follow but we will explain each one in detail.

 Don’t worry about the terms and syntax until we get into the detail.

7

Standard Static Route

 Standard static routes are useful when connecting to a specific remote network.

R2(config)# ip route 172.16.3.0 255.255.255.0 172.16.2.1

.2

.1

No need to use a dynamic routing protocol with R1 to reach 172.16.3.0/24.

I can simply use a static route to reach the stub network.

8

Default Static Route

Router(config)# ip route 0.0.0.0 0.0.0.0 [exit-interface | ip-address ]

Don’t worry about the syntax right now

 A default static route is a “catch-all” route that matches all networks that is not in the routing table.

 It is configured with a 0.0.0.0/0 “quad zero” destination address.

 It creates a “ Gateway of Last Resort ” in the routing table

9

Default Static Routes Are Used When …

Router# show ip route

<some codes omitted>

* - candidate default , U - per-user static route, o - ODR

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

List of directly connected networks and remote networks

C 172.16.2.0/24 is directly connected, Serial0/0/0

L 172.16.2.2/32 is directly connected, Serial0/0/0

S 192.168.1.0/24 [1/0] via 172.16.2.2

S 192.168.2.0/24 [1/0] via 172.16.2.2

. . .

S* 0.0.0.0/0 is directly connected, 172.16.2.1

 When no other routes in the routing table match the packet destination IP address.

 In other words, when a “ more specific ” match does not exist.

 A common use is when connecting a company's edge router to the ISP network.

 When a stub router connects to only one upstream router.

10

Default Static Route Example

All I need to know about are my directly connected networks. For all other networks, I can use a default static route going to R2.

Default static routes are also commonly used with edge routers to connect to an ISP.

.2

.1

R1(config)# ip route 0.0.0.0 0.0.0.0 172.16.2.2

11

Summary Static Route

172.21.0.0/16

172.20.0.0/16

.2

I have four static routes to reach the remote networks 172.20.0.0/16

- 172.23.0.0/16.

10.0.0.0/24

R1

172.22.0.0/16

172.23.0.0/16

R1(config)# ip route 172.20.0.0 255.255.0.0 10.0.0.2

R1(config)# ip route 172.21.0.0 255.255.0.0 10.0.0.2

R1(config)# ip route 172.22.0.0 255.255.0.0 10.0.0.2

R1(config)# ip route 172.23.0.0 255.255.0.0 10.0.0.2

 Used to reduce the number of routing table entries.

 Multiple static routes can be summarized into a single static route if:

 The destination networks are contiguous and can be summarized into a single network address.

 The destination networks are all reachable using the same exit interface or next-hop IP address.

12

Summary Static Route

172.21.0.0/16

172.20.0.0/16

But to reduce the size of my routing table, I will replace those four static routes with one summary static route using a /14 subnet mask

10.0.0.0/24

.2

R1

172.22.0.0/16

172.23.0.0/16

R1(config)# no ip route 172.20.0.0 255.255.0.0 10.0.0.2

R1(config)# no ip route 172.21.0.0 255.255.0.0 10.0.0.2

R1(config)# no ip route 172.22.0.0 255.255.0.0 10.0.0.2

R1(config)# no ip route 172.23.0.0 255.255.0.0 10.0.0.2

R1(config)#

R1(config)# ip route 172.20.0.0 255.252.0.0 10.0.0.20

13

I can reach the HQ router

10.0.0.0/8 LAN using the private WAN link.

Floating Static Route

I’m using EIGRP to exchange routes between sites.

S0/0/0

.2

Branch

.242

S0/0/1

209.165.200.240 /29

Private WAN

172.16.1.0 /30

172.16.1.0 /30

.241

Internet

.225

ISP

.1

S0/0/0

S0/0/1

.226

HQ

209.165.200.224 /29

10.0.0.0 /8

 Floating static routes are static routes used to provide a backup path to a primary static or dynamic route, in the event of a link failure.

 The floating static route is only used when the primary route is not available.

14

However, if that link ever fails, I will use a floating static route connecting to the Internet as a backup.

Floating Static Route

Since EIGRP has an administrative distance of 90 I will configure the static route with a higher value

Private WAN

Branch(config)#

172.16.1.0 /30 ip route 10.0.0.0 255.0.0.0 S0/0/1 100

.2

.1

Branch

.242

S0/0/1 S0/0/1

.226

HQ

209.165.200.240 /29

.241

Internet

.225

ISP

209.165.200.224 /29

10.0.0.0 /8

 Accomplished by configuring the static route with a higher administrative distance than the primary route.

 Administrative distance represents the trustworthiness of a route.

 If multiple paths to the destination exist, the router will choose the path with the lowest administrative distance.

15

When to Use Static Routes

 In small networks that are not expected to grow significantly.

 To route traffic to and from stub networks.

 To configure a “catch-all” route

(i.e., default route) when no other route in the routing table match.

 To summarize other routes in one route.

 To make a backup route for a dynamic routing protocol.

 With a dynamic routing protocol such as a default route (coming)

16

2.1.2.6

17

Configuring Standard Static Routes

18

TSHOOT Slide

Collecting and Filtering Using Cisco IOS

 To help find specific information, troubleshooters need to know how to use filtering techniques effectively.

 Filtering can be accomplished by using:

 Additional options / keywords to make the command more specific.

 Appending a pipe character ( | ) followed by one of the keywords include , exclude , or begin , and then a regular expression.

 Use regular expressions for more granular filtering.

 Adding redirect , tee , and append to show commands.

 NOTE: These may not work with Packet Tracer and my differ slightly with some IOS versions.

19

TSHOOT Slide

Filtering With Additional Options / Keywords

 To limit the output, enter a specific IP address, routing protocol or type of route as an option.

R1# show ip route ?

Hostname or A.B.C.D Network to display information about or hostname bgp Border Gateway Protocol (BGP) connected Connected dhcp Show routes added by DHCP Server or Relay eigrp Enhanced Interior Gateway Routing Protocol (EIGRP) isis ISO IS-IS list IP Access list mobile Mobile routes odr On Demand stub Routes ospf Open Shortest Path First (OSPF) profile IP routing table profile rip Routing Information Protocol (RIP) static Static routes summary Summary of all routes supernets-only Show supernet entries only track-table Tracked static table update-queue Queue of RIB updates vrf Display routes from a VPN Routing/Forwarding instance

| Output modifiers

<cr>

20

R1# show ip route

TSHOOT Slide

Filtering With Additional Options / Keywords

R1# show ip route 10.1.193.2

Routing entry for 10.1.193.0/30

Known via "connected", distance 0, metric 0

(connected, via interface)

Redistributing via eigrp 1

Routing Descriptor Blocks:

* directly connected, via Serial0/0/1

Route metric is 0, traffic share count is 1

R1#

 To limit the output to a specific address:

21

| keyword

R1# show running-config | ?

append Append redirected output to URL begin Begin with the line that matches exclude Exclude lines that match include Include lines that match redirect Redirect output to URL section Filter a section of output tee Copy output to URL

R1# show running-config |

TSHOOT Slide

22

TSHOOT Slide

| keyword

Using pipes with include , exclude and begin keywords.

R1# show processes cpu | include IP Input

71 3149172 7922812 397 0.24% 0.15% 0.05% 0 IP Input

R1#

R1# show processes cpu| include IP Input s

^

% Invalid input detected at '^' marker.

R1#

There must always be at least one space preceding and following the pipe operator, otherwise it will not be accepted by the IOS CLI.

S1# show ip interface brief | exclude unassigned

Interface IP-Address OK? Method Status Protocol

Vlan128 10.1.156.1 YES NVRAM up up

S1#

S1# show running-config | begin line vty line vty 0 4 transport input telnet ssh line vty 5 15

!

transport input telnet ssh

TSHOOT Slide

| keyword and Regular Expressions

Using pipes with section and ^

R1# show running-config | section router eigrp router eigrp 1 network 10.1.192.2 0.0.0.0

network 10.1.192.10 0.0.0.0

network 10.1.193.1 0.0.0.0

no auto-summary

R1#

R1# show processes cpu | include ^CPU|IP Input

CPU utilization for five seconds: 1%/0%; one minute: 1%; five minutes: 1%

71 3149424 7923898 397 0.24% 0.04% 0.00% 0 IP Input

 The ^CPU keyword only matches lines that start with the characters “ CPU ” .

Lines that do not start with the "CPU" characters do not match the ^CPU regular expression, even if they actually contain the string "CPU" somewhere else.

 The same line uses the pipe operator “ | ” as part of a regular expression to signify a logical “ OR ” to also include lines that contain the string “ IP Input ” .

Topology

 We will assume all the interface have been configured with an IPv4 address and are in the up/up state.

25

Verify the Routing

Table of R1

Notice how R1 only has entries for its directly connected networks.

It does not have any knowledge of any networks beyond its directly connected interfaces.

For example, R1 has no knowledge of networks:

•172.16.1.0/24 - LAN on R2

•192.168.1.0/24 - R2 to R3

•192.168.2.0/24 - LAN on R3

R1# show ip route | begin Gateway

Gateway of last resort is not set

172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks

C 172.16.2.0/24 is directly connected, Serial0/0/0

L 172.16.2.1/32 is directly connected, Serial0/0/0

C 172.16.3.0/24 is directly connected, GigabitEthernet0/0

L 172.16.3.1/32 is directly connected, GigabitEthernet0/0

R1#

26

Verify the Routing Table of R2

R2 has no knowledge of networks:

•172.16.3.0/24 - LAN on R1

•192.168.2.0/24 - LAN on R3

R2# show ip route | begin Gateway

Gateway of last resort is not set

172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks

C 172.16.1.0/24 is directly connected, GigabitEthernet0/0

L 172.16.1.1/32 is directly connected, GigabitEthernet0/0

C 172.16.2.0/24 is directly connected, Serial0/0/0

L 172.16.2.2/32 is directly connected, Serial0/0/0

192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks

C 192.168.1.0/24 is directly connected, Serial0/0/1

L 192.168.1.2/32 is directly connected, Serial0/0/1

R2#

27

Verify the Routing Table of R3

R3 has no knowledge of networks:

•172.16.1.0/24 - LAN on R2

•172.16.2.0/24 – R1 to R2

•172.16.3.0/24 - LAN on R1

R3# show ip route | include C

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B

- BGP

C 192.168.1.0/24 is directly connected, Serial0/0/1

C 192.168.2.0/24 is directly connected, GigabitEthernet0/0

R3#

28

Verify Connectivity to R2

R1# ping 172.16.2.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 172.16.2.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max =

12/13/16 ms

R1#

29

Verify Connectivity to R3

?

R1# ping 192.168.2.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is

2 seconds:

.....

Success rate is 0 percent (0/5)

R1#

This network is not in the routing table and there is no IPv4 default route.

30

The ip route Command

ip route network-add subnet {ip-address | exit-intf [ip-address]} [distance]

Parameter Description networkadd subnet ipaddress exit-intf distance

• Destination network address of the remote network to be added to the routing table.

• Subnet mask of the remote network to be added to the routing table.

• Note: The subnet mask can be modified to summarize a group of networks

• Commonly referred to as the next-hop router’s IP address.

• Typically used when connecting to a broadcast media (i.e., Ethernet)

.

• Commonly creates a recursive lookup.

• Use the outgoing interface to forward packets to the destination network.

• Also referred to as a directly attached static route.

• Typically used when connecting in a point-to-point configuration.

• Used to create a floating static route by setting an administrative distance that is higher than a dynamically learned route.

31

ip route Command (for IPv4 static routes)

 Simpler version :

Router(config)# ip route network-address subnet-mask

{ ip-address | exit-interface }

network-address: Destination network address of the remote network

subnet-mask: Subnet mask of the remote network

 One or both of the following parameters must also be used:

ip-address: Next-hop router ’s IP address. (Does not have to be next-hop.)

exit-interface: Outgoing or exit interface

32

Types of Standard Static Routes

 Next Hop Static Route ( With CEF….. Use this one)

ip route network-add subnet ip-address

 Directly Attached Static Route

ip route network-add subnet exit-intf

 Fully Specified Static Route

ip route network-add subnet exit-intf ip- address

33

Next Hop (IPv4) Static Routes

Router(config)# ip route network-address subnet-mask next-hop-ip-address

 A next hop static route uses an IPv4 address to in the ip route command to specify the next hop router.

 A next hop static route is recommended to be used over:

 Directly attached routes

 Fully specified static routes

 Directly attached and fully specified static routes should only be used when needed (coming) and CEF is disabled.

 CEF is enabled by default since IOS 12.2

 We will cover directly attached and fully specified static routes, but it is best to use the next hop static route when CEF is enabled.

34

Configure Next Hop Static Routes on R1

R1(config)# ip route 172.16.1.0 255.255.255.0 172.16.2.2

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

R1(config)#

Notice: R1 uses the same next-hop IPv4 address for all static routes.

35

Next Hop Might be a Recursive Static Route

Only recursive if

CEF is disabled

A recursive lookup means:

1. A network in the routing table looks for a match with the packet’s destination IP address.

2. The next-hop address is looked up in the routing table to find an exitinterface.

R1# show ip route | begin Gateway

Gateway of last resort is not set

2

1

172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks

S 172.16.1.0/24 [1/0] via 172.16.2.2

Only if CEF disabled

C 172.16.2.0/24 is directly connected, Serial0/0/0

L 172.16.2.1/32 is directly connected, Serial0/0/0

C 172.16.3.0/24 is directly connected, GigabitEthernet0/0

L 172.16.3.1/32 is directly connected, GigabitEthernet0/0

S 192.168.1.0/24 [1/0] via 172.16.2.2

S 192.168.2.0/24 [1/0] via 172.16.2.2

R1#

36

Cisco Express Forwarding (CEF)

 Recursive lookups are not a problem when CEF is enabled

 CEF is enabled by default beginning with IOS 12.2

 CEF provides optimized lookup for efficient packet forwarding by using the FIB and Adjacency tables.

 Therefore, a next hop static route is resolved in one single lookup when

CEF is enabled.

 With CEF enabled, it is recommended that next-hop routes are used.

37

Alex Zinin ’ s Routing Table Principles

I know about my remote networks but it is not my responsibility if R2 and R3 know about their remote networks.

 Principle 1: Every router makes its decision alone, based on the information it has in its own routing table.

 Principle 2: The fact that one router has certain information in its routing table does not mean that other routers have the same information.

 Principle 3: Routing information about a path from one network to another does not provide routing information about the reverse, or return, path.

38

Configuring Next Hop Static Routes on R2

R2(config)# ip route 192.168.2.0 255.255.255.0 192.168.1.1

R2(config)# ip route 172.16.3.0 255.255.255.0 172.16.2.1

R2(config)# end

R2#

*Feb 21 17:56:16.231: %SYS-5-CONFIG_I: Configured from console by console up

R2# show ip route

<Output omitted>

172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks

C 172.16.1.0/24 is directly connected, GigabitEthernet0/0

L 172.16.1.1/32 is directly connected, GigabitEthernet0/0

C 172.16.2.0/24 is directly connected, Serial0/0/0

L 172.16.2.2/32 is directly connected, Serial0/0/0

S 172.16.3.0/24 [1/0] via 172.16.2.1

192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks

C 192.168.1.0/24 is directly connected, Serial0/0/1

L 192.168.1.2/32 is directly connected, Serial0/0/1

S 192.168.2.0/24 [1/0] via 192.168.1.1

R2#

39

Configuring Next Hop Static Routes on R3

R3(config)# ip route 172.16.1.0 255.255.255.0 192.168.1.2

R3(config)# ip route 172.16.2.0 255.255.255.0 192.168.1.2

R3(config)# ip route 172.16.3.0 255.255.255.0 192.168.1.2

R3(config)# end

R3# show ip route

<Output omitted>

172.16.0.0/24 is subnetted, 3 subnets

S 172.16.1.0 [1/0] via 192.168.1.2

S 172.16.2.0 [1/0] via 192.168.1.2

S 172.16.3.0 [1/0] via 192.168.1.2

192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks

C 192.168.1.0/24 is directly connected, Serial0/0/1

L 192.168.1.1/32 is directly connected, Serial0/0/1

192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks

C 192.168.2.0/24 is directly connected,

GigabitEthernet0/0

L 192.168.2.1/32 is directly connected,

GigabitEthernet0/0

R3#

40

Directly Attached Static Routes

Router(config)# ip route network-address subnet-mask exit-interface

 When CEF is not enabled , a directly attached static route avoids the recursive lookup problem on point-to-point networks.

 It allows the routing table to resolve the exit interface in a single search, instead of two searches.

 Typically used with point-to-point serial interfaces.

Note: Next-hop static routes are recommended when CEF is enabled.

41

Configure Directly Attached Static Routes

R1(config)# ip route 172.16.1.0 255.255.255.0 s0/0/0

R1(config)# ip route 192.168.1.0 255.255.255.0 s0/0/0

R1(config)# ip route 192.168.2.0 255.255.255.0 s0/0/0

R1(config)#

• This is an alternative method for configuring static routes on a point-to-point network.

• Static routes with a next-hop address recommended when CEF is enabled.

42

Verify the Routing Table of R1

Note (covered more later):

 Although the routing table entry indicates “ directly connected ”, the administrative distance of the static route is still 1.

 Only a directly connected interface can have an admin. distance of 0.

R1# show ip route | begin Gateway

Gateway of last resort is not set

172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks

S 172.16.1.0/24 is directly connected , Serial0/0/0

C 172.16.2.0/24 is directly connected, Serial0/0/0

L 172.16.2.1/32 is directly connected, Serial0/0/0

C 172.16.3.0/24 is directly connected, GigabitEthernet0/0

L 172.16.3.1/32 is directly connected, GigabitEthernet0/0

S 192.168.1.0/24 is directly connected , Serial0/0/0

S 192.168.2.0/24 is directly connected , Serial0/0/0

R1#

43

Fully Specified Static Routes

Router(config)# ip route network-address subnet-mask exit-interface next-hop-ip-address

 A static route with just an exit-interface will not work on multi-access networks such as Ethernet because there may be multiple next-hops.

 A fully specified static IPv4 route is can be used when:

 CEF is disabled

 The exit interface is a mutli-access network (Ethernet)

 Note: CEF is enabled by default beginning with IOS 12.2, so a static route with a next hop address is recommended.

46

Fully Specified Static Routes on R1

R1(config)# ip route 172.16.1.0 255.255.255.0 G0/1 172.16.2.2

R1(config)# ip route 192.168.1.0 255.255.255.0 G0/1 172.16.2.2

R1(config)# ip route 192.168.2.0 255.255.255.0 G0/1 172.16.2.2

R1(config)#

 Required when CEF is disabled and on a multi-access network.

47

Verify the Routing Table of R1

R1# show ip route | begin Gateway

Gateway of last resort is not set

172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks

S 172.16.1.0/24 [1/0] via 172.16.2.2, Gigabitethernet0/1

C 172.16.2.0/24 is directly connected, Gigabitethernet0/1

L 172.16.2.1/32 is directly connected, Gigabitethernet0/1

C 172.16.3.0/24 is directly connected, GigabitEthernet0/0

L 172.16.3.1/32 is directly connected, GigabitEthernet0/0

S 192.168.1.0/24 [1/0] via 172.16.2.2, Gigabitethernet0/1

S 192.168.2.0/24 [1/0] via 172.16.2.2, Gigabitethernet0/1

R1#

48

View only static routes in the routing table

R1# show ip route static | begin Gateway

Gateway of last resort is not set

172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks

S 172.16.1.0/24 [1/0] via 172.16.2.2

S 192.168.1.0/24 [1/0] via 172.16.2.2

S 192.168.2.0/24 [1/0] via 172.16.2.2

R1#

51

Verify a Specific Entry in the Routing Table

R1# show ip route 192.168.2.1

Routing entry for 192.168.2.0/24

Known via "static", distance 1, metric 0

Routing Descriptor Blocks:

* 172.16.2.2

Route metric is 0, traffic share count is 1

R1#

52

Verify the Static Route Configuration in the running-config

R1# show running-config | section ip route ip route 172.16.1.0 255.255.255.0 172.16.2.2

ip route 192.168.1.0 255.255.255.0 172.16.2.2

ip route 192.168.2.0 255.255.255.0 172.16.2.2

R1#

53

Configuring a Default Static Route

ip route 0.0.0.0 0.0.0.0 {ip-address | exit-intf [ip-address]}

Parameter Description

0.0.0.0

• Matches any network address.

0.0.0.0

• Matches any subnet mask.

ipaddress exitintf

• Commonly referred to as the next-hop router’s IP address.

• Typically used when connecting to a broadcast media (i.e.,

Ethernet) .

• Commonly creates a recursive lookup.

• Use the outgoing interface to forward packets to the destination network.

• Also referred to as a directly attached static route.

• Typically used when connecting in a point-to-point configuration.

56

Configuring a Default Static Route

R1(config)# ip route 0.0.0.0 0.0.0.0 172.16.2.2

R1(config)#

 Commonly used in every network to have at least one route to send packets when the destination IP address doesn’t match a more specific route in the routing table.

 Used along with dynamic routing protocols (later)

 If a default route is not used and there is not a match in the routing table, then the packet is dropped.

57

Verifying the Routing Table of R1

R1# show ip route static

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP

+ - replicated route, % - next hop override

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

S* 0.0.0.0/0 is via 172.16.2.2

R1#

58

Configuring IPv6 Static Routes

59

One Hex digit = 4 bits

2001:0DB8:AAAA:1111:0000:0000:0000:0100/64

2001 : 0DB8 : AAAA : 1111 : 0000 : 0000 : 0000 : 0100

16 bits

1

16 bits

2

16 bits

3

16 bits

4

16 bits

5

16 bits

6

16 bits

7

 IPv6 addresses are 128-bit addresses represented in:

16 bits

8

 Eight 16bit segments or “hextets” (not a formal term)

 Hexadecimal (non-case sensitive) between 0000 and FFFF

 Separated by colons

 Reading and subnetting IPv6 is easier than IPv4!

 Two rules for reducing the size of written IPv6 addresses.

 The first rule is: Leading zeroes in any 16-bit segment do not have to be written.

2001 : 0DB8 : 0001 : 1000 : 0000 : 0000 : 0ef0 : bc00

2001 : DB8 : 1 : 1000 : 0 : 0 : ef0 : bc00

2001 : 0DB8 : 010d : 000a : 00dd : c000 : e000 : 0001

2001 : DB8 : 10d : a : dd : c000 : e000 : 1

2001 : 0DB8 : 0000 : 0000 : 0000 : 0000 : 0000 : 0500

2001 : DB8 : 0 : 0 : 0 : 0 : 0 : 500

 The second rule can reduce this address even further:

 Any single, contiguous string of one or more 16-bit segments consisting of all zeroes can be represented with a double colon.

FE80 : 0000 : 0000 : 0000 : 0000 : 0000 : 0000 : 0001

FE80 : : 1

Second Rule First Rule

FE80::1

 IPv4, the prefix —the network portion of the address—can be identified by a dotted decimal netmask or bitcount.

255.255.255.0 or /24

 IPv6 prefixes are always identified by bitcount (prefix length).

 Prefix length notation:

3ffe:1944:100:a:: /64

16 32 48 64 bits

64

Global Unicast Address (GUA)

Global Routing Prefix Subnet ID Interface ID

001

Range: 2000::/3 001 0 0000 0000 0000 :: to 3FFF::/3 001 1 1111 1111 1111 ::

IANA’s allocation of IPv6 address space in

1/8 th sections • Global unicast addresses are similar to IPv4 addresses

• Routable

• Unique

65

Typical Global Unicast Address and Why We Love IPv6!

IPv4 Unicast Address

/?

Network portion Subnet portion Host portion

32 bits

IPv6 Global Unicast Address

Global Routing Prefix

/48

16-bit

Fixed

Subnet ID

/64

Interface ID

128 bits

• 64-bit Interface ID = 18 quintillion (18,446,744,073,709,551,616) devices/subnet

• 16-bit Subnet ID = 65,536 subnets

66

/64 Global Unicast Addresses and the 3-1-4 rule

/48 /64

16 bits 16 bits 16 bits 16 bits 16 bits 16 bits 16 bits 16 bits

Global Routing Prefix Subnet ID

3 1

Interface ID

4

2001 : 0DB8 : AAAA : 1111 : 0000 : 0000 : 0000 : 0100

3 + 1 = 4 (/64) : 4

2001:0DB8:AAAA:1111 :0000:0000:0000:0100 /64

2001:0DB8:AAAA:1111 ::100 /64

67

 Just increment by 1 in Hexadecimal:

 2001:0DB8:AAAA: 0000 ::/64

 2001:0DB8:AAAA: 0001 :: /64

 2001:0DB8:AAAA: 0002 :: /64

 2001:0DB8:AAAA: 000A :: /64

3 1

-4 Rule

 Valid abbreviation is to remove the 3 leading 0 ’ s from the first shown quartet

 2001:0DB8:AAAA: 1 :: /64

Enabling IPv6 Unicast Routing

The ipv6 unicast-routing global configuration command must be configured to enable the router to forward IPv6 packets and participate static/dynamic IPv6 routing.

R1(config)# ipv6 unicast-routing

R1(config)#

69

Notice how R1 only has entries for its directly connected networks.

R1 has no knowledge of networks:

•2001:DB8:ACAD:2::/64 - LAN on R2

•2001:DB8:ACAD:5::/64 - R2 to R3

•2001:DB8:ACAD:3::/64 - LAN on R3

Verify the IPv6 Routing

Table of R1

R1# show ipv6 route

<output omitted>

C 2001:DB8:ACAD:1::/64 [0/0] via GigabitEthernet0/0, directly connected

L 2001:DB8:ACAD:1::1/128 [0/0] via GigabitEthernet0/0, receive

C 2001:DB8:ACAD:4::/64 [0/0] via Serial0/0/0, directly connected

L 2001:DB8:ACAD:4::1/128 [0/0] via Serial0/0/0, receive

L FF00::/8 [0/0] via Null0, receive

R1#

70

Verify the IPv6

Routing Table of R2

R2 has no knowledge of networks:

•2001:DB8:ACAD:1::/64 - LAN on R1

•2001:DB8:ACAD:3::/64 - LAN on R3

R2# show ipv6 route

<output omitted>

C 2001:DB8:ACAD:2::/64 [0/0] via GigabitEthernet0/0, directly connected

L 2001:DB8:ACAD:2::1/128 [0/0] via GigabitEthernet0/0, receive

C 2001:DB8:ACAD:4::/64 [0/0] via Serial0/0/0, directly connected

L 2001:DB8:ACAD:4::2/128 [0/0] via Serial0/0/0, receive

C 2001:DB8:ACAD:5::/64 [0/0] via Serial0/0/1, directly connected

L 2001:DB8:ACAD:5::2/128 [0/0] via Serial0/0/1, receive

L FF00::/8 [0/0] via Null0, receive

71

Verify the

IPv6 Routing

Table of R3

R3 has no knowledge of networks:

•2001:DB8:ACAD:2::/64 - LAN on R2

•2001:DB8:ACAD:4::/64 – R1 to R2

•2001:DB8:ACAD:1::/64 - LAN on R1

R3# show ipv6 route

<output omitted>

C 2001:DB8:ACAD:3::/64 [0/0] via GigabitEthernet0/0, directly connected

L 2001:DB8:ACAD:3::1/128 [0/0] via GigabitEthernet0/0, receive

C 2001:DB8:ACAD:5::/64 [0/0] via Serial0/0/1, directly connected

L 2001:DB8:ACAD:5::1/128 [0/0] via Serial0/0/1, receive

L FF00::/8 [0/0] via Null0, receive

R3#

72

Verify

Connectivity from

R1 to R2

R1# ping 2001:DB8:ACAD:4::2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 2001:DB8:ACAD:4::2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 12/30/96 ms

R1#

Note: The curriculum also uses the ping ipv6 command. The ipv6 is optional.

73

No connectivity from R1 to the R3 LAN

?

R1# ping ipv6 2001:DB8:ACAD:3::1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 2001:DB8:ACAD:3::1, timeout is 2 seconds:

% No valid route for destination

Success rate is 0 percent (0/1)

R1#

This network is not in the routing table and there is no IPv6 default route.

74

Configuring an IPv6 Static Route

Router(config)# ipv6 route ipv6-prefix/prefix-length {exit-

intf | ipv6-address}

Parameter Description ipv6prefix

• Destination IPv6 network address of the remote network to be added to the routing table.

/prefixlength

• Prefix length of the remote network to be added to the routing table.

• Note: Can be modified to summarize a group of networks exit-intf

• Use the outgoing interface to forward packets to the destination network. ipv6address

• Commonly referred to as the next-hop router’s IPv6 address.

75

Types of IPv6 Static Routes

 Most of parameters are identical to the IPv4 version of the command.

 ip = ipv4

 ipv6 = ipv6

 IPv6 static routes can also be implemented as:

 Standard IPv6 static route

 Default IPv6 static route

 Summary IPv6 static route

 Floating IPv6 static route

76

Types of Standard IPv6 Static Routes

 Next Hop Static Route

ipv6 route ipv6-prefix/prefix-length ipv6-address

 Directly Attached Static Route

ipv6 route ipv6-prefix/prefix-length exit-intf

 Fully Specified Static Route

ipv6 route ipv6-prefix/prefix-length exit-intf ipv6-address

77

Configure Next Hop Static IPv6 Routes

R1(config)# ipv6 route 2001:DB8:ACAD:2::/64 2001:DB8:ACAD:4::2

R1(config)# ipv6 route 2001:DB8:ACAD:5::/64 2001:DB8:ACAD:4::2

R1(config)# ipv6 route 2001:DB8:ACAD:3::/64 2001:DB8:ACAD:4::2

R1(config)#

78

1

2

Verifying an IPv6 Next Hop Route

R1# show ipv6 route

<Output omitted>

C 2001:DB8:ACAD:1::/64 [0/0] via GigabitEthernet0/0, directly connected

L 2001:DB8:ACAD:1::1/128 [0/0] via GigabitEthernet0/0, receive

S 2001:DB8:ACAD:2::/64 [1/0] via 2001:DB8:ACAD:4::2

S 2001:DB8:ACAD:3::/64 [1/0] via 2001:DB8:ACAD:4::2

C 2001:DB8:ACAD:4::/64 [0/0] via Serial0/0/0, directly connected

Only necessary if CEF is disabled

L 2001:DB8:ACAD:4::1/128 [0/0] via Serial0/0/0, receive

S 2001:DB8:ACAD:5::/64 [1/0] via 2001:DB8:ACAD:4::2

L FF00::/8 [0/0] via Null0, receive

R1#

79

Configure Next Hop Static IPv6 Routes

R2(config)# ipv6 route 2001:DB8:ACAD:1::/64 2001:DB8:ACAD:4::1

R2(config)# ipv6 route 2001:DB8:ACAD:3::/64 2001:DB8:ACAD:5::1

R2(config)# exit

R2#

R2# show ipv6 route

<Output omitted>

S 2001:DB8:ACAD:1::/64 [1/0] via 2001:DB8:ACAD:4::1

C 2001:DB8:ACAD:2::/64 [0/0] via GigabitEthernet0/0, directly connected

L 2001:DB8:ACAD:2::1/128 [0/0] via GigabitEthernet0/0, receive

S 2001:DB8:ACAD:3::/64 [1/0] via 2001:DB8:ACAD:5::1

C 2001:DB8:ACAD:4::/64 [0/0] via Serial0/0/0, directly connected

L 2001:DB8:ACAD:4::2/128 [0/0] via Serial0/0/0, receive

C 2001:DB8:ACAD:5::/64 [0/0] via Serial0/0/1, directly connected

L 2001:DB8:ACAD:5::2/128 [0/0] via Serial0/0/1, receive

L FF00::/8 [0/0] via Null0, receive

R2#

80

Configure Next Hop Static IPv6 Routes

R3(config)# ipv6 route 2001:DB8:ACAD:2::/64 2001:DB8:ACAD:5::2

R3(config)# ipv6 route 2001:DB8:ACAD:4::/64 2001:DB8:ACAD:5::2

R3(config)# ipv6 route 2001:DB8:ACAD:1::/64 2001:DB8:ACAD:5::2

R3(config)# exit

R3# show ipv6 route

<Output omitted>

S 2001:DB8:ACAD:1::/64 [1/0] via 2001:DB8:ACAD:5::2

S 2001:DB8:ACAD:2::/64 [1/0] via 2001:DB8:ACAD:5::2

C 2001:DB8:ACAD:3::/64 [0/0] via GigabitEthernet0/0, directly connected

L 2001:DB8:ACAD:3::1/128 [0/0] via GigabitEthernet0/0, receive

S 2001:DB8:ACAD:4::/64 [1/0] via 2001:DB8:ACAD:5::2

C 2001:DB8:ACAD:5::/64 [0/0] via Serial0/0/1, directly connected

L 2001:DB8:ACAD:5::1/128 [0/0] via Serial0/0/1, receive

L FF00::/8 [0/0] via Null0, receive

R3# 81

Directly Attached Static IPv6 Routes on R1

R1(config)# ipv6 route 2001:DB8:ACAD:2::/64 s0/0/0

R1(config)# ipv6 route 2001:DB8:ACAD:5::/64 s0/0/0

R1(config)# ipv6 route 2001:DB8:ACAD:3::/64 s0/0/0

R1(config)#

• This is an alternative method for configuring static routes on a point-to-point network.

• Next-hop address recommended when CEF is enabled.

82

Verify the Routing Table of R1

R1# show ipv6 route

<Output omitted>

C 2001:DB8:ACAD:1::/64 [0/0] via GigabitEthernet0/0, directly connected

L 2001:DB8:ACAD:1::1/128 [0/0] via GigabitEthernet0/0, receive

S 2001:DB8:ACAD:2::/64 [1/0] via Serial0/0/0, directly connected

S 2001:DB8:ACAD:3::/64 [1/0] via Serial0/0/0, directly connected

C 2001:DB8:ACAD:4::/64 [0/0] via Serial0/0/0, directly connected

L 2001:DB8:ACAD:4::1/128 [0/0] via Serial0/0/0, receive

S 2001:DB8:ACAD:5::/64 [1/0] via Serial0/0/0, directly connected

L FF00::/8 [0/0] via Null0, receive

R1#

83

Fully Specified Static IPv6 Routes on R1

 Similar to IPv4 topology, a fully specified static IPv6 route is can be used when:

 CEF is disabled

 The exit interface is a mutli-access network (Ethernet)

 CEF is enabled by default beginning with IOS 12.2, so a static route with a next hop address is recommended.

 In IPv6, a fully specified route is required when the next-hop address is a link-local address.

86

87

Link-local Unicast

10 bits Remaining 54 bits

/64

1111 1110 10xx xxxx

FE80::/10

64 bits

Interface ID

EUI-64, Random or Manual Configuration

Range: FE80::/10 1111 1110 10 00 0000 :: to FEBF::/10 1111 1110 10 11 1111 ::

88

Link-local unicast

Link-Local Communications

• Used to communicate with other devices on the link.

• Are NOT routable off the link (network).

• Only have to be unique on the link.

• Are not included in the IPv6 routing table.

• An IPv6 device must have at least a link-local address.

• Used by:

• Hosts to communicate to the IPv6 network before it has a global unicast address.

• Router’s link-local address is used by hosts as the default gateway address.

• Adjacent routers to exchange routing updates

89

G0/0

IOS uses EUI-64 to Create Link-

Local Addresses

G0/1

S0/0/0

Wait! Two

Link-Locals are the same!

Router# show interface gigabitethernet 0/0

GigabitEthernet0/0 is up, line protocol is up

Hardware is CN Gigabit Ethernet, address is fc99.4775.c3e0

(bia fc99.4775.c3e0)

<Output Omitted>

Router# show ipv6 interface brief

GigabitEthernet0/0 [up/up]

FE80::FE99:47FF:FE75:C3E0

2001:DB8:ACAD:1::1

GigabitEthernet0/1 [up/up]

FE80::FE99:47FF:FE75:C3E1

2001:DB8:ACAD:2::1

Serial0/0/0 [up/up]

FE80::FE99:47FF:FE75:C3E0

2001:DB8:ACAD:3::1

R1#

EUI-64

FF:FE = EUI-64 (most likely)

Serial interfaces will use a MAC address of an Ethernet interface.

90

Configuring Static

Link-Local Addresses

Static addresses are more easily remembered and recognizable.

G0/0

FE80::1

Router(config)# interface gigabitethernet 0/0

Router(config-if)# ipv6 address fe80::1 ?

link-local Use link-local address

G0 /1

FE80::1

R1

S0/0/0

FE80::1

Router(config-if)# ipv6 address fe80::1 link-local

Router(config-if)# exit

Router(config)# interface gigabitethernet 0/1

Router(config-if)# ipv6 address fe80::1 link-local

Router(config-if)# exit

Router(config)# interface serial 0/0/0

Router(config-if)# ipv6 address fe80::1 link-local

Router(config-if)#

Link-Local

Addresses only have to be unique on the link!

91

Exit-interface required when link-local address is used as next-hop address

R1(config)# ipv6 route 2001:db8:acad:2::/64 fe80::2

% Interface has to be specified for a link-local nexthop

R1(config)# ipv6 route 2001:db8:acad:2::/64 s0/0/0 fe80::2

R1(config)#

 fe80::2 can uniquely exist on any interface

 fe80::2 must be on a directly connected interface (link local)

 The exit-interface is required to tell the router which exit-interface to use.

92

Verify the Static Route on R1

R1(config)# ipv6 route 2001:db8:acad:2::/64 s0/0/0 fe80::2

R1(config)# end

R1# show ipv6 route static | begin 2001:DB8:ACAD:2::/64

S 2001:DB8:ACAD:2::/64 [1/0] via FE80::2, Serial0/0/0

93

Verify the Routing Table of R1

R1# show ipv6 route static

<Output omitted>

S 2001:DB8:ACAD:2::/64 [1/0] via 2001:DB8:ACAD:4::2

S 2001:DB8:ACAD:3::/64 [1/0] via 2001:DB8:ACAD:4::2

S 2001:DB8:ACAD:5::/64 [1/0] via 2001:DB8:ACAD:4::2

R1#

94

Verify a Specific Entry in the Routing Table

R1# show ipv6 route 2001:db8:acad:3::

Routing entry for 2001:DB8:ACAD:3::/64

Known via "static", distance 1, metric 0

Route count is 1/1, share count 0

Routing paths:

2001:DB8:ACAD:4::2

Last updated 15:28:05 ago

R1#

95

Verify the Static Route Configuration

R1# show running-config | section ipv6 route ipv6 route 2001:DB8:ACAD:2::/64 2001:DB8:ACAD:4::2 ipv6 route 2001:DB8:ACAD:3::/64 2001:DB8:ACAD:4::2 ipv6 route 2001:DB8:ACAD:5::/64 2001:DB8:ACAD:4::2

R1#

96

Configuring a Default IPv6 Static Route

Router(config)# ipv6 route ::/0 {ipv6-address | exit-intf}

Parameter Description

::/0 ipv6address exitintf

• Matches any IPv6 prefix regardless of IPv6 mask.

• Commonly referred to as the next-hop router’s IPv6 address.

• Typically used when connecting to a broadcast media (i.e.,

Ethernet) .

• Commonly creates a recursive lookup.

• Use the outgoing interface to forward packets to the destination network.

• Also referred to as a directly attached static route.

• Typically used when connecting in a point-to-point configuration.

97

Configuring a Default Static IPv6 Route

R1(config)# ipv6 route ::/0 2001:DB8:ACAD:4::2

R1(config)#

98

Verifying the Routing Table of R1

R1# show ipv6 route static

IPv6 Routing Table - default - 6 entries

Codes: C - Connected, L - Local, S - Static, U - Per-user

Static route

<Output omitted>

S ::/0 [1/0] via 2001:DB8:ACAD:4::2

R1# 99

Verifying Connectivity to the R3 LAN

R1# ping 2001:0DB8:ACAD:3::1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 2001:DB8:ACAD:3::1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/28 ms

R1#

100

Classful Addressing

101

Classful Network Addressing

 In 1981, RFC 790 and RFC 791 described an IPv4 classification system for 3 different sizes of networks.

 Class A (large), B(medium), and C(small) addresses were defined with a specific format for the high order bits.

 With classful IP addressing, the subnet mask of a network address could be determined by the first three bits of the address.

0 xxxxxxx

10 xxxxxx

110 xxxxx

1110 xxxx

1111 xxxx

102

Class A Networks

1 st Octet

Always starts with binary 0:

0xxxxxxx

Decimal equivalent:

0 – 127

2 nd Octet 3 rd Octet 4 th Octet

Subnet mask

Network

255

Host

.0

Host

.0

Host

.0

103

Class B Networks

1 st Octet

Always starts with binary 10:

10xxxxxx

Decimal equivalent:

128 – 191

2 nd Octet 3 rd Octet 4 th Octet

Subnet mask

Network

255

Network

.255

Host

.0

Host

.0

104

Class C Networks

1 st Octet

Always starts with binary

110:

110xxxxx

Decimal equivalent:

192 – 223

2 nd Octet 3 rd Octet 4 th Octet

Subnet mask

Network

255

Network

.255

Network

.255

Host

.0

105

Class D and E

 Class D Multicast addresses begin with 1110.

 Multicast addresses are used to identify a group of hosts that are part of a multicast group.

 Routing protocols, such as RIPv2, EIGRP, and OSPF use designated multicast addresses (RIP = 224.0.0.9, EIGRP =

224.0.0.10, OSPF 224.0.0.5, and 224.0.0.6).

 Class E Reserved IP addresses begin with 1111

 These addresses were reserved for experimental and future use.

106

Classful Routing Updates

 Classful routing protocols, such as RIPv1, only need to propagate the network address of known routes.

 Updates do not need to include the subnet mask.

 The receiving router examined the value of the first octet in the network address.

 Routing protocols since RIPv1 (and IGRP) are classless.

 Classless routing protocols send the network address and the subnet mask in the routing update.

 RIPv2

 OSPF

 EIGRP

 IS-IS

 BGP 107

Classful Routing Updates

•When R2 receives the update, it applies the receiving interface subnet mask (/24) to the update and adds 172.16.1.0 to the routing table.

•R1 sends an update to R2.

•It sends 172.16.

1 .0

because the advertised subnet belongs to the same major classful network as the outgoing interface.

108

Classful Routing Updates

•R2 sends an update to R3.

•R2 summarizes subnets

172.16.1.0/24, 172.16.2.0/24, and

172.16.3.0/24 into the major classful network 172.16.

0 .0

.

•When R3 receives the update it applies the classful mask for a class B network.

•R3 adds 172.16.0.0/16 to its routing table.

109

Classful IP Address Allocation = Inefficient

 RFCs 790 and 791 resulted in a tremendous waste of address space.

Class C (192 – 223)

# of possible networks: 2,097,152

# of Hosts/Net: 254

Max. # Hosts: 532,676,608

Class A (1 - 126)

# of possible networks: 126

# of Hosts/Net: 16,777,214

Max. # Hosts: 2,113,928,964

Class B (128 – 191)

# of possible networks: 16,384

# of Hosts/Net:

Max. # Hosts:

65,534

1,073,709,056 110

Classless Inter-Domain Routing = Efficient

 In 1993, RFC 1517 replaced the classful RFCs and classes (A, B, and C) became obsolete.

 Using CIDR, network updates include a subnet mask (a.k.a. network prefix, or prefix length) such as /8, /19, etc.

Class C

# of possible networks:

# of Hosts/Net:

Max. # Hosts:

(192 – 223)

2,097,152

254

532,676,608

Class A

# of possible networks:

# of Hosts/Net:

Max. # Hosts:

(1 - 126)

126

16,777,214

2,113,928,964

Class B

# of possible networks:

# of Hosts/Net:

Max. # Hosts:

(128 – 191)

16,384

65,534

1,073,709,056

111

11111111.00000000.00000000.00000000 /8 (255.0.0.0)

11111111.10000000.00000000.00000000 /9 (255.128.0.0)

16,777,216 host addresses

8,388,608 host addresses

4,194,304 host addresses

2,097,152 host addresses

1,048,576 host addresses

524,288 host addresses

262,144 host addresses

11111111.11111110.00000000.00000000 /15 (255.254.0.0)

11111111.11111111.00000000.00000000 /16 (255.255.0.0)

11111111.11111111.10000000.00000000 /17 (255.255.128.0)

11111111.11111111.11000000.00000000 /18 (255.255.192.0)

11111111.11111111.11100000.00000000 /19 (255.255.224.0)

11111111.11111111.11110000.00000000 /20 (255.255.240.0)

131,072 host addresses

65,536 host addresses

32,768 host addresses

16,384 host addresses

8,192 host addresses

4,096 host addresses

11111111.11111111.11111000.00000000 /21 (255.255.248.0)

11111111.11111111.11111100.00000000 /22 (255.255.252.0)

11111111.11111111.11111110.00000000 /23 (255.255.254.0)

2,048 host addresses

1,024 host addresses

512 host addresses

11111111.11111111.11111111.00000000 /24 (255.255.255.0) 256 host addresses

11111111.11111111.11111111.10000000 /25 (255.255.255.128) 128 host addresses

11111111.11111111.11111111.11000000 /26 (255.255.255.192) 64 host addresses

 ISPs can now more efficiently allocate address space using any

11111111.11111111.11111111.11111000 /29 (255.255.255.248) 8 host addresses

 Blocks of IP addresses can be assigned to a network based on the or thousands of hosts.

“ Host Route ” 112

Classless Inter-Domain Routing = Efficient

 CIDR also reduces the size of routing tables and manages the IPv4 address space more efficiently using:

 Route summarization ( prefix aggregation)

 Routes are summarized into a single route to help reduce the size of routing tables such as when one summary static route replaces several specific static route statements.

 Summary routes can be configured by both static routes and classless routing protocols.

 Supernetting

 Summarizes multiple network addresses with a mask that is smaller than the classful mask.

 Note :

 A supernet is always a route summary, but a route summary is not always a supernet.

113

Summarizing Supernet Routes

 ISP1 has four customers, and that each customer has a variable amount of IP address space.

Customer A

192.168.0.0/23 RA

Customer B

192.168.2.0/23

RB

Customer C

192.168.4.0/22 RC

Customer D

192.168.8.0/21

RD

ISP1 ISP2

114

Summarizing Supernet Routes

 The address space of the four customers can be summarized into one advertisement to ISP2 (192.168.0.0/20)

 This type of route is known as a supernet route.

Customer A

192.168.0.0/23 RA

Customer B

192.168.2.0/23

RB

192.168.0.0/ 20

ISP2 ISP1

Customer C

192.168.4.0/22 RC

Customer D

192.168.8.0/21

RD

115

Calculating a Summary Route

1.

List the networks in binary format.

Customer A (192.168.

0 .0): 11000000.10101000.00000000.00000000

Customer B (192.168.

2 .0): 11000000.10101000.00000010.00000000

Customer C (192.168.

4 .0) : 11000000.10101000.00000100.00000000

Customer D (192.168.

8 .0):

11000000.10101000.00001000.00000000

116

Calculating a Summary Route

1.

List the networks in binary format.

2.

Count the number of far left matching bits.

 This identifies the prefix length or subnet mask for the summarized route.

3.

Copy the matching bits and then add zero bits to the rest of the address to determine subnet prefix.

Customer A (192.168.

0 .0): 11000000.10101000.00000000.00000000

Customer B (192.168.

2 .0): 11000000.10101000.00000010.00000000

Customer C (192.168.

4 .0) : 11000000.10101000.00000100.00000000

Customer D (192.168.

8 .0):

11000000.10101000.00001000.00000000

11000000.10101000.0000

0000.00000000

/20

117

Summarizing Routes

 Creating smaller routing tables makes the routing table lookup process more efficient.

 Fewer routes to search.

 Summary CIDR routes can be configured using static routes.

 If one static route can be used instead of multiple static routes, the size of the routing table is reduced.

 In many cases, a single static route can be used to represent dozens, hundreds, or even thousands of routes.

118

For Example: Six Static Routes (more later)

172.19.0.0/16

.1

R1

R1(config)# ip route 172.16.0.0 255.255.0.0 172.19.0.2

R1(config)# ip route 172.17.0.0 255.255.0.0 172.19.0.2

R1(config)# ip route 172.18.0.0 255.255.0.0 172.19.0.2

R1(config)# ip route 172.19.0.0 255.255.0.0 172.19.0.2

R1(config)# ip route 172.20.0.0 255.255.0.0 172.19.0.2

R1(config)# ip route 172.21.0.0 255.255.0.0 172.19.0.2

R1(config)#

119

Replaced with One Summary Static Route

R1

R1

R1(config)# no ip route 172.16.0.0 255.255.0.0 172.19.0.2

R1(config)# no ip route 172.17.0.0 255.255.0.0 172.19.0.2

R1(config)# no ip route 172.18.0.0 255.255.0.0 172.19.0.2

R1(config)# no ip route 172.19.0.0 255.255.0.0 172.19.0.2

R1(config)# no ip route 172.20.0.0 255.255.0.0 172.19.0.2

R1(config)# no ip route 172.21.0.0 255.255.0.0 172.19.0.2

R1(config)#

R1(config)# ip route 172.16.0.0 255.248.0.0 172.19.0.2

R1(config)#

120

Classless Routing Updates

•R2 summarizes networks

172.16.0.0/16, 172.17.0.0/16,

172.18.0.0/16, and 172.19.0.0/16, and advertise a supernet summary static route

172.16.0.0/14 to R3.

•R3 then installs the supernet route 172.16.0.0/14 in its routing table.

121

Fixed-Length Subnet Masking (FLSM)

172.16.0.0/16 subnetted

(FLSM) using /24

 With FLSM (traditional subnetting), the same number of addresses is allocated for each subnet.

 If all the subnets have the same requirements for the number of hosts, these fixed size address blocks would be sufficient.

 However, most often that is not the case.

122

FLSM Example

 The following network can be subnetted using a /27 subnet mask.

 This would create subnets with increments of 32, therefore:

 Building A: 192.168.20.

0 /27

.224 - 255 .0 - .31

Building A

192.168.20.

0 /27

 Building B: 192.168.20.

32 /27

 Building C: 192.168.20.

64 /27

.32 - .63

Building B

192.168.20.

32 /27

.192 - 223  Building D: 192.168.20.

96 /27

 This leaves four /27 subnets.

.160 - 191

.128 - 159 .96 - .127

.64 - 95

Building C

192.168.20.

64 /27

Building D

192.168.20.

96 /27

123

Variable-Length Subnet Masking (VLSM)

 With VLSM the subnet mask length varies depending on how many bits have been borrowed for a particular subnet, thus the “variable” part of variable-length subnet mask.

 VLSM subnetting is similar to traditional subnetting except that subnetting is not a single pass activity.

 With VLSM, the network is first subnetted, and then the subnets are subnetted again.

 This process can be repeated multiple times to create subnets of various sizes.

124

VLSM Example

 The WAN interfaces of the routers are assigned the IP addresses and mask for the /30 subnets (2 hosts).

 In this example, the last subnet is subnetted into /30 subnets to

Building A accommodate WAN interfaces:

192.168.20.

0 /27

 R1 to R2: 192.168.20.

224 /30

Building B

192.168.20.

32 /27  R2 to R3: 192.168.20.

228 /30

 R3 to R4: 192.168.20.

232 /30

Building C

192.168.20.

64 /27  This leaves 3 /27 and five /30 subnets.

Building D

192.168.20.

96 /27

125

VLSM Example

126

Configuring VLSM

R1(config)# interface gigabitethernet 0/0

R1(config-if)# ip address 192.168.20.1 255.255.255.224

R1(config-if)# exit

R1(config)# interface serial 0/0/0

R1(config-if)# ip address 192.168.20.225 255.255.255.252

R1(config-if)# end

R1#

R3(config)# interface gigabitethernet 0/0

R3(config-if)# ip address 192.168.20.65 255.255.255.224

R3(config-if)# exit

R3(config)# interface serial 0/0/0

R3(config-if)# ip address 192.168.20.230 255.255.255.252

R3(config-if)# exit

R3(config)# interface serial 0/0/1

R3(config-if)# ip address 192.168.20.233 255.255.255.252

R3(config-if)# end

R3#

R2(config)# interface gigabitethernet 0/0

R2(config-if)# ip address 192.168.20.33 255.255.255.224

R2(config-if)# exit

R2(config)# interface serial 0/0/0

R2(config-if)# ip address 192.168.20.226 255.255.255.252

R2(config-if)# exit

R2(config)# interface serial 0/0/1

R2(config-if)# ip address 192.168.20.229 255.255.255.252

R2(config-if)# end

R2#

R4(config)# interface gigabitethernet 0/0

R4(config-if)# ip address 192.168.20.97 255.255.255.224

R4(config-if)# exit

R4(config)# interface serial 0/0/0

R4(config-if)# ip address 192.168.20.234 255.255.255.252

R4(config-if)# end

R4#

127

VLSM Trick

Always satisfy the requirements of the

BIGGEST LAN FIRST and then work your way down ….

128

Subnetting 10.0.0.0/8 to 10.0.0.0/16

129

Subnetting the Subnet 10.1.0.0/16 to 10.1.0.0/24

130

Subnetting the Subnet 10.2.0.0/16 to 10.2.0.0/24

131

Subnetting the Subnet 10.3.0.0/16 to 10.3.0.0/28

132

Subnetting the Subnet 10.4.0.0/16 to 10.4.0.0/20

133

Route Summarization

134

Summary Static Route Example #1

172.21.0.0/16

172.23.0.0/16

172.20.0.0/16

R1

172.22.0.0/16

R1 needs to reach networks

172.20.0.0/16 through 172.23.0.0/16.

Instead of configuring four separate static routes, summarize the networks and create a summary static route.

.

135

Calculating a Route Summary

136

Calculating a Route Summary

Answer: 14 matching bits = /14 or 255.252.0.0

137

Calculating a Route Summary

Answer: 14 matching bits = /14 or 255.252.0.0

Answer: 172.20.0.0

138

One Summary Static Route

172.21.0.0/16

172.19.0.0/16

172.20.0.0/16

.1

172.22.0.0/16

R1

R1

172.23.0.0/16

R1(config)# ip route 172.20.0.0 255.252.0.0 172.19.0.1

R1(config)#

139

Summary Static Route Example #2

172.16.1.0/24

172.16.2.0/24 192.168.1.0/24

172.16.3.0/24 192.168.2.0/24

R3# show ip route static | begin Gateway

Gateway of last resort is not set

172.16.0.0/24 is subnetted, 3 subnets

S 172.16.1.0 [1/0] via 192.168.1.2

S 172.16.2.0 [1/0] via 192.168.1.2

S 172.16.3.0 [1/0] via 192.168.1.2

R3#

140

Summarize the Networks

141

Configure Summary Static Route

172.16.1.0/24

172.16.2.0/24 192.168.1.0/24

172.16.3.0/24 192.168.2.0/24

R3(config)# no ip route 172.16.1.0 255.255.255.0 192.168.1.2

R3(config)# no ip route 172.16.2.0 255.255.255.0 192.168.1.2

R3(config)# no ip route 172.16.3.0 255.255.255.0 192.168.1.2

R3(config)#

R3(config)# ip route 172.16.0.0 255.255.252.0 192.168.1.2

R3(config)#

142

Verify the Summary Static Route

172.16.1.0/24

172.16.2.0/24 192.168.1.0/24

172.16.3.0/24 192.168.2.0/24

R3# show ip route static | begin Gateway

Gateway of last resort is not set

172.16.0.0

/22 is subnetted, 1 subnets

S 172.16.0.0

[1/0] via 192.168.1.2

R3#

143

Configuring IPv6 Summary Routes

144

IPv6 Route Summarization

2001:DB8:ACAD:2::/64

2001:DB8:FEED:1::/64

2001:DB8:ACAD:1::/64

:2

2001:DB8:ACAD:3::/64

R1

R1

R1

2001:DB8:ACAD:4::/64

R1(config)# ipv6 route 2001:DB8:ACAD:1::/64 2001:db8:feed:1::2

R1(config)# ipv6 route 2001:DB8:ACAD:2::/64 2001:db8:feed:1::2

R1(config)# ipv6 route 2001:DB8:ACAD:3::/64 2001:db8:feed:1::2

R1(config)# ipv6 route 2001:DB8:ACAD:4::/64 2001:db8:feed:1::2

R1(config)#

145

Verify the Routing Table of R1

2001:DB8:ACAD:2::/64

2001:DB8:FEED:1::/64

2001:DB8:ACAD:1::/64

:2

2001:DB8:ACAD:3::/64

R1

R1

R1

2001:DB8:ACAD:4::/64

R1# show ipv6 route static

<Output omitted>

S 2001:DB8:ACAD:1::/64 [1/0] via 2001:DB8:FEED:1::2

S 2001:DB8:ACAD:2::/64 [1/0] via 2001:DB8:FEED:1::2

S 2001:DB8:ACAD:3::/64 [1/0] via 2001:DB8:FEED:1::2

S 2001:DB8:ACAD:4::/64 [1/0] via 2001:DB8:FEED:1::2

R1# 146

Identify Where the Addresses Differ

Identify Where the Addresses Differ

147

Convert the Section from Hex to Binary

148

Count the # of Left-Most Matching Bits

Add Zero Bits

149

Convert the Binary Section Back to Hex

2001:0DB8:ACAD: 0000 ::/61 or

2001:0DB8:ACAD: 0 ::/61 or

2001:0DB8:ACAD::/61

150

Configuring an IPv6 Summary Address

2001:DB8:ACAD:2::/64

2001:DB8:FEED:1::/64

2001:DB8:ACAD:1::/64

R1

:2

R1

2001:DB8:ACAD:3::/64

R1

2001:DB8:ACAD:4::/64

R1(config)# no ipv6 route 2001:DB8:ACAD:1::/64 2001:db8:feed:1::2

R1(config)# no ipv6 route 2001:DB8:ACAD:2::/64 2001:db8:feed:1::2

R1(config)# no ipv6 route 2001:DB8:ACAD:3::/64 2001:db8:feed:1::2

R1(config)# no ipv6 route 2001:DB8:ACAD:4::/64 2001:db8:feed:1::2

R1(config)#

R1(config)#

R1(config)# ipv6 route 2001:DB8:ACAD::/61 2001:db8:feed:1::2

R1(config)#

151

Verify the Summary IPv6 Route

2001:DB8:ACAD:2::/64

2001:DB8:FEED:1::/64

2001:DB8:ACAD:1::/64

:2

2001:DB8:ACAD:3::/64

R1

R1

R1

2001:DB8:ACAD:4::/64

R1# show ipv6 route static

<Output omitted>

S 2001:DB8:ACAD::/61 [1/0] via 2001:DB8:FEED:1::2

R1#

152

Configuring Floating Static Routes

153

Floating Static Route

I can reach the HQ router

10.0.0.0/8 LAN using the private WAN link.

I’m using EIGRP to exchange routes between sites.

Private WAN

172.16.1.0 /30

172.16.1.0 /30

S0/0/0

.2

Branch

.242

S0/0/1

209.165.200.240 /29

.241

Internet

.225

ISP

.1

S0/0/0

S0/0/1

.226

HQ

209.165.200.224 /29

10.0.0.0 /8

154

Floating Static Route

However, if that link ever fails, I will use a floating static route connecting to the

Internet as a backup.

Since EIGRP has an administrative distance of 90 I will configure the static route with a higher value

Branch(config)#

Private WAN ip route 10.0.0.0 255.0.0.0 S0/0/1 100

172.16.1.0 /30

S0/0/0 S0/0/0

.2

.1

Branch

.242

S0/0/1 S0/0/1

.226

HQ

209.165.200.240 /29

.241

Internet

.225

ISP

209.165.200.224 /29

10.0.0.0 /8

155

Advantages and Disadvantages

Advantages

Backs up multiple interfaces / networks

Encapsulation independent

Disadvantages

Requires a routing protocol.

Dependent on convergence times

Line protocol status independent Single router backup only

156

Configuring a Floating Static Route to R3

Backup

R1(config)# ip route 0.0.0.0 0.0.0.0 172.16.2.2

R1(config)# ip route 0.0.0.0 0.0.0.0 10.10.10.2 5

R1(config)#

157

Verifying the Routing Table of R1

Only the primary (best) route is in the routing table.

The backup route with the higher administrative distance is not in the routing table.

Backup

R1# show ip route static | begin Gateway

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

S* 0.0.0.0/0 [1/0] via 172.16.2.2

R1#

158

Verify the Path to the R3 LAN

R1# traceroute 192.168.2.1

Type escape sequence to abort.

Tracing the route to 192.168.2.1

VRF info: (vrf in name/id, vrf out name/id)

1 172.16.2.2 4 msec 4 msec 8 msec

2 192.168.1.1 12 msec * 12 msec

R1#

159

Simulate a Router Failure on R2

X X

R2(config)# int s0/0/0

R2(config-if)# shutdown

*Feb 21 16:33:35.939: %LINK-5-CHANGED: Interface Serial0/0/0, changed state to administratively down

*Feb 21 16:33:36.939: %LINEPROTO-5-UPDOWN: Line protocol on Interface

Serial0/0/0, changed state to down

R2(config-if)# int s0/0/1

R2(config-if)# shutdown

R2(config-if)#

*Feb 21 16:33:42.543: %LINK-5-CHANGED: Interface Serial0/0/1, changed state to administratively down

*Feb 21 16:33:43.543: %LINEPROTO-5-UPDOWN: Line protocol on Interface

Serial0/0/1, changed state to down

160

Verify the Default Route on R1

X X

Primary

R1# show ip route static | begin Gateway

Gateway of last resort is 0.0.0.0 to network

0.0.0.0

S* 0.0.0.0/0 [5/0] via 10.10.10.2

R1#

161

Verify the Path to the R3 LAN

X X

If the links come back up, the backup route is removed and the primary route with the lower default administrative distance of 1 is reinstalled into the routing table.

R1# traceroute 192.168.2.1

Type escape sequence to abort.

Tracing the route to 192.168.2.1

VRF info: (vrf in name/id, vrf out name/id)

1 10.10.10.2 4 msec 4 msec *

R1#

162

Troubleshooting Static Routes

163

Networks Fail

 Due to a failed interface.

 A service provider drops a connection.

 Links become oversaturated.

 An administrator enters a wrong configuration.

Common IOS Troubleshooting Commands

 ping

 traceroute

 show ip route

 show ip interface brief

 show cdp neighbors detail

164

Extended Ping

R1# ping 192.168.2.1 source 172.16.3.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:

Packet sent with a source address of 172.16.3.1

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max =

28/28/28 ms

R1#

165

Traceroute

R1# traceroute 192.168.2.1

Type escape sequence to abort.

Tracing the route to 192.168.2.1

VRF info: (vrf in name/id, vrf out name/id)

1 172.16.2.2 4 msec 4 msec 8 msec

2 192.168.1.1 12 msec 12 msec *

R1#

166

Verify the Routing table

R1# show ip route | begin Gateway

Gateway of last resort is not set

172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks

S 172.16.1.0/24 [1/0] via 172.16.2.2

C 172.16.2.0/24 is directly connected, Serial0/0/0

L 172.16.2.1/32 is directly connected, Serial0/0/0

C 172.16.3.0/24 is directly connected, GigabitEthernet0/0

L 172.16.3.1/32 is directly connected, GigabitEthernet0/0

S 192.168.1.0/24 [1/0] via 172.16.2.2

S 192.168.2.0/24 [1/0] via 172.16.2.2

R1#

167

Verify Interface Status

R1# show ip interface brief

Interface IP-Address OK? Method Status Protocol

Embedded-Service-Engine0/0 unassigned YES unset administratively down down

GigabitEthernet0/0 172.16.3.1 YES manual up up

GigabitEthernet0/1 unassigned YES unset administratively down down

Serial0/0/0 172.16.2.1 YES manual up up

Serial0/0/1 unassigned YES unset administratively down down

R1#

168

Directly

Connected Cisco

Devices

R1# show cdp neighbors

Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge

S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone,

D - Remote, C - CVTA, M - Two-port Mac Relay

Device ID Local Intrfce Holdtme Capability Platform Port ID netlab-cs5 Gig 0/0 156 S I WS-C2960- Fas 0/1

R2 Ser 0/0/0 153 R S I CISCO1941 Ser 0/0/0

R1#

169

Troubleshooting

Example #1

R1# ping 192.168.2.1 source g0/0

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:

Packet sent with a source address of 172.16.3.1

.....

Success rate is 0 percent (0/5)

R1#

170

Troubleshooting

Example #1

R1# traceroute 192.168.2.1

Type escape sequence to abort.

Tracing the route to 192.168.2.1

VRF info: (vrf in name/id, vrf out name/id)

1 172.16.2.2 4 msec 4 msec 8 msec

2 172.16.2.1 12 msec 12 msec 12 msec

3 172.16.2.2 12 msec 8 msec 8 msec

Routing Loop!

4 172.16.2.1 20 msec 16 msec 20 msec

5 172.16.2.2 16 msec 16 msec 16 msec

6 172.16.2.1 20 msec 20 msec 24 msec

171

Verify the Routing

Table of R2

R2# show ip route | begin Gateway

Gateway of last resort is not set

172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks

C 172.16.1.0/24 is directly connected, GigabitEthernet0/0

L 172.16.1.1/32 is directly connected, GigabitEthernet0/0

C 172.16.2.0/24 is directly connected, Serial0/0/0

L 172.16.2.2/32 is directly connected, Serial0/0/0

S 172.16.3.0/24 is directly connected, Serial0/0/0

192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks

C 192.168.1.0/24 is directly connected, Serial0/0/1

L 192.168.1.2/32 is directly connected, Serial0/0/1

S 192.168.2.0/24 [1/0] via 172.16.2.1

R2#

172

Verify the Running

Configuration

R2# show running-config | section ip route ip route 172.16.3.0 255.255.255.0 172.16.2.1

ip route 192.168.2.0 255.255.255.0 172.16.2.1

R2# conf t

R2(config)# no ip route 192.168.2.0 255.255.255.0 172.16.2.1

R2(config)# ip route 192.168.2.0 255.255.255.0 192.168.1.1

R2(config)#

173

Troubleshooting

Example #1

R1# ping 192.168.2.1 source g0/0

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:

Packet sent with a source address of 172.16.3.1

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max =

28/28/28 ms

R1#

174

Download