0061:_Cisco: IPv6_addresses

enable
	configure terminal
		interface g0/0
			ipv6 address 2001:DB8::/64 EUI-64	#to generate an IPv6 address on the g0/0 interface
	
	show interface g0/0							#to show MAC address
	show ipv6 interface brief					#the second line will show a new generated MAC address
	

##IPv6 address types:
#	-Global Unicast
#	-Unique Local
#	-Link lLcal
#	-Multicast
#	-others

#===================Global Unicast IPv6 address====================================
#	Global Unicast IPv6 address - using for the Internet
#Originally defined as the 2000::3/3 block
#From 2000:: to 3FFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
#				  1	   2    3    4    5   6     7    8

#			| 48 bit - Global Routing prefix	|
# 128 bit	| 16 bit - Subnet Identifier		|	/64
#			| 64 bit - Interface Identifier		|
#==================================================================================

#===================Unique Local IPv6 address======================================
#	Unique Local IPv6 address - using for the Privet / Local networks
#All Unique Local address must begin with FD, because updated the 8-th bit
#From FD00:: to FDFF:3FFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
#   ______________   ____ 
#  |FD45:93AC:8A8F|:|0001|:0000:0000:0000:0001/64
#   --------------   ---- 
#	 |            \       \
#	 |             \       16bit subnet identifier used by the enterprise to make various subnets
#	 |				40 bit "Global ID" which should randomly generated
#	FD - indicates a Unique Local address
#==================================================================================


#===========================Link Local IPv6 address================================
#Automatically generated on IPv6 interfaces
enable
	configure terminal
		interface g0/0
			ipv6 enable
#Uses the address block FE80::/10
#From FE80:: to FEBF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
#However, the standart states then the 54 bits after FE80/10 should be all 0,so you won`t see link local addresses
#beginning with FE9, FEA or FEB. Only FE8.

#The interface ID generated using EUI-64 rules.
#Link Local means that these addresses are used for communication within a single link (subnet).
#Routers won`t route packets with link local destination IPv6 addresses.

#Common uses of link-local addresses
#	-routing protocols peering OSPF v3 using link-local addresses for neighbor adjacencies
#	-next-hop addresses for static routes
#	-Neighbor Discovery Protocol (NDPm, IPv6 replacement for ARP uses link-local addresses to function
#==================================================================================

#=======================IPv6 Multicast Addresses===================================
#	Unicast		 - One to One
#	Broadcast	 - One to Many (within subnet)
#	Multicast	 - One to Many (joined to the specific multicast group)

#IPv6 uses range FF::/8 for multicast
#From FF00:: to FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF
#
#IPv6 doesn`t use broadcast (there is no broadcast addresses in IPv6)

#----------------------------------------------------------------------------------
# Purpose								|	  IPv6 address		|	IPv4 address  |
#----------------------------------------------------------------------------------
#All nodes/hosts functions ie broadcast |       FF02::1			|	224.0.0.1	  |
#----------------------------------------------------------------------------------
#All routers							|		FF02::2			|	224.0.0.2	  |
#----------------------------------------------------------------------------------
#All OSPF routers						|		FF02::5			|	224.0.0.5	  |
#----------------------------------------------------------------------------------
#All OSPF DRs/BDRs routers				|		FF02::6			|	224.0.0.6	  |
#----------------------------------------------------------------------------------
#All RIP routers						|		FF02::9			|	224.0.0..9	  |
#----------------------------------------------------------------------------------
#All EIGRP routers						|		FF02:A			|	224.0.0.10	  |
#----------------------------------------------------------------------------------

#
#=============================Multicast address scopes=============================
#IPv6 defines multiple multicast scopes which indocate how far the packet should be forwarded
#
#	-Interface-Local (FF01). The packet doesn`t leave the local device. Can be used to send
#	 traffic to a service within the local device
#
#	-Link-Local (FF02). The packet remains in the local subnet. Routers won`t route the packet
#	 between subnets.
#
#	-Site-Local (FF05). The packet can be forwarded by routers. Should be limited to a single
#	 physical location (not for forwarding over the WAN)
#
#	-Organosation-Local (FF08). Wider in scope that Site-Local (an entire company/organization)
#
#	-Global (FF0E). No boundaries. Possible to be route over the Internet
#
#	Global-Scope
		-Organosation-Local Scope (Branches through the WAN)
			-Site-Local Scope (All local networks behind the WAN)
				-Link-Local Scope (Inside a subnet)
#==================================================================================

#==================================IPv6 Anycast====================================
#Anycast is One-to-One-of-Many
enable
	configure terminal
		interface g0/0
			ipv6 address 2001:DB8:1:1:99/128 anycast
#==================================================================================

#====================================IPv6 Others===================================
#	:: = the unspecified IPv6 address
#		- Can be used when a device doesn`t yet know it`s IPv6 address
#		- IPv6 default routes are configured to ::/0 (IPv4 equivalent 0.0.0.0)
#	::1 = the loopback interface (IPv4 equivalent 127.0.0.0/8 address range)

#==================================================================================
enable
	configure terminal
		interface g0/0
			ipv6 address 2001:DB8:/64 EUI-64 	#It is a subnet, using this the IPv6 address will generated

#==================================================================================