Monday 8 June 2015

CCENT IPv6


Bear in mind, my children, that only cowards and those who are weak
commit sin and tell lies. The brave are always moral. Try to be moral,
try to be brave, try to be sympathising.

Three things are necessary to make every man great, every nation great:
  1. Conviction of the powers of goodness.
  2. Absence of jealousy and suspicion.
  3. Helping all who are trying to be and do good.

IPv6

32 Hexadecimal Values ,Hex = 0 to 9 and A to F

Each Hexadecimal Value is represented by 4 Binary Bits.
Example 0 = 0000
1= 0001

Binary to Decimal conversion Examples
0001 = 1 * 2^0 = 1
0010 = 1 * 2^1 = 2

Characteristics:
No Broadcasts
No ARP , uses NDP

Types of IPv6 Address:

1.Global Unicast 2000::/3 Routable used on the Internet.
2.Unique local FC00::/7 similar Ipv4 Private Addresses (fd00::/8)
3.Link local FE80::/8 similar to Windows APIPA
4. 2001:0db8::/32 Reserved for examples and documentation
5. 2002::/16 6-to-4 tunneling

0:0:0:0:0:0:0:1 or ::1/128 Localhost address similar IPv4: 127.0.0.1
2001:db8::/32 used in documentation

0:0:0:0:0:0:192.168.100.1 This is how an IPv4 address would be written in a mixed IPv6/
IPv4 network environment.

FF00::/8 The multicast range.
0:0:0:0:0:0:0:0 Equals ::. This is the equivalent of IPv4’s 0.0.0.0 and is typically
the source address of a host before the host receives an IP
address when you’re using DHCP-driven stateful configuration.
(unspecified address)


::1/128
50
0
Localhost
::/0
40
1
Default unicast
::ffff:0:0/96
35
4
IPv4-mapped IPv6 address
2002::/16
30
2
6to4
2001::/32
5
5
Teredo tunneling
fc00::/7
3
13
Unique local address

Address Format :

Routing prefix | Subnet ID | Host ID
48 Bits | 16 Bits | 64 Bits

Network Prefix = Routing Prefix + Subnet ID

The network prefix (the routing prefix combined with the subnet id) is contained in
the most significant 64 bits of the address. The size of the routing prefix may vary;
a larger prefix size means a smaller subnet id size. The bits of the subnet id(entifier)
field are available to the network administrator to define subnets within the given
network. The 64-bit interface identifier is either automatically generated from the
interface's MAC address using the modified EUI-64 format, obtained from a
DHCPv6 server, automatically established randomly, or assigned manually.

Total 128 Bits
Upto 48 bits = Routing prefix
48 to 64 bits = used for subnet number
(note can borrow more host bits but this can conflict with stateless autoconfiguration which needs /64)
first 64 bits Network prefix
second 64 bits Host ID

Stateless Autoconfiguration (eui-64) Padding Processes:
Adding FF FE and inverting 7th bit.

Example 1:
MAC : 0060:d673:1987
Padded MAC : 0260:d6FF:FE73:1987
Note 7th bit starting from left : 0 = 0000 , 0= 0000
0000 0000 , 7th bit is 0 ,inverting it we get 1
thus we get 0000 0010 and 0010 = 2 ,hex to deci

2001:db8:1111:2222::/64 gets converted to
2001:db8:1111:2222:0260:d6FF:FE73:1987

Example 2 :
MAC address 0090:2716:fd0f
IPv6 EUI-64 address: 2001:0db8:0:1:0290:27ff:fe16:fd0f

Example 3 :
MAC address aa12:bcbc:1234
IPv6 EUI-64 address: 2001:0db8:0:1:a812:bcff:febc:1234

Example 4:
MAC address 0c0c:dede:1234
IPv6 EUI-64 address: 2001:0db8:0:1:0e0c:deff:fede:1234

Example 5:
MAC address 0b34:ba12:1234
IPv6 EUI-64 address: 2001:0db8:0:1:0934:baff:fe12:1234



