Sunday, July 3, 2011

IPv6 Dual Stack

IPv6 was delivered with  some migration techniques,one of the technique called dual stack
it is a way to implement IPv6 and still remain compatible with IPv4 to run Both IPv4 and IPv6
either independently or in a hybrid form. The hybrid form is commonly implemented in modern operating systems supporting IPv6.Dual-stack hosts are described in RFC 4213.

Example of configure:
Two IPv6/IPv4 nodes, R1 and R2, are connected to each other via a GigabitEthernet interface.
The GigabitEthernet interface is configured with an IPv4 as well as an IPv6 address


R1:
ipv6 unicast-routing
ipv6 cef
!
interface Loopback 0
 ip address 1.1.1.1 255.255.255.255
!
interface Loopback 1
 ipv6 address 2002:ABAA::/64 eui-64
 ipv6 rip YANIV enable
!
interface GigabitEthernet1/0
 ip address 11.1.1.1 255.255.255.252
 ipv6 address 2001::/64 eui-64
 ipv6 rip YANIV enable
!
router ospf 1
 network 1.1.1.1 0.0.0.0 area 0
 network 11.1.1.0 0.0.0.3 area 0
!
ipv6 router rip YANIV

________________________________
R2:
ipv6 unicast-routing
ipv6 cef
!
interface Loopback 0
 ip address 2.2.2.2 255.255.255.255
!
interface Loopback 1
 ipv6 address 2003:ABAA::/64 eui-64
 ipv6 rip YANIV enable
!
interface GigabitEthernet1/0
 ip address 11.1.1.2 255.255.255.252
 ipv6 address 2001::/64 eui-64
 ipv6 rip YANIV enable
!
router ospf 1
 network 2.2.2.2 0.0.0.0 area 0
 network 11.1.1.0 0.0.0.3 area 0
!
ipv6 router rip YANIV
!

___________________________________________

R1#sh ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        unassigned      YES unset  administratively down down   
GigabitEthernet1/0     11.1.1.1        YES manual up                    up     
Loopback0              1.1.1.1         YES manual up                    up     
Loopback1              unassigned      YES unset  up                    up

R1#show ip route | begin Gateway
Gateway of last resort is not set
     1.0.0.0/32 is subnetted, 1 subnets
C       1.1.1.1 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/2] via 11.1.1.2, 00:01:22, GigabitEthernet1/0
     11.0.0.0/30 is subnetted, 1 subnets
C       11.1.1.0 is directly connected, GigabitEthernet1/0

R1#sh ipv6 interface brief
FastEthernet0/0            [administratively down/down]
    unassigned
GigabitEthernet1/0         [up/up]
    FE80::C800:8FF:FE7C:1C
    2001::C800:8FF:FE7C:1C
Loopback0                  [up/up]
    unassigned
Loopback1                  [up/up]
    FE80::C800:8FF:FE7C:0
    2002:ABAA::C800:8FF:FE7C:0

R1#show ipv6 route
IPv6 Routing Table - 7 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
C   2001::/64 [0/0]
     via ::, GigabitEthernet1/0
L   2001::C800:8FF:FE7C:1C/128 [0/0]
     via ::, GigabitEthernet1/0
C   2002:ABAA::/64 [0/0]
     via ::, Loopback1
L   2002:ABAA::C800:8FF:FE7C:0/128 [0/0]
     via ::, Loopback1
R   2003:ABAA::/64 [120/2]
     via FE80::C801:8FF:FE7C:1C, GigabitEthernet1/0
L   FE80::/10 [0/0]
     via ::, Null0
L   FF00::/8 [0/0]
     via ::, Null0

Further reading:
http://www.cisco.com/en/US/prod/collateral/iosswrel/ps6537/ps6553/aag_c45-625513.pdf
http://www.cisco.com/en/US/docs/ios/ipv6/configuration/guide/12_4t/ipv6_12_4t_book.html
http://www.cisco.com/en/US/technologies/tk648/tk872/technologies_white_paper0900aecd8026003d.pdf
http://packetlife.net/media/library/8/IPv6.pdf

Sunday, January 2, 2011

Bidir PIM


Bidirectional shared trees use the same tree for traffic from sources towards RP and from RP to receivers

