NLI CCIE R&S Lab Study Guide - V7.0.2006
NLI CCIE R&S Lab Study Guide - V7.0.2006
Experience
by
Robert Webber
CCIE 6922
Introduction.........................................................................................................8
Foreword .............................................................................................................9
3550....................................................................................................................10
Time Savers ....................................................................................................10
Creating VLANs...............................................................................................11
Access Ports ...................................................................................................12
Trunk Ports......................................................................................................12
Restricting VLANs on Trunk Ports...................................................................13
Routing with the 3550......................................................................................14
Etherchannels .................................................................................................16
VTP .................................................................................................................16
3550 Connection Types ..................................................................................17
Example of Using the 3550 .............................................................................17
BGP....................................................................................................................20
Peers...............................................................................................................20
Advertising to Peers ........................................................................................21
iBGP Full Mesh ...............................................................................................24
Filtering ...........................................................................................................24
Communities ...................................................................................................25
Synchronization...............................................................................................26
Aggregate Address..........................................................................................27
Attributes .........................................................................................................27
BGP Official Path Selection Process...............................................................29
BGP Unofficial Path Selection Process ...........................................................30
Bridging .............................................................................................................31
Spanning Tree.................................................................................................31
Frame Relay....................................................................................................32
Debug.................................................................................................................33
Distance.............................................................................................................34
Distribute Lists..................................................................................................35
Distribute List In...............................................................................................36
Distribute List Out............................................................................................37
EIGRP.................................................................................................................38
EIGRP Metric ..................................................................................................38
EIGRP Summarization ....................................................................................39
EIGRP Default Route ......................................................................................39
EIGRP Network Commands............................................................................39
Frame Relay ......................................................................................................40
Interfaces and Sub-Interfaces .........................................................................40
PVC Status......................................................................................................41
Inverse Arp and Mapping ................................................................................41
OSPF ..............................................................................................................43
Home Lab ..........................................................................................................44
Home Lab Considerations...............................................................................44
IOS For Your Home Lab..................................................................................45
Study Sheet
3550..................................................................................................................113
Etherchannel .................................................................................................113
VTP ...............................................................................................................113
Access Lists....................................................................................................113
Standard Access Lists...................................................................................114
Extended Access Lists ..................................................................................114
Named Access Lists......................................................................................114
Reflexive Access Lists...................................................................................114
Aliases .............................................................................................................114
BGP..................................................................................................................114
Table of Tables
Table 1: BGP Route Advertisement Rules..........................................................23
Table 2: Frame Relay Interface Types and Issues..............................................43
Table 3: Sample Loopback Address Assignments..............................................67
Table 4: OSPF Network Types ...........................................................................73
Table 5: OSPF Stub and NSSA Area..................................................................75
Table 6: IP Precedence Classes.........................................................................78
Table 7: DSCP Classes ......................................................................................79
Table 8: IP Subnetting Summary ........................................................................99
Table of Figures
Figure 1: Switched Virtual Interfaces (SVI's) for the 3550 (Logical Routing).......15
Figure 2: Typical 3550 Connectivity (Physical) ...................................................18
Figure 3: Typical 3550 Connectivity (Logical) .....................................................19
Figure 4: Bridging Over Frame Relay .................................................................33
Figure 5: Filtering RIP Routes.............................................................................36
Figure 6: Home Lab with Internet Connectivity ...................................................48
Figure 7: IPSec Using Multiple Tunnels ..............................................................52
Figure 8: OSPF Summarization with RIP Redistribution .....................................92
Figure 9: Using Route Tags ................................................................................95
Introduction
The first section of this guide, Notes From Experience,
discusses issues, tricks and approaches to many networking
problems. This section attempts to explain how and why to do
certain things.
Note: Included with some configs in the Study Sheet section are debug
and show commands. Obviously these are not part of the configuration,
but are included since I feel these are the most valuable debug and show
commands related to the given technology.
Foreword
As you prepare for the CCIE lab exam expose yourself to as many topics
as you can NTP, Multicast, Tunnels, NAT, etc. However do not do this at
the sacrifice of knowing the core topics inside and out.
The core topics include OSPF, BGP, redistribution, access lists, and
Frame Relay. Know these so well you can configure them in your
sleep (yes, you will find yourself dreaming about router configs)!
Know what every command in the command reference does for these
topics. You will not have time to look-up very much on these topics (there
will be other topics during the exam which will require your time to look-
up). You simply must know these extremely well!!
Once you have mastered these topics, then you can spend time on the
less common topics. I recommend spending the final 2-4 weeks before
your lab exam practicing on the core (and possibly the second set of)
topics!
As I prepared for my exam, I first mastered the core topics. I spent the
time necessary learning OSPF, BGP, Frame Relay, redistribution and
access-lists extremely well. For me this required many months. Once I
knew these inside and out, I tackled the second set of topics. I learned
these thoroughly, though perhaps not quite as in-depth as the core topics.
This required several months. I then pursued the odd ball topics. These
are the little things that might end up being worth 5, 10 or 15 points on the
exam. In most cases I didnt learn every command nor did I try every
possible scenario in the lab. Instead I tried a few common scenarios for
each topic and generally tried to become somewhat familiar with a lot of
the commands. I went on the assumption that if I knew a fair amount
about these topics, I could probably figure out the rest on the fly (and even
if I couldnt, it should only cost me a few points).
3550
The 3550 is a very flexible device within Ciscos product line. Not only can
it provide Layer 2 and Layer 3 switching (much like the 6500 with an
MSFC module) it does not use different hardware for these two tasks. It
also allows configuration of Layer 2 and Layer 3 configurations from the
same interface.
For the 3550 ip routing is not enabled by default. I recommend enabling this!
Time Savers
Creating VLANs
You can create VLANs one of two ways:
or
3550-1# conf t
3550-1(config)# vlan 99
3550-1(config-vlan)#command
Both ways accomplish the same task. I prefer the latter method, simply
because I am used to entering config t mode, but Im not used to
entering vlan database mode. Also, I will need to go into config t mode
for other configuration steps. I wont use vlan database to configure any
other attributes of the 3550.
I like to use the third octet of the IP address for the VLAN number. This
provides unique VLAN numbers and since the VLAN numbers go to 1000
there is no problem covering all 256 possible numbers that can be used by
the third octet. The biggest advantage of this is as soon as you see the
VLAN number you will instantly know what subnet it is.
So if Im creating a VLAN for the 144.32.87.0/24 subnet, I will use VLAN
87 for that subnet. Likewise, if Im creating a VLAN for the 144.32.16.0/24
subnet, I will use VLAN 16 for that subnet. This way simply by looking at
Access Ports
A key concept you will need to understand with the 3550 is access ports
vs. trunk ports. Access ports are ports that only support one VLAN. The
port gets assigned to a single VLAN and whatever device is connected on
that port is in that VLAN, period.
Switch(config)#int fa0/7
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 100
Trunk Ports
Trunk ports can transport (or carry) many VLANs over a single physical
connection. The trunk ports need to be configured with an encapsulation
type. This simply defines the protocol used to encapsulate, or tag
packets sent over the trunk. When sending packets the devices at either
end of the trunk add a small header with the VLAN number to identify the
VLAN to which that packet belongs. When receiving packets, the device
reads (and strips) the header and thus knows in what VLAN the packet
belongs.
Switch(config)#int fa0/3
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk
As with other similar things in the CCIE lab, I recommend against using
any type of auto-negotiation. I much prefer to hard configure both ends of
the link as a trunk. That way youll know for sure that you are not
experiencing any type of negotiation problems. If the trunk link does not
come up right away, you wont have any questions in your mind about
whether there is a negotiation problem. Lets face it on the exam if you
know a particular link needs to be a trunk, youre probably better off
having it not work at all than having it negotiate to be a non-trunk link. That
way you can troubleshoot it right away (since it will be down) and not have
the link working, but only passing one VLAN (in a non-trunk mode).
Either way you will need the switchport trunk allowed vlan command.
So to allow VLANs 2, 10, 11, 12 and 103 on a given trunk port, use the
following command. Note that you cannot use any spaces between the
VLANs (or VLAN ranges) when you issue this command!
If at a later time you need to add VLAN 40, you can either list all the
VLANs you would like allowed (probably a good idea so you know exactly
what VLANs will be traversing the trunk) or use the add command:
or
to add VLAN 40 to the allowed list as instead this will only allow VLAN 40.
To remove VLAN 12 from a trunk (once you have already allowed it, or if
the port is in the default mode, where all VLANs are allowed on the port):
interface FastEthernet0/23
no switchport
ip address 155.182.32.15 255.255.255.0
Each port that is configured for physical routing acts like a port on a
traditional router it gets assigned a unique IP subnet and it is the only
port on the 3550 that is a member of that subnet. These ports do not get
assigned to any VLAN since they are standalone router ports. Cisco
refers to these ports as routed ports.
Logical routing places any number of ports into a VLAN (IP subnet), then
creates a logical (virtual) routed interface for that entire VLAN. This
method can be used regardless of the number of ports in the VLAN you
can have one port or dozens of ports in the VLAN. Another advantage of
this type of routing is ports can easily be added or removed from the
VLAN/subnet with the switchport mode access command:
interface FastEthernet0/23
switchport access vlan 32
switchport mode access
no ip address
!
interface Vlan32
ip address 155.182.32.16 255.255.255.0
Note that the VLAN assigned to the ports (vlan 32) exactly matches the
interface name (Vlan32). This is what ties the router interface to the
Interface Fast Eth 0/1 Internal Router Interface Fast Eth 0/8
Function in the 3550 switchport access vlan 8 RJ
RJ switchport access vlan 3
45 45
Interface Fast Eth 0/17
Interface Fast Eth 0/2
RJ switchport access vlan 3 switchport access vlan 8 RJ
45 45
Interface Vlan8 Interface Fast Eth 0/20
Interface Fast Eth 0/10 Interface Vlan3
RJ switchport access vlan 3 ip address 147.142.3.1 ip address 147.142.8.1 switchport access vlan 8 RJ
45 45
Interface Fast Eth 0/21
switchport access vlan 8 RJ
45
VLAN 8
Logical "SVI" Interfaces subnet 147.142.8.0
Physical Interfaces
Figure 1: Switched Virtual Interfaces (SVI's) for the 3550 (Logical Routing)
Although both methods (physical routing and logical routing) work well, I
prefer to use logical routing (SVIs) for all my routing, even if only a single
port is in a VLAN (a case where physical routing would work). Here are my
reasons for always using logical routing (even though in a few cases it
may require an additional command or two):
1. Logical routing covers all situations where there is one port in a
VLAN and where multiple ports are in a VLAN (IP subnet). Physical
routing is limited to only one port in an IP subnet.
2. Logical routing allows additional ports to be added to a
VLAN/subnet at a later time. In order to add ports to a subnet that is
physically routed, you need to first convert it to logical routing a
bit of a hassle (especially under the pressure of the exam)!
3. Logical routing is very similar to the routing used by the 5500/RSM
platform and the 6500/MSFC platform. If you have any experience
with these products you will find logical routing almost identical.
4. I can be completely consistent using logical routing I can use it for
routing on all my VLAN/subnets. If I use physical routing in some
cases Ill almost surely also need logical routing in other cases. In
that case I need to work with both types. I find it easier to simply
deal with one type of routing!
As with so many things on the CCIE exam, you should select your
preferred way, but know how to configure the solution both ways.
Etherchannels
When creating Etherchannel connections in the 3550, you can create
layer 2 or layer 3 Etherchannels. I recommend using layer 2
Etherchannels, simply because they are a bit simpler and because they
are more similar to other Etherchannels you may have seen, such as with
the 5500 or 6500. Furthermore the difference is similar to the routing
discussed in the previous section, Routing with the 3550. That is, Layer 2
Etherchannels get assigned to a VLAN (or as a trunk with several VLANs).
Other ports can at any time be added to any of the VLANs, even if they
will not be part of the Etherchannel. With Layer 2 Etherchannels you
perform routing just as you would any Layer 2 VLAN (with the interface
Vlanxx command). Layer 3 Etherchannels do not get assigned to a VLAN
and only provide a point-to-point routed link, similar to the physical routing
discussed earlier.
Make sure all the Etherchannel ports are configured the same including
VLAN(s), speed & duplex, trunking, Spanning Tree, etc.
VTP
The VLAN Trunking Protocol (VTP) is used to propagate VLAN
information between 3550s. VTP automatically propagates this
information from the VTP server to all VTP clients. VTP is not required
VLANs can be defined manually on each switch. In fact, this is my
preference. If I need VLAN 5 on 3550-1 and on 3550-2 I would prefer to
manually create it on each switch and assign the appropriate ports to it (in
this case the switches would be configured to not participate in VTP with
the vtp mode transparent command).
However you may be asked to use VTP on the exam. In that case it is
important to identify the switch that will be the VTP server. The exam may
choose for you or you may be allowed to pick a switch. In that case the
In the lab you may find it useful to draw both diagrams so you clearly
understand both how the devices are cabled as well as what subnets they
share. On the logical diagram you may also want to add the port and/or
interface used by each device. I have omitted these simply because I
didnt want to clutter this diagram.
VLAN 32
155.182.32.0/24 trunk
FA 0/14
VLAN 64
155.182.64.0/24
VLAN 128
r14 155.182.128.0/24
VLAN 32 connection
155.182.32.0/24 type 3 3550 (r16) r4
r13
connection
type 4 VLAN 64
155.182.64.0/24
r14
connection
type 2
Here are the configurations from each device in the figures above:
hostname 3550-r16
interface FastEthernet0/4
switchport access vlan 64
no ip address
!
interface FastEthernet0/5
switchport access vlan 192
no ip address
!
interface FastEthernet0/6
switchport access vlan 192
no ip address
!
interface FastEthernet0/14
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
!
interface FastEthernet0/23
switchport access vlan 32
switchport mode access
no ip address
!
hostname r5
interface Ethernet0
ip address 155.182.192.5 255.255.255.0
hostname r6
interface Ethernet0
ip address 155.182.192.6 255.255.255.0
!
interface Serial0
ip address 155.182.160.6 255.255.255.0
hostname r4
interface Ethernet0
ip address 155.182.64.4 255.255.255.0
!
interface Serial0
ip address 155.182.160.4 255.255.255.0
hostname r13
interface Ethernet1/0
ip address 155.182.32.13 255.255.255.0
half-duplex
!
interface Serial1/1
ip address 155.182.16.13 255.255.255.0
clockrate 1000000
hostname r14
interface FastEthernet0/0
no ip address
!
interface FastEthernet0/0.64
encapsulation dot1Q 64
ip address 155.182.64.14 255.255.255.0
!
interface FastEthernet0/0.128
encapsulation dot1Q 128
ip address 155.182.128.14 255.255.255.0
!
interface Serial1/1
ip address 155.182.16.14 255.255.255.0
BGP
Peers
By default eBGP peers must define each other as neighbors using the
subnet that directly connects them. If either one or both do not use this
directly connected address (if either one or both use their loopback
addresses or if they are separated by a few hops) they must use the ebgp-
multihop neighbor command.
By default iBGP peers can be up to 255 hops away without requiring the
ebgp-multihop command.
If BGP peers (eBGP or iBGP) peer between loopback addresses they will
also need the update-source neighbor command. This instructs the local
router to update its BGP source IP address with the interface specified
(such as loopback 0). Otherwise by default the router uses the IP address
of the outgoing interface used to reach the BGP peer as its BGP source
address. If you are peering between loopback addresses, this address will
not match the IP address defined at the remote peer via the neighbor
command. This mismatch will prevent the BGP peer relationship from
forming.
Advertising to Peers
If a router is originating a route with the network command, the exact
network and mask specified must be in that routers routing table. This is
worth noting and it becomes especially important when attempting to
advertise a summary. If the router has networks 172.16.16.0/24 through
172.16.19.0/24 in its routing table these can be advertised by one
summary advertisement (172.16.16.0/22). However if you simply enter:
The router will not advertise the summary nor any of the four class C
subnets. This is because you have stated to only advertise the summary,
yet the router does not have that exact network and mask in its routing
table. This can be overcome with the aggregate-address command (see
the Aggregate Address example on page 117) or with a static route to
null0. For the latter technique, simply place a static route in the routing
table to act as a placeholder so BGP will advertise a route. So you could
enter:
Make sure you check carefully if static routes to null0 are allowed in order
to use this approach.
There are two alternate solutions to the iBGP full mesh requirement: route
reflectors and confederations.
Route reflectors are the easier solution to implement and offer few, if any,
drawbacks from the confederation solution.
Filtering
Although there are many ways to filter with BGP, I like using route-maps
with prefix lists. Part of the reason is you need to master route-maps, so
this is a skill you will need anyway. Furthermore both the route-map and
prefix-list can use the same, meaningful name. See the CCIE Study Sheet
BGP Filtering with Route Maps for an example of this.
The first two options apply the filter to a specific neighbor. The third option
applies the filter to the entire BGP process (routes learned from any
neighbor). Using just a dist-list filters updates from the routing table but
leaves them in the bgp table. The other two eliminate them from both.
This will show you the BGP entries that match the particular regular
expression you specify (in this case, beginning with 701, followed by 80).
The BGP regular expression command (above) states that the beginning
of the AS path must be 701 (followed by 80). Even though the true
beginning of the AS path is 80 (that is, the route was originated from AS
80, then went through 701). The same holds true when using $ to mark
the end of an AS path.
Communities
In order to send communities, you need to enter the neighbor 10.13.13.1
send-community command. This will send to that neighbor both: any
communities that BGP routes already have (that were sent to you from
You need the second route-map statement to send all other routes
without communities. Also, it is helpful to use the global command ip bgp-
community new-format. Otherwise your communities look really weird!
Synchronization
Synchronization is a parameter that can be enabled or disabled in router
bgp configuration. Synchronization requires that a BGP route must also
show up in an IGP (OSPF, EIGRP, etc.) before it will be installed in the
routing table. This rule was established in case some routers within a
network were not running BGP. If they were not running BGP and the
routes were not in the IGP, those routers would not be able to correctly
forward packets because they would be missing routes. You can
officially disable synchronization if either of the following are true:
1. All routers in the AS run BGP (thus there is no need to include them
in the IGP)
2. The AS is not a transit AS, that is, it does not forward traffic
between other Autonomous Systems (in this case it is presumed
non-BGP routers will know how to correctly forward traffic since it is
destined for within their Autonomous System).
My rule of thumb is to turn it off whenever possible! With it on, all iBGP
learned routes must also show up in some IGP (OSPF, etc.) Even static
routes are not enough! This can be very frustrating since it is not always
obvious why the routes appear in the BGP table but do not appear in the
routing table. A closer examination of a BGP route shows:
As you can see, the route 10.20.255.236/32 appears in the BGP table but
not in the routing table:
RTL3FC22-156#sho ip bgp
A closer examination of the BGP entry shows that the route is not
synchronized (a case where synchronization is still enabled on the router):
Aggregate Address
This is a useful command for summarizing an address block. Use the
keyword summary-only to suppress more specific routes. If this keyword is
not included, the aggregate address you specify will be advertised, but the
more specific routes will be as well. However to advertise a summary (an
aggregate) at least one more specific route must be in the routers BGP
table (via a network command, redistribution, etc.)
Attributes
It is extremely important to understand each BGP attribute especially the
more important ones (local pref, AS_PATH, MEDs, communities). I wont
identify all the BGP attributes, but I will discuss the more common ones. I
recommend further reading and a lot of hands-on practice, but here is an
overview:
AS_PATH possibly the most important BGP attribute. It is a running
tally of all the Autonomous Systems through which the advertisement has
passed. This is important since (realistically) only local preference is
higher in the order of route selection. This is by far the most common
attribute used to determine routing on the Internet. Often routing is
controlled by prepending an ASN (making the AS_PATH longer by
including your own ASN several times).
Local Preference this is effectively first on the BGP route selection
algorithm. It is set within an AS, it is passed to all routers in the AS yet it
does not leave the AS. It controls how that AS routes traffic outbound to
other ASs. Since it is shared among all routers in an AS, all routers
should agree on the local preference for each route. The higher local
preference is preferred. A router can set the local preference on all routes
(bgp default local-preference) or on specific routes (set local-
preference via a route-map).
For example, assume AS 10 has two ISP connections, ISP 1 and ISP 2.
Without setting Local Preference, AS 10 will route traffic to whichever ISP
For example, a route might be originated by the local router using the
network bgp command, or through redistribution from an IGP.
Note The most recent IETF decision regarding BGP MED assigns a value
of infinity to the missing MED, making the route lacking the MED variable
the least preferred. The default behavior of BGP routers running Cisco
IOS software is to treat routes without the MED attribute as having a MED
of 0, making the route lacking the MED variable the most preferred. To
configure the router to conform to the IETF standard, use the bgp
bestpath missing-as-worst command.
9. Prefer the external (EBGP) path over the internal (IBGP) path.
10. Prefer the route that can be reached through the closest IGP neighbor (the
lowest IGP metric).
This means the router will prefer the shortest internal path within the
autonomous system to reach the destination (the shortest path to the BGP
next-hop).
11. If the following conditions are all true, insert the route for this path into
the IP routing table:
Note EBGP load sharing can occur at this point, which means that
multiple paths can be installed in the forwarding table.
12. If multipath is not enabled, prefer the route with the lowest IP address
value for the BGP router ID.
This is why it is important to have an IGP route to the next hop address.
8. If multipath is not enabled, prefer the route with the lowest IP address
value for the BGP router ID.
Bridging
For bridging over Frame Relay, there are no special requirements if all
interfaces are point-to-point. However for Frame Relay physical interfaces
(no subinterfaces) or multipoint interfaces, you need one frame-relay map
bridge dlci broadcast command for each DLCI thats part of a physical
or multipoint interface. However, note that for physical and multipoint
interfaces, the router will not forward packets out the same physical or
multipoint interface that bridge packets were received on (regardless of all
else, including Spanning Tree)!
Spanning Tree
My approach to Spanning Tree is to first identify the root bridge. In the real
world this is the bridge closet to the core of my network. In the CCIE lab it
will be the bridge where you want all ports forwarding. In a Frame Relay
network, you want to choose this carefully (see the Frame Relay
discussion in Bridging, below).
Once I have selected my root bridge I cost paths appropriately to allow the
bridges to forward and block on each link as I see fit. I usually do this by
lowering the default cost on a link I want to be in forwarding mode. You
could raise the cost of a link you want in blocking mode, though if you ever
add bridging to a link it will start with the default cost and compete with
your forwarding link. If you lower the cost on your forwarding link, you can
add additional links without worrying about setting path costs.
The root bridge is determined by the lowest bridge priority set by the
global bridge priority command.
On each subnet a designated bridge is elected. This is the bridge that will
have the forwarding path to the root. The bridge with the lowest path cost
to the root will be the designated bridge (and thus will be forwarding). In
the case where two or more bridges have the exact same path cost to the
root, the bridge with the lowest priority becomes the designated bridge.
The path cost is calculated by adding the outbound path costs of all
paths (links) to the root. That is, path costs are added as you are leaving
Port priority is almost never used. The only time this might be used is if
two non-root bridges had redundant links between them. One of the four
ports for those two links would have to block port priority would allow
you to control which one it was. If you dont set this on any of the four, the
IOS will select one to block.
Frame Relay
Use caution when bridging via physical Frame Relay interfaces. A physical
Frame Relay interface will not forward packets out the same interface
upon which they were received, even if the packet is intended for a
different DLCI.
A better solution would be to make router3 the root bridge. In this case the
Frame Relay connection between router1 and router2 would be blocking
and thus router1 would not be required to forward packets to and from its
Frame Relay interface, serial 0. Router3 could forward packets on both
serial interfaces since they are separate physical interfaces.
Spanning Tree
root bridge
Cannot be router3
Spanning Tree
root bridge S0
S1
router1
Point to Point
Frame Serial Connection
S0 Relay
S1
router2
S0
Blocked by
Spanning Tree
Debug
If you need to use debug ip packet [detail] [access-list], remember
that in some cases (depending on router and IOS version) only packets
that are processed switched will get debugged. To disable fast switching
(and force process switching) use no ip route-cache on each interface
(especially the incoming interface for the packets in question). In a lab
environment, configuring no ip route-cache has few negative affects. In a
production environment, it will slow throughput since the CPU must
process every packet. An example of using an access list to debug traffic
between two hosts is shown below. This is helpful if there is a lot of other
stuff going on that is causing the debug messages to clog up the screen:
During configuration ctrl-r will refresh the current line if a console or debug
message is displayed (for example, if you are in the middle of a long
configuration command and a debug message gets displayed, ctrl-r will
refresh the line and redisplay the command you are working on).
From the above output several things can be learned. The first two
packets are telnet packets (TCP dst and src 23) between 172.31.2.2 and
172.31.201.1. The g= indicates the gateway (next hop address) the
router will use to forward the packet. The next two packets are EIGRP
packets (protocol 88) from 172.31.4.1 and 172.31.4.3 to 224.0.0.10 (the
EIGRP multicast address). On the last packet you can see the source port
(src=) is 179 this is BGP. This is a BGP session between 172.31.2.2 and
172.31.2.3.
Distance
Distance is the parameter that Cisco uses to determine what routing
source to use for a given network when there is more than one choice. For
example, suppose a router learns about 192.168.1.0/24 from RIP and
EIGRP. Which one should it use? The answer is the routing source
(routing protocol) with the lower distance.
Note that distance is only a factor when identical routes are learned by
different means. For example, if 137.17.58.0/24 is learned via OSPF and
137.17.58.0/23 is learned via BGP, both will get placed into the routing
table because they are different routes (because of their different subnet
masks).
Note that distance takes precedence over any type of routing metric. For
example, a router can learn about a RIP route with a metric of 1. It can
learn about the same route via EIGRP with a metric of 2,297,856. Yet the
router will prefer the EIGRP route (even though it has a much, much
higher metric) since the distance of EIGRP is lower than that of RIP.
router eigrp 1
distance eigrp 130 140
You can also set the distance on routes learned from a specific neighbor.
This can be handy if you want to prefer EIGRP routes from a given
neighbor. To set the distance of routes learned from neighbor 172.31.3.4
to 80, use:
router eigrp 1
distance 80 172.31.3.4
Distance is contained within each router. That is, routers do not share or
advertise distance in any way. For simplicity, each router should be
configured with the same distance commands (whenever possible).
However in the CCIE lab you may be required to configure distance
differently on each router. Whatever the case, distance commands only
affect the router to which they are being applied (distance is not passed in
routing updates, etc.)
Distribute Lists
* Try adding the word log at the end of an access-list statement to log
what is happening with the access list (for example, what packets are
being denied). For example, the configuration:
router rip
network 172.31.0.0
distribute-list 1 in
!
access-list 1 deny 172.31.97.0 0.0.0.255 log
Distribute List In
Distribute lists in block routes from the routing table, but not the OSPF
(or other) database. This will block the routes from appearing in that
router. However it will not prevent these routes from being passed to other
routers via the exchange of the OSPF Link State Database. Thus these
filtered routes may appear in other routers running OSPF.
Unwanted RIP
advertisements
172.16.8.1/24 E0
172.16.1.1/24 172.16.1.2/24
S0 S0
R1 R2
172.16.12.1/24
RIP advertisements
Figure 5: Filtering RIP Routes
Lets assume RIP is required between R1 and R2 (on the 172.16.1.0/24
network). Your RIP config would look something like this:
router rip
network 172.16.0.0
RIP is enabled on classful networks only (that is, networks with their
natural class A, class B or class C mask). So if you enter the command
network 172.16.1.0 under the RIP process, the router will automatically
(and sometimes surprisingly!) change it to simply network 172.16.0.0.
This is because 172.16.1.0 is a subnet, yet 172.16.0.0 is the actual
network. This behavior was also true of EIGRP, though with version
12.0(4)T and 12.1 (and later) the subnet mask attribute was introduced,
allowing you to enable EIGRP on specific subnets, not just the entire
network.
router rip
network 172.16.0.0
passive-interface e0
distribute-list 1 in e0
access-list 1 deny any
router rip
network 172.16.0.0
distribute-list 2 out S0
Or this access-list:
access-list 2 permit 172.16.12.0
Note
My general philosophy with filtering (in the CCIE lab) is to only allow those
routes you want send. So in the above example I would select the second
access-list option. The reason for my choice is this method tends to block
more stuff than the former option, which blocks one or two specific routes
and allows all others. In the lab if a particular route does not appear in a
However consider the case where you configure the network using the
former option (where you block 172.16.8.0/24 and allow all others).
Perhaps several hours later you may choose (or be required) to add a
loopback address of 172.16.100.1/24 to R1. Unless you remember to go
back and block that network using access-list 2, it will propagate through
your network yet this will break the aforementioned requirement that the
only subnet in the 172.16.0.0/16 range that R2 should learn about via RIP
is the 172.16.12.0/24 subnet. However you may not even be aware that
youve broken this requirement! If you select the second access-list option
mentioned, 172.16.100.0/24 will be blocked automatically.
Distribute lists out are typically much more effective from blocking a
route from a large portion of the network. However with OSPF
distribute-list out only works on External Type 1 or 2 routes not with
internal OSPF routes.
Distribution lists may not take effect immediately. You may have to bounce
the interface or do a clear ip route * to activate them.
It would appear that this would regulate what ospf sends out to eigrp 1.
But instead it controls what OSPF receives in from EIGRP 1 (or, more
aptly, what EIGRP sends out to OSPF).
EIGRP
By default EIGRP will summarize routes on a classful boundary in a
manner similar to RIP. I tend to dislike this behavior and disable this
feature with the no auto-summary. Note that this command only affects
how you advertise routes to other routers (i.e., whether or not you
summarize on classful boundaries). It does not affect routes that you learn
from other routers you accept them just as they are (either classful
summaries or not depending on whether that router has auto-summary
enabled or disabled). Given the choice I configure no auto-summary on all
my EIGRP routers.
EIGRP Metric
By default reliability does not affect the metric (though this can be
changed). The bandwidth is the smallest bandwidth of all links used to
reach the destination network. The delay is an accumulation of the delay
of all links to reach the destination network. Loading is a rough estimate of
the utilization of a given link.
When I needed to set the EIGRP metric I would typically use default-
metric 1000 10 255 50 1500 . I would use this regardless of the actual
speed, loading, etc. of the link. This approximately corresponds to 1 Mb/s
of bandwidth, 100 microsecond delay, 100% reliable, 25% loaded with a
1500 byte MTU (packet size).
EIGRP Summarization
EIGRP has the ability to summarize IP routes. Unlike many routing
protocols, which perform summarization in the routing process
configuration, EIGRP performs summarization at the interface level. The
ip summary-address eigrp 1 10.20.0.0 255.255.0.0 command can be
applied to an interface, such as s0. When that configuration is applied, all
EIGRP routes that are within the 10.20.0.0/16 range will be summarized to
one EIGRP advertisement (10.20.0.0 255.255.0.0) for advertisements out
the s0 interface. All other interfaces will not be affected by this
summarization (and will advertise EIGRP routes normally).
RTL3FC22-156(config)#router eigrp 1
RTL3FC22-156(config-router)#network 172.17.1.0
Becomes:
router eigrp 1
network 172.17.0.0
RTL3FC22-156(config)#router eigrp 1
RTL3FC22-156(config-router)#network 172.18.1.0 0.0.0.255
Becomes:
router eigrp 1
network 172.18.1.0 0.0.0.255
The difference is significant, as the first command will run EIGRP on all
172.17.0.0 interfaces. The latter command will only run EIGRP on the
172.18.1.0 interface. Needless to say I prefer explicitly indicating the exact
interfaces on which EIGRP should run by using the subnet mask. Note
that it is a reverse mask (which Ive never understood why Cisco uses!)
like OSPF.
Frame Relay
Frame Relay traffic shaping always requires a frame-relay interface-
dlci command since this is where you configure the traffic shaping
commands.
In Frame Relay you may want to place a map statement for your own
(local) IP address so that you can ping it (or ask the proctor if this is
necessary).
By default all DLCIs that are announced to a router are placed in that
routers physical interface. DLCIs can be assigned to an interface via the
frame-relay interface-dlci command (preferred) or by applying a
frame-relay map statement to a subinterface that references that DLCI.
Due to their nature point-to-point subinterfaces can only receive one DLCI.
Multipoint subinterfaces (and physical interfaces) can receive many
DLCIs.
PVC Status
If you see a PVC with the status of deleted, it probably means you typed
in a frame-relay interface-dlci 100 command, but the frame switch is
not announcing (and doesnt know about) that DLCI check DLCI.
If you see a PVC with the status of inactive, it probably means the local
routers connection to the frame switch is fine, but there is a problem with
the far end of the PVC. Check the router that is supposed to terminate
the PVC.
The way this can occur is as follows: suppose router A is a spoke router
connecting to router B. Router C is also a spoke router that connects to
router B. Router A uses inverse-arp to map router Bs IP address to a
particular DLCI. However router A can not inverse-arp for router Cs IP
address as discussed. A map statement is placed in router A for router C.
Everything works great since router A has the two mappings it needs: a
dynamically learned one for router B (via inverse-arp) and a manually
defined one (via a map statement) for router C.
However with some versions of code the map statement disables inverse-
arp. Thus once the router is rebooted is loses its dynamically learned
mapping for router B. Since the map statement has disabled inverse-arp,
connectivity to router B is lost. Thus, to be safe if you are performing map
statements add one for each router in the Frame cloud.
Table 2: Frame Relay Interface Types and Issues shows the various
combination of Frame Relay interface types that can exist at the hub
router and at the spoke routers. Each combination has potential
problems and issues, as are outlined in the table.
OSPF
Home Lab
During your CCIE preparation you will need to decide whether to purchase
a home lab. I highly recommend purchasing one. Unless you have access
to a lab (at work, etc.) a home lab is invaluable. Not only can you work on
it anytime it is convenient, you can also continue to build on configurations
over several days (unlike labs where you rent rack time or equipment).
Now that used 2500s on eBay are under $200, a small home lab can be
assembled at a reasonable price. At the very least I recommend
purchasing some 2500s since you can practice a fairly wide range of
networking topics on these devices (OSPF, BGP, EIGRP, etc., etc.)
For routers that have a limited flash, I used a compressed image. Cisco
doesnt recommend this on production routers, though in a lab
environment it works great. You do need a decent amount of memory
(almost all my routers had 16 MB) but compressing an image lets you
place a 10 or 11 MB image in an 8 MB flash. You can also compress a
larger image so that it will fit into 16 MB of flash.
You can compress the image with any standard UNIX compress utility.
The router will decompress the image on boot-up (it takes a few minutes
longer to boot), then it runs the image from memory. Once the router is
booted you cant tell that the image on flash was compressed.
Remember that if you are limited in flash you dont necessarily need every
feature on every router. For example, you might want IPSec on certain
routers, firewall features on other routers, etc.
I selected Tera Term (also known as Tera Term Pro) for my terminal
emulator of choice. I recommend Tera Term as it can make your life
easier. The biggest advantage of Tera Term for me was:
Tera Term uses a very simple macro language. With this you can very
easily program Tera Term to execute commands on your routers. I have
included two such useful Macros in Appendix A: Tera Term Macro.
For example:
I found this extremely useful since it would very quickly capture the
configs and IP routing tables (and any other info you desire OSPF
neighbors, IPSec associations, etc.) for a given scenario with virtually no
effort. During my studying I was forever reviewing scenarios I had already
staged in my lab. This made a very easy way to document all my work for
later review.
You could easily write a macro for other purposes, such as write-erasing
your routers when changing from one lab scenario to another.
Tera Term is freeware and can be found on many software distribution
sites, such as www.tucows.com and www.cnet.com.
Vendor Product
SMC Barricade
Linksys EtherFast Cable/DSL Firewall Router
D-Link 4 Port Broadband Gateway
Netgear Internet Gateway Router
async async
connection to connection to
the console the console
async
connection to router1 router2
the console
router3
In each router:
line con 0
privilege level 15
no login
line vty 0 4
Once you are logged into your terminal server router (in enable mode),
you simply invoke the script (via the Control Macro menu selection in
Tera Term). Here is the script:
timeout = 120
send "router1"
sendln #13
wait "#"
sendln #30#$78
wait "#"
send "router2"
sendln #13
wait "#"
sendln #30#$78
wait "#"
send "router3"
sendln #13
wait "#"
sendln #30#$78
wait "#"
send "where"
send #13
Simply save this as a text file, then select that file when you invoke the
Tera Term script (Control Macro). You can use other names for your
routers (such as r1, r2, etc.) Just simply change the config of the terminal
server router (such as ip host r1 1.1.1.1 2001) and update the names
in the script above.
You can repeat the portion of the script in bold for each of your routers (or
other devices). The sendln #30#$78 sends the terminal server a Ctrl-
Shift-6 X to escape back to the terminal server.
If you need to use telnet and enable passwords on your routers, simply
replace the bold portion of the script with:
sendln #30#$78
wait "#"
send "router3"
sendln #13
wait "Password:"
sendln "lucy"
wait ">"
sendln "en"
Dont feel you need to use lucy as your password. You can use the name
of your own cat!
IKE
IKE is the Internet Key Exchange standard and is usually performed using
the ISAKMP protocol. IKE is often used with IPSec because it automates
key management and controls the security associations that are formed,
though IKE is not required for IPSec. IKE policies define five things:
encryption algorithm (such as des)
hash algorithm (such as sha or md5)
authentication method (such as rsa-sig, rsa-encr or pre-share)
Diffe-Hellman group (such as group-1 (768-bit) or group-2 (1024
bit))
security association lifetime (in seconds)
All of these have defaults (and the defaults can be used) except
authentication that must be specified. Pre-share is by far the easiest
authentication method it simply requires one command defining the
same text key at each peer. Thus this is my recommendation (assuming
this is allowed on the exam). Rsa-sig authentication requires a certificate
authority (and thus is very unlikely to be on the CCIE Lab). These
parameters affect the data that flows between hosts during the IKE
negotiation not the actual data flows. Encryption and authentication of
data flows are defined by the transform set in IPSec (step 3, below).
IPSec
To configure IPSec:
The transform set defines the security (encryption, hash algorithm, etc.)
used for the actual data that is passed between the routers. The transform
set defines the security, then the crypto map defines the peer, the access
list (which defines what traffic is sent into the IPSec tunnel) and the
transform set that is used between the router and that peer. You can have
more than one transform set. Different transform sets can be applied to
different peers.
Finally the crypto map gets applied to the interface used to communicate
between IPSec peers.
It appears IPSec likes to have the crypto map applied to the outer most
interface. In the past I have applied the crypto map statement to the LAN
(inside) interfaces and had no success. (I recommend applying the crypto
maps to the outer-most interface even if the routers are IPSec peering
between loopbacks).
Access lists
For ipsec-manual mode (not using IKE/ISAKMP), only 1 access list entry
is permitted; all others are ignored.
Always make access lists mirror images of each other at opposite ends!
You will need some routing so that each router knows of the others
loopback address static routing, a routing protocol through the tunnel,
etc.
Enable the crypto map on both the physical interface and the tunnel
interface.
IPSec Example
For an example of implementing IPSec, consider the network in Figure 7:
IPSec Using Multiple Tunnels. As you can see, r4 has two different IPSec
associations: one with r1 and another with r2. For this example we will use
IKE/ISAKMP for key management (my preferred solution). We will force
r4
Logical IPSec connection
192.168.123.51/24 eth 0 eth 0 172.26.77.4/24
192.168.123.0/24 172.26.77.0/24
eth 0 eth 0
r2
s0 s0
loopback 150 172.25.33.2 172.25.33.3 r3
ip address 10.2.2.2/24
We will use OSPF to route between the loopback interfaces and the
physical interfaces the serial and Ethernet interfaces. Even though the
traffic on the 10.0.0.0 network is going through the IPSec tunnels, the
router still requires a route (even a default) for those networks. The router
routes the packet to the appropriate interface, then the crypto map takes
over.
Step 1: ISAKMP
On all routers:
crypto isakmp policy 1
encryption des
hash sha
authentication pre-share
group 1
lifetime 7200
On r1:
crypto ipsec transform-set r1-r4set esp-des esp-sha
On r2:
crypto ipsec transform-set r2-r4set esp-des ah-sha-hmac
On r4:
crypto ipsec transform-set r1-r4set esp-des esp-sha
crypto ipsec transform-set r2-r4set esp-des ah-sha-hmac
Step 4: Access-List
On r1:
access-list 104 permit ip 10.1.1.0 0.0.0.255 10.4.4.0 0.0.0.255
On r2:
access-list 104 permit ip 10.2.2.0 0.0.0.255 10.4.4.0 0.0.0.255
On r4:
access-list 101 permit ip 10.4.4.0 0.0.0.255 10.1.1.0 0.0.0.255
access-list 102 permit ip 10.4.4.0 0.0.0.255 10.2.2.0 0.0.0.255
On r2:
crypto map mymap 10 ipsec-isakmp
match address 104
set peer 172.26.77.4
set transform-set r2-r4set
On r4:
crypto map mymap 10 ipsec-isakmp
match address 101
set peer 192.168.123.51
set transform-set r1-r4set
crypto map mymap 20 ipsec-isakmp
match address 102
set peer 172.25.33.2
set transform-set r2-r4set
On r1:
interface Ethernet 0
crypto map mymap
On r2:
interface serial 0
crypto map mymap
On r4:
interface Ethernet 0
crypto map mymap
interface: Ethernet0
Crypto map tag: mymap, local addr. 192.168.123.50
inbound ah sas:
outbound ah sas:
r1#
r1#ping
Protocol [ip]:
Target IP address: 10.4.4.4
Repeat count [5]: 25
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface: 10.1.1.1
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 25, 100-byte ICMP Echos to 10.4.4.4, timeout is 2
seconds:
Packet sent with a source address of 10.1.1.1
!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (25/25), round-trip min/avg/max =
52/53/60 ms
r1#
r1#
r1#sho crypto ipsec sa
interface: Ethernet0
Crypto map tag: mymap, local addr. 192.168.123.50
inbound ah sas:
outbound ah sas:
r1#
Performing a sho crypto isakmp sa displays that the two routers have
successfully made an ISAKMP connection:
r1#
The final router configs from the example in Figure 7: IPSec Using Multiple
Tunnels:
r1
crypto isakmp policy 1
encryption des
hash sha
authentication pre-share
group 1
lifetime 7200
crypto isakmp key ccie address 172.26.77.4
crypto ipsec transform-set r1-r4set esp-des esp-sha
crypto map mymap 10 ipsec-isakmp
match address 104
set peer 172.26.77.4
set transform-set r1-r4set
interface loopback 150
ip address 10.1.1.1 255.255.255.0
interface Ethernet 0
ip address 192.168.123.50 255.255.255.0
crypto map mymap
router ospf 1
network 192.168.123.0 0.0.0.255 area 0
network 10.1.1.0 0.0.0.255 area 0
r2
crypto isakmp policy 1
encryption des
hash sha
authentication pre-share
group 1
lifetime 7200
crypto isakmp key ccie address 172.26.77.4
crypto ipsec transform-set r2-r4set esp-des ah-sha-hmac
crypto map mymap 10 ipsec-isakmp
match address 104
set peer 172.26.77.4
set transform-set r2-r4set
interface loopback 150
ip address 10.2.2.2 255.255.255.0
interface Ethernet 0
ip address 192.168.123.52 255.255.255.0
interface serial 0
ip address 172.25.33.2 255.255.255.0
crypto map mymap
router ospf 1
network 192.168.123.0 0.0.0.255 area 0
network 172.25.33.0 0.0.0.255 area 0
network 10.2.2.0 0.0.0.255 area 0
access-list 104 permit ip 10.2.2.0 0.0.0.255 10.4.4.0 0.0.0.255
r4
crypto isakmp policy 1
encryption des
hash sha
authentication pre-share
group 1
lifetime 7200
crypto isakmp key ccie address 192.168.123.50
crypto isakmp key ccie address 172.25.33.2
crypto ipsec transform-set r1-r4set esp-des esp-sha
crypto ipsec transform-set r2-r4set esp-des ah-sha-hmac
crypto map mymap 10 ipsec-isakmp
match address 101
set peer 192.168.123.50
set transform-set r1-r4set
crypto map mymap 20 ipsec-isakmp
match address 102
set peer 172.25.33.2
set transform-set r2-r4set
interface loopback 150
ip address 10.4.4.4 255.255.255.0
interface Ethernet 0
ip address 172.26.77.4 255.255.255.0
crypto map mymap
router ospf 1
network 172.26.77.0 0.0.0.255 area 0
network 10.4.4.0 0.0.0.255 area 0
access-list 101 permit ip 10.4.4.0 0.0.0.255 10.1.1.0 0.0.0.255
access-list 102 permit ip 10.4.4.0 0.0.0.255 10.2.2.0 0.0.0.255
IPv6
With version 12.2 of IOS, Cisco has reasonably good support for IPv6. I
used version 12.2(15)T14 on my 2500s with good success. Although it is
highly unlikely to be a core topic on the exam, it is you understand IPv6
and have practiced some configuration scenarios.
http://www.cisco.com/en/US/products/sw/iosswrel/ps1839/products_featur
e_guide09186a00801ad99d.html
Unlike IPv4, IPv6 routing is not enabled globally by default. If you think this
is strange, lets face it how many people are really using it?!! To enable
it globally, use the ipv6 unicast-routing global configuration command.
Access Lists
Access lists are created with the ipv6 access-list ACL_name command,
where ACL_name can be any name you choose. IPv6 access lists are
designated with a word, rather than a number. I prefer this anyway with
a word (or series of words separated by _ ) you can make a meaningful
name for the list, rather than simply access-list 100.
IPv6 access lists are formatted the same way IP extended access lists are
formatted. That is, after the ipv6 access-list ACL_name command there
are an unlimited number of permit and deny statements that can specify
protocol (TCP, UDP, etc.), source and destination IPv6 addresses and/or
source and destination port numbers or port ranges.
IPv6 access lists take sequence numbers. These are not required if you
simply type in permit and deny statements they will be entered in the order
you type them. However if you need to place a new line in the middle of
the list, sequence numbers are very handy. This is similar to the way
route-maps work. If you need to do this the statements, by default, are
sequenced by 10s (10, 20, 30
) even though the sequence numbers will
not be shown. Thus to place a new entry between the existing second and
third entries (sequence entries 20 and 30), simply add a sequence 25
permit tcp any any command:
r3#sho run
…
!
ipv6 access-list block_r1
permit udp any eq rip any
permit udp any any eq rip
deny icmp host 10:10:10::1 host 300:300:300::3 log-input
permit udp any any eq 521
permit ipv6 host 10:10:10::1 any
!
Addressing
As you may know IPv6 uses 128 bits of addressing rather than IPv4s 32
bits. So rather than the 4 octets of addressing you are used to, there are
16. On an editorial note I feel this is one of things that will slow its
acceptance. Suppose your team is troubleshooting a problem. Today you
might ask someone else on your network team Hey, try pinging
172.16.1.5. With IPv6 youll be asking, Hey, try pinging
172.16.1.5.192.168.17.168.12.34.1.1.10.145.248.1!! Now its not quite
that bad there are some shortcuts that are useful but without a doubt
the addressing of IPv6 is much more cumbersome than IPv4.
In reality IPv6 addressing is not broken up into the 8-bit octets that we are
used to. Instead of the sixteen 8-bit octets that would be required for 132
bits, IPv6 uses eight hex words that are 16 bits each. IPv6 addressing
uses colons (:) instead of dots between these groups. So an actual IPv6
address would appear something like
10FE:29A4:333C:4194:DAC7:8A6B:100A:613F. One of the shortcuts
you can use is a double colon (::) represents all zeros for any part of the
address that are not otherwise called out. So rather than use an address
of 172:16:0:0:0:0:0:1, you can simply use 172:16::1 (although remember
the 172, 16 and 1 are in hex!). Since only three hex words are listed and
eight are required, in this case the :: represent five hex words of zeros.
IPv6 addresses can be applied to all types of interfaces, just like ipv4
(Ethernet, serial, loopback, etc.)
Just as with IPv4 addressing, you need to tell the router the subnet mask
so that it knows which part is the network/subnet portion and what part is
the host portion. Again, where IPv6 uses such a large address space a
shortcut is to simply list the number of network/subnet bits. So whereas
today you might use a /24 or a /27, with IPv6 you might list /48, /56 or /64
as the number of subnet bits. Using a 64-bit subnet mask leaves the
remaining 64 bits for host addressing. By default with IPv6 hosts use the
last 64 bits of the 128-bit address as the host portion. Hosts typically use
IPv6 has the concept of link-local addresses. This is a process where IPv6
devices basically assign themselves their own address. This is helpful if a
TV remote control and a TV are using IPv6 to communicate, for example.
In this case DHCP may not be convenient and manually assigning the TV
and remote an IPv6 address is definitely not helpful. (Most people cant
set the clock on their VCR imagine an average user trying to set an IPv6
address on their TV!!) Link local addresses use the prefix FE80, followed
by the double colon (indicating the rest of the subnet portion is all zeros),
followed by the 64-bit host address. So a router with a MAC address of
00E0.1E3E.3ACB will create a link-local address of
FE80::00E0.1EFF.FE3E.3ACB. The FF.FE are used to extend the 48-bit
MAC address to 64 bits. This will appear when you enter a show ipv6 int
brief, for example. Dont worry too much about these. The router will
assign the addresses itself and they really arent used much.
If you get to assign your own IPv6 addressing (likely), I would attempt to
keep it as simple and familiar as possible. In my lab I used addresses like
192:168:10::1/64 and 300:300:300::1/48, etc. Even though in this case
192 is a 16-bit hex word (since only three hex letters are entered the
router assumes a leading 0 (0192 or 0300)), it still is familiar. Obviously
300 could never be used in IPv4, but 300 is allowed because of the hex
nature of IPv6 addressing. The address 300:300:300::3 might be a good
loopback address to assign to r3, for example.
You can ping IPv6 addresses just like any other address:
r1#ping 300:300:300::3
A config from a router with one IPv4 and one IPv6 BGP neighbor:
L 100:100::1/128 [0/0]
via ::, Loopback200, 00:00:17/never
C 100:100::/64 [0/0]
via ::, Loopback200, 00:00:17/never
L 192:168::1/128 [0/0]
via ::, Serial0, 00:05:38/never
C 192:168::/64 [0/0]
via ::, Serial0, 00:05:41/never
R 200:200::/64 [120/2]
Filtering
Access-lists and prefix-lists are included in IPv6, just as you would expect.
The lists themselves are very similar to IPv4, with the obvious exception
that you use IPv6 addresses.
One difference you will see is that access-lists get applied to interfaces
(for packet filtering) with the traffic-filter interface command, such as
ipv6 traffic-filter block_r1 in.
Prefix-lists and/or access-lists can still be applied to the OSPF and RIP
routing processes with the distribute-list command in the IPv6 router
rip test router configuration:
Remember that in an IPv6 prefix-list the entry for permit any any is
permit ::/0 le 128 or permit 0::0/0 le 128. Remember that if you
apply a distribute-list to an existing IPv6 RIP process you will need to
wait for the routes to time-out of the routing table (or perform a clear
ipv6 route * for impatient types, like myself!)
OSPF
In IPv6 you identify each OSPF process with a process number like you
do in IPv4. However the global command to configure the IPv6 OSPF
process is ipv6 router ospf 1, unlike IP OSPF config (router ospf 1).
When running IPv6 over NBMA (Frame Relay) networks OSPF neighbors
must be defined manually. Do this by using the ipv6 ospf neighbor
<address> command, where <address> is the link-local address of the
neighbor. Identify the link-local by performing a show ipv6 int brief
command on the neighbor. Once this is displayed I recommend copying &
pasting the link local address into the opposite routers configuration.
RIP
If you need to implement routing for IPv6 in IOS 12.2, it is likely to be RIP
or OSPF, though for you unlucky types it could also be BGP.
You use a word (or a number, optionally) to identify the IPv6 RIP process.
This allows multiple IPv6 RIP processes to be running on a router, the
same way you can have multiple OSPF or EIGRP processes today.
Enable the IPv6 RIP process called test on each interface by using the
ipv6 rip test enable interface command. You do not use the network
router command as you do with IPv4 RIP. IPv6 RIP is disabled by default,
so you will need to specifically enable it wherever you need it.
In fact the only things you can actually configure in the ipv6 router rip
test configuration are things that will look fairly familiar: distance,
distribute lists, split horizon, timers, etc.
The interface level is where you can also configure the router to only
advertise the default route or to originate the default route. Again, these
commands will only apply to the interface on which they are applied. If you
want to originate the default route on several interfaces the ipv6 rip test
default-information originate command will be required on each one.
Lab Day!!
The information within this section is provided to help you prepare a
strategy for the day you actually take your lab exam:
The ip tcp synwait-time 5 and no ip domain-lookup will both save you
time. The former times-out a failed TCP connection (such as trying to
telnet to another router) in 5 seconds, rather than the default of 30 (which
feels more like 3 minutes). This is helpful if you telnet to another router but
typed the IP address incorrectly, etc. This is one of my favorite IOS
commands! Man, is it annoying waiting for the router to come back
The
later command prevents the router from trying to perform DNS lookups.
This can occur when you mistype a command and the router attempts to
perform a DNS look-up for it, such as when you type enabv instead of
enab to get into enable mode. Possibly even more importantly this
command prevents the router from performing reverse DNS lookups, such
as during traceroutes. I highly recommend using both of these.
Aliases
Aliases are simply shortcuts that you define for your own use. They
basically allow you to create your own words for commonly used
commands. You define what the shortcut word (or letter) will be and what
command it corresponds to. So the alias:
You may want to also create an alias for show ip bgp since this would be
useful in the same way. You could use this to show show ip bgp, show
ip bgp neighbors, show ip bgp summary, etc.
Loopback Interfaces
I like all my routers to have loopback addresses. These are useful for
things such as:
OSPF router IDs
BGP peering
Pinging to see if a router is reachable
I like to add loopback interfaces even if they are not required. Often I will
assign loopback addresses from the upper end of whatever range of
addresses I am using.
For example, if I am working on a practice lab that calls for using the
128.128.0.0 address space, I would assign my loopback addresses as
shown in Table 3: Sample Loopback Address Assignments:
Table 3: Sample Loopback Address Assignments
Router Loopback Address
r1 128.128.201.1/24
r2 128.128.202.1/24
r3 128.128.203.1/24
r4 128.128.204.1/24
r5 128.128.205.1/24
r6 128.128.206.1/24
As you can see, this creates a simple addressing plan where the last digit
of the third octet matches the router number. Since the upper range of the
128.128.0.0 space is being used, it is also unlikely a higher addressed
loopback will be required by the practice lab (and thus changing an OSPF
router ID, for example).
Multicast
If you need to configure IP multicast on the exam, it is most likely you will
need to configure PIM. The only other multicast protocol that Cisco
supports, DVMRP, is supported by Cisco only to the extent that Cisco can
You may want to disable fast switching for IP multicast using the no ip
mroute-cache interface command. In a production environment fast
switching is probably preferred, but disabling fast switching allows debug
messages to be logged very helpful in a lab environment.
IGMP/CGMP
IGMP (Internet Group Management Protocol) is the standard multicast
protocol that controls hosts joining multicast groups (and thus determines
where a router needs to forward multicast traffic). Periodically (such as
once per minute) the router sends our IGMP requests (queries) and any
host participating in multicast sends back an IGMP report, indicating the
multicast group (i.e., the multicast IP address) on which it is listening.
Since this protocol is typically used between a router and end stations
(PCs), it is unlikely you will actually see this protocol in operation, though
you may be required to configure and tune it on the router.
Typically routers forward traffic to multicast groups, but are not members
of the groups themselves. However it can be useful to have a router join a
particular multicast group. When it is a member of a group, it will respond
to pings destined to that groups multicast address. This is very helpful
way to determine if multicast routing is working in your network. Use the
ip igmp join-group 230.0.0.1 interface command to force a router to
join the 230.0.0.1 multicast group.
CGMP is Ciscos proprietary IGMP. It only goes between the router and
the switch, telling the switch on what ports it needs to forward multicast
traffic.
PIM
IP Multicast routing is not enabled by default. Enable it using the ip
multicast-routing command.
In dense mode, multicast routers assume all other multicast routers and
users want multicast flows. Thus by default multicast traffic is forwarded
In sparse mode, multicast routers assume all other multicast routers and
users do not want multicast flows. A multicast router (based on the
requests it receives from users) or a multicast user must specifically
request a flow, such as with an IGMP Report message. Spare mode is
typically used where either there are few multicast clients or where
bandwidth is limited. In either of these cases sparse mode is efficient
since it will only transmit multicast packets to subnets where active
multicast clients exist.
In sparse mode or dense mode, an interface acts that way for all multicast
groups. A sparse-dense mode interface can operate in both sparse mode
and dense mode, depending on the multicast group. Thus in sparse-dense
mode the interface can act like sparse mode for certain multicast groups
and dense mode for other multicast groups. If you enable sparse mode or
sparse-dense mode you must configure a rendezvous point (RP), as
discussed in the next section.
DVMRP
DVMRP (Distance Vector Multicast Routing Protocol) is not fully supported
by Cisco. However Cisco does support PIM to DVMRP conversion,
allowing it to send to and receive packets from a DVMRP router.
NTP
For NTP configuration examples, see the CCIE Study Sheet on page 126.
Overview
NTP is the primary method to synchronize clocks (or the time) between
Cisco routers and switches. All NTP devices (routers, servers, clocks, etc.)
maintain a stratum number. This number indicates how many hops away
from the time source (usually an atomic clock, etc.) the device is. So a
device directly connected to an atomic clock would be stratum 1. A router
that synchronizes to that device would be stratum 2. A switch that
synchronizes to the router would be stratum 3, etc.
In the real world (although we know that has no relevance to the CCIE
Lab!) typically 1 or 2 routers in a network will peer with (and obtain time
from) 2 or 3 public NTP timeservers. NTP provides a mechanism for the
router to select the best (most accurate) time of all NTP devices to which
it connects. There are many of these servers freely available on the
Internet. All routers, switches and other devices within that network then
peer with (and obtain time from) those 1 or 2 routers. This allows for very
accurate time within the network, yet it does not overburden public
timeservers, nor does it incur the security risks of dozens of devices using
NTP to peer with Internet-based servers.
In the CCIE lab it is unlikely such a timeserver will exist. (Although if one
does exist the configuration becomes easier it is the same as discussed
here, though without the need to define a master server). Although NTP
does have broadcast capability I dont recommend it. The broadcast
method is less efficient and (more importantly) more difficult to
troubleshoot than statically configuring NTP peers.
NTP Modes
NTP between devices can operate in one of two modes:
Client-Server mode
Peer (Symmetric) mode
In client-server mode one router is clearly the timeserver and will distribute
time to other routers (but not accept time from any routers). In peer mode
two routers compare which has the more authoritative (lower stratum)
clock; the routers use the more authoritative time of the two.
In the CCIE lab (unless directed otherwise), I recommend using the client-
server mode. In this mode you can choose one router to be your time
(NTP) server and all other devices can be time (NTP) clients.
Basic Commands
To synchronize the clock of two routers, use one of the following
commands:
Client-server mode: ntp server 10.10.94.1 (on the client router)
Peer mode: ntp peer 10.10.94.1 (on both routers)
In client-server mode, the server router does not require configuration if its
clock is synchronized. If it is not, it needs the ntp master command, as
described below.
Advanced Commands
By default a router will only synchronize to another router if that router is
synchronized itself. In the CCIE Lab you may be asked to have all routers
synchronize their clocks to one router within your network. Use the ntp
master command to instruct a router to act as an NTP server (and
distribute time) despite the fact that it does not have a synchronized clock.
By default a router will use the IP address of the outgoing interface when
sending NTP packets. Especially if access-groups are used to restrict NTP
OSPF
If you have a partial mesh Frame Relay network (a very common
scenario) and you are forced to use the non-broadcast OSPF network
type (as opposed to the more favorable point-to-multipoint type) you will
likely have to manually configure neighbors. In this case you will probably
only need to define these at the hub router. Use ip ospf priority 0 at
the remotes since you dont want them becoming the designated router
since they will not be able to directly share the OSPF database with all of
the spoke routers the hub router is best positioned for this.
Even if your router is using a loopback address as its OSPF router ID,
loopback networks wont be part of the OSPF process by default they
need to be added with the network statement, like any other interface.
Loopback networks get defined as host routes (/32 mask) regardless of
the real mask. However if you want the whole loopback subnet to be
visible to the rest of the network, consider:
interface loopback0
ip address 192.168.253.1 255.255.255.0
router ospf 1
network 192.168.253.0 0.0.0.255 area 4
area 4 range 192.168.253.0 255.255.255.0
interface loopback0
ip address 192.168.253.1 255.255.255.0
ip ospf network point-to-point
Network Types
OSPF uses four network types as shown in Table 4: OSPF Network
Types:
My rule of thumb is this: always get the routers to agree on the OSPF
network type. If they don't agree you're asking for problems. If the routers
dont agree you can manually set the Hello and Dead timers to match, but
then one router is looking to elect a DR/BDR (designated router/back-up
designated router) while the other is not.
Cost (Metrics)
The OSPF cost, or metric, of a route is the sum of the costs of all outgoing
interfaces to reach the destination. By default each OSPF interface cost is
100 Mb/s divided by the speed of the interface. Fast Ethernets use a cost
of 1, 10 Mb/s Ethernets use a cost of 10, 1.544 Mb/s T1s use a cost of 64,
etc. Note that the router does not detect WAN port speeds automatically.
Thus the bandwidth command must be used to specify the bandwidth. If
no bandwidth is specified on a WAN port, the router assumes T1 speed
(1.544 Mb/s).
The cost can be changed on an interface via the ip ospf cost interface
command. To change the cost on all interfaces (such as increasing all
costs by a factor of 10), use the auto-cost reference-bandwidth 1000
command (where 1000 is in Mb/s and is used in place of 100 Mb/s in the
formula discussed above). This is helpful if you have Gigabit (or 10 Gig)
interfaces since otherwise they receive the same cost as 100 Mb/s
interfaces 1. Although it is unlikely youll need this in the lab, I have used
this in real life several times.
External Routes
OSPF uses two types of external routes: external type 1 and external type
2. Type 1 routes increase their metric by the OSPF metric of a link when
they cross that link (as discussed in the previous section). That is, their
OSPF metric increases as they propagate through a network. Type 2
routes remain with a fixed metric regardless of how far they propagate
through a network.
Networks for which OSPF is configured become OSPF internal routes. All
other OSPF routes are OSPF external routes. Usually external routes are
the result of redistribution from another protocol. By default redistributed
routes become external type 2 routes. This can be overridden with the
metric-type 1 keyword in the redistribute command. Either type (type 1 or
type 2) can be given an initial metric with the metric keyword in the
redistribute command. For type 2 routes, this will be their metric
throughout the network since type 2 routes do not change their metric. For
type 1 routes this will be the starting metric that gets increased with
every link.
Router ID
Each OSPF router uses a router ID to identify itself to other routers. When
the OSPF process is started (with the router ospf command) or when the
router is booted it selects a router ID. The router uses the following criteria
to select its router ID:
1. The router will select the highest IP address of all loopback
interfaces.
2. If no loopback interfaces exist, the router selects the highest IP
address of all interfaces.
As you can see, if there are no loopback interfaces the router selects the
highest IP address of all interfaces as its router ID. Then if a loopback
address is added later, then the router booted, the router will change its
router ID to the (highest) loopback IP address.
Changing the router ID can break OSPF virtual links as they reference a
routers router ID. To avoid this create all loopback interfaces before
configuring OSPF. The OSPF router ID can also be set (with more recent
versions of IOS) with the router-id router command, though this is not
too common.
Distance
Using the distance ospf router command you can set distances for:
intra-area routes (OSPF routes that are in that routers area)
inter-area routes (OSPF routes that are from a different area)
external OSPF routes
This can control what routes the router chooses to place in the routing
table. I recommend leaving these at the default unless you are required to
change them. If you are required to change them, I recommend setting
them all the same (if possible).
Summarization
When you use an area 1 range command it will summarize all OSPF
internal routes, but none of the OSPF external (type 1 or 2) routes. This is
usually done on the ABR for whatever area is being summarized.
summary
Use a stub area (area 1 stub) to block external (type 1 and type 2) routes
from being sent to the stub area. Use a stub area with no summary (area
1 stub no-summary) to block all OSPF routes except those from within that
area (this commands blocks inter-area routes, external type-1 routes and
external type-2 routes).
Use an NSSA area when you want to block external (type 1 or type 2)
routes from being sent to the area (NSSA areas do not get OSPF external
routes) but you want the area to be able to originate external routes, such
as from redistribution. NSSA external routes can be summarized by the
router that connects between the NSSA area and the backbone.
Virtual Links
You do need to have every OSPF ABR (Area Border Router) connect to
area 0, either directly or through a virtual link. When setting up virtual
links, the area defined (in the area 1 virtual-link 154.16.32.1
command) is the area through which the virtual link will traverse. When
configuring the virtual link, you must use the router id of the router at the
other end of the virtual link.
R1 --- area 0 --- R2 --- area 1 --- R3 --- area 2 --- R4 --- area 3
Prefix Lists
The way prefix lists work are you can specify a network and mask or a
network and a range of masks. Specifying a network and mask is fairly
simple:
This will allow (match) the exact network 172.16.25.0/24 to pass the list.
Prefix lists can also specify a range of networks (very useful) using the ge
and le keywords. The keyword ge matches a mask that is greater than or
This will take the entire class B network 172.16.0.0 (172.16.0.0/16) and
pass only subnets with a /24, /25 or /26 mask (ge 24 le 26). So the exact
network 172.16.0.0/16 would actually fail the list because it does not have
a mask of /24, /25 or /26.
By default if you only specify ge then any subnet with a mask greater
than or equal to the ge value will pass. That is, ge all the way up to /32.
For example:
This list specifies any subnet within the 10.10.10.0/24 range that has a
mask of /28 or greater (255.255.255.240 255.255.255.255). Again, the
exact subnet 10.10.10.0/24 would fail because it does not have a mask of
/28 or greater.
By default if you only specify le then any subnet with a mask less than or
equal to the le value but greater than or equal to the mask specified will
pass. That is, le all the way down to the mask listed. For example:
This list specifies any subnet within the 10.64.0.0/16 range that has a
mask between /16 and /23, inclusive (255.255.0.0 255.255.254.0). In
this case the exact subnet 10.64.0.0/16 would pass because it has a mask
in the range /16 /23.
Prefix lists are my preferred way to filter routing updates. I feel they are
extremely powerful. Once you become familiar with them they are easy to
use.
Quality of Service
Explain Class of Service, IP Precedence and DiffServ Code Points
The phrase Class of Service is used in many ways. One common use of
the phrase is to describe a particular level of service, such as the classes
of service defined by the IP Precedence bits (see below). Another use is
to define a level of priority in a layer 2 header. The 802.1p standard
dictates bits for use in defining Class of Service (CoS). The 802.1p and
802.1q standards are commonly used on layer 2 trunk links. 802.1p
defines priority of packets using the CoS bits. 802.1q defines a tagging
standard, allowing more than one VLAN (or subnet) to be carried
separately across one physical link. When the CoS bits are set in an
802.1p header a layer 2-only device (such as a switch) can still apply
priority to certain packets since they understand and adhere to the CoS
value (whereas they likely do not always understand the layer 3 IP
Precedence or DSCP field).
IPv4 contains an 8-bit Type of Service (ToS) field in its header. Three of
these eight bits form the IP Precedence bits, providing six different classes
of service (two levels are reserved), as shown in Table 6: IP Precedence
Classes. Once these bits are set other devices throughout the network
can assign a level of service (low latency, etc.) based on the three IP
Precedence bits. For example Weighted Fair Queuing (WFQ) and
Weighted Random Early Detection (WRED) can both use IP Precedence
bits to determine how to treat packets.
The DiffServ Code Point (DSCP) uses (and replaces) the Type of Service
(ToS) field in the IPv4 header. The eight bits of the IPv4 Type of Service
field are:
the three IP Precedence bits (discussed earlier in this section)
one bit for low delay
one bit for high throughput
one bit for high reliability.
The last two bits of the ToS field are not used. DSCP uses these first six
bits to define its levels of service, also known as forwarding classes.
IPv6 (for those of you who are really optimistic!) has a Traffic Class field
that is very similar to the IPv4 Type of Service field. This field also
contains bits used to prioritize traffic. DSCP also replaces this field with its
own information.
Setting the IP Precedence or DSCP bits is very effective since once these
values are set, by default, layer 3 devices adhere to but do not alter them.
These also determine how Weighted Random Early Detection (WRED)
treats packets in a congestion situation.
Setting the CoS value is not as useful since it is not maintained from end-
to-end throughout the network it gets removed when the 802.1p header
is stripped. However it is very useful for marking (and thus prioritizing)
traffic on a trunk link, switch-to-switch link or router-to-switch link. DSCP
values can also get mapped based on CoS values, making the marking
more permanent.
Setting a local QoS group is useful to classify packets within a router (not
between routers). This classification can be made based on parameters
such as IP prefix, autonomous system and BGP community values.
Congestion Management
Congestion management techniques allow you to control congestion by
determining the order in which packets are sent out an interface based on
priorities assigned to each packet. Congestion management includes:
Creating queues
Using classification to assign packets to queues
Scheduling packets in a queue for transmission
First In, First Out is by far the simplest queuing mechanism. Packets are
sent out an interface in the order they are received. No preferential
treatment is administered, no bandwidth is reserved. Although FIFO
sounds almost overly simplistic, on higher speed interfaces (over T1/E1) it
is the default. This is mostly because it is extremely easy for the router to
process packets and the average wait or delay on these interfaces is
usually very low.
The first two types are designed for the standard IOS routers. The
distributed types are simply the same implementations as the non-
distributed types, but designed for the Route Switch Processor (7000
series) or the Versatile Interface Processor (VIP) (7500 series). In this
guide unless otherwise noted WFQ will denote both WFQ and DWFQ.
Similarly CBWFQ will be used to mean CBWFQ and DCBWFQ.
With WFQ the router identifies and sorts traffic into flows, or
conversations. Each flow is assigned a weight, which effectively acts as
that flows priority. The weight can be set by:
IP Precedence of the packet
RSVP
Traffic of the flow (lower traffic rates get higher weight)
Frame Relay BECN, FECN and DE
The router cycles through all flows, servicing them in proportion to their
weight. The router automatically sorts traffic based on many attributes,
such as source and destination network or MAC address, protocol, source
and destination port and socket numbers of the session, Frame Relay
data-link connection identifier (DLCI) value, and ToS value. IP Precedence
is part of the ToS value, and WFQ will adhere to this setting. It will give
higher weights to flows with higher IP Precedence values.
Once a queue has reached its maximum packet limit, any additional
packets for that queue will be dropped. The user can decide whether the
default, tail drop, will be used (packets at the end (or tail) of the queue that
wont fit in get dropped). The alternative to this is to use Weighted
Random Early Detection (WRED) to drop excess packets.
Custom Queuing provides up to 16 queues for traffic (if you are using
anywhere near 16 queues your configuration is more complicated than it
needs to be!) Each queue is serviced in a round-robin fashion, with the
router moving from one queue to the next, to the next. The administrator
specifies how many bytes are sent from each queue before the router
should move onto the next queue. If any queue is empty, the router
immediately moves onto the next queue. The router maintains one queue
for system traffic (keepalives, etc.) that is emptied before any other queue.
Priority Queuing uses just four queues high, medium, normal and low.
This is the priority order of the four queues. The highest queue with traffic
to send is always serviced first. Thus if the high priority queue has enough
traffic to fill a link, the other three queues will never send a packet! The
administrator uses filters to place packets into one of the four queues.
Packets that do not match any list are placed in the normal queue.
Packets can be classified by the following criteria:
Protocol or subprotocol type
Incoming interface
Packet size
Fragments
Access list
Packets are filtered and sorted by the routers processor. This causes a
slight delay in the handling of each packet. On low speed interfaces this
small delay is usually acceptable (especially compared to the benefit PQ
provides). On higher speed interfaces this delay may be unacceptable.
Each queue does have a limit on the number of packets that can be in the
queue. This is especially helpful for the lower queues, as packets may
build up there, waiting for transmission. In the case of long delays in the
lower queues, the application is probably resending the data anyway so
the router is better off dropping the packets.
Keepalives are always placed in the high priority queues. Other important
system traffic (OSPF hellos, CDP, etc.) needs to be manually configured.
class-map pop-email
match access-group 100
!
policy-map limit-email
class pop-email
police 128000 16000 32000 conform-action transmit exceed-
action set-qos-transmit 3 violate-action drop
!
interface serial 0/0
service-policy input limit-email
!
access-list 100 permit tcp any any eq pop3
The class-map uses an access list to define the type of traffic to be policed
(use match any in the class-map or an ip any any in the access-list to
police all traffic). The policy-map uses the traffic defined by the class-map
and defines how the traffic will be treated (transmitted, dropped, change
the QoS, precedence or DSCP value). The service-policy applies the
policing policy to a given interface.
Identify the Various Types of Traffic Shaping and How to Apply Each
Traffic shaping allows you to control traffic going out an interface. This can
be done to match the speed of a remote connection or remote portion of
the network, to adhere to a policy or to restrict certain types of traffic.
Traffic shaping can be more useful than policing, since it shapes traffic by
delaying it, whereas policing drops excess traffic. Dropped traffic often is
simply retransmitted, creating inefficiency.
All four methods use similar methods to determine whether a packet can
be forwarded or whether it must be delayed. If a packet must be delayed
GTS and Class-based Shaping use a weighted fair queue to delay the
traffic. DTS and FRTS use either a weighted queue, a custom queue or a
priority queue to hold delayed traffic, depending on how they are
configured.
FRTS can apply shaping to individual VCs (PVCs or SVCs) that are
assigned to a subinterface. In this case if a subinterface does not have
any shaping configured, it will inherit the shaping on the main interface (if
any is configured there). Any shaping configuration on the subinterface will
override the shaping configured on the main interface.
GTS and DTS are applied to interfaces (or subinterfaces). FRTS can be
applied on a per-DLCI basis. Class-based shaping is applied to a class
(or, occasionally, on an interface).
A variable that you should be familiar with for traffic shaping is Bc. This is
known as the committed burst (thus the Bc) of traffic a router can send.
That is, this is the burst of traffic that a router transmits that the network
(such as a Frame Relay network) is committed to accept and deliver. This
is directly related to the Committed Information Rate (CIR) the CIR is
simply Bc divided by time. For example if the CIR is 128 Kb/s and the
routers sampling period is 1 second then Bc = 128,000 bits.
Another variable used in traffic shaping is Be. This is the excess burst
(thus the Be) that the router can send that the network will accept but is
not committed to deliver. It will mark this traffic discard eligible (set the DE
bit) and will give a best effort to deliver this traffic, but may drop this traffic
upon congestion.
The total amount of traffic the router can transmit in any given sampling
period is the committed burst plus the excess burst (Bc plus Be).
To configure Frame Relay Traffic Shaping create a class with the map-
class command. Apply the map-class to an interface, subinterface or
DLCI using the class command (or the frame-relay class command,
depending on the config mode you are in).
For example, subinterfaces s1.2 and s1.3 do not have any shaping
configured and inherit the main interface shaping (configured for a 384K
PVC). S1.1 has shaping configured on the subinterface for a 512K PVC.
S1.4 has individual shaping configured on the DLCI for a 256K PVC:
interface Serial1
encapsulation frame-relay
frame-relay class 384K_VCs
frame-relay traffic-shaping
!
interface Serial1.1 point-to-point
frame-relay class 512K_VCs
frame-relay interface-dlci 101
!
interface Serial1.2 point-to-point
frame-relay interface-dlci 102
!
interface Serial1.3 point-to-point
frame-relay interface-dlci 103
!
interface Serial1.4 point-to-point
frame-relay interface-dlci 104
class 256K_VCs
!
map-class frame-relay 384K_VCs
frame-relay traffic-rate 384000 384000
frame-relay adaptive-shaping becn
!
map-class frame-relay 512K_VCs
frame-relay traffic-rate 512000 512000
frame-relay adaptive-shaping becn
!
map-class frame-relay 256K_VCs
frame-relay traffic-rate 256000 256000
frame-relay adaptive-shaping becn
!
The map-classes also let you configure many other characteristics, such
as custom queuing, priority queuing, weighted fair queuing, committed and
excess burst sizes, etc.
Overview
Here is a good overview of the QoS tools offered by Cisco IOS. Ive
included a few other, less commonly used QoS techniques for reference:
WFQ:
interface serial 0
fair-queue
CBWFQ:
class-map Sarasota-traffic
match access-group 101 or
match input-interface serial 1 or
match protocol ip
!
policy-map sarasota
class Sarasota-traffic
bandwidth 384 (in kb/s or you can specify percent bandwidth)
queue-limit 20
random-detect (if using WRED rather than the default, tail drop)
!
interface serial 4/1
service-policy output sarasota
CQ:
interface serial 1/1
custom-queue-list 1
!
queue-list 1 protocol ip 1 tcp 23 (TCP port 23 to queue 1)
queue-list 1 protocol ip 2 tcp 80 (TCP port 80 to queue 2)
queue-list 1 protocol ip 3 list 100 (ACL 100 to queue 3)
queue-list 1 queue 1 limit 20 (max 20 packets in queue 1)
queue-list 1 queue 2 byte-count 1000 (byte count 1000 in queue 2)
PQ:
priority-list 2 protocol ip high list 5 or
priority-list 2 interface ethernet 1/0 low or
priority-list 2 protocol ip medium udp 161
!
interface serial 1/0
priority-group 2
!
access-list 5 permit 192.168.1.0 0.0.0.255
LLQ:
class-map voice-enabled
match access-group 150
!
policy-map phoenix
class voice-enabled
priority 128
!
interface serial 1
service-policy output phoenix
!
access-list 150 permit udp any range 16384 32768 any
access-list 150 permit udp any any range 16384 32768
IP RTP Priority:
interface serial 0/1
ip rtp priority starting-port-number port-number-range bandwidth
CAR:
interface serial 0/1
rate-limit input 128000 10000 20000 conform-action transmit
exceed-action drop
Marking:
class-map telnet-class
match access-group name telnet
class-map web-class
match access-group name www
!
policy-map salem
class telnet-class
set ip precedence 5
class web-class
set ip dscp ef
!
interface serial 1/1
service-policy input salem
!
ip access-list extended telnet
permit tcp any any eq telnet
ip access-list extended www
permit tcp any any eq www
!
Policing:
class-map ftp
match access-group 101
!
policy-map limit-ftp
class ftp
police 256000 32000 32000 conform-action transmit
exceed-action drop violate-action drop
!
interface serial 0/0
service-policy input limit-ftp
!
access-list 101 permit tcp any any eq ftp-data
WRED:
interface serial 0
random-detect
FRED:
interface serial 1
random-detect
random-detect flow
random-detect flow count 16
random-detect flow average-depth-factor 8
!
map-class frame-relay 256K_VCs
frame-relay traffic-rate 256000 256000
frame-relay adaptive-shaping becn
!
Redistribution
Redistribution is the act of taking routes from one routing process (OSPF,
EIGRP, static routes, etc.) and placing them into another routing process.
By default, Cisco routers do not share routing information between routing
processes. For example, you could have a single router running EIGRP on
the 150.150.0.0 network and running RIP on the 160.160.0.0 network. By
default routers on the 150.150.0.0 network would not be able to
communicate with other routers on the 160.160.0.0 network. This is
because the router running both protocols does not automatically share
routing information between its routing processes between EIGRP and
RIP, in this case. (Users directly connected to that router would be able to
communicate with each other because the router connected to both
networks forwards packets between the 150.150.0.0 and 160.160.0.0
networks).
Metrics
When redistributing from one protocol to another, it is recommended to
specifically define the routing metric. This is because almost every routing
protocol has a metric that is not compatible with any other protocol. You
can do this in the redistribute command:
router rip
redistribute eigrp 1 metric 4
router rip
redistribute eigrp 1
default-metric 4
router eigrp 1
default-metric 1000 50 255 128 1514
or
router eigrp 1
redistribute bgp 65222 metric 1000 50 255 128 1514
Note: in EIGRP the metric values are (in order): BW (in Kbits/sec), delay,
reliability, loading and MTU. You can select almost any allowed values for
these they dont necessarily need to reflect the actual network.
When redistributing into RIP, make very sure you add the metric keyword,
such as metric 3 (or the default-metric command). This is critical
because RIP has such a low metric. Otherwise you may get the metric set
to 16 (unreachable), depending on the metric of the routing protocol
supplying the route.
Route-Maps
I recommend getting in the habit of using route-maps when you
redistribute routes. Route-maps can be used to set various route
attributes, but the most common use I found was simply for filtering
(controlling) what routes were actually redistributed. Often the CCIE Lab
will specifically state what routes are to be redistributed (rather than simply
all routes). A route-map can be used to meet this requirement. Even if the
lab does not specifically require this, it is a good idea to use a route-map
for filtering so that you know exactly what routes are being redistributed.
OSPF
When redistributing a protocol into OSPF, I usually use the subnets
keyword. This enables all routes to be redistributed into OSPF. If you omit
this keyword routes will be summarized to their natural classful mask
when they are redistributed into OSPF (which is probably not what you
want).
When redistributing OSPF into BGP by default BGP will only accept OSPF
internal (inter- and intra-area) routes not external type 1 or type 2
routes by default. To change this, use the match keyword:
Summarization Notes
When you redistribute, make sure that you dont violate a requirement of
summarization that the lab may require. For example, you may be
summarizing OSPF routes. You may also be required to run RIP on those
interfaces and redistribute RIP into OSPF. If you dont use a route-map to
control which routes get placed into OSPF, youll see the OSPF summary
and one external OSPF route for each of the RIP interfaces (from the
redistribution) and thus you wont really be summarizing correctly.
RIP
router3 router1
router2
172.16.10.0/24 172.16.254.0/24
172.16.8.0/24
OSPF Area 0
172.16.9.0/24
OSPF Area 1
router3 happens to be also running RIP then both of the routes listed
above go back into OSPF as external routes. Thus other OSPF routers
will have the OSPF area summary, but also the specific routes as OSPF
externals. To prevent this, filter (use a route-map) on the redistribution of
RIP into OSPF to prevent the above three routes from being redistributed
into OSPF.
RIP
Cisco supports RIP version 1 and version 2. There are several
differences, though the most important difference is V2 includes the
subnet mask of each route within the advertisement. Thus V2 is capable
of handling variable length subnet masks. You should be familiar with and
practice both as you may be required to use one or the other during the
Lab exam.
You can set the version of RIP for the entire routing process (every
interface):
router rip
version 2
interface Ethernet 0
ip rip receive version 1
ip rip send version 1
RIP version 1 is a classless protocol. This does not mean its lacks
elegance and grace (though many would argue that as well!), it means it
does not share subnet information in routing updates. That is, because no
subnet mask is provided for each route announced with RIP version 1, the
receiving router must make certain assumptions that are detailed in the
following section.
interface to that of the advertisement. If they are the same (i.e., both /24)
the advertisement is sent. If they are different, the router drops the
advertisement.
Route Maps
There are three primary uses for route-maps:
1. To control redistribution from one routing protocol to another
2. To use for policy routing
3. To control the way BGP updates are sent between BGP neighbors
You will typically need them during redistribution since you are usually
limiting what routes get redistributed. However they can also perform a
myriad of other functions: setting almost any BGP attribute, setting route
tags, setting various routing parameters (metric, metric-type, etc.), filtering
Tagging Routes
One of the things route maps can do is to tag routes. This is not
something you will use often, but it can be a handy tool in your toolbox.
Several protocols (RIP, OSPF) support tags. A tag is basically an arbitrary
value that you can apply to certain routes. Each route maintains its tag
from router to router. You may use this tag for things such as filtering or
adjusting metrics.
R1
hostname R1
172.16.1.1/24 ip route 10.10.10.0 255.255.255.0 172.16.1.2
ip route 10.10.11.0 255.255.255.0 172.16.1.2
RIP
192.168.11.0
R2 EIGRP R3
192.168.200.0
Figure 9: Using Route Tags
For example, in Figure 9: Using Route Tags assume R1 is running RIP
with R2. R1 runs RIP on its Ethernet interface and redistributes two static
routes into RIP. R1 can set tags on the routes it redistributes into RIP:
router rip
version 2
redistribute static metric 4 route-map staticTOrip
network 192.168.11.0
network 172.16.0.0
no auto-summary
!
route-map staticTOrip permit 10
match ip address prefix-list staticTOrip
set tag 2222
!
ip prefix-list staticTOrip seq 5 permit 10.10.10.0/24
ip prefix-list staticTOrip seq 10 permit 10.10.11.0/24
This is one way you can identify certain routes to other routers, such as
R2. For example, R2 can be configured to only redistribute into EIGRP
RIP routes that have tags set to 2222 (i.e., static routes on R1 that have
been redistributed, not the 172.16.1.0/24 pure RIP network):
router eigrp 1
redistribute rip route-map ripTOeigrp
network 192.168.200.0
default-metric 1000 10 255 100 1500
no auto-summary
!
route-map ripTOeigrp permit 10
match tag 2222
Routing (General)
Router “Network” Statements
When you specify a network via the network statement in eigrp, rip, etc.,
that triggers the software to perform two related but slightly different tasks:
1. Run that protocol on the interfaces included within the network
command (broadcast routing updates, look for neighbors, etc.)
2. To incorporate that network into the protocols database. This
means that this route will be advertised in updates.
However connected routes also include static routes that use a next-hop
interface (if you look via show ip route a static route with a next hop of an
interface shows as connected).
Passive Interface
There are times when you want a route advertised by a routing protocol,
but you dont want to actually run that protocol over the interface. For
example, lets say you have a router where Ethernet 0 has an address of
192.168.33.1/24. Lets say the router is running RIP. There will be cases
where you want to advertise the 192.168.33.0/24 network via RIP, yet you
dont want to actually run RIP on Ethernet 0. That is, in this case you dont
want to send and receive updates on this interface. In this case use the
network 192.168.33.0 command in RIP to include that network in your
routing, but also use passive-interface ethernet 0 command in RIP to
prevent updates from being sent out Ethernet 0.
Default Metrics
All routing protocols use metrics. Few, if any, routing protocols have
metrics that are compatible with the metrics of other routing protocols.
Thus when one protocol is redistributed into another, there is a problem
with metrics. There are two basic ways to solve this issue. One is to use
the metric keyword with the redistribute command. This sets the (new)
metric on all routes that are redistributed with that command. The other
solution is to use a default-metric command in the routing protocol that
will be accepting the redistributed routes. This command basically says if
redistributed routes do not have the metric set in the redistribute
command, use this metric.
Both solutions work well, though you need to use one or the other for
proper redistribution.
Split Horizon
Split Horizon prevents loops by blocking the sending of any updates on an
interface where the next hop for that route is located out that interface.
Split Horizon is set on a physical interface, but that setting also applies to
any subinterfaces of that interface (such as Frame Relay subinterfaces).
Many routing protocols use split horizon. RIP and EIGRP each use it.
Often split horizon is turned off on a physical Frame Relay interface. Often
on a remote router you will want to turn this on.
It is a good practice when using a protocol that runs split-horizon (IP RIP,
IP EIGRP, etc.), to manually set the split-horizon to the way you need it,
regardless of the default. For RIP use the (no) ip split-horizon
command. For EIGRP, use the (no) ip split-horizon eigrp 1
command.
The lab should provide colored pens and pencils. However these are
about the only thing you actually can bring into the lab with you (and even
with these you should probably check in advance). It might be a good idea
to bring good erasers, pens and sharpened, colored pencils. I dont
recommend bringing in stencils for your diagram (though one person did
the day I took my exam). You probably wont have that much time!
If you have a serial cross-over cable and you dont know which end is
DCE or DTE, connect each end to routers and do:
Usually in about the second line it will tell you which end of cable it is
(DCE or DTE):
interface Serial0
clock rate 1000000
Practice Speed
Knowing all the information required to pass the CCIE lab exam is only
part of what you need. Many people could pass the CCIE if they were
given more time. A critical skill you will need to pass the exam is speed.
The more speed you have on certain aspects of the exam, the more time
you will have to search the doc CD and think about the answer on other
portions of the exam. However you know certain scenarios are likely on
the exam. Repeatedly practice these tasks and time yourself. Begin each
speed drill with very basic router configs. Draw the relevant configuration
info (DLCIs, IP addresses, OSPF area numbers, etc.) on a piece of paper.
Then time yourself and begin configuring. Actually write down how long an
exercise took to complete. Repeat the exercise over several days and see
how much you can improve your time. Remember, accuracy is more
important than speed, but speed is a close second!
Here are some configs on which you should practice your speed:
Configure a hub-and-spoke Frame Relay network of 3 or 4 routers
with a mix of physical and subinterfaces
Configure three routers for BGP using the same ASN. Configure
one router to be a route reflector for the other two routers.
Configure three routers for OSPF. Use at least two OSPF areas,
change the OSPF network type on 1 network and have one OSPF
area summarize a couple of routes to the other OSPF area
Configure a routing protocol such as RIP or EIGRP. Configure it to
run on 2 or more interfaces of router 1, one of which connects to
router 2. On router 2 configure that same protocol on the interface
that connects to router 1. On router 2 also configure OSPF. On
router 2 redistribute the protocol into OSPF as metric-type 1, metric
of 50, include subnets and use a route-map to only allow 1 of the
routes from the other protocol to go into OSPF
Run BGP between two routers using different ASNs. Use a route-
map on one to set the MED and a community on advertised routes.
On the other router use a filter to only accept routes from that AS
and a route-map to only accept routes where the community is set
correctly.
IP Subnetting
It is important that you become familiar and fluent with IP subnetting. You
should have a solid understanding of subnet masks (255.255.255.192),
the number of subnet bits (/26) and the number of hosts allowed (64). At
the beginning of my exam I took a piece of extra paper and quickly jotted
down the table shown in Table 8: IP Subnetting Summary. Creating a
table like this prevents you from forgetting any information, like
accidentally skipping 255.255.255.248.
by 1 each row
Using this table I can quickly get the information I need, whether that is:
The correct subnet mask for an interface (such as
255.255.255.128)
The correct number of subnet bits (/25) for a prefix list
The correct number of hosts (128) in the event the exam requires
you to create a subnet that will support 120 hosts, for example
If necessary I also create a similar table going in the other direction. For
example, the first two lines of that table would be:
Access Lists
For access-lists:
BGP uses TCP port 179
RIPv1 uses UDP port 520 and dest. address 255.255.255.255
RIPv2 uses UDP port 520 and dest. address 224.0.0.9
OSPF uses protocol 89 and dest. address 224.0.0.5
EIGRP uses protocol 88 and dest. address 224.0.0.10
ESP (IPSec) uses protocol 50
AH (IPSec) uses protocol 51
GRE uses protocol 47
ISAKMP uses UDP port 500
For netbios host name access lists, permit * is the permit any.
For mac-address lists permit 0000.0000.0000 ffff.ffff.ffff is the
permit any.
At the end of an access-list place a deny any any log to send rejected
packets to the log. This will help determine what packets may be getting
blocked that are causing other things not to work (routing protocols,
tunnels, IPSec, etc.). Then do a show log to determine what packets are
being blocked.
Logging
In order to send all messages to the on-board logging buffer (including the
blocked packets mentioned, above) make sure you have the logging
buffered command in your configuration. This command allows you to
specify the size of the buffer, though Ive always found the default size to
be sufficient. Use the show log command to view the messages in the
buffer.
no login
privilege level 15
exec-timeout 120 0
line con 0
exec-timeout 120 0
privilege level 15
no login
line vty 0 4
exec-timeout 120 0
privilege level 15
no login
Terminal Editing
control-A brings you to the beginning of the line
control-E brings you to the end of the line
control-R repaints a line (handy if a console or debug message pops up)
control-U is the same as up arrow (in case that isnt working)
Tools
This section is devoted to tools you might use. No, I dont mean software
packages or ISDN simulators. Im referring to scenarios where you may be
testing or troubleshooting a problem and these tools mostly techniques
for doing certain things may come in handy.
router1 router4
interface Serial0 172.31.3.1/24
ip address 172.31.3.1 255.255.255.0
ip access-group 109 out
access-list 109 deny ip 172.31.203.0
0.0.0.255 any log OSPF 172.31.3.4/24
access-list 109 permit ip any any
172.31.4.1/24 area 0
OSPF
area 1
router3 172.31.4.3/24
router ospf 1
network 172.31.4.0 0.0.0.255 area 1
172.31.203.1/24
router3#ping 172.31.3.4
This tells us that (most likely) router4 does not have a route to get back to
the 172.31.203.0/24 network. Analyzing router3 shows that the
172.31.203.0 network was not included in any of the network statements
in the router ospf 1 configuration. Adding network 172.31.203.0
0.0.0.255 area 1 allows both the ping and the extended ping to complete
successfully, since now router4 can route the return pings back to the
172.31.203.0/24 network.
You might start with router4 and do a debug ip packet detail and notice
that the pings are not being received by router4. In this case youd
probably move onto router1 to determine whether the packets where
being received and sent by router1. As it turns out router1 has an ip
access-group 109 out configured on serial0 (connecting to router4), so
the packets were never making it to router4. If access-list 109 had a log
at the end of its deny statement, you would see a message like this on
router1:
router1#
5d19h: %SEC-6-IPACCESSLOGDP: list 109 denied icmp 172.31.203.1 ->
172.31.3.4 (0/0), 1 packet
router1#
This indicates that ACL 109 was blocking traffic from 172.31.203.1 to
172.31.3.4 (just as it was supposed to). Lets assume you didnt have the
log statement on access-list 109. One alternative is to issue the
command debug ip packet detail on router1. In this case router1
produces the output:
Although this does not indicate access-list 109 is the culprit, it clearly
indicates the packets in question are denied. Once that has been
determined it wont take you long to figure out why.
Another technique I use in the real world is to issue a ping with a very
high repeat count. I wont hesitate to ping a router interface 5000 times,
even in a production environment. The only exception to this is if the
destination is over a slow WAN link. Otherwise in a healthy network these
5000 pings should finish quickly with a 100% success rate. If you drop 10
or 20 packets, this probably indicates a problem.
router1#ping
Protocol [ip]:
Target IP address: 172.31.3.4
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
This command issues 7,325 pings: one ping for every size packet from 36
bytes to 1500 bytes (a total of 1,465 pings), repeated 5 times. If you dont
want to send 7,325 pings use a Repeat count of 1 this will just send one
ping packet of each size from 36 to 1500 bytes, a total of 1,465 pings.
Debug
Becoming familiar with the debug commands is invaluable to passing
and perhaps more importantly preparing for the CCIE. I recommend
experimenting with all different types of debugs to see what happens.
When you are brain-dead and tired of studying, turn on some debugs and
then do things to make the router react (reset BGP neighbors, drop serial
links, reboot other routers, turn off routing protocols, etc.)
Other Tools
Other tools that may come in useful are policy routing (manually
controlling the flow of packets based on rules), route maps, traceroutes (to
determine the path packets are taking through the network) and tunnels
(discussed below).
Tunnels
You define a tunnel by configuring a source and a destination IP address.
Then assign the appropriate characteristics to the tunnel (bridging, IP
addresses, IP routing, etc.)
If a router learns about its tunnel destination address over the tunnel it will
try to send the GRE (or whatever tunnel mode you are using) packets over
the tunnel itself... that won't work! Use a distribute list to prevent each
side from advertising it's tunnel source address to the other side over the
tunnel. For example, perhaps two routers have a tunnel between their
loopback addresses. Lets say they are using RIP to be able to route
between the loopbacks. If OSPF is enabled on the tunnel and the
loopbacks, OSPF will deliver updates (through the tunnel) about the
loopback networks. Since OSPF has a better admin distance than RIP, it
will supercede the RIP learned routes.
Yet now the router is attempting to maintain the tunnel (route packets to
the destination) through the tunnel but it cant maintain the tunnel if the
next hop is inside the tunnel!
In this case you will usually get a console message that the tunnel
interface is down due to a routing loop.
To actually run the macro, within Tera Term choose Control Macro,
then select the text file where you saved this (or your own) macro script.
timeout = 120
! If 2 minutes goes by and Tera Term is still waiting for a response,
! stop waiting and go ahead and continue with the macro (some
! problem has occurred).
directory = "C:\My Router configs\"
! This sets the default directory for storing the collected logs.
! Set this to whatever directory you will use for storing
! configs. Note: also set this a few lines down as well (where
! you see “directory”)
inputbox "Name of log file for this test:" "check out www.Callisma.com"
! This prompts the user to enter the filename of this log.
! Directory is not needed since the default directory (listed
! above) will be added. I usually use “.doc” extensions on the
! name (that I place in this box) so they will automatically be
! opened by Word.
strconcat directory inputstr
! This adds the directory onto the filename inputted by the user
! (thus making a complete filename).
logfilename = directory
! This sets the variable “logfilename” to be the name of the log
! file (includes directory and name).
directory = "C:\My Router configs\"
! This sets the default directory back to what you want it to be
! since the variable “directory” just got the actual filename
! crammed on the end of it a few lines back. You need to set the
! default directory here and in the second line of the macro
! (above).
:search_logfile
filesearch logfilename
if result=0 goto openlog
send "1"
sendln #13
wait "#"
! This sends the command “1” to the terminal server, which
! instructs it to connect to session 1. This is why it’s
! important to have the routers already connected in sessions 1-6
! (or however many routers you have) rather than session 1,3,4,6
! (which can happen if you disconnect sessions, etc.) It then
! sends a <Return> to the router (which is the “sendln #13”) to
! get it to display it’s prompt.
wait "#"
sendln "term length 42"
wait "#"
pause 1
! All commands are now issued to router1 (or whatever router is
! session 1 on the terminal server). After we have issued the
! commands, set the length of the screen to 42 (some people
! prefer 24).
sendln #30#$78
wait "#"
send "2"
sendln #13
wait "#"
! The #30#$78 sends a “Control-Shift-6 X” so that you can jump
! back to the terminal server. It then sends a 2 to connect to
! session 2 (which is the next router and the process starts all
! over again).
sendln #30#$78
wait "#"
send "3"
sendln #13
wait "#"
! Simply cut and paste the appropriate section based on the number of
! routers (and thus terminal server sessions) you have.
sendln #30#$78
wait "#"
send "4"
sendln #13
wait "#"
sendln #30#$78
wait "#"
send "5"
sendln #13
wait "#"
! Now go back to the terminal server router for the final time:
sendln #30#$78
wait "#"
logclose
Here is the macro without any added comments. Note that I used an alias of i representing show ip
routes on all my routers:
timeout = 120
directory = "C:\My Router configs\"
inputbox "Name of log file for this test:" "Callisma Rules"
strconcat directory inputstr
logfilename = directory
directory = "C:\My Router configs\"
:search_logfile
filesearch logfilename
if result=0 goto openlog
inputbox "Enter new filename:" "File already exists!"
strconcat directory inputstr
logfilename = directory
directory = "C:\My Router configs\"
goto search_logfile
:openlog
logopen logfilename 1 1
send "1"
sendln #13
wait "#"
sendln #30#$78
wait "#"
send "2"
sendln #13
wait "#"
sendln #30#$78
wait "#"
send "3"
sendln #13
wait "#"
sendln #30#$78
wait "#"
send "4"
sendln #13
wait "#"
sendln #30#$78
wait "#"
send "5"
sendln #13
wait "#"
sendln #30#$78
wait "#"
logclose
by
Robert Webber
CCIE 6922
Foreword
The CCIE test is demanding. However your mental state of mind can have
a dramatic outcome on your performance. Study the material well and be
confident that you will succeed. There is tremendous power in positive
thinking!
At some point a few days before you take the exam (when you are
relaxed) visualize passing the test. Visualize walking into the lab, seeing
the rack and getting handed the test. Visualize seeing several things (core
topics) on the test that you know cold. There will also be some topics you
are very unfamiliar with this is expected. Part of the CCIE testing is
seeing if you can react quickly. These are usually only worth a few points
and are not incredibly difficult. Don’t get psyched out by the exam!
Visualize getting your CCIE number and imagine what that will feel like.
Do this entire process several times; it will help reinforce your confidence.
Make up your mind that you are going to study hard, prepare well, execute
beautifully and pass the test!
3550
Etherchannel
VTP
vtp mode server
vtp domain lab
vtp password cisco
vtp version 2
Access Lists
show access-list
Aliases
alias exec i show ip route
BGP
router bgp 65000
no synchronization
neighbor 10.2.1.1 remote-as 65001
neighbor 10.2.1.1 distribute-list 3 in
neighbor 10.10.150.2 remote-as 65000
network 10.10.10.0 mask 255.255.255.0
network 150.150.0.0
no auto-summary
show ip bgp
show ip bgp neighbor
show ip bgp summary
debug ip bgp updates
This config uses the same name for the route-map and prefix list
(OuttoR4) for simplicity. It allows any route in the entire 172.17.0.0/16
class B range to be sent to BGP neighbor 10.10.10.10, but filters all
others.
Filtering by AS_PATH
Filtering by AS_PATH is important because you can filter all routes
originating from a given AS, any routes that have been through (transited)
an AS, etc. You will want to check out Regular Expressions later in this
document (page 134). There are two basic ways to filter by AS_PATH:
1. Use the neighbor filter-list command
2. Use a route-map
In either case you will define the AS_PATH you are looking for with the ip
as-path access-list command. Here is an example of the route-map
method. This config sends out to neighbor 172.16.40.5 any routes that
originated in AS 200 (but drops all other advertisements to that neighbor):
router bgp 65001
no synchronization
neighbor 172.16.40.5 remote-as 500
neighbor 172.16.40.5 route-map AS500filter out
!
ip as-path access-list 150 permit _200$
!
route-map AS500filter permit 10
match as-path 150
hostname r1
!
interface Loopback0
ip address 206.30.0.78 255.255.255.255
!
router bgp 4293
no synchronization
neighbor 208.172.50.4 remote-as 3561
neighbor 208.172.50.4 ebgp-multihop 255
neighbor 208.172.50.4 update-source Loopback0
!
ip route 208.172.50.4 255.255.255.255 Serial0/0
ip route 208.172.50.4 255.255.255.255 Serial0/1
hostname r2
!
interface Loopback0
ip address 208.172.50.4 255.255.255.255
!
router bgp 3561
no synchronization
neighbor 206.30.0.78 remote-as 4293
neighbor 206.30.0.78 ebgp-multihop 255
neighbor 206.30.0.78 update-source Loopback0
!
ip route 206.30.0.78 255.255.255.255 Serial0
ip route 206.30.0.78 255.255.255.255 Serial1
A Client (64.71.100.4):
router bgp 65001
no synchronization
neighbor 64.71.100.1 remote-as 65001
Aggregate Address
Here all four BGP networks are summarized into one aggregate and all
other advertisements (the actual /24 networks) are suppressed:
interface Loopback90
ip address 172.24.1.1 255.255.255.0
!
interface Loopback91
ip address 172.24.2.1 255.255.255.0
!
interface Loopback92
ip address 172.24.254.1 255.255.255.0
!
interface Loopback93
ip address 172.25.3.1 255.255.255.0
!
router bgp 65002
no synchronization
bgp log-neighbor-changes
network 172.24.1.0 mask 255.255.255.0
Bridging
Global
bridge 1 protocol ieee
bridge 1 priority 100
Interface
interface e0
bridge-group 1
bridge-group 1 path-cost 50
interface serial 1
bridge-group 1
show bridge
crypto key generate dss Router1 (often the name of the router)
show crypto key mypubkey dss (view public keys)
copy system:running-config nvram:startup-config (save private keys)
interface serial 0
crypto map mymap
If a router has more than one CET peer, simply add more sequences to
the crypto map, one for each remote peer.
DHCP
Often both when studying for the CCIE exam and even in real life
(imagine that something that is useful in both cases!), I find it useful to
make the router a DHCP server. For example my laptop is configured for
DHCP (for work, etc.), yet when I take my laptop home I do not have a
DHCP server to assign me an address. To configure your router as a
DHCP server, use the following:
If you need to assign your PC the exact same address every time, you can
create a specific reservation within DHCP based on your MAC address.
That configuration is:
! The "client-identifier" is the MAC address. The pool name can
! be anything – I gave it my name to remind me its my MAC
! address. Here I will always receive address 10.5.22.10.
!
ip dhcp pool robwebber
Note that only certain versions of IOS support the DHCP functionality. In
most versions of 12.1 you will need the T technology train version of
IOS.
EIGRP
interface serial0
ip summary-address eigrp 1 176.14.0.0 255.255.0.0
no ip split-horizon eigrp 1
router eigrp 1
no auto-summary
network 24.0.0.0
network 176.14.0.0
network 200.1.155.0
distribute-list 107 in serial0
debug ip routing
Firewalls
Context Based Access Control (CBAC)
ip inspect name myfirewall tcp
This works, however everyone who telnets to the router activates the
autocommand and gets disconnected not very useful! A better way is:
username bob password 0 cisco
username bob autocommand access-enable
username sue password 0 mypass
interface serial 0
ip address 172.17.1.1 255.255.255.0
ip access-group 101 in
!
access-list 101 permit tcp any host 172.17.1.1 eq telnet
access-list 101 dynamic dunno permit ip any any
!
line vty 0 4
password mypassword
login local
Frame Relay
Frame Relay Switching
frame-relay switching
interface s0
encapsulation frame-relay
frame-relay intf-type dce (nni if connecting to another frame switch)
frame-relay route 100 interface s1 150 (in-dlci out-interface out-
dlci)
clock rate 512000 (if using a DCE cable)
Frame Relay
Interface s0
Ip address 172.24.1.1. 255.255.255.0
encapsulation frame-relay
frame-relay map ip 172.24.1.2 330 broadcast
frame-relay map ip 172.24.1.3 340 broadcast
Or
interface s0
no ip address
encapsulation frame-relay
Or
interface s0
no ip address
encapsulation frame-relay
HSRP
This creates two HSRP groups. Router A is primary for group 1; Router B
is primary for group 2. Both primary routers are tracking their serial 0
interfaces. Should either routers serial 0 fail, it will drop to priority 95. The
other router will have (the default) priority of 100 and thus will become
primary for that group as well. Group 1 also uses authentication.
Router A:
standby 1 ip 172.24.1.1
standby 1 priority 105
standby 1 preempt (good idea to use this!)
standby 1 authentication cisco
standby 1 track serial 0
standby 2 ip 172.24.1.2
standby 2 preempt
Router B:
standby 1 ip 172.24.1.1
standby 1 preempt (good idea to use this!)
standby 1 authentication cisco
standby 2 ip 172.24.1.2
standby 2 priority 105
standby 2 preempt
standby 2 track serial 0
show standby
ISAKMP
Note: ISAKMP uses UDP port number 500 (ACLs).
IPSEC
Note: The IPSec ESP and AH protocols use IP protocol numbers 50 and 51
(ACLs).
If a router has more than one IPSec peer, simply add more sequences to
the crypto map, one for each remote peer.
network 172.16.0.0
redistribute mobile
default-metric 80 70 60 70 100
access-list 2 deny 172.16.5.0 0.0.0.255
access-list 2 deny 172.16.12.16 0.0.0.0
access-list 2 permit 172.16.0.0 0.0.255.255
Multicast
IGMP
Router(config)#interface Ethernet 0
Router(config-if)#ip igmp join-group 224.1.2.3
CGMP
Router(config)#interface Ethernet 0
Router(config-if)#ip cgmp
show ip mroute
show ip pim neighbor
show ip pim interface
show ip pim rp
show ip igmp groups
debug ip pim
Dynamic:
NTP
Clock and date commands
r1(config)# clock timezone EST -5
r1(config)# clock summer-time EDT recurring
r1(config)# ntp update-calendar (if the machine has a permanent calendar)
r2# calendar set 10:05:00 4 April 2000 (if the machine has a permanent calendar)
r2(config)# clock calendar-valid (if the machine has a permanent calendar)
r2# clock set 10:05:00 4 April 2001 (only if the machine doesnt have a permanent
calendar)
Client:
ntp server 192.168.254.1
Client:
interface loopback 0
ip address 172.16.24.1 255.255.255.0
ntp source Loopback0
ntp server 192.168.254.1
Clients:
ntp authenticate
ntp authentication-key 1 md5 iguana
ntp trusted-key 1
ntp server 192.168.38.8 key 1
show clock
show ntp association
show ntp status
OSPF
Basic
interface serial 0
ip ospf network point-to-multipoint
ip ospf priority 10
ip ospf cost 150
router ospf 100
network 10.12.140.128 0.0.0.127 area 0
network 150.150.0.0 0.0.255.255 area 1
network 192.168.88.0 0.0.0.255 area 2
show ip ospf
show ip ospf neighbor
show ip ospf interface
debug ip ospf adjacencies
debug ip routing
Summarization
router ospf 5
network 10.4.0.0 0.0.0.255 area 0
network 10.10.140.128 0.0.0.127 area 4
Authentication – MD5
router ospf 1
area 2 authentication message-digest
network 192.168.1.0 0.0.0.255 area 2
!
interface ethernet 0
ip address 192.168.1.1 255.255.255.0
ip ospf message-digest-key 1 md5 password
Note: passwords do not need to be the same for an entire area. They only
need to be the same for a network (subnet) that is, between neighboring
routers. Obviously, keeping the password the same throughout an area is
advisable whenever possible. Also, the command ip ospf
authentication can be used to override (on an interface basis) the
authentication set for an area, though this is extremely rare.
interface Serial9/2
ip address 10.0.1.3 255.255.255.0
encapsulation frame-relay
frame-relay local-dlci 301
frame-relay map ip 10.0.1.1 300
!
router ospf 1
network 10.0.1.0 0.0.0.255 area 0
Virtual Link
interface Loopback0
ip address 10.12.12.1 255.255.255.0
!
interface Serial1
ip address 192.168.2.1 255.255.255.0
!
router ospf 101
network 10.12.12.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 1
area 1 virtual-link 172.17.101.1
interface Loopback0
ip address 172.17.101.1 255.255.255.0
!
interface Serial1
ip address 192.168.2.2 255.255.255.0
!
router ospf 103
network 172.17.101.0 0.0.0.255 area 1
network 192.168.2.0 0.0.0.255 area 1
network 192.168.70.0 0.0.0.255 area 2
area 1 virtual-link 10.12.12.1
Password Recovery
Although you wont (hopefully!) need this on the exam, I have included this
section in the event you buy a used router and do not know the password.
2500/4000
Reboot router.
Type BREAK (control-shift-6 b on Cisco terminal server, control-F6-break
on Hyperterm, Alt-b on TeraTerm).
Type o/r 0x2142 at the > prompt (to boot from flash).
Type I at the > prompt to reboot the router.
Answer no to all set-up questions.
Type enable at the Router> prompt.
Type copy start run (brings in old config) Watch this!! Not the other way
around!!
Type config term, then either enable secret <password>. or enable
password <password>.
Type config term, then config-register 0x2102.
Verify the config now in running-config is correct.
Type copy run start.
(Type reload. optional)
2600/3600/4500
Reboot router.
Type BREAK (control-shift-6 b on Cisco terminal server, control-F6-break
on Hyperterm).
Type confreg 0x2142 at the "ROMMON>" prompt (to boot from flash).
Type reset at the "ROMMON>" prompt to reboot the router.
Answer no to all set-up questions.
Type enable at the Router> prompt.
Type copy start run (brings in old config) Watch this!! Not the other way
around!!
Type config term, then either enable secret <password>. or enable
password <password>.
Type config term, then config-register 0x2102.
Verify the config now in running-config is correct.
Type copy run start.
(Type reload. optional)
To recover a lost password on Catalyst 1200, Catalyst 5000, and all concentrators:
5. When you see the password prompt press Enter (null password for 30
seconds).
6. Change the password:
Priority Queuing
Bruce Caslow describes priority queuing as a facist queuing strategy
since it is very strict in its approach. Higher queues get priority, period.
Given enough high priority traffic, other queues can go for days without
tranmitting.
priority-list 1 protocol dlsw high
priority-list 1 protocol ip high tcp 23
priority-list 1 protocol ipx medium list 900
access-list 900 permit ncp any 451 any 451
interface serial 0
priority-group 1
Custom Queuing
Custom queuing is fairer since it can allocate percentages of bandwidth to
given queues. Typically this is done by assigning byte counts to queues.
The default byte count for each queue is 1500 bytes. Thus to give a queue
more bandwidth than other queues, assign it more than1500 bytes. There
can be up to 16 queues, but only as many as are configured will be active.
queue-list 9 protocol dlsw 1
queue-list 9 protocol ip 1 tcp 23
queue-list 9 protocol ipx 2 list 900
queue-list 9 queue 1 byte-count 3000
queue-list 9 default 4
access-list 900 permit ncp any 451 any 451
interface serial 1
custom-queue-list 9
Frame Relay
interface serial 0.0
ip addr 172.16.1.1 255.255.255.0
encapsulation frame-relay
frame-relay traffic-shaping
frame-relay interface-dlci 102
class myclass
Redistribution
Basic
router ospf 1
redistribute rip metric 100 metric-type 1 route-map rob subnets
router eigrp 1
redistribute bgp 65000 metric 1000 10 100 100 1500
OSPF Example
This example shows redistributing all routes from BGP 65001 into OSPF
1. Routes are set as OSPF external type-1 routes with an initial metric of
10:
router ospf 1
redistribute bgp 65001 metric 10 metric-type 1 subnets
network 192.168.200.0 0.0.0.255 area 0
router ospf 1
redistribute static metric 10 subnets route-map staticTOospf
network 192.168.50.0 0.0.0.255 area 0
!
ip route 10.179.0.0 255.255.0.0 10.200.1.2
ip route 10.180.0.0 255.255.0.0 10.200.1.2
!
ip prefix-list 10-179-0-0 seq 5 permit 10.179.0.0/16
ip prefix-list 10-180-0-0 seq 5 permit 10.180.0.0/16
!
route-map staticTOospf permit 20
match ip address prefix-list 10-179-0-0
set metric-type type-1
!
route-map staticTOospf permit 30
match ip address prefix-list 10-180-0-0
set metric-type type-2
!
BGP Example
This example shows redistributing all routes from IGRP 1 into BGP 65001.
Routes are set with a BGP community value of 11111:22222:
This example shows redistributing OSPF routes into BGP. By default only
internal OSPF routes are redistributed into BGP. The match keyword
changes this behavior. By specifying "match external 1" only external type
1 OSPF routes are redistributed into BGP (even internal OSPF routes are
not redistributed):
Regular Expressions
RIP
interface Ethernet 0
neighbor 10.150.150.1
ip rip send version 1
ip rip receive version 1
!
router rip
version 2
no auto-summary ! only applies if version 2 is used
network 10.0.0.0
network 131.15.0.0
network 207.244.11.0
distribute-list 105 in ethernet0
default-metric 5
offset-list 10 in 4
!
access-list 10 permit 10.1.99.0 0.0.0.255
The default-metric commands sets the RIP metric (hop count) for all
routes redistributed into RIP.
The offset-list increases the metric (from what was learned) by 4 for all
routes that match access-list 10. This command also applies to IGRP
and EIGRP.
The ip rip send version and ip rip receive version override (on an
interface basis) the version of RIP defined by the version router
command.
debug ip rip
debug ip routing
Route Maps
To enable the router to policy route for locally generated traffic (pings,
etc.):
ip local policy route-map mymap
Switches
Catalyst 5000
show cam
show port 4/15
show port status
show vlan
show vlan 2
show port
show vlan all
line 1 8
no exec
transport input all
Important notes:
Type control-shift-6 x to send an escape sequence to the term server
that will bring you back to the terminal server prompt.
Type control-shift-6 b to send a break to a router that is being
accessed via the terminal server (handy for password recovery).
To send an escape sequence to a router that is being accessed via the
terminal server, type control-shift-6 control-shift-6. This prevents
you from getting tossed all the way back to the term server. Very handy for
interrupting pings or traceroutes that are not completing.
You may even have to type control-shift-6 four times. For example, if
you are using a term server to access a router, then that router is telnetted
into another router. This requires control-shift-6 four times to escape.
Trunking
ISL:
On the Catalyst 5000:
802.1Q:
On the Catalyst 5000:
Tunnels
interface tunnel 0
tunnel source 10.100.5.1
tunnel destination 10.10.10.10
tunnel mode gre ip (optional – defaults to gre)
etc.