Showing posts with label IPv6 routing. Show all posts
Showing posts with label IPv6 routing. Show all posts

Wednesday, March 11, 2015

IPv6 Auto-Configuration

R5:
ipv6 unicast-routing
!
interface FastEthernet 0/0
ipv6 address fc00:1:0:58::5/64
ipv6 address fc00:1:0:85::5/64

ipv6 nd prefix fc00:1:0:58::/64 14400 14400 no-autoconfig
ipv6 nd prefix fc00:1:0:85::/64 14400 14400
ipv6 nd ra-interval 40
ipv6 nd ra-lifetime 60
no ipv6 nd suppress-ra
SW2:
sdm prefer dual-ipv4-and-ipv6 routing
!
interface Vlan 58
ipv6 address autoconfig default


IPv6 has a special feature called auto-configuration. It replaces many functions served by DHCP in IPv4 networks (yet there is a special DHCPv6 edition of the DHCP protocol). With IPv6 auto-configuration, an IPv6 host may automatically
learn the IPv6 prefixes assigned to the local segment, as well as determine the default routers on that segment. A special type of link-local IPv6 addressing and the ICMPv6 ND (Neighbor Discovery) protocol accomplish this.
Router Advertisements can be sent at a specified interval or the feature can be suppressed completely (“suppress-ra” is enabled by default on Ethernet interfaces. This default behavior can be changed with the no ipv6 nd suppress-ra) depending on how you configure your Cisco router.
 Note:  that you must enable IPv6 unicast routing in order to send router advertisements. The following commands control the IPv6 RA announcements:
ipv6 nd ra-interval                    – specifies the periodic interval to send RAs.
ipv6 nd ra-lifetime                   – specifies the validity interval of the router’s IPv6 address
ipv6 nd prefix                           – manipulates the IPv6 network prefixes included into RA. By default, all prefixes are  included.
You may adjust the interval that the prefix is valid and preferred with every command. Additionally, you may instruct the hosts not to use this prefix for auto-configuration, by using the no-autoconfig keyword.



Rack1SW2#show ipv6 interface vlan 58
Vlan58 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::21B:D4FF:FED4:4D45
Global unicast address(es):
FC00:1:0:85:21B:D4FF:FED4:4D45, subnet is FC00:1:0:85::/64 [PRE]
valid lifetime 14374 preferred lifetime 14374
Joined group address(es):
FF02::1
FF02::1:FFD4:4D45
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds
Default router is FE80::212:FF:FE1C:DAA0 on Vlan58

Rack1R5#debug ipv6 nd
ICMP Neighbor Discovery events debugging is on
Rack1R5#
ICMPv6-ND: Sending RA to FF02::1 on FastEthernet0/0
ICMPv6-ND: MTU = 1500
ICMPv6-ND: prefix = FC00:1:0:58::/64 onlink
ICMPv6-ND: 14400/14400 (valid/preferred)
ICMPv6-ND: prefix = FC00:1:0:85::/64 onlink autoconfig
ICMPv6-ND: 14400/14400 (valid/preferred)

Rack1R5#show ipv6 interface fastEthernet 0/0 prefix
IPv6 Prefix Advertisements FastEthernet0/0
Codes: A - Address, P - Prefix-Advertisement, O - Pool
U - Per-user prefix, D - Default
N - Not advertised, C - Calendar
PD default [LA] Valid lifetime 2592000, preferred lifetime 604800
AP FC00:1:0:58::/64 [L] Valid lifetime 14400, preferred lifetime
14400

AP FC00:1:0:85::/64 [LA] Valid lifetime 14400, preferred lifetime

EIGRP IPv6

 -------------------------------------------------------------------------------------------
| Configuration text:                                        
 ------------------------------------------------------------------------------------------
|        Router(config)#  ipv6 unicast-routing                
|        Router(config)# ipv6 router ei 1                
|        Router(config-rtr)# no shutdown
   Router(config-rtr)# router-id                 
|                                                        
|        Router(config)# interface f0/0                                
|        router(config-rtr)# ipv6 eigrp 1                
|                                                        
|========================================================

1- EIGRPv6 Enable in a Interface
        => Auto create a EIGRPv6 Process.

> When Enable EIGRPv6 in a Interface, must "no shutdown" in EIGRP Process mode.

2- IN NBMA : Same as RIPng
> keyword " broadcast" add only in Frame-relay map with Link-local

3- Split-horizon in EIGRPv6:

> Enable in Interface mode        => Impact only its this interface

4- Advertise a default-route:

> On Interface mode

> Create a default-route and Redistribute Static.

>Summary 
5- Summary address EIGRPv6:


> Unlike IPv4, cannot associate a leck-map with the summary prefix and allow specific routing.
 
 example: Ensure that R5 advertises an optimal summary prefix for the IPv6 addresses of R5’s and SW2’s Loopback 100 interfaces.



FC00:1:0:5::/64
           FC00:1:0:8::/64
=
0000 0000 0000 00101 = 5
0000 0000 0000 01000 = 8
= FC00:1::/60

Config R5:
#interface Serial1/1
 #ipv6 enable
 #ipv6 eigrp 100
 #ipv6 summary-address eigrp 100 FC00:1::/60
#interface serials1/0
 #ipv6 summary-address eigrp 100 FC00:1::/60