On each link, the router with the best path to the RP is elected to be the Designated Forwarder
The Designated Forwarder is responsible for forwarding upstream towards the RP
ROSH#
ROSH#sh run
Building configuration...

Current configuration : 1417 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname ROSH
!
boot-start-marker
boot-end-marker
!
!
ip subnet-zero
ip cef
!
!
no ip domain-lookup
!
ip multicast-routing 
no mpls traffic-eng auto-bw timers frequency 0
call rsvp-sync
!         
!
!
!
!
!
!
!
interface Loopback0
 ip address 172.18.5.5 255.255.255.255
 no clns route-cache
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
 no clns route-cache
!
interface FastEthernet1/0
 ip address 172.18.25.5 255.255.255.0
 ip pim sparse-mode
 duplex auto
 speed auto
 no clns route-cache
!
interface FastEthernet1/1
 ip address 10.255.1.2 255.255.255.0
 ip pim sparse-mode
 duplex auto
 speed auto
 standby 1 ip 10.255.1.1
 standby 1 priority 105
 standby 1 preempt
 no clns route-cache
!
router ospf 1
 log-adjacency-changes
 network 10.255.1.2 0.0.0.0 area 0
 network 172.18.5.5 0.0.0.0 area 0
 network 172.18.25.5 0.0.0.0 area 0
!
ip classless
!
no ip http server
!
ip pim bidir-enable
ip pim autorp listener
!
!
no cdp run
!
!
!
control-plane
!
!
dial-peer cor custom
!
!
!
alias exec si show ip int brie
alias exec sr sh ip route
alias exec son show ip ospf neigh
alias exec vrf show ip vrf interface
alias exec sib show ip bgp vpnv4 all summ
alias exec srb sh run | b router bgp
!
line con 0
 exec-timeout 0 0
 logging synchronous
 stopbits 1
line aux 0
 stopbits 1
line vty 0 4
!
!
end

ROSH#       



RISH#

RISH#sh run
Building configuration...

Current configuration : 1693 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname RISH
!
boot-start-marker
boot-end-marker
!
!
ip subnet-zero
ip cef
!
!
no ip domain-lookup
!
ip multicast-routing 
no mpls traffic-eng auto-bw timers frequency 0
call rsvp-sync
!         
!
!
!
!
!
!
!
interface Loopback0
 ip address 172.18.1.1 255.255.255.255
 ip pim sparse-mode
 no clns route-cache
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
 no clns route-cache
!
interface FastEthernet1/0
 ip address 172.18.31.1 255.255.255.0
 ip pim sparse-mode
 duplex auto
 speed auto
!
interface FastEthernet1/1
 ip address 172.18.12.3 255.255.255.0
 ip pim sparse-mode
 duplex auto
 speed auto
 no clns route-cache
!
interface FastEthernet2/0
 ip address 10.255.1.3 255.255.255.0
 ip pim sparse-mode
 duplex auto
 speed auto
 standby 1 ip 10.255.1.1
 standby 1 preempt
 no clns route-cache
!
interface FastEthernet2/1
 no ip address
 shutdown
 duplex auto
 speed auto
 no clns route-cache
!
router ospf 1
 log-adjacency-changes
 network 10.255.1.3 0.0.0.0 area 0
 network 172.18.1.1 0.0.0.0 area 0
 network 172.18.12.3 0.0.0.0 area 0
 network 172.18.31.1 0.0.0.0 area 0
!
ip classless
!
no ip http server
!
ip pim bidir-enable
ip pim autorp listener
ip pim send-rp-discovery scope 10
!
!
no cdp run
!
!
!
control-plane
!         
!
dial-peer cor custom
!
!
!
alias exec si show ip int brie
alias exec sr sh ip route
alias exec son show ip ospf neigh
alias exec vrf show ip vrf interface
alias exec sib show ip bgp vpnv4 all summ
alias exec srb sh run | b router bgp
!
line con 0
 exec-timeout 0 0
 logging synchronous
 stopbits 1
line aux 0
 stopbits 1
line vty 0 4
!
!
end
          
RISH# 




PT#

PT#sh run
Building configuration...

