configuring static routes

Upload: snoumani123

Post on 04-Apr-2018

240 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/29/2019 Configuring Static Routes

    1/19

    1/30/13 Configuring Static Routes

    fengnet.com/book/CCIE Professional Development Routing TCPIP Volume I/ch03lev1sec2.html

    Configuring Static Routes

    The route table a cquires info rmation in one o f three ways:

    The info rmation can be entered based on what the router knows about its directly connected subnets.

    The informa tion can be entered manually, by means of a static route entry.

    The information can be entered automatically by one of several systems of automatic information discovery and

    sharing known as dynamic routing protocols.

    The bulk of this book concerns dynam ic IP routing protocols, but this discussion o f static route configuration will prepareyou for understanding the subsequent chapters.

    More to the point, static routing is preferred over dynamic routing in certain circumstances. As with any process, the moreautomatic it is, the less control you have over it. Although dynamic (automatic) routing requires much less humanintervention, static routing allows very precise control over the routing behavior of a network. The price to be paid for thisprecision is the necessity of manual reconfiguration any time the topology of the ne twork changes .

    Case Study: Simple IPv4 Static Routes

    Figure 3-2 shows a network with four routers and six data links. Notice that the subnets of network 10.0.0.0 arediscontiguousthere is a diffe rent major network subnet (192.168.1.192, in the Tigge r-to-Piglet link) s epa rating 10.1.0.0from the other 10.0.0.0 subnets. The subnets of 10.0.0.0 are also variably subnettedthe subnet masks are not consistenthroughout the ne twork: Subnet 10.1.0.0 has a 16-bit mask , while 10.4.0.0 has a 24-bit mask . Finally, the subnetaddress of Pooh's Ethernet link is an a ll-zero subnet. Later chapters dem onstrate that an addressing scheme with thesecharacteristics causes p roblems for simple r, classful routing protocols such as RIP and IGRP; but static routes work finehere.

    Figure 3-2. Routing protocols such as RIP and IGRP cannot easily route this discontiguous,

    variably subnetted network, but static routing will work.

    [View full size image]

    The procedure fo r statically routing a network has three steps :

    1. For each data link within the network, identify all subnet o r network a ddresses .

    2. For each router, identify all data links not directly connected to that router.

    3. For each router, write a route statement for each address not directly connected to it.

    http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/images/03fig02_alt.jpghttp://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03fig02http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec3.htmlhttp://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec1.html
  • 7/29/2019 Configuring Static Routes

    2/19

    1/30/13 Configuring Static Routes

    fengnet.com/book/CCIE Professional Development Routing TCPIP Volume I/ch03lev1sec2.html 2

    Writing route statements for a router's directly connected data links is unnecessary, because the addresses and masksconfigured on the router's interfaces cause those networks to be recorded in its route table.

    For exam ple, the network in Figure 3-2 has six subnets:

    10.1.0.0/16

    10.4.6.0/24

    10.4.7.0/24

    192.168.1.192/27

    192.168.1.64/27

    192.168.1.0/27

    To configure s tatic routes fo r Piglet, the subne ts that are not directly connected a re identified as follows:

    10.4.6.0/24

    10.4.7.0/24

    192.168.1.64/27

    192.168.1.0/27

    These are the subnets for which static routes must be written. Example 3-2 shows the comm ands for entering Piglet's

    static routes.[3]

    [3] For the static routes in t his example and the subsequent examples in t his chapter to work properly, two global commands m ust be added to

    the routers: ip classless and ip subnet-zero. In IOS 11.3 and later, ip classless is enabled by default. These commands are introduced in

    Chapter 6 and are mentioned here f or readers who wish to try the conf iguration examples in a lab.

    Example 3-2. Configuring Piglet's static routes.

    Piglet(config)# ip route 192.168.1.0 255.255.255.224 192.168.1.193

    Piglet(config)# ip route 192.168.1.64 255.255.255.224 192.168.1.193

    Piglet(config)# ip route 10.4.6.0 255.255.255.0 192.168.1.193

    Piglet(config)# ip route 10.4.7.0 255.255.255.0 192.168.1.193

    Following the same steps, Exam ple 3-3 shows the route entries for the other three routers.

    Example 3-3. Route entries for Routers Pooh, Tigger, and Eeyore.

    Pooh(config)# ip route 192.168.1.192 255.255.255.224 192.168.1.66Pooh(config)# ip route 10.1.0.0 255.255.0.0 192.168.1.66

    Pooh(config)# ip route 10.4.6.0 255.255.255.0 192.168.1.66

    Pooh(config)# ip route 10.4.7.0 255.255.255.0 192.168.1.66

    _________________________________________________________________

    Tigger(config)# ip route 192.168.1.0 255.255.255.224 192.168.1.65

    Tigger(config)# ip route 10.1.0.0 255.255.0.0 192.168.1.194

    Tigger(config)# ip route 10.4.7.0 255.255.255.0 10.4.6.2

    _________________________________________________________________

    Eeyore(config)# ip route 192.168.1.0 255.255.255.224 10.4.6.1

    Eeyore(config)# ip route 192.168.1.64 255.255.255.224 10.4.6.1

    Eeyore(config)# ip route 192.168.1.192 255.255.255.224 10.4.6.1

    Eeyore(config)# ip route 10.1.0.0 255.255.0.0 10.4.6.1

    http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex03http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch06.html#ch06http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03fn03http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex02http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03fig02
  • 7/29/2019 Configuring Static Routes

    3/19

    1/30/13 Configuring Static Routes

    fengnet.com/book/CCIE Professional Development Routing TCPIP Volume I/ch03lev1sec2.html 3

    The routing commands themselves are easily read if the reader remembers that each command describes a route tableentry. The command for IPv4 is ip route, followed by the address to be entered into the table, a mask for determiningthe network portion of the address, and the address of the directly connected interface o f the nex t-hop router.

    An alternative configuration command fo r IPv4 static routes specifies the interface out of which an address is reachedinstead of the interface address of the next-hop router. For example, Exam ple 3-4 shows the pos sible route entries fo rTigger.

    Example 3-4. Alternative route entries for Tigger.

    ip route 192.168.1.0 255.255.255.224 S0

    ip route 10.1.0.0 255.255.0.0 E0

    ip route 10.4.7.0 255.255.255.0 S1

    Certain conditions m ust be m et befo re a static route is written into the route table. IP routing must be e nabled , thenext-hop address, if used, must be reachable, the exit interface must have an IP address configured on it, and the exitinterface must be up.

    Example 3-5 compares the route table resulting from this configuration with the route table resulting from entriespointing to a next-hop router. Notice that a certain inaccuracy is introduced: All addresses specified with a static routereferring to an exit interface are entered into the tab le as if they are directly connected to that interface. Theimplications for route redistribution are discussed in Chapter 11.

    A point of interest in Exam ple 3-5 is that the header for the 10.0.0.0 subnets indicates the variable subnet masks used

    in the network. Variable-length subnet mask ing (VLSM) can be a use ful tool and is d iscussed at length in Chapter 6.

    Example 3-5. The top route table is the result of static route entries pointing to the next-hop

    router. The bottom route table is the result of static routes that point to the interface a

    packet must exit to reach the destination network.[4]

    Tigger#show ip route

    Gateway of last resort is not set10.0.0.0 is variably subnetted, 3 subnets, 2 masks

    C 10.4.6.0 255.255.255.0 is directly connected, Serial1S 10.4.7.0 255.255.255.0 [1/0] via 10.4.6.2S 10.1.0.0 255.255.0.0 [1/0] via 192.168.1.194

    192.168.1.0 255.255.255.224 is subnetted, 3 subnets

    C 192.168.1.64 is directly connected, Serial0S 192.168.1.0 [1/0] via 192.168.1.65C 192.168.1.192 is directly connected, Ethernet0Tigger#

    Tigger#show ip route

    Gateway of last resort is not set10.0.0.0 is variably subnetted, 3 subnets, 2 masks

    C 10.4.6.0 255.255.255.0 is directly connected, Serial1S 10.4.7.0 255.255.255.0 is directly connected, Serial1S 10.1.0.0 255.255.0.0 is directly connected, Ethernet0

    192.168.1.0 255.255.255.224 is subnetted, 3 subnetsC 192.168.1.64 is directly connected, Serial0S 192.168.1.0 is directly connected, Serial0C 192.168.1.192 is directly connected, Ethernet0Tigger#

    [4] The key normally seen at the top of the route table (as in Figure 3-2) has been remov ed for clarity .

    A third option for static routes is to use a combination of the outgoing interface and the next-hop address. The ne xt-hopaddress is coupled with the specified ex it interface. If the ex it interface goes down, the route is removed from the routetable, even if the next-hop address is recursively reachable via an alternate route. This minimizes table lookupsassociated with finding the outgoing interface asso ciated with a nex t-hop address and the e ntry in the table appea rs asa route with a distance of 1, not a directly connected network.

    Directing a static route to an exit broadcast interface without specifying the next-hop address can cause a n ex cessiveamount of traffic on the broadcast network, and also might eat up the router's memory. For example, look at Tigger's iproute 10.1.0.0 255.255.0.0 E0 command. The router assumes 10.1.0.0 is directly connected, as we have seen from theroute table. Therefore, when a ttempting to route to any address on the 10.1.0.0/16 subnet, the router sends an ARP

    http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03fig02http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03fn04http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch06.html#ch06http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex05http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch11.html#ch11http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex05http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex04
  • 7/29/2019 Configuring Static Routes

    4/19

    1/30/13 Configuring Static Routes

    fengnet.com/book/CCIE Professional Development Routing TCPIP Volume I/ch03lev1sec2.html 4

    request to find the MAC address to which to fo rward the pa cket. Each attempt to reach an address on the 10.1.0.0network, whether the des tination is valid or not, will result in an ARP request, an ARP respo nse if a router on thebroadcast network is responding on beha lf of the 10.1.0.0 network (proxy ARP), and a po tentially large ARP cache onthe router. By appending the nex t-hop address to the s tatic route en try, ip route 10.1.0.0 255.255.0.0 E0192.168.1.194, the router no longer assumes that the de stination is directly connected. The only ARP traffic is for thenext-hop address, which only occurs for the first packet des tined to a host on network 10.1.0.0, rather than for everypacket de stined to a new host on network 10.1.0.0.

    Specify the ex it interface and the next-hop address to minimize table look ups associated with finding the exit interfacefor a spe cified nex t-hop address, and to m inimize traffic on the broadcast network.

    Example 3-6 shows the difference in the static route e ntries in the route tables when the nex t-hop address is used withthe exit interface.

    Example 3-6. Specifying an exit interface rather than the next-hop router address with static

    routing could generate excessive traffic on a broadcast network.

    Tigger#show ip route static

    10.0.0.0/16 is subnetted, 1 subnetsS 10.1.0.0 is directly connected, Ethernet0

    Tigger#show arpProtocol Address Age (min) Hardware Addr Type InterfaceInternet 192.168.1.193 - 0004.c150.f1c0 ARPA Ethernet0Internet 10.1.8.1 0 0010.7b38.37d5 ARPA Ethernet0Internet 192.168.1.194 24 0010.7b38.37d5 ARPA Ethernet0

    Internet 10.1.5.5 0 0010.7b38.37d5 ARPA Ethernet0Internet 10.1.1.1 0 0010.7b38.37d5 ARPA Ethernet0Tigger#

    Tigger#show ip route static10.0.0.0/16 is subnetted, 1 subnets

    S 10.1.0.0 [1/0] via 192.168.1.194, Ethernet0

    Tigger#show arpProtocol Address Age (min) Hardware Addr Type InterfaceInternet 192.168.1.193 - 0004.c150.f1c0 ARPA Ethernet0Internet 192.168.1.194 22 0010.7b38.37d5 ARPA Ethernet0

    The first route table and ARP cache show that the static route entry was created with an exit interface and no next-hopaddress . The route is directly connected a nd there are multiple ARP cache entries for destinations on the 10.1.0.0network. The MAC address for each entry is the sam e. It is the ha rdware address of the router with IP address192.168.1.194. The router is sending ARP replies for all hosts on the 10.1.0.0 network. As discussed in Chapter 1, thisproxy ARP is enabled by default in IOS.

    The second se t of tables shows the route table and ARP cache when the next-hop address is specified in addition to theex it interface. Notice the route is no longer directly connected. It is known via 192.168.1.194 a nd the exit interface isEthernet 0. The ARP cache has no e ntries fo r the 10.1.0.0 ne twork, only for the add resses that actually exist on thedirectly connected network, including 192.168.1.194.

    Case Study: Simple IPv6 Static Routes

    IPv6 static routes a re configured the sam e way as IPv4 static routes. The only difference is that the IPv6 prefix length ofthe des tination ne twork is e ntered rather than the dotted decima l form o f the IPv4 ne twork mask . Unlike IPv4, however,IPv6 routing is not enabled by default. Before en tering a static route, IPv6 must be enabled using the ipv6 unicast-routing command. As with IPv4, an IPv6 address must be configured on the e xit interface and the interface must be upbefo re the static entry will be added to the route table. The comma nd used to create a static route is ipv6 route followedby the network to be entered into the route table, the leng th, in bits of the prefix, and the address of the next-hoprouter, or the ex it interface to be used to reach this des tination.

    To specify the next-hop address in the static route e ntry, you need to know what that address is. A detailed networkdrawing will help, but it may be out of date because of the dynam ic nature of the Interface ID portion o f the addresses.When addressing the IPv6 ne twork, if you specify interface IDs manually rather than using the automatically constructedEUI-64 format addresses, the ne xt-hop a ddress will be predictable. However, if the interfaces on the data link areconfigured to use EUI-64 interface IDs, you only spe cify the first 64 bits of the address . The router determines the final64 bits based on a MAC address. If a router is replaced, the new router will have different IPv6 addresses . (The first 64bits will remain the same , but the final 64 bits will be different.) One way to identify the full 128-bit IPv6 address of aneighbo r router is to use the Cisco Discovery Protocol (CDP) statistics. CDP displays informa tion about neighboringrouters, such as the router's hostname , router type, IOS, and the IP addresse s configured on the remo te end o f the

    http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch01.html#ch01http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex06
  • 7/29/2019 Configuring Static Routes

    5/19

    1/30/13 Configuring Static Routes

    fengnet.com/book/CCIE Professional Development Routing TCPIP Volume I/ch03lev1sec2.html 5

    link. Exam ple 3-7 displays one form of the show cdp command.

    Example 3-7. Cisco Discovery Protocol can tell you a lot of information about a device's

    neighbors.

    Honeybee#show cdp neighbor detail

    -------------------------Device ID: HoneytreeEntry address(es):IP address: 10.4.6.2

    IPv6 address: FE80::2B0:64FF:FE30:1DE0 (link-local)IPv6 address: FEC0::1:2B0:64FF:FE30:1DE0 (site-local)

    Platform: cisco 2610, Capabilities: RouterInterface: Serial0/0.2, Port ID (outgoing port): Serial0/0.2Holdtime : 146 sec

    Version :Cisco Internetwork Operating System SoftwareIOS (tm) C2600 Software (C2600-J1S3-M), Version 12.3(6), RELEASE SOFTWARE (fc3)Copyright (c) 1986-2004 by cisco Systems, Inc.Compiled Wed 11-Feb-04 19:24 by kellythw

    advertisement version: 2

    Example 3-7 displays a lot of information about the neighbor router, including the router type, IO S, host name and IPaddresses. The detail keyword is required to ob tain all the information that is disp layed.

    Another way to determine the IP v6 address o f a link is to issue the show ipv6 interface command. This comm anddisplays the I Pv6 information relevant to an interface. Example 3-8 shows the output from the command issued onHoneybee.

    Example 3-8.show ipv6 interface displays IPv6 information relevant to an interface,

    including the IPv6 EUI-64 formatted addresses.

    Honeybee#show ipv6 interface serial0/0.1Serial0/0.1 is up, line protocol is upIPv6 is enabled, link-local address is FE80::204:C1FF:FE50:F1C0

    Description: Link to PigletGlobal unicast address(es):FEC0::3:204:C1FF:FE50:F1C0, subnet is FEC0:0:0:3::/64

    Joined group address(es):FF02::1FF02::2FF02::1:FF30:1DE0

    Figure 3-3 shows a simple network with IPv6 addresses .[5]

    [5] The interf ace addresses are conf igured with EUI -64 addresses . The addresses, t herefore, are unique to each router based on MAC address.

    To reproduce the conf iguration, y ou'd have to determine y our router's interf ace addresses to use as the next hop.

    Figure 3-3. Static routing also works with IPv6.

    [View full size image]

    http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/images/03fig03_alt.jpghttp://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03fn05http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03fig03http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex08http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex07http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex07
  • 7/29/2019 Configuring Static Routes

    6/19

    1/30/13 Configuring Static Routes

    fengnet.com/book/CCIE Professional Development Routing TCPIP Volume I/ch03lev1sec2.html 6

    Example 3-9 shows the commands fo r entering Honeypot's IPv6 static routes.

    Example 3-9. Configuring Honeypot's IPv6 static routes.

    ipv6 unicast-routing

    interface serial 0/0.2 point-to-point

    ipv6 address fec0:0:0:3::/64 eui-64

    ipv6 route fec0::1:0:0:0:0/64 fec0::3:204:c1ff:fe50:f1c0

    ipv6 route fec0::a:0:0:0:0/64 fec0::3:204:c1ff:fe50:f1c0

    ipv6 route fec0::8:0:0:0:0/64 fec0::3:204:c1ff:fe50:f1c0

    Example 3-10 and Exam ple 3-11 show the route entries fo r the other two routers, Honeytree and Honeybee ,respectively.

    Example 3-10. Configuring IPv6 static routes for Honeytree.

    ipv6 route fec0::8:0:0:0:0/64 fec0::1:204:c1ff:fe50:f1c0

    ipv6 route fec0::3:0:0:0:0/64 fec0::1:204:c1ff:fe50:f1c0

    ipv6 route fec0::5:0:0:0:0/64 fec0::1:204:c1ff:fe50:f1c0

    Example 3-11. Configuring IPv6 static routes for Honeybee.

    ipv6 route fec0::a:0:0:0:0/64 fec0::1:2b0:64ff:fe30:1de0

    ipv6 route fec0::5:0:0:0:0/64 fec0::3:230:94ff:fe24:b780

    Look at the next-hop address used for Honeypot's routes, and the next-hop address used for Honeytree's routes.Honeypot's next-hop address for each route is fec0::3:204:c1ff:fe50:f1c0. The next-hop address used for Honeytree'sroutes is fec0::1:204:c1ff:fe50:f1c0. These addresses are those of Honeybee's interfaces to Honeypot and Honeytree,respectively. Notice that the last 64 bits of each of Honeybee 's interface addresses a re the same. The router uses itsfirst encountered MAC address to fo rm the last 64 bits of the EUI-64 formatted IPv6 addresses on each of its serialinterfaces.

    As with IPv4, IPv6 static routes can use the outbound interface rather than next-hop address. The re is an o ption to entean address a fter the interface as there is with IPv4. You can put either the link-local address here or a configuredaddress . This nex t-hop address should be used when the exit interface is a broadcast interface, such as Ethernet.

    Example 3-12 displays Hone ypot's IPv6 route table with only the next-hop address specified in the ipv6 routestatement. The comm and show ipv6 route displays the IPv6 route table. Prefixes, prefix lengths, and the next-hopaddress or outgoing interface are disp layed, as a re the administrative distance and route metric.

    http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex12http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex11http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex10http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex09
  • 7/29/2019 Configuring Static Routes

    7/19

    1/30/13 Configuring Static Routes

    fengnet.com/book/CCIE Professional Development Routing TCPIP Volume I/ch03lev1sec2.html 7

    Example 3-12. As with IPv4, the IPv6 static route table displays the destination network and

    the next-hop address used to reach the destination.

    Honeypot#show ipv6 route

    Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGPU - Per-user Static routeI1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summaryO - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2

    L FE80::/10 [0/0]

    via ::, Null0C FEC0:0:0:3::/64 [0/0]

    via ::, Serial0/0.2L FEC0::3:230:94FF:FE24:B780/128 [0/0]

    via ::, Serial0/0.2S FEC0:0:0:A::/64 [1/0]

    via FEC0::3:204:C1FF:FE50:F1C0S FEC0:0:0:8::/64 [1/0]

    via FEC0::3:204:C1FF:FE50:F1C0S FEC0:0:0:1::/64 [1/0]

    via FEC0::3:204:C1FF:FE50:F1C0C FEC0:0:0:5::/64 [0/0]

    via ::, Ethernet0/0L FEC0::5:230:94FF:FE24:B780/128 [0/0]

    via ::, Ethernet0/0L FF00::/8 [0/0]

    via ::, Null0

    The s tatic routes displayed in Exam ple 3-12 were entered using an IPv6 next-hop address. The router must determinethe ex it interface associated with this IP v6 address recursively, as it does with IPv4. The entry for FEC0:0:0:A::/64 has anext-hop address o f FEC0::3:204:C1FF:FE50:F1C0. Looking further into the route table, FEC0:0:0:3::/64 is connectedon Serial0/0.2. Notice that the adm inistrative distance of the static routes entered with the next-hop IPv6 address is 1and the route me tric is 0, the same as IP v4 static route entered in this way.

    Routes can also be entered with the outgoing interface toward the de stination network. The outgoing interface and thenext-hop address can be entered together, too. Exam ple 3-13 shows what Honeypot's static route configuration could bechanged to.

    Example 3-13. Alternative static route configuration for Honeypot.

    ipv6 route fec0::a:0:0:0:0/64 serial 0/0.2

    ipv6 route fec0::8:0:0:0:0/64 serial 0/0.2

    ipv6 route fec0::1:0:0:0:0/64 serial 0/0.2

    ipv6 route fec0::20:0:0:0:0/62 Ethernet0/0 FE80::2B0:64FF:FE30:1DE0

    The last entry, using the e xit interface and the next-hop address will help to illustrate the diffe rence in the route tablebetween the two forms of the comm and. Exam ple 3-14 displays Honeypot's new route table.

    Example 3-14. Honeypot route table after changing the next hop to the exit interface.

    Honeypot#show ipv6 route static

    S FEC0:0:0:A::/64 [1/0]via ::, Serial0/0.2

    S FEC0:0:0:8::/64 [1/0]via ::, Serial0/0.2

    S FEC0:0:0:1::/64 [1/0]via ::, Serial0/0.2

    S FEC0:0:0:20::/62 [1/0]via FE80::2B0:64FF:FE30:1DE0, Ethernet0/0

    One thing to notice in the route table is the administrative distance o f the static route configured with an exit interface.

    http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex14http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex13http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex12
  • 7/29/2019 Configuring Static Routes

    8/19

    1/30/13 Configuring Static Routes

    fengnet.com/book/CCIE Professional Development Routing TCPIP Volume I/ch03lev1sec2.html 8

    The d istance is 1, unlike IPv4 static routes configured the sam e way. The route doe s not appear to be d irectly connectedas it does with IPv4.

    The ne xt-hop address is undetermined when you enter the outbound interface unless you specify the exit interface andthe next-hop address. You can se e this in the route table shown in Example 3-14. The first statement, for instance, saythat FEC0:0:0:A::/64 is known via ::, Serial 0/0.2. The "::" means that the ne xt hop is unspe cified, but the ou tgoinginterface is Serial 0/0.2. On a po int-to-po int serial interface, an unspecified nex t-hop address is not a problem . There isonly one other device on that point-to-po int network, and all packe ts are forwarded out the interface and reach the o thedevice.

    On a broadcast interface, the router must find a ne ighbor to which to send the packet. The router multicasts a neighborsolicitation me ssage on the Ethernet and waits for a neighbo r advertisement from the nex t-hop device. There is nodefined proxy address resolution mechanism with IPv6, other than for mob ile IPv6 nodes. A router on the Ethernet that

    has a route to the de stination will not respo nd to a ne ighbor solicitation on be half of another device.

    For this reason, when us ing an ex it interface to configure a static route on a broadcast network, a nex t-hop addressmust also be specified. The recomm ended address to use as the next-hop address is the link-local address o f the nexthop router. One reason to use the link-local address is that it is not likely to change. A link-local address will onlychange if the interface card, or the en tire router, is replaced. Even if the site is renumbered with a different IPv6 globa lprefix, the link-local address on the interface does not change. Another reason to use the link-local address as the nexthop is to remain consistent with the addresses routers advertise in the router advertisement messages and so thatprocesses using those addresses, such as ICMPv6 Redirect, will operate as expected.

    Routers advertise their presence, a long with their link-local addresses, to all IP v6 devices on broadcast networks. Hostsuse the router list created from the router advertisement to de termine how to fo rward packets off the network. If a hostforwards a packet to a router, and that router knows that a second router on the network is a better choice for the hostto use , the first router will send a redirect to the host. The redirect includes the link-local IPv6 address of the betterchoice router. When the host processes the redirect, if the better router is in its router list, the host will begin to forwardpackets to the be tter router. If the better router is not in the list (or it is listed by a different IPv6 address), the ho st will

    discard the redirect.

    Case Study: Summary Routes

    A summary route is an address that encompasses several more specific addresses in a route table. It is the addressmask used with a route entry that makes static routes as flexible as they are; by using an appropriate address mask, itis sometimes possible to create a single summary route for several destination addresses.

    For example, the preceding two case studies use a separate entry for each data link. The mask of each entrycorresponds to the address mask used on the device interfaces connected to that data link. Looking again at Figure 3-2you can see that subne ts 10.4.6.0/24 and 10.4.7.0/24 could be specified to P iglet with a single entry of 10.4.0.0/16,reachable via Tigge r. Likewise, subnets 192.168.1.0/27 and 192.168.1.64/27 could be accounted fo r in its route tablewith a single entry pointing to 192.168.1.0/24, also reachable via T igger. These two route e ntries, 10.4.0.0/16 and192.16.1.0/24, are summary routes.

    Using summ ary routes, P iglet's static route entries a re displayed in Example 3-15.

    Example 3-15. Piglet's static route entries are summarized into only two entries.

    ip route 192.168.1.0 255.255.255.0 192.168.1.193

    ip route 10.4.0.0 255.255.0.0 192.168.1.193

    All subnets of network 10.0.0.0 are reachable from Pooh via Tigger, so a s ingle entry to that ma jor network address anda corresponding mask are all that is needed (see Exam ple 3-16).

    Example 3-16. Pooh's static route entries for all of network 10.0.0.0 subnets are summarized

    into a single entry.

    ip route 192.168.1.192 255.255.255.224 192.168.1.66

    ip route 10.0.0.0 255.0.0.0 192.168.1.66

    From Eeyore, all destination add resses beginning with 192 are reachable via Tigger. The single route entry does not

    even have to specify all of the Class C address bits [6], as displayed in Example 3-17.

    [6] This method of summarizing a group of major network addresses with a mask shorter than the default address m ask f or that class is known

    as supernetting. This is introduced in Chapter 6.

    http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch06.html#ch06http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex17http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03fn06http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex16http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex15http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03fig02http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex14
  • 7/29/2019 Configuring Static Routes

    9/19

    1/30/13 Configuring Static Routes

    fengnet.com/book/CCIE Professional Development Routing TCPIP Volume I/ch03lev1sec2.html 9

    Example 3-17. Eeyore summarizes all routes beginning with 192 into a single entry.

    ip route 192.0.0.0 255.0.0.0 10.4.6.1

    ip route 10.1.0.0 255.255.0.0 10.4.6.1

    Summary routes can also be applied to the IPv6 destination addresses in Figure 3-3.

    Honeypot's two static routes can be sum marized into a group consisting of fec0:0:0:8:: through fec0:0:0:b:: bychanging the prefix length from 64 to 62, as in Example 3-18.

    Example 3-18. Honeypot summarizes IPv6 static routes.

    ipv6 route fec0::8:0:0:0:0/62 fec0::3:204:c1ff:fe50:f1c0

    By summa rizing a g roup of subnets or even major networks, the number of static route entries may be reduceddrasticallyin this example, by mo re than one-third. However, caution must be used when sum marizing addresses ; whendone incorrectly, unexpected routing behavior may occur (see "Case Study: Tracing a Failed Route," later in thischapter). Summarization and the problems that can develop from incorrect summarization are examined in more depthin Chapters 7, "Enhanced Interior Gateway Routing Protocol (EIGRP)," and 8, "OSPFv2."

    Case Study: Alternative Routes

    In Figure 3-4, a new link has been added between P ooh a nd Eeyore. All packets from Pooh to the 10.0.0.0 networks willtake this new path with the e xception of packets destined for the hos t 10.4.7.25; a policy is in place stating that trafficto this host must go through T igger. The static route commands a t Pooh will be as displayed in Exam ple 3-19.

    Figure 3-4. A more direct path from Pooh to the 10.4.0.0 subnets is added to the network.

    [View full size image]

    Example 3-19. Pooh's static route commands help implement a policy directing traffic

    through specific routers.

    ip route 192.168.1.192 255.255.255.224 192.168.1.66ip route 10.0.0.0 255.0.0.0 192.168.1.34ip route 10.4.7.25 255.255.255.255 192.168.1.66

    http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/images/03fig04_alt.jpghttp://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex19http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03fig04http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch08.html#ch08http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch07.html#ch07http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec3.html#ch03lev2sec9http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex18http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03fig03
  • 7/29/2019 Configuring Static Routes

    10/19

    1/30/13 Configuring Static Routes

    fengnet.com/book/CCIE Professional Development Routing TCPIP Volume I/ch03lev1sec2.html 10

    The first two route en tries a re the sam e a s be fore ex cept that the second path now points to the new interface192.168.1.34 at Eeyore. The third entry is a host route, pointing to the single host 10.4.7.25 and made possible by

    setting the address mask to all one s. Notice that unlike the entry for the other 10.0.0.0 subnets, this host route pointsto Tigge r's interface 192.168.1.66.

    The debugging function debug ip packet is turned on in Pooh (see Exam ple 3-20) to observe the paths packets takefrom the router as a result of the new route entries. A packe t is sent from a host 192.168.1.15 to host 10.4.7.25. Thefirst two debug trap messages show that the packe t is routed from interface E0 to the nex t-hop router 192.168.1.66(Tigger) out interface S0, as required, and that the reply packet was received on S0 and routed to the host 192.168.1.15out E0.

    Example 3-20. Debugging verifies that the new route entries at Pooh are working correctly.

    Pooh#debug ip packet

    IP packet debugging is onPooh#IP: s=192.168.1.15 (Ethernet0), d=10.4.7.25 (Serial0), g=192.168.1.66, forwardIP: s=10.4.7.25 (Serial0), d=192.168.1.15 (Ethernet0), g=192.168.1.15, forwardPooh#IP: s=192.168.1.15 (Ethernet0), d=10.4.7.100 (Serial1), g=192.168.1.34, forwardIP: s=10.4.7.100 (Serial0), d=192.168.1.15 (Ethernet0), g=192.168.1.15, forwardPooh#

    Next, a pa cket is sent from hos t 192.168.1.15 to host 10.4.7.100. Packets destined fo r any host on 10.0.0.0 subnets,

    other than host 10.4.7.25, should be routed a cross the new link to Eeyore's interface 192.186.1.34. The third debugmessage verifies that this is indeed happening. However, the fou rth message shows something that at first might besurprising. The response from 10.4.7.100 to 192.168.1.15 arrived on Po oh's interface S0 from Tigger.

    Remember that the route entries in the other routers have not changed from the original example. This result might ormight not be desired, but it does illustrate two characteristics of static routes:

    First, if the network topology changes, the routers that are required to know about those changes must be

    reconfigured.

    Second, static routes can be use d to create very specific routing beha vior. In this ex ample, pe rhaps it is des irable

    to have traffic tak ing one path in one direction and another path in the oppos ite direction.

    A final observation about this example is that packets routed from Pooh to subnet 10.1.5.0 take a less-than-optimalroute, from Pooh to Eeyore to Tigge r instead of directly from Pooh to Tigger. Example 3-21 shows a m ore efficientconfiguration for Router Pooh.

    Example 3-21. Configuring a more efficient static route on Router Pooh.

    ip route 192.168.1.192 255.255.255.224 192.168.1.66

    ip route 10.0.0.0 255.0.0.0 192.168.1.34

    ip route 10.1.0.0 255.255.0.0 192.168.1.66

    ip route 10.4.7.25 255.255.255.255 192.168.1.66

    The third entry will now send all packets for subnet 10.1.5.0 directly to Tigger.

    Case Study: Floating Static Routes

    Unlike other static routes, a floating static route is less preferred than other routes in the route table. It appears in thetable only under the special circumstance of the fa ilure o f a more-preferred route.

    In Figure 3-5, a new router (Rabbit) is connected to Piglet with two parallel links. One link connects their respective Seria0 interfaces, and the second connection has been added be tween the two Serial 1 interfaces. This se cond link has beenadded for redundancy: If the primary link 10.1.10.0 fails, floating static routes will direct traffic across the backup link10.1.20.0.

    Figure 3-5. A new router has been connected to Piglet. Two serial links are used: one for the

    http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03fig05http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex21http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex20
  • 7/29/2019 Configuring Static Routes

    11/19

    1/30/13 Configuring Static Routes

    fengnet.com/book/CCIE Professional Development Routing TCPIP Volume I/ch03lev1sec2.html 1

    primary link and one for the backup link.

    [View full size image]

    Additionally, the mask on P iglet's Ethernet interface has changed from 10.1.5.1/16 to 10.1.5.1/24. This change a llowsthe single route entry at Tigger

    ip route 10.1.0.0 255.255.0.0 192.168.1.194

    to po int not only to 10.1.5.0 but a lso to all of the new subnets used in a ssociation with the new router.

    To create the floa ting static route, Example 3-22 and Exam ple 3-23 show the route entries fo r both Piglet and Rabbit,respectively.

    Example 3-22. Route entries for Piglet to create a floating static route.

    ip route 192.168.1.0 255.255.255.0 192.168.1.193

    ip route 10.4.0.0 255.255.0.0 192.168.1.193

    ip route 10.1.30.0 255.255.255.0 10.1.10.2

    ip route 10.1.30.0 255.255.255.0 10.1.20.2 50

    Example 3-23. Route entries for Rabbit to create a floating static route.

    ip route 10.4.0.0 255.255.0.0 10.1.10.1

    ip route 10.4.0.0 255.255.0.0 10.1.20.1 50

    ip route 10.1.5.0 255.255.255.0 10.1.10.1

    ip route 10.1.5.0 255.255.255.0 10.1.20.1 50

    ip route 192.168.0.0 255.255.0.0 10.1.10.1

    ip route 192.168.0.0 255.255.0.0 10.1.20.1 50

    Two en tries at Pigle t point to Rabbit's network 10.1.30.0; one specifies a next-hop address o f Rabbit's S0 interface, andthe other specifies a next-hop address o f Rabbit's S1 interface. Rabbit has sim ilar double en tries for every route.

    Notice that all static routes us ing subnet 10.1.20.0 are followed by a 50. This number specifies an administrative distance,which is a measure of preferability; when duplicate paths to the same network are known, the router will prefer the pathwith the lower administrative distance. At first this idea sounds like a metric; however, a metric specifies the preferabilityof a route, whereas an adm inistrative distance specifies the preferability of the means by which the route wasdiscovered.

    For exam ple, IPv4 static routes po inting to a ne xt-hop address have an administrative distance of 1, and static routesreferencing an ex it interface have an adm inistrative distance of 0. If two static routes point to the sam e destination, butone references a nex t-hop address and one references an exit interface, the latterwith the lower adm inistrativedistancewill be preferred.

    By increasing the administrative distances of the static routes traversing subne t 10.1.20.0 to 50, they be come less

    http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex23http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex22http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/images/03fig05_alt.jpg
  • 7/29/2019 Configuring Static Routes

    12/19

    1/30/13 Configuring Static Routes

    fengnet.com/book/CCIE Professional Development Routing TCPIP Volume I/ch03lev1sec2.html 12

    preferred than the routes traversing subnet 10.1.10.0. Example 3-24 shows three iterations o f Rabbit's route table . Inthe first table, all routes to nonconnected ne tworks use a nex t-hop address of 10.1.10.1. The bracketed numbe rsassociated with each route indicate an administrative distance of 1 and a metric of 0 (because no metrics are associatedwith static routes).

    Example 3-24. When the primary link 10.1.10.0 fails, the backup link 10.1.20.0 is used. When

    the primary link is restored, it is again the preferred path.

    Rabbit#show ip route10.0.0.0 is variably subnetted, 5 subnets, 2 masks

    C 10.1.10.0 255.255.255.0 is directly connected, Serial0S 10.4.0.0 255.255.0.0 [1/0] via 10.1.10.1S 10.1.5.0 255.255.255.0 [1/0] via 10.1.10.1C 10.1.30.0 255.255.255.0 is directly connected, Ethernet0C 10.1.20.0 255.255.255.0 is directly connected, Serial1S 192.168.0.0 255.255.0.0 [1/0] via 10.1.10.1Rabbit#%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down%LINK-3-UPDOWN: Interface Serial0, changed state to down

    Rabbit#show ip route

    10.0.0.0 is variably subnetted, 4 subnets, 2 masksS 10.4.0.0 255.255.0.0 [50/0] via 10.1.20.0S 10.1.5.0 255.255.255.0 [50/0] via 10.1.20.1C 10.1.30.0 255.255.255.0 is directly connected, Ethernet0C 10.1.20.0 255.255.255.0 is directly connected, Serial1S 192.168.0.0 255.255.0.0 [50/0] via 10.1.20.1

    Rabbit#%LINK-3-UPDOWN: Interface Serial0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to up

    Rabbit#show ip route10.0.0.0 is variably subnetted, 5 subnets, 2 masksC 10.1.10.0 255.255.255.0 is directly connected, Serial0S 10.4.0.0 255.255.0.0 [1/0] via 10.1.10.1S 10.1.5.0 255.255.255.0 [1/0] via 10.1.10.1C 10.1.30.0 255.255.255.0 is directly connected, Ethernet0C 10.1.20.0 255.255.255.0 is directly connected, Serial1S 192.168.0.0 255.255.0.0 [1/0] via 10.1.10.1Rabbit#

    Next, trap messages announce that the s tate of the primary link connected to Serial 0 has change d to "down," indicatinga fa ilure. A look at the second iteration of the route table shows that all nonconnected routes now point to a ne xt-hopaddress of 10.1.20.1. Because the m ore-preferred e ntry is no longer available , the router has switched to the less-preferred backup link , with the administrative distance of 50 indicated in the brackets. And because subnet 10.1.10.0has failed, it no longer shows up in the route table as a directly connected network.

    Before the third iteration o f the route table, trap messages indicate that the state of the primary link has change d to"up." The route table then shows that subnet 10.1.10.0 is aga in in the table, and the router is again us ing the next-hopaddress of 10.1.10.1.

    Chapter 11 discusses the administrative distances associated with the various dynamic routing protocols, but it can besaid here that the adm inistrative distances of a ll dynamic routing protocols are substantially higher than 1. The refore, bydefault, a static route to a network will always be preferred over a dynamically discovered route to the same network.

    Case Study: IPv6 Floating Static Routes

    IPv6 floa ting static route statements work the same way as IPv4. A second link has been added to the IP v6 network ofFigure 3-3 between Honeypot and Honeybee, to route IPv6 traffic if the primary link fa ils (see Figure 3-6).

    Figure 3-6. Backup link added between two IPv6 routers can be used to recover from a

    primary link failure with floating static routes.

    [View full size image]

    http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/images/03fig06_alt.jpghttp://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03fig06http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03fig03http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch11.html#ch11http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex24
  • 7/29/2019 Configuring Static Routes

    13/19

    1/30/13 Configuring Static Routes

    fengnet.com/book/CCIE Professional Development Routing TCPIP Volume I/ch03lev1sec2.html 13

    Example 3-25 shows Honeypot's configuration with new static route entries, which have an administrative distancegreater than 1. Similar static routes a re entered on Honeybee , as shown in Example 3-26.

    Example 3-25. Honeypot is configured with floating static routes to be used over the new

    redundant parallel link to Honeybee.

    ipv6 route FEC0::/62 FEC0::3:204:C1FF:FE50:F1C0

    ipv6 route FEC0::/62 FEC0::2:204:C1FF:FE50:F1C0 50

    ipv6 route FEC0:0:0:8::/62 FEC0::3:204:C1FF:FE50:F1C0

    ipv6 route FEC0:0:0:8::/62 FEC0::2:204:C1FF:FE50:F1C0 50

    Example 3-26. Honeybee is configured with floating static routes to be used over the new

    redundant parallel link to Honeypot.

    ipv6 route FEC0:0:0:5::/64 FEC0::3:230:94FF:FE24:B780

    ipv6 route FEC0:0:0:5::/64 FEC0::2:230:94FF:FE24:B780 50

    ipv6 route FEC0:0:0:A::/64 FEC0::1:2B0:64FF:FE30:1DE0

    IPv6 traffic from Honeypot will continue to be fo rwarded out Serial0/0.2, unless this link goes down.

    Example 3-27 shows Honeypot's route table with the routes k nown via the fec0::3:0:0:0:0/64 subnet installed. Bothroutes have an adm inistrative distance of 1. Then, interface S0/0.2 goes down. The backup routes, with administrativedistance of 50, get installed in the route table. After the interface S0/0.2 comes back up, the routing process lea rns ofbetter routes to the destinations and installs the routes with an adm inistrative distance of 1 back into the table.

    Example 3-27. Static routes with high administrative distances are installed in the IPv6 route

    table only when the lower administrative distance routes are deleted.

    Honeypot#show ipv6 route static

    S FEC0::/62 [1/0]via FEC0::3:204:C1FF:FE50:F1C0

    S FEC0:0:0:8::/62 [1/0]via FEC0::3:204:C1FF:FE50:F1C0

    Honeypot#%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2, changed state to down%LINK-3-UPDOWN: Interface Serial0/2, changed state to down

    Honeypot#show ipv6 route staticS FEC0::/62 [50/0]

    via FEC0::2:204:C1FF:FE50:F1C0

    http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex27http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex26http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex25
  • 7/29/2019 Configuring Static Routes

    14/19

    1/30/13 Configuring Static Routes

    fengnet.com/book/CCIE Professional Development Routing TCPIP Volume I/ch03lev1sec2.html 14

    S FEC0:0:0:8::/62 [50/0]

    via FEC0::2:204:C1FF:FE50:F1C0Honeypot#%LINK-3-UPDOWN: Interface Serial0/2, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2, changed state to up

    The default administrative distance of I Pv6 static routes, whether specified with an ex it interface or a next-hop address,is 1. When static routes to a des tination are specified both ways, the routes are considered equal, and load sharing(described in the next case study) occurs.

    Case Study: Load Sharing

    The problem with the configuration used in the previous section is that unde r normal circumstances the second link isnever utilized. The bandwidth available on the link is wasted. Load sharing allows routers to take advantage of multiplepaths to the same destination by sending packets over all the available routes.

    Load sharing can be equa l cost or unequal cost, where costis a generic term referring to whatever metric (if any) isassociated with the route:

    Equal-cost load sharing distributes traffic equa lly among multiple pa ths with equal m etrics. In this case , load

    sharing can also be called load balancing.

    Unequal-cost load sharing distributes packets among m ultiple paths with different metrics. The traffic is

    distributed in inverse proportion to the cost of the routes. Tha t is, paths with lower costs are as signed moretraffic, and paths with higher costs are assigned less traffic.

    Some routing protocols support both equa l-cost and unequa l-cost load sharing, whereas o thers support only equal cost.Static routes, which have no metric, support only equal-cost load sharing.

    To configure the parallel links in Figure 3-5 for load sharing using s tatic routes, Exam ple 3-28 shows the route entriesfor Piglet and Exam ple 3-29 shows the route entries for Rabbit.

    Example 3-28. Configuring parallel links for load sharing using static routes: route entries for

    Piglet.

    ip route 192.168.1.0 255.255.255.0 192.168.1.193

    ip route 10.4.0.0 255.255.0.0 192.168.1.193ip route 10.1.30.0 255.255.255.0 10.1.10.2

    ip route 10.1.30.0 255.255.255.0 10.1.20.2

    Example 3-29. Configuring parallel links for load sharing using static routes: route entries for

    Rabbit.

    ip route 10.4.0.0 255.255.0.0 10.1.10.1

    ip route 10.4.0.0 255.255.0.0 10.1.20.1

    ip route 10.1.5.0 255.255.255.0 10.1.10.1

    ip route 10.1.5.0 255.255.255.0 10.1.20.1

    ip route 192.168.0.0 255.255.0.0 10.1.10.1

    ip route 192.168.0.0 255.255.0.0 10.1.20.1

    These entries were also used in the previous section for floating static routes, except both links now use the defaultadm inistrative distance of 1. Rabbit's route table, shown in Exam ple 3-30, now has two routes to each destination.

    Example 3-30. This route table indicates that there are two paths to the same destination

    networks. The router will balance the load across these multiple paths.

    Rabbit#show ip route

    Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

    http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex30http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex29http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex28http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03fig05
  • 7/29/2019 Configuring Static Routes

    15/19

  • 7/29/2019 Configuring Static Routes

    16/19

    1/30/13 Configuring Static Routes

    fengnet.com/book/CCIE Professional Development Routing TCPIP Volume I/ch03lev1sec2.html 16

    over the next link, even if this next packet is to the same destination as the first, and so on, given equal-cost paths. Ifthe paths are unequal cost, the load sha ring may be one pa cket over the highe r-cost link for every three packe ts overthe lower-cost link, or some other proportion depend ing upon the ratio of costs. Per packe t load sha ring may distributethe load more evenly than per destination load sharing, depending upon the number of different source-destinationpairs, but because the pa ckets to a given de stination will be taking d ifferent paths, the pa ckets are likely to arrive out oorder, which is unacceptable for some applications, such as Voice over IP.

    To determine if CEF is enabled globally on a router, use the commands show ip cefand show ipv6 cef. If it is notenabled by default, you can turn it on globally using the command ip cef for IPv4. To enable CEF for IPv6, first enableCEF for IPv4, then use the command ipv6 cef.

    Per packet load sharing is enabled for IPv4 using the interface command ip load-sharing per-packet. The command ipload-sharing per-destination re-enables per destination load sharing. You can see which type of load sharing is enabled

    using the show cef interface command. This d isplays the CEF information that is configured on the interface.

    The router determines whether to use C EF switching based on the ingress interface and the type of so urce anddestination address. The ingress interface m ust be configured with CEF switching for the router to even consider usingCEF. If CEF is configured on the ingress interface, CEF will attempt to switch the packet. If fo r some reason the packetcannot be CEF switched, CEFpunts the packe t down to the next-best and available switching method. For IP v4, this wouldbe fast switching, if it is enabled on the interface. For IPv6, this would be process switching.

    You can verify that CEF is enabled on an interface using the commands show cef interface {interface} and show ipv6cef{interface} detail.

    Per Destination Load Sharing and Fast Switching

    IOS performs pe r destination load sharing on ex it interfaces configured with fast switching. Fast switching is the de fault

    IOS switching mode in so me routers.

    Fast switching works as follows:

    1. When a router switches the first packet to a particular destination, a route table lookup is pe rformed and an ex itinterface is selected.

    2. The ne cessary data-link information to frame the packet for the se lected interface is then retrieved (from theARP cache, for instance), and the packet is encapsulated and transmitted.

    3. The retrieved route and da ta-link information is then entered into a fast switching cache.

    4. As subsequent packe ts to the same destination enter the router, the information in the fast cache allows therouter to imm ediately switch the packet without performing another route table and ARP cache lookup.

    While switching time and processor utilization are decreased , fast switching means that all packets to a specificdestination, not source-destination pair, are routed out the same interface. When packets addressed to a different host

    on the same network enter the router and an alternate route ex ists, the router may send all packets fo r that destinationon the a lternate route. Therefore, the best the router can do is balance traffic on a pe r destination basis.

    Per Packet Load Sharing and Process Switching

    Process switching simply means that for every packet, the router performs a route table look up, sele cts an interface, andthen looks up the data link information. Because each routing decision is independent for each packet, all packets tothe sam e destination are not forced to use the same interface. To ena ble process switching on an interface, use thecommand no ip route-cache for IPv4. You don't have to do anything to enab le process switching for IPv6. It is enab ledby default.

    In Exam ple 3-33, host 192.168.1.15 has sent six pings to host 10.1.30.25. Using debug ip packet, the ICMP echorequest and e cho reply packets a re obse rved a t Piglet. Looking a t the ex it interfaces and the fo rwarding addresses, itcan be observed that both Piglet and R abbit are using S0 and S1 alternately. Note that the command debug ip packet

    allows only process switched packets to be obse rved. Fast switched packets a re not displayed.

    Note

    The debug ip packet comma nd displays only process switched packets.

    Example 3-33. This router is alternating between S0 and S1 to send packets to the same

    destination. Notice that the router on the other end of the two links is doing the same thing

    with the reply packets.

    http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex33
  • 7/29/2019 Configuring Static Routes

    17/19

    1/30/13 Configuring Static Routes

    fengnet.com/book/CCIE Professional Development Routing TCPIP Volume I/ch03lev1sec2.html 17

    Piglet#debug ip packetIP packet debugging is onPiglet#IP: s=192.168.1.15 (Ethernet0), d=10.1.30.25 (Serial0), g=10.1.10.2, forwardIP: s=10.1.30.25 (Serial0), d=192.168.1.15 (Ethernet0), g=192.168.1.193, forwardIP: s=192.168.1.15 (Ethernet0), d=10.1.30.25 (Serial1), g=10.1.20.2, forwardIP: s=10.1.30.25 (Serial1), d=192.168.1.15 (Ethernet0), g=192.168.1.193, forwardIP: s=192.168.1.15 (Ethernet0), d=10.1.30.25 (Serial0), g=10.1.10.2, forwardIP: s=10.1.30.25 (Serial0), d=192.168.1.15 (Ethernet0), g=192.168.1.193, forwardIP: s=192.168.1.15 (Ethernet0), d=10.1.30.25 (Serial1), g=10.1.20.2, forwardIP: s=10.1.30.25 (Serial1), d=192.168.1.15 (Ethernet0), g=192.168.1.193, forwardIP: s=192.168.1.15 (Ethernet0), d=10.1.30.25 (Serial0), g=10.1.10.2, forward

    IP: s=10.1.30.25 (Serial0), d=192.168.1.15 (Ethernet0), g=192.168.1.193, forwardIP: s=192.168.1.15 (Ethernet0), d=10.1.30.25 (Serial1), g=10.1.20.2, forwardIP: s=10.1.30.25 (Serial1), d=192.168.1.15 (Ethernet0), g=192.168.1.193, forwardPiglet#

    Like many design choices, per packet load balancing has a price. The traffic may be distributed more evenly among thevarious links than with per destination load ba lancing, but the lower switching time and processor utilization o f fastswitching are lo st.

    Which Switching Method Will Be Used?

    IOS makes switching decisions based on the configuration of the inbound interface first. If CEF is configured on an

    inbound interface, the pa cket will be CEF switched regardless o f the configuration on the outbound interface.

    If CEF is not enabled on the inbound interface, then IOS processes and forwards the packet, and based on theconfiguration o f the outbound interface, subsequent packets will be fast-switched or process switched. Table 3-1 showswhich switching method will be used based on configuration of inbound and ou tbound interfaces.

    Table 3-1. IOS switching determination is based on configuration of

    inbound and outbound interfaces.

    Inbound Configuration Outbound Configuration Switching Method Used

    CEF Process CEF

    CEF Fast CEF

    Process CEF Fast (or process if IPv6)

    Process Fast Fast

    Fast CEF Fast (or process if IPv6)

    Fast Process Process

    IOS will switch a packet us ing CEF only if CEF is enabled on the inbound interface. If CEF is no t configured on theinbound interface, the configuration of the ex it interface determines the switching m ethod. Notice that when process o rfast-switching is configured inbound and CEF is configured on the outbound interface, fast-switching is used . CEF is onlyused if it is configured on the ingress interface. For IPv4, fast-switching is enabled outbound, even if CEF is enab led onthe interface.

    There a re times when a packet will not be switched using CEF even if it is enabled (fo r exam ple, if access-list logging is

    enab led and a packet will be logged). P ackets will be punted down to the next fastest switching method. For IPv4, thenext fastest switching method is fast-switching. For IPv6, this is process switching.

    Case Study: Recursive Table Lookups

    All route entries do no t necessarily need to point to the nex t-hop router. Figure 3-7 shows a s implified version of thenetwork ofFigure 3-5. In this network, Pooh is configured as disp layed in Exam ple 3-34.

    Figure 3-7. To reach network 10.1.30.0, Pooh must perform three route table lookups.

    http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex34http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03fig05http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03fig07http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03table01
  • 7/29/2019 Configuring Static Routes

    18/19

    1/30/13 Configuring Static Routes

    fengnet.com/book/CCIE Professional Development Routing TCPIP Volume I/ch03lev1sec2.html 18

    [View full size image]

    Example 3-34. Pooh's static route entries use various addresses as the next-hop parameter.

    The addresses are not necessarily the actual next-hop router interface.

    ip route 10.1.30.0 255.255.255.0 10.1.10.2

    ip route 10.1.10.0 255.255.255.0 192.168.1.194

    ip route 192.168.1.192 255.255.255.224 192.168.1.66

    If Pooh needs to send a packet to host 10.1.30.25, it will look into its route table a nd find that the subnet is reachablevia 10.1.10.2. Because that address is not on a directly connected ne twork, Pooh m ust aga in consult the table to findthat network 10.1.10.0 is reachable via 192 .168.1.194. That subne t is also not directly connected, so a third tablelookup is called for. Pooh will find that 192.168.1.192 is reachable via 192.168.1.66, which is on a directly connected

    subne t. The packet can now be fo rwarded.

    Because each table lookup costs processo r time, under normal circumstances forcing a router to perform multiplelookups is a poor design decision. Fast switching significantly reduces these adverse e ffects by lim iting the recursivelookups to the first packet to ea ch destination, but a justification should still be identified be fore using such a de sign.

    Figure 3-8 shows an e xample of an instance in which recursive lookups m ight be use ful. Here, Sande rz reaches a llnetworks via He ffalump. However, the ne twork administrator plans to eliminate Heffalump and repoint all of Sande rz'sroutes through Woo zle. The first 12 entries point not to Heffa lump, but to the appropriate router attached to the10.87.14.0 subnet. The la st entry specifies that the 10.87.14.0 subne t is reached via Heffa lump.

    Figure 3-8. Configuring Sanderz for recursive lookups enables the network administrator to

    redirect all of that router's exit traffic from Heffalump to Woozle by changing one route entry

    [View full size image]

    http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/images/03fig08_alt.jpghttp://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03fig08http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/images/03fig07_alt.jpg
  • 7/29/2019 Configuring Static Routes

    19/19

    1/30/13 Configuring Static Routes

    With this configuration, all of Sanderz's entries can be repointed through Woozle simply by changing the last static entryas in Example 3-35.

    Example 3-35. Sanderz's routing can easily be modified to forward all routes through a

    different next-hop router simply by changing one static route entry.

    Sanderz(config)# ip route 10.87.14.0 255.255.255.0 10.23.5.95Sanderz(config)# no ip route 10.87.14.0 255.255.255.0 10.23.5.20

    Had a ll the static routes referenced 10.23.5.20 as the ne xt-hop address, it would have been necessa ry to delete a ll 13lines and type 13 new lines. Nevertheless, the effort saved in retyping s tatic routes must be weighed carefully aga instthe ex tra processing burden that recursive lookups put on the router.

    http://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec3.htmlhttp://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec1.htmlhttp://fengnet.com/book/CCIE%20Professional%20Development%20Routing%20TCPIP%20Volume%20I/ch03lev1sec2.html#ch03ex35