đ Cisco IOS Command Cheatsheet¶
𧱠1. INITIAL SETUP (Switches & Routers)¶
| Mode | Command | Description | Notes |
|---|---|---|---|
| Enable Mode | configure terminal |
Enter global config mode | Must be in enable (#) first |
| Config Mode | hostname SW1 |
Set device hostname | Shows in prompt |
| Config Mode | no ip domain-lookup |
Disable DNS on typos | Speeds up error handling |
| Config Mode | service password-encryption |
Encrypts all plaintext passwords | Basic security |
| Config Mode | banner motd #No Access# |
Set login banner | Required for compliance |
| Privileged (Enable) Mode | clock set HH:MM:SS DD MONTH YYYY |
Set the system clock | Useful for log timestamps |
| Privileged (Enable) Mode | copy running-config startup-config |
Save config to NVRAM | Save after every change |
đ 2. BASIC SECURITY CONFIGURATION¶
| Mode | Command | Description | Notes |
|---|---|---|---|
| Config Mode | enable secret <password> |
Set encrypted enable password | Stronger than enable password |
| Config Mode â Line Console | line console 0 |
Enter console line config | Use login + password inside |
| Line Config Mode | password ciscologin |
Set console password and enable login | Prevents unauthorized CLI access |
| Config Mode â Line VTY | line vty 0 4 |
VTY lines for SSH/Telnet | 0â4 = five concurrent sessions |
| Line Config Mode | password ciscologin |
Set remote access password | Used if no local auth |
| Config Mode | username admin password cisco |
Create local user account | Needed for SSH login |
| Config Mode | ip domain-name lab.local |
Required for SSH key gen | Any domain works |
| Config Mode | crypto key generate rsa |
Create SSH keys | Enables SSH |
| Line Config Mode | transport input ssh |
Allow SSH only | Donât allow Telnet in prod |
đ 3. INTERFACE & IP CONFIGURATION¶
| Mode | Command | Description | Notes |
|---|---|---|---|
| Config Mode â Interface | interface g0/0 |
Select interface | Replace with correct ID |
| Interface Mode | ip address 192.168.1.1 255.255.255.0 |
Assign IP | Needed on routers |
| Interface Mode | no shutdown |
Bring interface up | Always required! |
| Interface Mode | description Link to ISP |
Add comment | Best practice |
| Enable Mode | show ip interface brief |
Verify interface IPs and status | Useful summary |
đïž 4. SWITCHING & VLAN CONFIGURATION¶
| Mode | Command | Description | Notes |
|---|---|---|---|
| Config Mode | vlan 10 |
Create VLAN | VLAN ID must be unique |
| VLAN Config Mode | name Sales |
Name the VLAN | Optional but helpful |
| Config Mode â Interface | interface fa0/1 |
Select access port | One host per access port |
| Interface Mode | switchport mode access |
Set as access port | Required before assigning VLAN |
| Interface Mode | switchport access vlan 10 |
Assign to VLAN | VLAN must exist first |
| Interface Mode | switchport mode trunk |
Make interface a trunk | Use between switches |
| Interface Mode | switchport trunk allowed vlan 10,20 |
Limit trunk VLANs | Reduce unnecessary traffic |
| Enable Mode | show vlan brief |
Show VLANs and ports | Confirm access port assignments |
| Enable Mode | show mac address-table |
MAC learning table | Useful for troubleshooting |
đŁïž 5. ROUTING CONFIGURATION¶
Static Routing¶
| Mode | Command | Description | Notes |
|---|---|---|---|
| Config Mode | ip route 10.0.0.0 255.255.255.0 192.168.1.2 |
Static route | For simple environments |
OSPF¶
| Mode | Command | Description | Notes |
|---|---|---|---|
| Config Mode | router ospf 1 |
Enable OSPF process | Pick a unique process ID |
| OSPF Config Mode | network 192.168.1.0 0.0.0.255 area 0 |
Advertise a network | Wildcard mask required |
đ§ 6. VERIFICATION & TROUBLESHOOTING¶
| Mode | Command | Description | Notes |
|---|---|---|---|
| Enable Mode | show running-config |
Current active config | Always check before saving |
| Enable Mode | show startup-config |
Saved config in NVRAM | After reboot, this loads |
| Enable Mode | show interfaces |
Detailed interface stats | CRCs, drops, duplex info |
| Enable Mode | show ip interface brief |
IPs and statuses | Excellent quick check |
| Enable Mode | show cdp neighbors |
Discover adjacent Cisco devices | Helpful in topologies |
| Enable Mode | show lldp neighbors |
Discover non-Cisco devices | Enable with lldp run first |
| User or Enable Mode | ping <IP> |
Check reachability | Basic Layer 3 test |
| User or Enable Mode | traceroute <IP> |
Trace path to host | Shows hops and delays |
| Enable Mode | show ip route |
Routing table | Look for S, O, or C routes |
đœ 7. FILES, SAVING, AND RESETTING¶
| Mode | Command | Description | Notes |
|---|---|---|---|
| Enable Mode | copy running-config startup-config |
Save to NVRAM | Donât forget this! |
| Enable Mode | erase startup-config |
Wipe saved config | Use with caution |
| Enable Mode | reload |
Reboot the device | May prompt to save running config |
đ FINAL NOTES ON MODES¶
| Mode | Prompt | Description |
|---|---|---|
| User Exec | > |
Limited view-only commands |
| Privileged Exec (Enable) | # |
Can view and copy configs |
| Global Config | (config)# |
Where most setup is done |
| Interface Config | (config-if)# |
For individual ports/interfaces |
| Line Config | (config-line)# |
Console, VTY lines, etc. |
| Routing Protocol Config | (config-router)# |
For OSPF, EIGRP, etc. |
IPv6¶
1. Global Unicast Addresses (GUAs)¶
- Purpose: Publicly routable (equivalent to IPv4 public addresses).
- Prefix:
2000::/3(first three bits001). -
Structure:
-
Global Routing Prefix: typically 48âŻbits, assigned by your ISP.
- Subnet ID: 16âŻbits for internal subnetting.
- Interface ID: 64âŻbits (often derived via EUIâ64).
- Example:
2001:db8:85a3:42::7334
2. LinkâLocal Addresses¶
- Purpose: Used for NDP (Neighbor Discovery), router advertisements, and onâlink communications only.
- Standard Prefix:
FE80::/10(per RFCâŻ4291), but in practice every linkâlocal is configured asFE80::/64. - Assignment: Autoâgenerated by the hostâno DHCPv6 needed.
- Interface ID: Usually formed via EUIâ64 (from the MAC) or randomly.
- Zone Index: When testing on hosts you append the interface (e.g.
fe80::1%GigabitEthernet0/1). - Example:
fe80::c800:ff:feB4:3a9f
3. Unique Local Addresses (ULAs)¶
- Purpose: Privateâuse (similar to IPv4 RFCâŻ1918).
- Prefix:
FC00::/7; in practiceFD00::/8(the âLâ bit set to 1). -
Layout:
-
Global ID: 40âŻrandom bits
- Subnet ID: 16âŻbits
- Interface ID: 64âŻbits
- Scope: Routable within an organization but not on the public Internet.
- Example:
fd12:3456:789a:1::1
4. Multicast Addresses¶
- Purpose: Oneâtoâmany traffic.
- Prefix:
FF00::/8. - Format:
|8 bits|4 flags|4 scope|112âbit group ID|
|11111111| Flgs | Scope | Group ID |
- Flags: e.g. Pâbit (permanent vs. transient).
-
Scope values:
1â nodeâlocal2â linkâlocal5â siteâlocal8â organizationâwideEâ global- WellâKnown Examples:
-
ff02::1â allânodes (linkâlocal) ff02::2â allârouters (linkâlocal)ff05::2â allârouters (siteâlocal)
5. Anycast Addresses¶
- Purpose: Packets delivered to the ânearestâ member among a group.
- How to Create: Assign the same unicast address (GUA or ULA) on multiple devices in the same subnet.
- Behavior: Routers automatically forward to the topologically closest instance.
6. IPv6 Notation & Abbreviation¶
- Leading zeros in each 16âbit block must be omitted:
2001:0db8:0000:0000:0000:0000:0000:0001
â 2001:db8:0:0:0:0:0:1
:::
2001:db8:0:0:0:0:0:1
â 2001:db8::1
:: more than once in a single address.
Address Configuration¶
IPv6 hosts can obtain addresses in several ways. On the CCNA youâll need to understand manual (static) assignment, SLAAC, EUIâ64 interfaceâID formation, and DHCPv6 (both stateful and stateless).
A. Manual (Static) Configuration¶
- Enable IPv6 routing on the router (global config):
Router(config)# ipv6 unicast-routing
Router(config)# interface GigabitEthernet0/0
Router(config-if)# ipv6 address 2001:db8:1:1::1/64
Router(config-if)# ipv6 address FE80::1 link-local
Tip: A missing
/prefix-lengthor theipv6 unicast-routingcommand are the most common âit doesnât workâ culprits.
B. SLAAC (Stateless Address Auto Configuration)¶
-
How it works:
-
Host generates a linkâlocal address (
FE80::/64) via EUIâ64 or random. - Host sends a Router Solicitation (RS) multicast (
FF02::2). - Router replies with a Router Advertisement (RA) (
FF02::1) containing one or more Prefix Information Options (PIOs). -
If the RAâs Mâbit is 0 (do not use DHCPv6) and the Oâbit is 0, the host uses the advertised prefix + its interfaceâID to form its global address.
-
RA flags in the PIO:
-
M (Managed) bit = 1 â use DHCPv6 for address (stateful).
-
O (Other) bit = 1 â use DHCPv6 for additional info (DNS, etc.), but SLAAC for address.
-
Verification commands on Cisco:
show ipv6 interface GigabitEthernet0/0
show ipv6 neighbors
show ipv6 route
C. EUIâ64 InterfaceâID Formation¶
When SLAAC uses EUIâ64, a 48âbit MAC (e.g. 00â0Câ29â3Eâ5Bâ7C) is transformed:
- Split the MAC into two 24âbit halves:
00:0C:29 | 3E:5B:7C
FF:FE in the middle:
00:0C:29:FF:FE:3E:5B:7C
- Original first byte 0x00 â binaryâŻ00000000
- Invert bitâŻ7 â binaryâŻ00000010 â 0x02
- Result â
02:0C:29:FF:FE:3E:5B:7C - InterfaceâID = that 64âbit value, e.g.:
2001:db8:1:1:02c:29ff:fe3e:5b7c/64
Note: Many modern OSes use âprivacy extensionsâ to randomize the IID instead of EUIâ64.
D. DHCPv6¶
1. Stateful DHCPv6¶
- Clients request addresses from a DHCPv6 server (Mâbit =âŻ1).
- DHCPv6 message flow:
Solicit â Advertise â Request â Reply
2. Stateless DHCPv6¶
- SLAAC builds the address (Mâbit =âŻ0), but Oâbit =âŻ1 in RA signals the host to get DNS and other options from DHCPv6.
- Message flow for option retrieval:
Informationârequest â Reply
3. Cisco DHCPv6 Server Example¶
ipv6 dhcp pool MYPOOL
address prefix 2001:db8:1:1::/64
dns-server 2001:db8:ffff::1
!
interface GigabitEthernet0/0
ipv6 address FE80::1 link-local
ipv6 nd prefix 2001:db8:1:1::/64 3600 1800
ipv6 dhcp server MYPOOL
These cover all the CCNAâlevel address configuration methods for IPv6. Next up, would you like to explore Neighbor Discovery Protocol (NDP) in depth (NS/NA, DAD, RS/RA)?
Neighbor Discovery Protocol (NDP)¶
NDP replaces ARP, ICMP router redirects, and more from IPv4. On the CCNA exam, youâll need to know the core packet types, their purposes, and key behaviors.
A. NDP Packet Types¶
| Type | Decimal Code | Purpose |
|---|---|---|
| RS | 133 | Router Solicitation â host asks for RAs |
| RA | 134 | Router Advertisement â router advertises prefix & flags |
| NS | 135 | Neighbor Solicitation â like ARP request |
| NA | 136 | Neighbor Advertisement â like ARP reply |
| Redirect | 137 | Redirect a host to a better next hop |
B. Router Solicitation (RS) & Advertisement (RA)¶
-
RS (TypeâŻ133)
-
Sent by hosts to
FF02::2(allârouters multicast) at boot or when interface comes up. - Hop Limit = 255 (ensures onâlink source).
- No payload other than NDP header.
-
RA (TypeâŻ134)
-
Sent by routers periodically (\~200âŻsec default) or in response to RS.
-
Destination:
- Unicast to the solicitÂing host, or
FF02::1(allânodes) if periodic.-
Key fields in the Prefix Information Option (PIO):
-
Prefix (64âŻbits) and prefix length.
- Mâbit (Managed) â DHCPv6 for address.
- Oâbit (Other) â DHCPv6 for other info.
- Valid Lifetime, Preferred Lifetime for SLAAC.
Verification Commands
show ipv6 interface GigabitEthernet0/0
# shows current RAs received, flags, lifetimes
show ipv6 route
# prefixes learned via RAs (marked 'R')
C. Neighbor Solicitation (NS) & Advertisement (NA)¶
-
Solicited-Node Multicast
-
Each IPv6 address has a solicited-node group:
FF02:0:0:0:0:1:FFXX:XXXXwhere
XX:XXXX= last 24âŻbits of the IPv6 address. * NS (TypeâŻ135) -
Used for:
- Address resolution (like ARP): host asks âWho has X? Tell me.â
- Duplicate Address Detection (DAD): host probes its own tentative address.
- Sent to the solicitedânode multicast of the target.
-
Fields:
-
Target Address = the IPv6 address being resolved or probed.
- Source LinkâLayer Address option (when not DAD) carries senderâs MAC.
- NA (TypeâŻ136)
-
Response to NS for address resolution.
- Or sent unsolicited with the Override flag to update caches.
-
Fields:
- Target Address = the address being announced.
- Target LinkâLayer Address option with the responderâs MAC.
-
Flags:
-
Solicited (S) = 1 when replying to an NS.
- Override (O) = 1 to overwrite stale cache entries.
Verification Commands
show ipv6 neighbors
# neighbor table with LinkâLayer addresses and state
D. Duplicate Address Detection (DAD)¶
- Purpose: Ensure uniqueness of an address before binding.
-
Mechanism:
-
Host assigns the tentative address (IID = EUIâ64 or random).
- Sends an NS with Source Address =
::and Target Address = tentative. -
Waits for NA replies.
- No reply within the DAD timeout â address is unique, assign it.
- If an NA is received â collision detected â interface goes into error.
- Exam Tip: DAD uses an NS packet; look for
src=:: dst=solicited-node-multicast(target).
E. Key Takeaways¶
-
Multicast addresses for NDP:
-
RS â
FF02::2 - RA â
FF02::1or unicast - NS â solicitedânode multicast
FF02::1:FFxx:xxxx - NA â unicast or multicast to
FF02::1 - Hop Limit = 255 for all NDP messagesâto verify onâlink.
- RA flags: Mâbit, Oâbit, Valid/Preferred lifetimes.
- NS/NA flags: S (Solicited), O (Override).
- DAD = NS with
src=::, target = tentative address.
â--
NDP vs ARP¶
flowchart TD
subgraph ARP["IPv4 ARP"]
A1["Host A: knows IPv4 of Host B<br>wants MAC"] --> A2["Broadcast ARP Request<br>Who has IP B? Tell A"]
A2 --> A3["All hosts on LAN receive request"]
A3 -- If IP matches B --> A4["Host B unicasts ARP Reply to A<br>MAC = Bâs MAC"]
A4 --> A5["Host A updates ARP cache<br>sends frame to MAC"]
end
subgraph NDP["IPv6 NDP"]
B1["Host A: knows IPv6 of Host B<br>wants L2 address"] --> B2["Multicast NS to solicited-node<br>Who has IPv6 B? Tell A"]
B2 --> B3["All hosts listen on solicited-node group"]
B3 -- If IPv6 matches B --> B4["Host B unicasts NA to A<br>L2 = Bâs MAC<br>flags S=1, O=1"]
B4 --> B5["Host A updates neighbor cache<br>sends frame to MAC"]
end
style ARP fill:#000000,stroke:#ffffff,stroke-width:2px
style NDP fill:#000000,stroke:#dddddd,stroke-width:2px
IPv6 Routing¶
1. Enabling IPv6 Routing¶
On Cisco routers, IPv6 routing is off by default. Before any IPv6 routes will work, you must enable it globally:
Router(config)# ipv6 unicast-routing
Without this, static routes and dynamic protocols will be ignored.
2. Static Routing with ipv6 route¶
A. PointâtoâPoint Static Route¶
Router(config)# ipv6 route 2001:DB8:1:0::/64 2001:DB8:2:0::2
- Destination prefix:
2001:DB8:1:0::/64 - Nextâhop (must be reachable linkâlocal or global): here
2001:DB8:2:0::2
B. Using a LinkâLocal NextâHop¶
Router(config)# ipv6 route 2001:DB8:3:0::/64 FE80::2 GigabitEthernet0/1
- If you specify a linkâlocal (
FE80::2), you must include the outgoing interface.
C. Default Route¶
Router(config)# ipv6 route ::/0 2001:DB8:2:0::2
::/0matches all destinations not in the routing table.
D. Administrative Distance¶
- Static: 1 (or 254 if you add the
distancekeyword) - Learned via OSPFv3: 110
3. Understanding the IPv6 Routing Table (show ipv6 route)¶
Example output snippet:
IPv6 Route Table - 5 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
O - OSPFv3, IA - OSPFv3 Inter-area, E1/E2 - OSPFv3 External
O 2001:DB8:10:0::/64 [110/20]
via FE80::1, GigabitEthernet0/0
C 2001:DB8:20:0::/64 [0/0]
via GigabitEthernet0/1
S ::/0 [1/0]
via FE80::2, GigabitEthernet0/2
L FE80::1/128 [0/0] via GigabitEthernet0/0
- Codes tell you how the route was learned.
- Metric is in brackets
[AD/Metric]. - Nextâhop may be linkâlocal (FE80::) or global.
Key codes to know:
C= directly ConnectedL= Local address of router interfaceS= Static routeO= OSPFv3 intraâareaIA= OSPFv3 interâareaE1/E2= OSPFv3 external types
4. OSPFv3 Fundamentals¶
IPv6âs version of OSPF has a few differences from OSPFv2:
A. Enabling OSPFv3¶
Router(config)# ipv6 router ospf 1
Router(configârtr)# router-id 1.1.1.1
- Process ID (
1) is locally significant. - Router ID must be set manually (32âbit IPv4 format).
B. Enabling on Interfaces (no network statements)¶
Router(config)# interface GigabitEthernet0/0
Router(configâif)# ipv6 ospf 1 area 0
- OSPFv3 is enabled per interface, not via broad
networkstatements.
C. LinkâLocal NextâHop & Neighbors¶
- OSPFv3 uses IPv6 linkâlocal addresses for adjacency and nextâhop resolution.
- Verify adjacencies:
show ipv6 ospf neighbor
show ipv6 ospf interface
D. Area Types & LSAs¶
- LSA Types are similar: Router LSAs, Network LSAs, Summary LSAs, External LSAs.
- Be aware of stub areas, totally stubby, and NSSA (exam typically only mentions âstubâ).
5. CCNAâLevel Verification Commands¶
- Global status
show ipv6 protocols
show ipv6 route
show ipv6 ospf neighbor
show ipv6 ospf interface GigabitEthernet0/0
traceroute ipv6 2001:DB8:1:0::1
ping ipv6 2001:DB8:1:0::1
Know the Administrative Cost for common IPv6 Routes
| Route Source | Administrative Distance |
|---|---|
| Connected interface | 0 |
| Static route | 1 |
| eBGP | 20 |
| Internal EIGRP | 90 |
| IGRP | 100 |
| OSPFv3 | 110 |
| ISâIS | 115 |
| RIPng | 120 |
| External EIGRP | 170 |
| Unknown/unusable routes | 255 |
Tip:
- When two routes to the same prefix exist, the router picks the one with the lowest AD.
- You do not calculate these valuesâtheyâre just memorized defaults.
- Occasionally you may see or configure a âfloatingâ static route by setting a higher AD, but you still pick from known values.
ICMPv6: Informational & Error Messages¶
ICMPv6 serves two primary roles: Neighbor Discovery (covered in NDP) and error/reporting for IPv6 packet delivery. On the CCNA youâll be expected to recognize common message types and their purposes.
A. NDP Message Types (ICMPv6 Codes)¶
| Type | Code | Name | Purpose |
|---|---|---|---|
| 133 | 0 | Router Solicitation (RS) | Host â allârouters multicast to solicit RAs |
| 134 | 0 | Router Advertisement (RA) | Router â hosts (or unicast) to advertise prefixes & flags |
| 135 | 0 | Neighbor Solicitation (NS) | Address resolution & Duplicate Address Detection |
| 136 | 0 | Neighbor Advertisement (NA) | Reply to NS; unsolicited updates |
| 137 | 0 | Redirect | Informs host of a better firstâhop next hop |
Note: The Code field for all NDP messages is always zero.
B. ICMPv6 Error Messages¶
| Type | Code | Name | Description |
|---|---|---|---|
| 1 | 0 | Destination Unreachable â No Route | No route to destination |
| 1 | 1 | Destination Unreachable â Admin Prohibit | Administratively prohibited (e.g., ACL) |
| 1 | 3 | Destination Unreachable â Addr Unreachable | Address unreachable at next hop |
| 1 | 4 | Destination Unreachable â Port Unreachable | Port unreachable at destination |
| 2 | 0 | Packet Too Big | Packet larger than MTU; carry MTU of nextâhop in the âMTUâ field |
| 3 | 0 | Time Exceeded â Hop Limit Exceeded | Hopâlimit reached zero |
| 3 | 1 | Time Exceeded â Fragment Reassembly Time Exceeded | Fragment reassembly timer expired |
| 4 | 0 | Parameter Problem â Erroneous Header Field | Problem with IPv6 header |
| 4 | 1 | Parameter Problem â Unrecognized Next Header | Next Header type unknown |
| 4 | 2 | Parameter Problem â Unrecognized IPv6 Option | Option in the header not understood |
Behavior:
- Error messages are sent to the IPv6 source address, never a multicast address.
- The invoking packetâs header + first 8âŻbytes of payload are embedded in the ICMPv6 message so the sender can correlate the error.
C. ICMPv6 Informational Messages¶
| Type | Code | Name | Purpose |
|---|---|---|---|
| 128 | 0 | Echo Request | âPingâ to test reachability |
| 129 | 0 | Echo Reply | Response to Echo Request |
Exam Tip: IPv6 uses ICMPv6 exclusively for ping and traceroute (no separate âping6â command on Cisco routers; itâs simply
ping ipv6 âŠ).
D. CCNAâLevel Takeaways¶
- NDP is implemented via ICMPv6 types 133â137 (all Code =âŻ0).
- Error messages use TypesâŻ1â4 with multiple Codes; remember â1 = Dest Unreachable,â â2 = Too Big,â â3 = Time Exceeded,â â4 = Parameter Problem.â
- Echo Request/Reply are TypesâŻ128/129.
- Error ICMPv6 messages always return to the unicast source of the offending packet.
-
Router & Link MTU Discovery:
-
Packet Too Big (TypeâŻ2) drives Path MTU Discovery.
IPv6 ACLs: Basics & Syntax¶
IPv6 ACLs function similarly to IPv4 ACLs but use the ipv6 access-list command and support IPv6âspecific features (e.g., prefix lists).
1. Defining a Named IPv6 ACL¶
Router(config)# ipv6 access-list MY_IPV6_ACL
- Named (versus numbered) is the CCNA norm.
- Once created, you add entries beneath this mode:
Router(configâipv6-acl)# permit tcp 2001:DB8:1:0::/64 any eq 80
Router(configâipv6-acl)# deny icmp any any nd-na
Router(configâipv6-acl)# permit ipv6 any any
2. Entry Format¶
[action] [protocol] [source] [source-prefix-length] [destination] [dest-prefix-length] [operator [port]]
- action:
permitordeny - protocol:
ipv6(all),tcp,udp,icmp,icmp6, or specific ICMPv6 types/codes (e.g.,icmp6 nd-ns,icmp6 packet-too-big) - source/destination: IPv6 prefix and prefix length (no wildcard masks)
- ports/operators:
eq,gt,lt,rangefor TCP/UDP; not supported for plainipv6
Example Entries¶
! Permit SSH from anywhere to the subnet
permit tcp any 2001:DB8:2:0::/64 eq 22
! Deny all ICMPv6 Neighbor Solicitations (NDâNS)
deny icmp6 any any nd-ns
! Permit only HTTPS to a host
permit tcp any host 2001:DB8:3:0::5 eq 443
! Deny everything else
deny ipv6 any any
! Implicit âpermit ipv6 any anyâ at end if no deny exists
3. Applying an IPv6 ACL¶
ACLs are applied per interface and per direction:
Router(config)# interface GigabitEthernet0/1
Router(configâif)# ipv6 traffic-filter MY_IPV6_ACL in
Router(configâif)# ipv6 traffic-filter MY_IPV6_ACL out
- in filters packets entering the interface.
- out filters packets leaving the interface.
Permit/Deny Semantics¶
- Topâdown processing: First matching entry is used; no further entries are checked.
- Implicit deny: At the end of every ACL there is an invisible
deny ipv6 any any. - Implicit permit: If you issue only
permitstatements, the end-of-ACL implicit deny still appliesâunmatched traffic is dropped. - Explicit permit for IPv6âspecific: To allow all other IPv6 traffic, you must explicitly add
permit ipv6 any anybefore the implicit deny.
Prefix Lists¶
IPv6 prefix lists let you match on prefixes without worrying about individual entries for every subnet size.
1. Defining a Prefix List¶
Router(config)# ipv6 prefix-list PL_FILTER seq 5 permit 2001:DB8:0:0::/64 le 128
Router(config)# ipv6 prefix-list PL_FILTER seq 10 deny 2001:DB8:0:1::/64 eq 64
- seq: sequence number for ordering
- permit/deny: action
- prefix: network prefix
-
ge/le: minimum/maximum prefix length to match
-
le 128means any subnet longer (more specific) than /64 up to /128 ge 48means any prefix shorter (less specific) than /48
2. Using Prefix Lists in ACLs or Routing¶
- In ACLs (with the
ipv6 access-listsyntax):
Router(configâipv6-acl)# permit ipv6 any any prefix-list PL_FILTER
Router(configâbgp)# neighbor X.X.X.X prefix-list PL_FILTER in
Tips
- Remember no wildcard masksâyou always specify prefix/length.
- Learn the common ICMPv6 types (e.g.,
nd-ns,nd-na,echo-request,packet-too-big). - Donât forget to apply ACLs on the correct interface and direction.
- Always include an explicit permit if you need to allow âall otherâ IPv6 traffic.
- Understand how prefix lists simplify filtering variableâlength subnets.
Multicast in IPv6¶
IPv6 uses multicast far more extensively than IPv4. Rather than broadcasts, IPv6 relies on multicast for discovery and many control-plane functions.
1. WellâKnown Multicast Addresses¶
IPv6 multicast addresses all begin with FF00::/8. The next 4âŻbits are flags, followed by a 4âbit scope, then a 112âbit group ID.
| Address | Scope | Description |
|---|---|---|
FF02::1 |
linkâlocal | All nodes on the local link (equivalent to âall hostsâ) |
FF02::2 |
linkâlocal | All routers on the local link |
FF05::2 |
siteâlocal | All routers within the site |
FF02::D |
linkâlocal | All MLDv2-capable routers (MLDv2) |
FF02::16 |
linkâlocal | MLDv1 Multicast Listener Report |
FF02::1:FFXX:XXXX |
linkâlocal | Solicitedânode multicast (for NDP); last 24âŻbits = addressâs last 24âŻbits |
Key points:
-
Scope values (hex):
-
1= nodeâlocal 2= linkâlocal5= siteâlocal8= organizationâwideE= global- Flags (4âŻbits): e.g., Pâbit indicates permanent vs. transient group.
Multicast Listener Discovery (MLD)¶
MLD is the IPv6 equivalent of IGMP. It lets routers know which multicast groups are active on which links so they can forward multicast traffic appropriately.
A. MLD Versions¶
-
MLDv1 (RFCâŻ2710)
-
Uses Query and Report messages.
-
Hosts send Report when they want to join a group.
-
MLDv2 (RFCâŻ3810)
-
Adds âsource-specificâ joins (like IGMPv3).
- Supports Include and Exclude lists for finer control.
B. MLD Message Types (ICMPv6)¶
| Type | Code | Name | Purpose |
|---|---|---|---|
| 130 | 0 | Multicast Listener Query | Router â allânodes to solicit reports |
| 131 | 0 | Multicast Listener Report (v1) | Host â router: âI want to receive group Xâ |
| 132 | 0 | Multicast Listener Done (v1) | Host â router: âIâm leaving group Xâ |
| 143 | 0 | Multicast Listener Report (v2) | Host â router: includes source filters |
C. MLD Operation¶
-
Query Phase
-
Routers periodically send a General Query to
FF02::1(allânodes). -
They may send Multicast-Address-Specific Queries to a group address.
-
Report Phase
-
Hosts respond with Report messages to the groupâs multicast address.
-
In MLDv2, a Report can include sourceâspecific filters.
-
Timer Management
-
Routers maintain a timer per link to know when all listeners have left.
- If no more Reports arrive for a group before the timer expires, the router stops forwarding that group to the link.
D. CCNAâLevel Takeaways¶
- Wellâknown addresses: memorize
FF02::1,FF02::2, solicitedânodeFF02::1:FFxx:xxxx. - MLD vs. IGMP: MLD is ICMPv6âbased (typesâŻ130â143) instead of IGMP.
- MLDv2 adds source filteringâknow the concept but not deep syntax.
- Verification on Cisco routers:
show ipv6 mld groups
show ipv6 mld interface GigabitEthernet0/0
Transition Mechanisms (HighâLevel)¶
On the CCNA you wonât be configuring these in depth, but you should understand their purposes, basic operation, and tradeâoffs.
1. DualâStack¶
- Definition: Devices and networks run IPv4 and IPv6 simultaneously.
-
How it works:
-
Hosts have both an IPv4 Aârecord and an IPv6 AAAAârecord in DNS.
- Applications choose which to use based on DNS response (âHappy Eyeballsâ algorithm).
-
Pros:
-
Simplest incrementâbyâincrement migration.
- No encapsulation overhead.
-
Cons:
-
You must maintain two parallel protocol stacks (ACLs, routing, security).
- Potential for inconsistent policy between IPv4 and IPv6.
2. 6to4 Tunneling¶
- Purpose: Automatic, âconfiguredâonâtheâflyâ IPv6 connectivity over IPv4 Internet.
-
Addressing:
-
6to4 prefix =
2002::/16. -
An endâhost or router with global IPv4 address
W.X.Y.Zderives its 6to4 prefix as:2002:WXY Z::/48 ââââŹâââ hex(IPv4)e.g., IPv4
192.0.2.4â prefix2002:c000:0204::/48. * Encapsulation: -
IPv6 packets are wrapped in IPv4 protocol 41 and sent to a 6to4 relay.
- Configuration Example (Cisco IOS):
interface Tunnel0
ipv6 address 2002:c000:0204::1/64
tunnel source 192.0.2.4
tunnel mode ipv6ip 6to4
- + Autoâconfigured, minimal manual config.
- â Relies on public relays; can be unreliable and has MTU issues.
3. ISATAP (IntraâSite Automatic Tunnel Addressing Protocol)¶
- Purpose: Connect IPv6 islands across an IPv4 intranet.
-
Addressing:
-
ISATAP hosts derive an interface ID of the form:
0000:5EFE:W.X.Y.Zwhere
W.X.Y.Zis the IPv4 address. * Combined with a siteâs IPv6 prefix (e.g.,2001:db8:acad::/64), the hostâs IPv6 address becomes:* Encapsulation:2001:db8:acad::5EFE:c000:0204 -
Uses IPv4 unicast (protocol 41) between ISATAP routers/hosts.
- Configuration Example (Cisco IOS):
interface Tunnel1
ipv6 address 2001:db8:acad::1/64
tunnel source GigabitEthernet0/0
tunnel mode isatap
- + Works over existing IPv4 infrastructure internally.
- â Not suitable over the public Internet; limited to siteâtoâsite.
Key Takeaways¶
- Dualâstack is preferred for longâterm; you run both stacks side by side.
- 6to4 uses a builtâin
2002::/16prefix mapped from your IPv4 address and public relays. - ISATAP embeds an IPv4 address in the low 32âŻbits of the IPv6 interfaceâID for site tunnels.
- Both tunneling methods encapsulate IPv6 inside IPv4 (protocolâŻ41) and can suffer from MTU/traceroute issues.