Hitchhikers Guide to Ipv6
Total Page:16
File Type:pdf, Size:1020Kb
BRKRST-3304 Hitchhikers Guide to Ipv6 Nicole Wajer – Chiefstroopwafel Officer @Vlinder_NL Cisco Webex Teams Questions? Use Cisco Webex Teams (formerly Cisco Spark) to chat with the speaker after the session How 1 Find this session in the Cisco Events Mobile App 2 Click “Join the Discussion” 3 Install Webex Teams or go directly to the team space 4 Enter messages/questions in the team space cs.co/ciscolivebot#BRKRST-3304 BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 3 Nicole Nicole Wajer Technical Solutions Architect @vlinder_nl BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 4 “Space,” it says, “is big. Really big. You just won’t believe how vastly hugely mindboggingly big it is. I mean you may think it’s a long way down the road to the chemist, but that’s just peanuts to space. Listen …” and so on. The Hitchhiker's Guide to the Galaxy BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 5 This Session…. BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 6 This Session…. BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 7 Don’t Panic BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 8 Encyclopaedia Galactica • Easy to miss – Warm up your brain • Neighbor And Router Discovery • Addressing • IPv4 Coexistence And Transition • IPv6-centric Deployments BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 9 Easy-to-miss configuration knobs EIGRP IPv6 needs “no shutdown” ipv6 router eigrp 1 router-id 192.0.2.1 no shutdown BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 11 VRRPv3: default is VRRPv2 => no IPv6 support R1#conf t Enter configuration commands, one per line. End with CNTL/Z. R1(config)#int e0/1 R1(config-if)# ipv6 address 2001:DB8:CAFE::1/64 R1(config-if)#vrrp 101 ? authentication Authentication description Group specific description ip Enable Virtual Router Redundancy Protocol (VRRP) for IP preempt Enable preemption of lower priority Master priority Priority of this VRRP group shutdown Disable VRRP Configuration timers Set the VRRP timers track Event Tracking R1(config-if)#vrrp 101 BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 12 VRRPv3: enabling it + successful configuration fhrp version vrrp v3 interface Ethernet0/1 no ip address ipv6 address 2001:DB8:CAFE::1/64 vrrp 101 address-family ipv6 address FE80::1 primary exit-vrrp ! BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 13 Encyclopaedia Galactica • Easy to miss – Warm up your brain • Neighbor And Router Discovery • Addressing • IPv4 Coexistence And Transition • IPv6-centric Deployments BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 14 Neighbor Discovery: Solicited Node Multicatscast Solicited node multicast groups: FF02::1:FF00:0000 /104 FF02::1:FF FF02::1:FF 00:0001 00:0002 FF02::1:FFAA:AAAA FF02::1:FFBB:BBBB FF02::1:FFCC:CCCC 2001:db8::0000:0002 2001:db8::0000:0001 BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 15 ACL BRKRST-13304 6 Beware the ACL “tightening” ipv6 access-list ingress permit tcp host 2001:db8::1 eq 80 any deny ipv6 any any log permit icmp any any nd-ns implicit permit icmp any any nd-na deny ipv6 any any implicit BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 17 IPv6 ACL Implicit Rules • IPv6 ACLs configure like “extended named” • Matching, SRC, DST, next header • Applying the ACL uses ipv6 traffic-filter command • IPv6 ACLs have multiple implicit rules • Similar to deny ip any any ipv6 access-list IOS permit icmp any any nd-na permit icmp any any nd-ns • IOS has 3 implicit IPv6 ACL rules deny ipv6 any any • NXOS has 5 implicit IPv6 ACL rules ipv6 access-list NXOS permit icmp any any nd-na • IOS-XE has no implicit IPv6 ACL rules permit icmp any any nd-ns interface GigabitEthernet 0/2 permit icmp any any router-advertise permit icmp any any router-solicitation ipv6 address 2001:db8:50:31::1/64 deny ipv6 any any ipv6 traffic-filter BLOCK-BAD in BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 18 NIST guidelines for secure IPv6 deployment; RFC4890 See BRKSEC-2003 http://csrc.nist.gov/publications/nistpubs/800-119/sp800-119.pdf http://www.ietf.org/rfc/rfc4890.txt BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 19 Ducks in a Row • Code paths of requests/replies may differ • Multicast and Unicast processing can differ • Neighbor Solicitation contains Link-Layer address • May populate the cache without explicit request • Beware of defaults BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 20 Neighbors Neighbor Cache State Machine • Incomplete – Pending address resolution, NS message outstanding • Reachable – Recently used mapping, Can be refreshed by ULP • Stale – Not currently communicating, waiting for next queued packet • Delay –Using stale binding, awaiting (ULP) return traffic • Probe – Sending Unicast NS to node (after Delay timer, 3x1 sec) NS No Entry Incomplete NA time expired Reachable NA ULP send packet Stale Delay Probe © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public ReachableTime: How Long Is It ? • BASE_REACHABLE_TIME • Sent in RA or taken from default • Value in milliseconds BASE_REACHABLE_TIME • Random(0.5 .. 1.5) * BASE_REACHABLE_TIME default: 30000 msec • Chosen every few hours or when BASE… changes BASE_REACHABLE_TIME BASE_REACHABLE_TIME RANDOM (0.5x .. 1.5x) 0.5x 1.5x milliseconds ReachableTime BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 23 Neighbor Table Maintenance Active Standby BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 24 Neighbor Table Maintenance Can Burden The CPU Standby Newly active Active BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 25 DC ND Tuning TEST ! • If FHRP is present or single gateway: increase reachable time BASE_REAC ipv6 nd reachable-time 600000 ! 10 minutes HABLE_TIME • Pre-populate and maintain the neighbor table Expiry ipv6 nd cache expire 14400 refresh ipv6 nd na glean Burst size • Rate-limit the address resolution traffic mls rate-limit unicast cef glean 1000 10 • Start with this configuration and adjust depending on the site PPS • Wrong values can impact the neighbor resolution times! BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 26 Ducks in a Row • ND has more states than ARP • Having “STALE” Neighbor Entry is ok! • Even in a connected Nespresso machine • Reachable interval is in milliseconds • Remember when adjusting • Adjust the Reachable timer up BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 27 Router Advertisements and Battery Life The model of measurements • Three levels: • Device – level behavior • Network-wide behavior • Traffic on the network • Power consumption ~ F(number of hosts on segment, network volatility) • Two main sources of multicast traffic • IPv6 Neighbor Discovery protocol • Service Advertisements • More information on the power consumption model from the author directly: • http://tools.ietf.org/html/draft-desmouceaux-ipv6-mcast-wifi-power-usage-01 • Disclaimer: use this model as a guidance/basis only, verify your network telemetry! BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 29 Power Consumption On A Smartphone sleeping 10 mA awake 40 mA CPU awake 150 mA sleeping t I(t) BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 30 Experimental Measurements: Per Device When joining the network • At least 4 multicast packets issued (RS + 3DAD) • Possibly more than 20 (MLD, mDNS) joins Once connected • ~0.021 packets/device/second© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public Data Analysis From A Real Network (~600 nodes) • Arrival rates: exponential(λ) • Connection durations: ? • Here 600 hosts: 1/λ = 6 s (small)! • Average connection time = 55 min • Model: power multiplier is K = 1 + (0.03 + 28/Tc)*N • 27 nodes, 1 hour average connection time K = 2 (!) BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 32 Why Multicast Solicited RAs ? RFC4861, 6.2.6. Processing Router Solicitations In addition to sending periodic, unsolicited advertisements, a router sends advertisements in response to valid solicitations received on an advertising interface. A router MAY choose to unicast the response directly to the soliciting host's address (if the solicitation's source address is not the unspecified address), but the usual case is to multicast the response to the all-nodes group. BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 33 Tcpdump On A Host In A Large WiFi Network BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 34 WLC Sends RAs Reliably: Can Reduce Frequency! APc47a.fe34.1cc9#show capwap mcast mgid all | begin RA MGID RA MGID Information MGID = 8341 IPv6 mc2uc Clients = 1 MGID = 8343 IPv6 mc2uc Clients = 1 APc47a.fe34.1cc9#show capwap mcast mgid id 8343 Normal Mcast Clients: Reliable Mcast Clients: Client: 14cf.929d.740c --- Qos User Priority: 3 State: ADMITTED History – Retry Pct: 0 0 0 0 Rate )500Kbps): 0 65535 65535 APc47a.fe34.1cc9# BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 35 RA throttle BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 36 BRKRST-3304 © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public 37 IOS vs. NX-OS Default Solicited RA Behavior • NX-OS sends unicast solicited RA packets • Periodic RA still sent multicast as expected • Easy (Less need for RA-throttle), but may be harder to debug (unicast vs.