Stateless autoconfiguration eui-64 and stateful (DHCP)
IPv6 Header
DHCPv6 (Stateful)
ICMPv6

Network discovery Protocol:
ARP of IPv6 to find MAC of neighbors.
RS Router solicitation.      FF02::2
RA Router advertisement. FF02::1
NS Neighbor soliciation
NA Neighbour advertisement. 
DAD - Duplicate address detection.


Routing Protocols RIPng


Verification , show commands

IPv6 Commands

ipv6 unicast-routing
ipv6 enable (on an interface assigns a link-local address)




Lab 1 : Ipv6 Adderss assignment using ipv6 enable.
Router(config-if)#ipv6 enable
Router#show ipv6 interface
GigabitEthernet0/1 is administratively down, line protocol is down
IPv6 is enabled, link-local address is FE80::260:2FFF:FE83:E02 [TEN]
[Note after enabling a link local address is assigned]
No Virtual link-local address(es):
Global unicast address(es):
Joined group address(es):
FF02::1
FF02::1:FF83:E02
[Note the interface now joins the multicast groups]
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ICMP unreachables are sent
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds
ND advertised reachable time is 0 milliseconds
ND advertised retransmit interval is 0 milliseconds
ND router advertisements are sent every 200 seconds
ND router advertisements live for 1800 seconds
ND advertised default router preference is Medium
Hosts use stateless autoconfig for addresses.
Vlan1 is administratively down, line protocol is down
Internet protocol processing disabled

Note:
sh ipv6 int
sh ipv6 int brief

Lab 2 : Ipv6 unicast-routing significance.
ipv6 unicast-routing , has to be enabled on router so a Computer on the LAN can get an IP.
That is if the PC is set to get an IPv6 IP automatically

