Config Lab: IPv6 Static Routes 1
Ever get tired of sifting through the details of seemingly random IPv6 addresses? Well, today’s lab gives you yet another quick config exercise while using very easy-to-remember IPv6 addresses and prefixes. The task today: configuring static IPv6 routes. All the IPv6 addresses and subnets are purposefully short (when abbreviated). Enjoy!
The Lab Exercise
Requirements
The network shown in the figure uses IPv6. However, it will not use a routing protocol at all. This lab begins with all the IPv6 addresses configured. Your job: add static IPv6 routes so that each device can ping each other. The specific rules for this lab are:
- None of the routers use a dynamic routing protocol
- Configure your static routes to use global unicast addresses as next-hop addresses, rather than link local addresses.
- Assumptions:
- All router interfaces shown in the lab are up, working
- All routers and hosts have correct IPv6 addresses assigned
- All routers have IPv6 routing enabled
Figure 1: Simple Hub and Spoke Topology
Initial Configuration
Examples 1, 2, 3 and 4 show the beginning configuration state of Core, Branch1, Branch2 and Branch3.
hostname Core
!
ipv6 unicast-routing
!
interface GigabitEthernet0/0
ipv6 address 3002::1/64
no shutdown
!
interface GigabitEthernet0/1
ipv6 address 3000::1/64
no shutdown
!
interface GigabitEthernet0/2
ipv6 address 3001::1/64
no shutdown
Example 1: Core Config
hostname Branch1
!
ipv6 unicast-routing
!
interface GigabitEthernet0/1
ipv6 address 3000::2/64
no shutdown
!
interface GigabitEthernet0/2
ipv6 address 2000::1/64
no shutdown
Example 2: Branch1 Config
hostname Branch2
!
ipv6 unicast-routing
!
interface GigabitEthernet0/1
ipv6 address 3001::2/64
no shutdown
!
interface GigabitEthernet0/2
ipv6 address 2001::1/64
no shutdown
Example 3: Branch2 Config
hostname Branch3
!
ipv6 unicast-routing
!
interface GigabitEthernet0/1
ipv6 address 3002::2/64
no shutdown
!
interface GigabitEthernet0/2
ipv6 address 2002::1/64
no shutdown
Example 4: Branch3 Config
Answer Options - Click Tabs to Reveal
You can learn a lot and strengthen real learning of the topics by creating the configuration – even without a router or switch CLI. In fact, these labs were originally built to be used solely as a paper exercise!
To answer, just think about the lab. Refer to your primary learning material for CCNA, your notes, and create the configuration on paper or in a text editor. Then check your answer versus the answer post, which is linked at the bottom of the lab, just above the comments section.
You can also implement the lab using the Cisco Packet Tracer network simulator. With this option, you use Cisco’s free Packet Tracer simulator. You open a file that begins with the initial configuration already loaded. Then you implement your configuration and test to determine if it met the requirements of the lab.
(Use this link for more information about Cisco Packet Tracer.)
Use this workflow to do the labs in Cisco Packet Tracer:
- Download the .pkt file linked below.
- Open the .pkt file, creating a working lab with the same topology and interfaces as the lab exercise.
- Add your planned configuration to the lab.
- Test the configuration using some of the suggestions below.
You can also implement the lab using Cisco Modeling Labs – Personal (CML-P). CML-P (or simply CML) replaced Cisco Virtual Internet Routing Lab (VIRL) software in 2020, in effect serving as VIRL Version 2.
If you prefer to use CML, use a similar workflow as you would use if using Cisco Packet Tracer, as follows:
- Download the CML file (filetype .yaml) linked below.
- Import the lab’s CML file into CML and then start the lab.
- Compare the lab topology and interface IDs to this lab, as they may differ (more detail below).
- Add your planned configuration to the lab.
- Test the configuration using some of the suggestions below.
Download this lab’s CML file!
Network Device Info:
The interfaces used in the lab exercise match the interfaces used in CML.
The switch used in the lab is a Cisco IOS layer 2 switch. Note that if you happen to have a layer 3 switch, to use the initial configurations as shown in this lab, issue to no ip routing command on the switch. This command will disable the routing of IPv4 packets, making the layer 3 switch act only as a layer 2 switch.
Lab Answers Below: Spoiler Alert
Lab Answers: Configuration (Click Tab to Reveal)
Answers
Figure 1: Simple Hub and Spoke Topology
ipv6 route 2000::/64 3000::2
ipv6 route 2001::/64 3001::2
ipv6 route 2002::/64 3002::2
Example 1: Core Config
ipv6 route 3001::/64 3000::1
ipv6 route 2001::/64 3000::1
ipv6 route 3002::/64 3000::1
ipv6 route 2002::/64 3000::1
Example 2: Branch1 Config
ipv6 route 3000::/64 3001::1
ipv6 route 2000::/64 3001::1
ipv6 route 3002::/64 3001::1
ipv6 route 2002::/64 3001::1
Example 3: Branch2 Config
ipv6 route 3000::/64 3002::1
ipv6 route 2000::/64 3002::1
ipv6 route 3001::/64 3002::1
ipv6 route 2001::/64 3002::1
Example 4: Branch3 Config
Commentary, Issues, and Verification Tips (Click Tabs to Reveal)
Commentary
When configuring static routes, it is important to ensure that you have all of the correct IPv6 subnet information, just a little difference in subnet mask can make a big difference in routing behavior.
For this lab you were tasked with configuring static routes to all remote subnets on all routers. The figure shows six different subnets. The Core router connects to three subnets, so it will need three static routes. Each branch router connects to two subnets, so each branch router will need static routes for four different subnets.
For Core, the three remote LAN subnets are 2000::/64,2001::/64 and 2002::/64. Just to help us get our bearings, Table 1 lists the three destination subnets, with router Core’s outgoing interface and next-hop global unicast address:
Destination Subnet | Off of Router… | Core’s Outgoing interface | Core’s Next-Hop Address |
2000::/64 | Branch1 | G0/1 | 3000::2 |
2001::/64 | Branch2 | G0/2 | 3001::2 |
2002::/64 | Branch3 | G0/0 | 3002::2 |
Table 1: Data to Use in Router Core’s Static IPv6 Routes
The configuration, shown in Example 1, repeats the ipv6 route command three times. Each time it lists the destination subnet per the first column of the table, and the next hop address per the last column. For example, the complete command to configure one static route would be ipv6 route 2000::/64 3000::2.
For Branch1, before thinking about the configuration command, think about the topology in the figure. Branch1 has two connected subnets. Then, to send packets to the other four subnets, router Branch1 will always send the packets out its G0/1 interface to the Core router next. As a result, and as seen in Example 2, all four of Branch1’s routes list 3000::1 as the next hop address. The four commands each list a different destination subnet: 3001::/64, 2001::/64, 3002::/64 and 2002::/64.
Branch2 uses the same basic logic as router Branch1. Branch2 has two connected subnets, four remote subnets, and all four static routes for the remote subnets points to router Core next. In Branch2’s case, the next-hop address of the Core router is 3001::1. As seen in Example 3, the four ipv6 route commands list 3001::1 as the next-hop address, with subnets 3000::/64, 2000::/64, 3002::/64 and 2002::/64 in the four different commands.
As you probably guess by now, Branch3 uses the same basic logic as routers Branch1 and Branch2. Branch3 has two connected subnets, four remote subnets, and all four static routes for the remote subnets points to router Core next. In Branch3’s case, the next-hop address of the Core router is 3002::1. As seen in Example 4, the four ipv6 route commands list 3002::1 as the next-hop address, with subnets 3000::/64, 2000::/64, 3001::/64 and 2001::/64.
Known Issues in this Lab
This section of each Config Lab Answers post hopes to help with those issues by listing any known issues with Packet Tracer related to this lab. In this case, the issues are:
# | Summary | Detail |
1 | None | No known issues related to this lab. |
Why Would Cisco Packet Tracer Have Issues?
(Note: The below text is the same in every Config Lab.)
Cisco Packet Tracer (CPT) simulates Cisco routers and switches. However, CPT does not run the same software that runs in real Cisco routers and switches. Instead, developers wrote CPT to predict the output a real router or switch would display given the same topology and configuration – but without performing all the same tasks, an actual device has to do. On a positive note, CPT requires far less CPU and RAM than a lab full of devices so that you can run CPT on your computer as an app. In addition, simulators like CPT help you learn about the Cisco router/switch user interface – the Command Line Interface (CLI) – without having to own real devices.
CPT can have issues compared to real devices because CPT does not run the same software as Cisco devices. CPT does not support all commands or parameters of a command. CPT may supply output from a command that differs in some ways from what an actual device would give. Those differences can be a problem for anyone learning networking technology because you may not have experience with that technology on real gear – so you may not notice the differences. So this section lists differences and issues that we have seen when using CPT to do this lab.
Beyond comparing your answers to this lab’s Answers post, you can test in Cisco Packet Tracer (CPT) or Cisco Modeling Labs (CML). In fact, you can and should explore the lab once configured. For this lab, once you have completed the configuration, try these verification steps.Â
- Connect to the command line of each of the PCs and attempt to ping the other PCs. If each of the static routes was configured correctly everyone should have connectivity to each other.
- Also try the tracert or traceroute6 command on each PC, referencing another PC’s address, to see the various next-hop IPv6 addresses.
Hello Wendell
I try to use defualt route on all branch routers consider they have one Ethernet WAN link ,
but it dose not work the , PCs at branches can not reach each other
I use packet tracer V8
thank you
Hi Raed,
Interesting. Sometimes w/ static route labs I didn’t write them so that pings would work at the end of the lab, so I wondered if that was the case with this lab. But I re-read the lab, and it looks like all the routes are there in the answer so that pings should work.
So, I implemented the lab in PT (V 8.0), and a ping from PC1 to PC2 and PC3 work for me. I assume that’s what you mean by “can not reach each other”.
So, from PC1:
ping 2001::100
and
ping 2002::100
work.
Try tracert instead, and let me know what those show. That’s a great command to troubleshoot routing issues. Here’s what I see from PC1:
C:\>tracert 2001::100
Tracing route to 2001::100 over a maximum of 30 hops:
1 0 ms 0 ms 0 ms 2000::1
2 0 ms 0 ms 0 ms 3000::1
3 0 ms 0 ms 0 ms 3001::2
4 0 ms 0 ms 0 ms 2001::100
Trace complete.
C:\>tracert 2002::100
Tracing route to 2002::100 over a maximum of 30 hops:
1 0 ms 0 ms 0 ms 2000::1
2 0 ms 0 ms 0 ms 3000::1
3 0 ms 0 ms 0 ms 3002::2
4 0 ms 0 ms 0 ms 2002::100
Trace complete.
C:\>
are these really necessary?
branch 1:
ipv6 route 3001::/64 3000::1
ipv6 route 3002::/64 3000::1
branch 2:
ipv6 route 3000::/64 3001::1
ipv6 route 3002::/64 3001::1
branch 3:
ipv6 route 3000::/64 3002::1
ipv6 route 3001::/64 3002::1
I realize for completeness they are there but the devices can ping each other without them.
Jack,
Yes, for completeness. The PCs can ping each other, but a network engineer testing connectivity couldn’t ping WAN interface addresses, for instance. But honestly, for the purposes of a CCNA preparation lab, it’s more practice and a chance to think through why or why not such things might be useful. 🙂
Although, the PCs can ping each other without those static routes on the branch routers. Why can’t the branch routers ping the PCs without those routes?
Without starting it in Packet Tracer to confirm…
The ping command (and traceroute) must choose a source address to use. By default, they use the interface address of the outgoing interface the packets will be forwarded out. When pinging from a router, if the first link is the WAN link, then the ping command uses an IP address on a WAN link. It’s the ping reply that can’t be routed because of lack of routes back to the WAN subnet.
Wendell
Hi there Wendel, I had a slightly different approach and was wondering if this would be invalid.
Core:
enable
conf t
ipv6 route 2000::/64 3000::2
ipv6 route 2001::/64 3001::2
ipv6 route 2002::/64 3002::2
Branch1:
enable
conf t
ipv6 route ::/0 3000::1
Branch2:
enable
conf t
ipv6 route ::/0 3001::1
Branch3:
enable
conf t
ipv route ::/0 3002::1
Hi Michiel,
Yep, I agree, using the static default routes on the branch routers would work as well!
Wendell
Hi Wendell,
There is a concept that is still not clear for me, or perhaps I missed it from the book. When should we use link-local addresses instead of global unicast addresses as next hop in static routes?
or what are the pros/cons in using one or the other for next-hop in static routes?
Hi Vicente,
The book didn’t discuss pros/cons, so you didn’t miss it.
Neither gives you a performance improvement. I can see arguments for each, but I think they all reduce to personal preference. For instance, the reality is that most IPv6 routes will be learned by routing protocols, and they use LLAs as next-hop. So, for the few static routes, using LLAs may be good since all the others do. And using LLAs requires also the outgoing interface in the static route command, so that makes operations more obvious. However, you may have a staff attuned to next-hop IPv4 addresses… so I think it’s just personal preference.
Wendell
Hi, The traceroute6 command on each PC did not work. However, tracert 2001::100 did work. Is traceroute6 a Cisco only command? Thanks!
Lucas,
You’ll find traceroute6 on Linux and MacOS. Packet Tracer’s PCs act more like Windows, which uses tracert. (Cisco ios uses traceroute.) I updated the lab to mention the tracert command – thanks for the heads up.
Wendell
Hello Wendell,
Please a question. In reading your study guide on IPv6, you indicated that IPv6 needs to be enabled globally and on each interface for IPv6 routing to occur. In the initial configuration for these IPv6 labs, I see that IPv6 routing is enabled globally but don’t see any initial configuration to enable IPv6 per interface. Yet when I view the configuration in packet tracer before configuring any of the lab requirements I see that IPv6 is already enabled. My question is this, did you manually enable these interfaces without including it in your initial configuration for these exercises or are they enabled by default when IPv6 unicast-routing command is configured?
Hi Tewa,
When creating the .pkt file, we configured the routers to match the initial config shown in the lab. You suggest one of two answers, but neither is correct. Your first is closest – we manually enabled the interfaces, but we did include the commands in the initial config on this page. Just look for the “ipv6 address” interface subcommand in the initial config sections above.
Hope this helps,
Wendell
Hi Wendell,
I tried to summarize. Works. But I’m not sure it can be a correct way to solve this lab
Alessia
B3
conf t
ipv6 route 3000::/6 3002::1
ipv6 route 2000::/6 3002::1
B2
conf t
ipv6 route 3000::/6 3001::1
ipv6 route 2000::/6 3001::1
B1
conf t
ipv6 route 3000::/6 3000::1
ipv6 route 2000::/6 3000::1
CORE
conf t
ipv6 route 2000::/64 3000::2
ipv6 route 2001::/64 3001::2
ipv6 route 2002::/64 3002::2
I see what you’re attempting there. The Core config looks good and matches the supplied answer.
Your routes would work on real gear, although it might confuse the rest of the staff. EG, on router B1, ipv6 route 2000::/6 3000::1 will match all with the first 8 bits in a pattern like 0010 00**, which in hex would be a first two digits of 20-23. Not sure what the objective is there. If you’re going for matching the first three hex digits, then match 12 bits, with prefix length /12, like ipv6 route 2000::/12 3000::1, matching (hex) first three digits of 200 only.