Current configuration : 1465 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname PT
!
boot-start-marker
boot-end-marker
!
!
ip subnet-zero
ip cef
!
!
no ip domain-lookup
!
ip multicast-routing 
no mpls traffic-eng auto-bw timers frequency 0
call rsvp-sync
!         
!
!
!
!
!
!
!
interface Loopback0
 ip address 172.18.3.3 255.255.255.255
 ip pim sparse-mode
 no clns route-cache
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
 no clns route-cache
!
interface FastEthernet1/0
 ip address 172.18.43.3 255.255.255.0
 ip pim sparse-mode
 duplex auto
 speed auto
 no clns route-cache
!
interface FastEthernet1/1
 ip address 172.18.31.3 255.255.255.0
 ip pim sparse-mode
 duplex auto
 speed auto
 no clns route-cache
!
router ospf 1
 log-adjacency-changes
 network 172.18.3.3 0.0.0.0 area 0
 network 172.18.31.3 0.0.0.0 area 0
 network 172.18.43.3 0.0.0.0 area 0
!
ip classless
!
no ip http server
!
ip pim bidir-enable
ip pim autorp listener
ip pim send-rp-announce Loopback0 scope 10 group-list 1 bidir
!         
!
access-list 1 permit 239.0.0.0 0.255.255.255
!
!
!
control-plane
!
!
dial-peer cor custom
!
!
!
alias exec si show ip int brie
alias exec sr sh ip route
alias exec son show ip ospf neigh
alias exec vrf show ip vrf interface
alias exec sib show ip bgp vpnv4 all summ
alias exec srb sh run | b router bgp
!
line con 0
 exec-timeout 0 0
 logging synchronous
 stopbits 1
line aux 0
 stopbits 1
line vty 0 4
!
!
end

PT#          









TA#


TA#
TA#
TA#
TA#sh run
Building configuration...

Current configuration : 1732 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname TA
!
boot-start-marker
boot-end-marker
!
!
ip subnet-zero
ip cef
!
!
no ip domain-lookup
!
ip multicast-routing 
no mpls traffic-eng auto-bw timers frequency 0
call rsvp-sync
!         
!
!
!
!
!
!
!
interface Loopback0
 ip address 172.18.2.2 255.255.255.255
 ip pim sparse-mode
 no clns route-cache
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
 no clns route-cache
!
interface FastEthernet1/0
 ip address 172.18.42.2 255.255.255.0
 ip pim sparse-mode
 duplex auto
 speed auto
 no clns route-cache
!
interface FastEthernet1/1
 ip address 172.18.12.2 255.255.255.0
 ip pim sparse-mode
 duplex auto
 speed auto
 no clns route-cache
!
interface FastEthernet2/0
 ip address 172.18.25.3 255.255.255.0
 ip pim sparse-mode
 duplex auto
 speed auto
 no clns route-cache
!
interface FastEthernet2/1
 no ip address
 shutdown
 duplex auto
 speed auto
 no clns route-cache
!         
router ospf 1
 log-adjacency-changes
 network 172.18.2.2 0.0.0.0 area 0
 network 172.18.12.2 0.0.0.0 area 0
 network 172.18.25.3 0.0.0.0 area 0
 network 172.18.42.2 0.0.0.0 area 0
!
ip classless
!
no ip http server
!
ip pim bidir-enable
ip pim autorp listener
ip pim send-rp-announce Loopback0 scope 10 group-list 1 bidir
!
!
access-list 1 permit 239.0.0.0 0.255.255.255
!
!
!
control-plane
!
!         
dial-peer cor custom
!
!
!
alias exec si show ip int brie
alias exec sr sh ip route
alias exec son show ip ospf neigh
alias exec vrf show ip vrf interface
alias exec sib show ip bgp vpnv4 all summ
alias exec srb sh run | b router bgp
!
line con 0
 exec-timeout 0 0
 logging synchronous
 stopbits 1
line aux 0
 stopbits 1
line vty 0 4
!
!
end

TA#                                     






HFA#

HFA#sh run
Building configuration...

Current configuration : 1627 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname HFA
!
boot-start-marker
boot-end-marker
!
!
ip subnet-zero
ip cef
!
!
no ip domain-lookup
!
ip multicast-routing 
no mpls traffic-eng auto-bw timers frequency 0
call rsvp-sync
!         
!
!
!
!
!
!
!
interface Loopback0
 ip address 172.18.4.4 255.255.255.255
 no clns route-cache
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex half
 no clns route-cache