Lab 3 : Ipv6 Global address manual assignment , eui-64
Router(config)#int g0/1
Router(config-if)#ipv6 address 2001:0db8:1111:A::/64 eui-64
[Note if you do not use eui-64 , than the interface mac will not be added ]
[we can only use 2001:0db8:1111:A::/64 , but this indicates everything after :: will be zero's]
Router#show ipv6 int g0/1
GigabitEthernet0/1 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::260:2FFF:FE83:E02
No Virtual link-local address(es):
Global unicast address(es):
2001:DB8:1111:A::, subnet is 2001:DB8:1111:A::/64
2001:DB8:1111:A:260:2FFF:FE83:E02, subnet is 2001:DB8:1111:A::/64 [EUI]
Joined group address(es):
FF02::1
FF02::2
FF02::1:FF00:0
FF02::1:FF83:E02
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ICMP unreachables are sent
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds
ND advertised reachable time is 0 milliseconds
ND advertised retransmit interval is 0 milliseconds
ND router advertisements are sent every 200 seconds
ND router advertisements live for 1800 seconds
ND advertised default router preference is Medium
Hosts use stateless autoconfig for addresses.
Router#

[Note PC's get a global IPv6 IP and Gateway from the Router
only after the Router interface has been assigned a Global IP,PC's
initially have a link-local address assigned ]

Lab 4 :
IPv6 Link local address assigned manually.
Router(config-if)#ipv6 address FE80:1111:2222:3333:4444:5555:6666:7777 link-local

Lab 5 :
IPv6 Address assignment using autoconfig.

Router(config)#int g0/2
Router(config-if)#ipv6 address ?
WORD General prefix name
X:X:X:X::X IPv6 link-local address
X:X:X:X::X/<0-128> IPv6 prefix
autoconfig Obtain address using autoconfiguration
Router(config-if)#ipv6 address autoconfig
Router#show ipv6 int g0/2
GigabitEthernet0/2 is administratively down, line protocol is down
IPv6 is enabled, link-local address is FE80::203:E4FF:FE3C:4A03 [TEN]
No Virtual link-local address(es):
Global unicast address(es):
Joined group address(es):
FF02::1
FF02::2
FF02::1:FF3C:4A03
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ICMP unreachables are sent
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds
ND advertised reachable time is 0 milliseconds
ND advertised retransmit interval is 0 milliseconds
ND router advertisements are sent every 200 seconds
ND router advertisements live for 1800 seconds
ND advertised default router preference is Medium
Hosts use stateless autoconfig for addresses.

Lab 6 :
Understanding IPv6:

Interface g0/2:
Router(config-if)#int g0/2
Router(config-if)#ipv6 add 1111:2222:3333:4444:aaaa:bbbb:cccc:dddd/1
[Only 1 binary bit is matched on ]

Interface g0/0:
Router(config-if)#int g0/0
Router(config-if)#ipv6 add ffff:2222:3333:4444:aaaa:bbbb:cccc:dddd/1
%GigabitEthernet0/0: Error: FFFF:2222:3333:4444:AAAA:BBBB:CCCC:DDDD/1 is invalid
[invalid as FF00::/8 is Multicast group]
Router(config-if)#ipv6 add faaa:2222:3333:4444:aaaa:bbbb:cccc:dddd/1
[This IP is taken as F in binary is 1111 and since we are matching 1st bit that is /1
this IP is OK, as it differes from 1 above which is 0001, first bit has to vary]
[Note first bit of interface g0/0 and g0/2 must vary as /1 , 1 bit is compared ]
Router(config-if)#no ipv6 add faaa:2222:3333:4444:aaaa:bbbb:cccc:dddd/1
Router(config-if)#ipv6 add 8aaa:2222:3333:4444:aaaa:bbbb:cccc:dddd/1
[ 8 is accepted as first bit is 1]
Router(config-if)#no ipv6 add 8aaa:2222:3333:4444:aaaa:bbbb:cccc:dddd/1
Router(config-if)#ipv6 add 7aaa:2222:3333:4444:aaaa:bbbb:cccc:dddd/1
%GigabitEthernet0/0: Error: ::/1 is overlapping with ::/1 on GigabitEthernet0/2
[ 7 not accpted as 7 hexadecimal in binary is 0111, and first bit is 0 same as on int g0/2]
[8 is the last hex value we can use,we cannot go lower ]


Lab 7 : Understanding IPv6 Subnetting:

2001:0101:2222:A::/64 eui-64

Note A in the fourth octet is the subnet ID
upto 48 bits or /48 is the Routing Prefix.
/48 to /64 or the bits between 48 and 64
are the Subnet Bits.

4th Octet is the Subnet Number:
It is 16 Bits long like all other Octet's.
4 Hexadecimal Values , each repersented
by 4 Binary Bits.
So the Subnets are

0000 0000 0000 0000 = 0 = 1st Subnet.
0000 0000 0000 0001 = 1 = 2nd Subnet.
0000 0000 0000 0010 = 2 = 3rd Subnet.
0000 0000 0000 0011 = 3 = 4th Subnet.
0000 0000 0000 0100 = 4 = 5th Subnet.
0000 0000 0000 0101 = 5 = 6th Subnet.
0000 0000 0000 0110 = 6 = 7th Subnet.
0000 0000 0000 0111 = 7 = 8th Subnet.
0000 0000 0000 1000 = 8 = 9th Subnet.
0000 0000 0000 1001 = 9 = 10th Subnet.
0000 0000 0000 1010 = A = 11th Subnet.
0000 0000 0000 1011 = B = 12th Subnet.
:
:
and so on

Example : Subnetting.
2001:2A1:BAD::/64

1.What is the 1st subnet ? (Note we start at 0 hence 0 is the first subnet)
Answers is 0000 0000 0000 0000 , which is the Zero subnet.
Written as 2001:2A1:BAD:0::/64

2.What is the 2nd Subnet ?
Answers is 0000 0000 0000 0001 , which is the second subnet.
Written as 2001:2A1:BAD:1::/64

3. What is the 11th Subnet ?
Answers is 0000 0000 0000 1010 , which is the 11th subnet.
Can be written as 2001:2A1:BAD:A::/64
1010 = A , which is 10, but 0 to 10 is 0 to 9 and 10 or A, will be 11th Subnet.

4.What is the 75th Subnet ?
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
512 256 128 64 32 16 8 4 2 1
1 1 1 1
75 = 64 + 8+ 2+1 = 0100 1011 = 4B
0100 = 4
1011 = B = 11
75 = 4B but since we have to be one less, which is the real 75th Number.
We use 4A.

In relation to above IP the 75th subnet is 2001:2A1:BAD:4A::/64.




































Lab 8 Static Routing using Global unicast addresses.































Lab 9 Static Routing using Unique local address.
ipv6 unicast-routing
ipv6 address FD00:1111:2222:4::1/64
ipv6 route FD00:1111:2222:5::/64 FD00:1111:2222:4::2
ipv6 route FD00:1111:2222:6::/64 FD00:1111:2222:4::2


Lab 10 Static Route with a Link Local Next-hop Address:
Unlike IPv4 static routing, with IPv6 you have the ability to use either the global
unicast address or link-local address as the next hop in the static route statement.

Router(config)#ipv6 route 2001:db8:1111:2::/64 g0/0 FE80::2E0:F9FF:FE84:2601


Lab 11 IPv6 Default route.
Router(config)#ipv6 route ::/0 s0/0/1

Lab 12 OSPF v 3 :
Configuration
Router-id
debug command


















ROUTER 1:(Similar configuration of other Two Routers)
Fa0/0
Router(config-if)#ipv6 address 2001:AAAA:BBBB:CCCC::/64 eui-64
Fa0/1
Router(config-if)#ipv6 address 2001:AAAA:BBBB:DDDD::/64 eui-64
Router(config)#ipv6 unicast-routing
Router(config)#ipv6 router ospf 1
%OSPFv3-4-NORTRID: OSPFv3 process 1 could not pick a router-id,
please configure manually
Router(config-rtr)#router-id 2.2.2.2
Router(config)#interface FastEthernet0/0
Router(config-if)#ipv6 ospf 1 area 0
Router(config)#interface FastEthernet0/1
Router(config-if)#ipv6 ospf 1 area 0



NOW TRY PING Between all Routers.

IPv6 Show commands:
Router#show ipv6 ?
access-list Summary of access lists
dhcp IPv6 DHCP
eigrp EIGRP show commands
general-prefix IPv6 general prefixes
inspect CBAC (Context Based Access Control) information
interface IPv6 interface status and configuration
nat IPv6 NAT-PT information
neighbors Show IPv6 neighbor cache entries
ospf OSPF information
protocols IPv6 Routing Protocols
rip RIP routing protocol status
route Show IPv6 route table entries
Router#show ipv6 ospf ?
<1-65535> Process ID number
border-routers Border and Boundary Router Information
database Database summary
interface Interface information
neighbor Neighbor list
<cr>
Router#show ipv6 interface ?
Ethernet IEEE 802.3
FastEthernet FastEthernet IEEE 802.3
GigabitEthernet GigabitEthernet IEEE 802.3z
Loopback Loopback interface
Serial Serial
Tunnel Tunnel interface
brief Brief summary of IP status and configuration
<cr>
Router#show ipv6 access-list ?
WORD User selected string identifying this access list
<cr>
Router#show ipv6 dhcp ?
binding DHCP bindings
interface DHCPv6 interface information
pool DHCPv6 pool statistics
<cr>
Router#show ipv6 nat ?
statistics Translation statistics
translations Translation entries

Router#show ipv6 neighbors ?
Ethernet IEEE 802.3
FastEthernet FastEthernet IEEE 802.3
GigabitEthernet GigabitEthernet IEEE 802.3z
Loopback Loopback interface
Serial Serial
<cr>

Router#show ipv6 protocols ?
<cr>
Router#show ipv6 route ?
ospf OSPFv3 routes
<cr>
Router#show ipv6 route ospf ?
<cr>
Router#show ipv6 rip ?
database RIP local RIB

No comments:

Post a Comment