0062_Cisco: IPv6_Routing

#IPv6 Static Route
	- A correction
	- IPv6 header
	- NDR	(Neighbor Discovery Protocol)
	- SLAAK
	
#==================================================================================
#	:: use only left side instead right if they are present at the address
#	Use lower-case instead upper-case
#	IPv6 version is fixed in the Packet header 4 bits and in binary it looks like 0b0110 (in decimal=6)
#	Next 8 bits   - it is  QoS
#	Next 20 bits  - flow traffic
#	Next 16 bits  - payload
#	Next (Next header) 8 bits - TCP or UDP (Protocol field in IPv4)
#	Next (Source address) - 128 bits
#	Next (Destination address) - 128 bits

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

#	Solicied-node multicast address - it is like ARP in IPv4. It helps devices to find each other
#		-works in chanell layer, using NDP
#		-FF02::1:FFXX:XXXX, where XX:XXXX the last 24 bits of the device unicast address
#			Example: 2001:DB8:1A2B:3C4D:5E6F:7A8B
#										  -- ---- 24 bits
#			The solicied-node multicast address will be:
#								 FF02::1FF6F:7A8B
#								 FF02::1<-------- Multicast All nodes and hosts (like broadcast)
#
#	NS=ICMPv6	Type 135 - Request
#	NA=ICMPv6	Type 136 - like ARP reply
#
#	NDR uses two messages
#		1. Router Solicitation (RS)=ICMPv6 Type 133
#			-sent to multicast address FF02::2 (all router)
#		    and asks all routers on the local link to identify themselves
#		   -sent when an interface is enable/host is connected to the network
#		2. Router Advertisement (RA)=ICMPv6 Type 134
#			-sent to multicast address FF02::1 (all nodes and hosts)
#			-the RA its presence, as well as other information about the link
#			-these messages are sent in response to RS messages
#			-they are also sent periodically event if the touter hasn`t recieved any RS
#
#
#SLAAC (Stateless Address Auto-Configuration)
#	Hosts use RS and RA messages to learn IPv6 prefix on the local link (ie 2001:DB8::/64)
#	and then automatically generate an IPv6 address.
#	Using the IPv6 address prefix/prefix-length EUI-64 command, you need to manually enter the prefix
#
#	Using the IPv6 address autoconfig command, you do not need ti enter the prefix.
#	The device uses NDP to learn the prefix used on the local link.
#	The device will use EUI-64 to generate the interface ID, or it will be randomly generated
#	depending of the device or maker
#
#
#	DAD (Duplicate Address Detection)
#	Just know, it exists )

#	IPv6 routing is disabled by default, and must be enable
enable
	configure terminal
		ipv6 unicast-routing

#	If IPv6 routing is disabled, the router will be able to send and recieve IPv6 traffic, but will not router
#	IPv6 traffic. It means won`t forward it between networks
#
	show ipv6 route
		ipv6 route destination/prefix length {next hop|exit interface [next-hop]} [ad]	# ad=Administrative Distance
#
#	-Directly attached static route: Only the exit interfaace is specified	#doesn`t work with Ethernet interfaces
		ipv6 route 2001:db8:0:3::/64	g0/0
		
#	-Recursive static route: Only the next hop is specified
		ipv6 route 2001:db8:0:3::/64 2001:db8:0:12:2
		
#	-Fully specified: Both the exit interfaace and next hop are specified
		ipv6 route 2001:db8:0:3::/64 g0/0 2001:db8:0:12:2

#Example
#	  2001:db8:0:1::/64		        					 2001:db8:0:23::/64
#	PC1=============g0/1(R1)g0/0================g0/0(R2)g0/1=============g0/0(R3)g0/1===========PC2
#	:100             :1       :1                 :2      :1               :2     :1             :100   
#							 2001:db8:0:12::100/128									2001:db8:0:3::/64
#	NETWORK ROUTING
#	R1
		ipv6 route 2001:db8:0:3::/64 2001:db8:0:12::2
#	HOST ROUTE
#	R2
		ipv6 route 2001:db8:0:1::100 2001:db8:0:12::1
		ipv6 route 2001:db8:0:3::100 2001:db8:0:23::2

#	DEFAULT ROUTE		
#	R3
		ipv6 route ::/0 2001:db8:0:23::1

#	If you need to use Static Float Route, then use ad (Advertisement Distance)
#	Example: Balancing with OSPF, then ad=110, with EIGRP ad=90



#	Global-scope = 2000::/3			#Public addresses (white IP)
#	Link-local scope = FE80::/10	#Generated auto or manually uses for OSPFv3, EIGRP

			ipv6 unicast-routing          			#Enable IPv6 routing
			interface GigabitEthernet0/0
				ipv6 address 2001:DB8:1::1/64    	#Set Global-scope address
				ipv6 address FE80::1 link-local  	#Set Link-local address
				no shutdown

#	OSPFv3		
			ipv6 router ospf 1              #Enable the OSPFv3
				router-id 1.1.1.1           #Set Router ID
				exit
				
			interface GigabitEthernet0/0
				ipv6 ospf 1 area 0          #Add the interface to OSPF Area

#	EIGRP for IPv6
			ipv6 router eigrp 10            #Enable the EIGRP
				router-id 1.1.1.1           #Set Router ID
				no shutdown                 #Enable routing process
				exit
			interface GigabitEthernet0/0
				ipv6 eigrp 10               #Activate the EIGRP on the interface

#	RIPng	(ng = Next Generation)
			ipv6 router rip RIP_LAB         #Enable RIPng
			interface GigabitEthernet0/0
				ipv6 rip RIP_LAB enable     #Activate the RIPng on the interface
				
#	Loopback-interface	(good to testing and to set Router ID)
			interface Loopback0
				ipv6 address 2001:DB8:2::1/128  #Set Global-scope address
				ipv6 ospf 1 area 0              #Add to OSPFv3 process


	show ipv6 interface brief
	show ipv6 route
	show ipv6 neighbors