!
interface FastEthernet1/0
 ip address 10.223.1.2 255.255.255.252
 ip igmp join-group 239.8.1.1
 duplex auto
 speed auto
 no clns route-cache
!
interface FastEthernet1/1
 ip address 172.18.43.4 255.255.255.0
 ip pim sparse-mode
 duplex auto
 speed auto
 no clns route-cache
!
interface FastEthernet2/0
 ip address 172.18.42.4 255.255.255.0
 ip pim sparse-mode
 duplex auto
 speed auto
 no clns route-cache
!
interface FastEthernet2/1
 no ip address
 shutdown
 duplex auto
 speed auto
 no clns route-cache
!
router ospf 1
 log-adjacency-changes
 network 10.223.1.2 0.0.0.0 area 0
 network 172.18.4.4 0.0.0.0 area 0
 network 172.18.42.4 0.0.0.0 area 0
 network 172.18.43.4 0.0.0.0 area 0
!
ip classless
!
no ip http server
!
ip pim bidir-enable
ip pim autorp listener
!
!
no cdp run
!
!
!
control-plane
!
!
dial-peer cor custom
!         
!
!
alias exec si show ip int brie
alias exec sr sh ip route
alias exec son show ip ospf neigh
alias exec vrf show ip vrf interface
alias exec sib show ip bgp vpnv4 all summ
alias exec srb sh run | b router bgp
!
line con 0
 exec-timeout 0 0
 logging synchronous
 stopbits 1
line aux 0
 stopbits 1
line vty 0 4
!
!
end

HFA#


All Pim router Domin are enable the pim Bidir
using ip pim bidir-enable command

 PIM Bidir need a RP we use here a auto-rp
Every router link election the DF win base on the metric,by the Offer message on the link

ROSH#sh ip route 172.18.3.3
Routing entry for 172.18.3.3/32
  Known via "ospf 1", distance 110, metric 3, type intra area
  Last update from 10.255.1.3 on FastEthernet1/1, 10:23:18 ago
  Routing Descriptor Blocks:
  * 10.255.1.3, from 172.18.3.3, 10:23:18 ago, via FastEthernet1/1
      Route metric is 3, traffic share count is 1

RISH#sh ip route  172.18.3.3
Routing entry for 172.18.3.3/32
  Known via "ospf 1", distance 110, metric 2, type intra area
  Last update from 172.18.31.3 on FastEthernet1/0, 10:23:51 ago
  Routing Descriptor Blocks:
  * 172.18.31.3, from 172.18.3.3, 10:23:51 ago, via FastEthernet1/0
      Route metric is 2, traffic share count is 1


debug ip pim df 

     11:34:57: PIM(0): Receive DF Winner message from 10.255.1.3 on FastEthernet1/1 (Non-DF)
11:34:57: PIM(0): RP 172.18.3.3, pref 110, metric 2
11:34:57: PIM(0): Metric is better

debug ip pim df 

11:35:02: PIM(0): Send v2 Winner on FastEthernet2/0 (DF) for RP 172.18.3.3
11:35:02: PIM(0): Sender 10.255.1.3, pref 110, metric 2

The show ip mroute output  on HFA shown the (*,239.8.1.1) entry FastEthernet1/1 present in both incoming and outgoing interface list as Bidir-upstream. This is not possible in PIM-SM


HFA#sh ip mroute  239.8.1.1
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, B - Bidir Group, s - SSM Group, C - Connected,
       L - Local, P - Pruned, R - RP-bit set, F - Register flag,
       T - SPT-bit set, J - Join SPT, M - MSDP created entry,
       X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
       U - URD, I - Received Source Specific Host Report, Z - Multicast Tunnel
       Y - Joined MDT-data group, y - Sending to MDT-data group
Outgoing interface flags: H - Hardware switched, A - Assert winner
 Timers: Uptime/Expires
 Interface state: Interface, Next-Hop or VCD, State/Mode

(*, 239.8.1.1), 00:00:42/00:02:59, RP 172.18.3.3, flags: BPL
  Bidir-Upstream: FastEthernet1/1, RPF nbr 172.18.43.3
  Outgoing interface list:
    FastEthernet1/1, Bidir-Upstream/Sparse, 00:00:42/00:00:00