Note: khi su dung summary trong bang dinh tuyen R5 tao ra route -> Null 0 voi AD=5. de xoa route nay thi cho AD=255 khi summary.
D   FC00:1::/60 [5/128256]
                 via Null0, directly connected


  1. Filtering route in EIGRPv6
> Distribute-list + prefix-list:
>> Create "Black-hold"        => Prefix-list must "Permit" any
>> Configuration in EIGRP process mode.

Example:     + Configure R5 to block the IPv6 prefix corresponding to R6’s Loopback 100 interface from entering the local routing table.
+ Permit any other IPv6 prefixes

Config R5:
#ipv6 prefix-list DENY_L0_R6 seq 5 deny FC00:1:0:6::/64
#ipv6 prefix-list DENY_L0_R6 seq 10 permit ::/0 le 128                    //permit any
  #ipv6 router eigrp 100
  # distribute-list prefix-list DENY_L0_R6 in



RIPng


------------------------------------------------------------------------------
| Configuration text:
------------------------------------------------------------------------------
|        Router(config)#  ipv6 unicast-routing
|
|        Router(config)# interface f0/0
|        router(config-if)# ipv6 rip [name] enable
|                example : ipv6 rip ccie enable
|        * note: "Name" mean local only
|
|=================================================

1- Enable RIPng in a interface        => Auto Create a RIPng Process on Router

2- RIPng in NBMA:

> Map static IPv6 global next-hop with DLCI local (Don't need keyword "broadcast" )

> Map Static IPv6 Link-local with DLCI Local, must add keyword "broadcast"

> Note Reachable in Routing table when learn by NBMA        => Layer 3 to Layer 2 must Reachable.

3- By default RIPng using "Split-horizon" same as RIPv2 but:

> Diable Split-horizon in RIPng implement in RIPng Process ( Router RIP mode)
>> command: no split-horizon

4- Redistribute between Two RIPng process note:

> Default don't advertise "connected network"        => you must do it.

5- Advertise default-route in RIPng:

> Advertise in Interface mode only
>> command : ipv6 rip [name] default-information originate

> Note: If Using : "ipv6 rip [name] default-information only"        => Advertise only 1 default-route and suppress other Specific route.

6- Filtering route in RIPng: (two ways)

> Distribute-list + prefix-list:
>> Create "Black-hold"        => Prefix-list must "Permit" any
>> Configuration in RIP process mode.
>>
Example: L100(R6): FC00:1:0:6::6/64

In R5: filter L100 (R6) and Permit any other IPv6 prefixes


Config R5:
#ipv6 prefix-list DENY_L0_R6 seq 5 deny FC00:1:0:6::/64
#ipv6 prefix-list DENY_L0_R6 seq 10 permit ::/0 le 128                    //permit any
  #ipv6 router rip RIPNG
  # distribute-list prefix-list DENY_L0_R6 in

> Metric-offset :
>> using only for per-interface.
>> cannot specific a route for "deny" ( Increase HOP COUNT to 16)
>>> Deny all route learn by neighbor.

>> command: configuration in Interface mode:
>>> ipv6 rip [name] metric-offset 16

Example:  R4 have L0 R5 via frame relay link and point-to-point link. Config p2p link is primary

Config R4:
#interface s1/0.1 p2p
  #ipv6 rip RIPNG metric-offset 3


 7- Summary address.
  • config in mode interface:
#ipv6 rip [WORD] summary {address}

Example:
FC00:X:0:5::/64
FC00:X:0:1::/64  
FC00:X:0:4::/64
=
0000 0000 0000 0101
0000 0000 0000 0001
0000 0000 0000 0100
=> FC00:0::/61

  • Advertise only summary route . Prevent specti route

IPv6 address

    IPv6 address: xxxx:xxxx:xxxx:xxxx : xxxx:xxxx:xxxx:xxxx
    > Each hex character(x) denotes a tuple(4 bits). Two tuples (2 hex characters) denotes 1 byte (8 bits).
    > 1st 8 bytes = network address portion.
    > 2nd 8 bytes = hosts addresses portion
    Mỗi octe = 16bit
    Không gian địa chỉ: 2^128 =  ???



  1. Link local Address.
+ FE80::/10
+ node on local link can use link-local address to communicate.  They do not need globally unique addresses to communicate
+ when ping to address, need outgoing interface.
+ IPv6 routers should not forward packets that have link-local source or destination addresses to other links
-> This means that packets with link-local addresses cannot be routed between interfaces

  1. IPv6 Unique Local Addressing (ULA)
+ FEC0::/10  = ip private in IPv4
+ ULA address are not public routable prefixes on the Internet.
+ The format of the ULA is:
FC00 (7 bits) + Unique ID (41 bits) + Link ID (16 bits) + Interface ID (64 bits)


  1. IPv6 Global Aggregatable Addressing
+ start with the binary prefix 001 (2000::/3) range 2000::-3FFF::.
+ use global unicast address, are public allocated and routetable on the internet.
+ 2001::/16 is currently used for allocation.

  1. IPv6 EUI-64 Addressing
+  IPv6 host addresses are generated from interface MAC addresses
+  A MAC address is 48-bits and IPv6 host address is 64-bits
+  The extra 16-bits are derived as follows:
>> MAC address 1234.5678.9012
>> Invert the 7th most significant bit (in binary) = 00010010 > 00010000 (thus 12 becomes 10)
= 1034.5678.9012
>> Insert FFFE in the middle
= 1034.56FF.FE78.9012

  1.