Wednesday, 20 November 2019

PIM Sparse Mode


PIM Sparse Mode 



(PIM-SM)  PIM Sparse Mode explicitly builds unidirectional shared trees rooted at a (RP) rendezvous point per group, and optionally creates shortest-path trees per source. (PIM-SM) PIM Sparse Mode generally scales fairly well for wide-area usage.




Sparse-mode protocol do not forward the group traffic to any other router unless it receives a message from that router  requesting copies of packet sent to particular group.

The PIM spares mode operation begins with the packet being forwarded to special router called the rendezvous point (RP).


PIM Sparse Mode uses explicit join means (not receive unless you ask for). PIM Sparse Mode uses both shared tree & source tree, more scalable.

let see the configuration for better understanding.

Topology:


GOAL:


  • configure the topology as per the diagram 
  • configure the IP addresses as per the topology 
  • configure OSPF 100 advertise the interfaces  
  • configure manually IGMP multicast group membership on router 2 for testing.
  • configure router 2 loopback (120.1.1.1) a static rendezvous point (RP) advertise in OSPF 100 with the mask 32.
  • configure RP address on all the routers. 



R1#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol

FastEthernet0/0        10.1.1.1        YES NVRAM  up                    up
Serial3/0                    1.1.1.1         YES NVRAM  up                    up
Serial3/2                    3.3.3.2         YES NVRAM  up                    up


R2#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol

FastEthernet0/0        20.1.1.1        YES NVRAM  up                    up
Serial3/0                    1.1.1.2         YES NVRAM  up                    up
Serial3/1                    2.2.2.1         YES NVRAM  up                    up
Loopback0              120.1.1.1       YES NVRAM  up                    up



R3#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol

FastEthernet0/0        30.1.1.1        YES NVRAM  up                    up
Serial3/1                     2.2.2.2         YES NVRAM  up                    up
Serial3/2                    3.3.3.1         YES NVRAM  up                    up
Serial3/3                    4.4.4.2         YES NVRAM  up                    up

R4#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol

FastEthernet0/0        40.1.1.1        YES NVRAM  up                    up
Serial3/3                    4.4.4.1         YES NVRAM  up                    up


R1(config)#router ospf 100
R1(config-router)#network 10.0.0.0 0.255.255.255 area 0
R1(config-router)#network 1.0.0.0 0.255.255.255 area 0
R1(config-router)#network 3.0.0.0 0.255.255.255 area 0
R1(config-router)#exit


*Nov 19 20:58:03.523: %OSPF-5-ADJCHG: Process 100, Nbr 120.1.1.1 on Serial3/0 from LOADING to FULL, Loading Done

*Nov 19 20:58:52.515: %OSPF-5-ADJCHG: Process 100, Nbr 30.1.1.1 on Serial3/2 from LOADING to FULL, Loading Done




R2(config)#router ospf 100
R2(config-router)#network 20.0.0.0 0.255.255.255 area 0
R2(config-router)#network 2.0.0.0 0.255.255.255 area 0
R2(config-router)#network 1.0.0.0 0.255.255.255 area 0
R2(config-router)#exit

*Nov 19 20:58:03.611: %OSPF-5-ADJCHG: Process 100, Nbr 3.3.3.2 on Serial3/0 from LOADING to FULL, Loading Done

*Nov 19 20:58:57.567: %OSPF-5-ADJCHG: Process 100, Nbr 30.1.1.1 on Serial3/1 from LOADING to FULL, Loading Done

 R3(config)#router ospf 100
R3(config-router)#network 30.0.0.0 0.255.255.255 area 0
R3(config-router)#network 3.0.0.0 0.255.255.255 area 0
R3(config-router)#network 2.0.0.0 0.255.255.255 area 0
R3(config-router)#network 4.0.0.0 0.255.255.255 area 0
R3(config-router)#exit

*Nov 19 20:58:52.531: %OSPF-5-ADJCHG: Process 100, Nbr 3.3.3.2 on Serial3/2 from LOADING to FULL, Loading Done

*Nov 19 20:58:57.443: %OSPF-5-ADJCHG: Process 100, Nbr 120.1.1.1 on Serial3/1 from LOADING to FULL, Loading Done

R4(config)#router ospf 100
R4(config-router)#network 40.0.0.0 0.255.255.255 area 0
R4(config-router)#network 4.0.0.0 0.255.255.255 area 0
R4(config-router)#exit

*Nov 19 21:01:57.783: %OSPF-5-ADJCHG: Process 100, Nbr 30.1.1.1 on Serial3/3 from LOADING to FULL, Loading Done



R1(config)#ip multicast-routing

R1(config)#interface serial 3/0
R1(config-if)#ip pim sparse-mode
R1(config-if)#exit

R1(config-if)#interface serial 3/2
R1(config-if)#ip pim sparse-mode
R1(config-if)#exit

R1(config)#interface fastEthernet 0/0
R1(config-if)#ip pim sparse-mode
R1(config-if)#exit

*Nov 19 21:07:27.535: %PIM-5-DRCHG: DR change from neighbor 0.0.0.0 to 10.1.1.1 on interface FastEthernet0/0





R2(config)#ip multicast-routing

R2(config)#interface serial 3/0
R2(config-if)#ip pim sparse-mode
R2(config-if)#exit

R2(config)#interface serial 3/1
R2(config-if)#ip pim sparse-mode
R2(config-if)#exit

R2(config)#interface fastEthernet 0/0
R2(config-if)#ip pim sparse-mode
R2(config-if)#exit


R3(config)#ip multicast-routing

R3(config)#interface serial 3/1
R3(config-if)#ip pim sparse-mode
R3(config-if)#exit

R3(config)#interface serial 3/2
R3(config-if)#ip pim sparse-mode
R3(config-if)#exit

R3(config)#interface serial 3/3
R3(config-if)#ip pim sparse-mode
R3(config-if)#exit

R3(config)#interface fastEthernet 0/0
R3(config-if)#ip pim sparse-mode
R3(config-if)#exit

R4(config)#ip multicast-routing

R4(config)#interface serial 3/3
R4(config-if)#ip pim sparse-mode
R4(config-if)#exit


R4(config)#interface fastEthernet 0/0
R4(config-if)#ip pim sparse-mode
R4(config-if)#exit

*Nov 19 21:12:44.031: %PIM-5-DRCHG: DR change from neighbor 0.0.0.0 to 40.1.1.1 on interface FastEthernet0/0


R1#show ip pim interface

Address          Interface                Ver/   Nbr    Query  DR     DR
                                                   Mode   Count  Intvl  Prior
10.1.1.1         FastEthernet0/0    v2/S   0      30     1      10.1.1.1
1.1.1.1          Serial3/0                v2/S   1      30     1      0.0.0.0
3.3.3.2          Serial3/2                v2/S   1      30     1      0.0.0.0


R2(config)#router ospf 100
R2(config-router)#network 120.0.0.0 255.0.0.0 area 0
R2(config-router)#exit

R1(config)#ip pim rp-address 120.1.1.1
R1(config)#exit

*Nov 19 22:18:17.103: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel0, changed state to up

R2(config)#interface loopback 0
R2(config-if)#ip ospf network point-to-point
R2(config-if)#exit


*Nov 19 22:18:16.771: %PIM-6-INVALID_RP_JOIN: Received (*, 224.0.1.40) Join from 1.1.1.1 for invalid RP 120.1.1.1

R2(config)#ip pim rp-address 120.1.1.1

*Nov 19 22:18:33.263: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel0, changed state to up

*Nov 19 22:18:33.375: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel1, changed state to up



R2(config)#interface fastEthernet 0/0
R2(config-if)#ip igmp join-group 224.2.2.2
R2(config-if)#exit


(let see some show command for verification)

 From Router 1




 From Router 2



  From Router 3




 From Router 4



 From Router 2




 From Router 1



 From Router 2

 From Router 3



 From Router 4





Wednesday, 13 November 2019

What is Reverse Path Forwarding (RPF) check?


To prevent loops, router do not forward multicast out the same interface on which they were received. Multicast routers use a reverse path forwarding (RPF) check to prevent loops. A multicast router does not forward any multicast packet unless the packet passes the RPF check.


The RPF check compares incoming packets with the unicast routing table to determine if a packet is arriving on the correct interface.


The issue of receiving duplicate packets, Cisco routers perform a reverse path forwarding (RPF)
Check to determine whether a multicast packet is entering a router on the correct interface





An RPF check examines the source address of an incoming packet and check it against the router’s uni-cast routing table to see what interface should be used to get back to the source network. If the incoming multicast packet is using that interface, the RPF  check passes, and the packet is forwarded.
If the multicast packet is coming in a different interface, the RPF check fails, and packet is discarded.

Configuration click here

Saturday, 12 October 2019

PIM (Protocol Independent Multicast) PIM Dense-Mode configuration


First of all we already know what is multicast ? why do we need it? and what is IGPM and its work? in this section we will talk about multicast routing protocol PIM Protocol independent multicast. 

IP Multicast Routing Protocols

  • Distance vector multicast routing protocol (DVMRP) (legacy)
  • Multicast OSPF (MOSPF) (legacy)
  • Protocol-independent multicast (PIM)

PIM (Protocol Independent Multicast) is a family of multicast routing protocols. The word independent comes from the fact that PIM does not build a topology of its own, it uses the information from IGP routing protocols to achieve this. 
There are a number of different PIM flavors:
  •  PIM Sparse-Mode 
  •  PIM Dense-Mode
  •  Bidirectional PIM 
  •  Source Specific PIM.






Protocol independent multicast Provides loop free router to router communication. PIM rely on IGP to figure out the network is loop free (using RPF check). PIM do not advertise the routes throughout the network (like IGP).






PIM (Protocol Independent Multicast) Modes


PIM modes tells how the multicast tree is build from sender to receiver. PIM mode will decide how the tree is built, and who will receive traffic.

PIM supports three different modes:
  1. PIM Dense mode
  2. PIM Sparse mode
  3. PIM Sparse-Dense mode


Dense mode Considered as implicit join Use flood and prune behavior 


Dense mode: we forward multicast traffic on all interfaces until a downstream router requests us to stop forwarding.

Pim dense mode Uses implicit join get traffic even if not asked Also called as flood and prune.
PIM Dense mode Suitable for small multicast implementation. Default hello= 30 sec & dead= 90 sec Discover PIM neighbor (uses 224.0.0.13). Flood all the multicast traffic on all PIM enable interfaces Prune unwanted traffic Maintain multicast table.

PIM Dense mode summary

  • PIM flood the multicast packet to all routers in the network and the prunes routers that do not service members of that particular multicast group.
  • PIM-dense mode is most useful in the following cases:
  • Senders and receivers are in close proximity to one another.
  • There are few senders and many receivers.
  • The volume of multicast traffic is high
  • The stream of multicast traffic is constant.

Nevertheless, PIM-dense mode is not the method of choice for enterprise and service provider customers because of its scalability and flooding properties.

.

lets see the configuration for better understanding:-

Topology:







GOAL:


  • Configure the topology as per the diagram.
  • assign the IP addresses as shown in the diagram.
  • configure IGP as EIGRP  AS 100
  • advertise all the interfaces as per the diagram 
  • configure IP multicast on all the interfaces using IP PIM dense mode 
  • for testing configure router 5 fastEthernet 0/0 interface to join multicast group 224.5.5.5
  • make sure that all the routers should ping to this multicast group on router 5.

R1#show ip interface brief

Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        10.1.1.1        YES manual up                    up
Serial3/0              1.1.1.1         YES manual up                    up
Serial3/3              4.4.4.2         YES manual up                    up


R2#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        20.1.1.1        YES manual up                    up
Serial3/0              1.1.1.2         YES manual up                    up
Serial3/1              2.2.2.1         YES manual up                    up
Serial3/5              5.5.5.2         YES manual up                    up


R3#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        30.1.1.1        YES manual up                    up
Serial3/1              2.2.2.2         YES manual up                    up
Serial3/2              3.3.3.1         YES manual up                    up


R4#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        40.1.1.1        YES manual up                    up
Serial3/2              3.3.3.2         YES manual up                    up
Serial3/3              4.4.4.1         YES manual up                    up


R5#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        50.1.1.1        YES manual up                    up
Serial3/5              5.5.5.1         YES manual up                          up


R1(config)#router eigrp 100
R1(config-router)#network 10.0.0.0
R1(config-router)#network 4.0.0.0
R1(config-router)#network 1.0.0.0
R1(config-router)#no auto-summary
R1(config-router)#exit


R2(config)#router eigrp 100
R2(config-router)#network 1.0.0.0
R2(config-router)#network 2.0.0.0
R2(config-router)#network 20.0.0.0
R2(config-router)#network 5.0.0.0
R2(config-router)#no auto-summary
R2(config-router)#exit


R3(config)#router eigrp 100
R3(config-router)#network 2.0.0.0
R3(config-router)#network 3.0.0.0
R3(config-router)#network 30.0.0.0
R3(config-router)#no auto-summary
R3(config-router)#exit


R4(config)#router eigrp 100
R4(config-router)#network 3.0.0.0
R4(config-router)#network 4.0.0.0
R4(config-router)#network 40.0.0.0
R4(config-router)#no auto-summary
R4(config-router)#exit

R5(config)#router eigrp 100
R5(config-router)#network 5.0.0.0
R5(config-router)#network 50.0.0.0
R5(config-router)#no auto-summary
R5(config-router)#exit

R1#show ip eigrp 100 neighbors
EIGRP-IPv4 Neighbors for AS(100)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
1   4.4.4.1                 Se3/3                    11 00:05:26   61   366  0  12
0   1.1.1.2                 Se3/0                    12 00:07:29   75   450  0  20

R1#show ip route eigrp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

D     2.0.0.0/8 [90/2681856] via 1.1.1.2, 00:05:39, Serial3/0
D     3.0.0.0/8 [90/2681856] via 4.4.4.1, 00:05:39, Serial3/3
D     5.0.0.0/8 [90/2681856] via 1.1.1.2, 00:07:13, Serial3/0
D     20.0.0.0/8 [90/2172416] via 1.1.1.2, 00:07:31, Serial3/0
D     30.0.0.0/8 [90/2684416] via 4.4.4.1, 00:05:39, Serial3/3
                 [90/2684416] via 1.1.1.2, 00:05:39, Serial3/0
D     40.0.0.0/8 [90/2172416] via 4.4.4.1, 00:05:33, Serial3/3
D     50.0.0.0/8 [90/2684416] via 1.1.1.2, 00:04:06, Serial3/0




R2#show ip eigrp neighbors
EIGRP-IPv4 Neighbors for AS(100)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
2   5.5.5.1                 Se3/5                    11 00:04:52   40   240  0  4
1   2.2.2.2                 Se3/1                    14 00:07:14   68   408  0  14
0   1.1.1.1                 Se3/0                    12 00:08:24   80   480  0  15

R2#show ip route eigrp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set


D     3.0.0.0/8 [90/2681856] via 2.2.2.2, 00:06:31, Serial3/1
D     4.0.0.0/8 [90/2681856] via 1.1.1.1, 00:06:31, Serial3/0
D     10.0.0.0/8 [90/2172416] via 1.1.1.1, 00:08:33, Serial3/0
D     30.0.0.0/8 [90/2172416] via 2.2.2.2, 00:07:14, Serial3/1
D     40.0.0.0/8 [90/2684416] via 2.2.2.2, 00:06:25, Serial3/1
                 [90/2684416] via 1.1.1.1, 00:06:25, Serial3/0
D     50.0.0.0/8 [90/2172416] via 5.5.5.1, 00:04:58, Serial3/5




R3#show ip eigrp neighbors
EIGRP-IPv4 Neighbors for AS(100)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
1   3.3.3.2                 Se3/2                    13 00:07:08   74   444  0  11
0   2.2.2.1                 Se3/1                    11 00:07:58   76   456  0  21


R3#show ip route eigrp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

D     1.0.0.0/8 [90/2681856] via 2.2.2.1, 00:07:11, Serial3/1
D     4.0.0.0/8 [90/2681856] via 3.3.3.2, 00:07:11, Serial3/2
D     5.0.0.0/8 [90/2681856] via 2.2.2.1, 00:08:04, Serial3/1
D     10.0.0.0/8 [90/2684416] via 3.3.3.2, 00:07:11, Serial3/2
                 [90/2684416] via 2.2.2.1, 00:07:11, Serial3/1
D     20.0.0.0/8 [90/2172416] via 2.2.2.1, 00:08:04, Serial3/1
D     40.0.0.0/8 [90/2172416] via 3.3.3.2, 00:07:05, Serial3/2
D     50.0.0.0/8 [90/2684416] via 2.2.2.1, 00:05:38, Serial3/1

R4#show ip eigrp neighbors
EIGRP-IPv4 Neighbors for AS(100)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
1   4.4.4.2                 Se3/3                    12 00:07:58   99   594  0  14
0   3.3.3.1                 Se3/2                    13 00:08:02   78   468  0  15


R4#show ip route eigrp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set

D     1.0.0.0/8 [90/2681856] via 4.4.4.2, 00:08:07, Serial3/3
D     2.0.0.0/8 [90/2681856] via 3.3.3.1, 00:08:07, Serial3/2
D     5.0.0.0/8 [90/3193856] via 4.4.4.2, 00:08:07, Serial3/3
                [90/3193856] via 3.3.3.1, 00:08:07, Serial3/2
D     10.0.0.0/8 [90/2172416] via 4.4.4.2, 00:08:07, Serial3/3
D     20.0.0.0/8 [90/2684416] via 4.4.4.2, 00:08:07, Serial3/3
                 [90/2684416] via 3.3.3.1, 00:08:07, Serial3/2
D     30.0.0.0/8 [90/2172416] via 3.3.3.1, 00:08:07, Serial3/2
D     50.0.0.0/8 [90/3196416] via 4.4.4.2, 00:06:34, Serial3/3
                 [90/3196416] via 3.3.3.1, 00:06:34, Serial3/2



R5#show ip eigrp neighbors
EIGRP-IPv4 Neighbors for AS(100)
H   Address                 Interface              Hold Uptime   SRTT   RTO  Q  Seq
                                                   (sec)         (ms)       Cnt Num
0   5.5.5.2                 Se3/5                    11 00:07:11   46   276  0  19

R5#show ip route eigrp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       + - replicated route, % - next hop override

Gateway of last resort is not set


D     1.0.0.0/8 [90/2681856] via 5.5.5.2, 00:07:21, Serial3/5
D     2.0.0.0/8 [90/2681856] via 5.5.5.2, 00:07:21, Serial3/5
D     3.0.0.0/8 [90/3193856] via 5.5.5.2, 00:07:21, Serial3/5
D     4.0.0.0/8 [90/3193856] via 5.5.5.2, 00:07:21, Serial3/5
D     10.0.0.0/8 [90/2684416] via 5.5.5.2, 00:07:21, Serial3/5
D     20.0.0.0/8 [90/2172416] via 5.5.5.2, 00:07:21, Serial3/5
D     30.0.0.0/8 [90/2684416] via 5.5.5.2, 00:07:21, Serial3/5
D     40.0.0.0/8 [90/3196416] via 5.5.5.2, 00:07:21, Serial3/5

R1(config)#ip multicast-routing

R1(config)#interface serial 3/0

R1(config-if)#ip pim dense-mode

R1(config)#interface serial 3/3

R1(config-if)#ip pim dense-mode

R1(config-if)#int f0/0

R1(config-if)#ip pim dense-mode

*Oct 12 04:42:13.507: %PIM-5-DRCHG: DR change from neighbor 0.0.0.0 to 10.1.1.1 on interface FastEthernet0/0

*Oct 12 04:42:43.595: %PIM-5-NBRCHG: neighbor 1.1.1.2 UP on interface Serial3/0

*Oct 12 04:50:27.739: %PIM-5-NBRCHG: neighbor 4.4.4.1 UP on interface Serial3/3

R1(config-if)#exit

R2(config)#ip multicast-routing

R2(config)#int serial 3/0

R2(config-if)#ip pim dense-mode

*Oct 12 04:42:43.755: %PIM-5-NBRCHG: neighbor 1.1.1.1 UP on interface Serial3/0

R2(config)#interface serial 3/1

R2(config-if)#ip pim dense-mode

R2(config)#interface serial 3/5

R2(config-if)#ip pim dense-mode

R2(config-if)#interface f0/0

R2(config-if)#interface f0/0

R2(config-if)#ip pim dense-mode

*Oct 12 04:44:12.411: %PIM-5-DRCHG: DR change from neighbor 0.0.0.0 to 20.1.1.1 on interface FastEthernet0/0

*Oct 12 04:49:10.347: %PIM-5-NBRCHG: neighbor 2.2.2.2 UP on interface Serial3/1

R2(config-if)#exit


R3(config)#ip multicast-routing

R3(config)#interface f0/0

R3(config-if)#ip pim dense-mode

*Oct 12 04:48:44.135: %PIM-5-DRCHG: DR change from neighbor 0.0.0.0 to 30.1.1.1 on interface FastEthernet0/0

R3(config-if)#int serial 3/1

R3(config-if)#ip pim dense-mode

*Oct 12 04:49:10.063: %PIM-5-NBRCHG: neighbor 2.2.2.1 UP on interface Serial3/1

R3(config-if)#int serial 3/2
R3(config-if)#ip pim dense-mode

*Oct 12 04:50:17.187: %PIM-5-NBRCHG: neighbor 3.3.3.2 UP on interface Serial3/2

R3(config-if)#exit

R4(config)#ip multicast-routing
R4(config)#int f0/0

R4(config-if)#ip pim dense-mode

*Oct 12 04:50:01.915: %PIM-5-DRCHG: DR change from neighbor 0.0.0.0 to 40.1.1.1 on interface FastEthernet0/0

R4(config-if)#int s3/2

R4(config-if)#ip pim dense-mode

*Oct 12 04:50:17.539: %PIM-5-NBRCHG: neighbor 3.3.3.1 UP on interface Serial3/2
R4(config-if)#int se3/3

R4(config-if)#ip pim dense-mode

*Oct 12 04:50:27.947: %PIM-5-NBRCHG: neighbor 4.4.4.2 UP on interface Serial3/3

R4(config-if)#exit

R5(config)#ip multicast-routing

R5(config)#int se3/5

R5(config-if)#ip pim dense-mode

*Oct 12 04:52:52.875: %PIM-5-NBRCHG: neighbor 5.5.5.2 UP on interface Serial3/5

R5(config-if)#int f0/0

R5(config-if)#ip pim dense-mode

R5(config-if)#exit

*Oct 12 04:53:14.715: %PIM-5-DRCHG: DR change from neighbor 0.0.0.0 to 50.1.1.1 on interface FastEthernet0/0


R1#show ip pim interface

Address          Interface                Ver/   Nbr    Query  DR     DR
                                          Mode   Count  Intvl  Prior
1.1.1.1          Serial3/0                v2/D   1      30     1      0.0.0.0
4.4.4.2          Serial3/3                v2/D   1      30     1      0.0.0.0
10.1.1.1         FastEthernet0/0          v2/D   0      30     1      10.1.1.1

R1#show ip pim neighbor
PIM Neighbor Table
Mode: B - Bidir Capable, DR - Designated Router, N - Default DR Priority,
      P - Proxy Capable, S - State Refresh Capable, G - GenID Capable
Neighbor          Interface                Uptime/Expires    Ver   DR
Address                                                            Prio/Mode
1.1.1.2           Serial3/0                00:18:24/00:01:31 v2    1 / S P G
4.4.4.1           Serial3/3                00:10:40/00:01:24 v2    1 / S P G

R2#show ip pim interface

Address          Interface                Ver/   Nbr    Query  DR     DR
                                          Mode   Count  Intvl  Prior
1.1.1.2          Serial3/0                v2/D   1      30     1      0.0.0.0
2.2.2.1          Serial3/1                v2/D   1      30     1      0.0.0.0
5.5.5.2          Serial3/5                v2/D   1      30     1      0.0.0.0
20.1.1.1         FastEthernet0/0          v2/D   0      30     1      20.1.1.1


R2#show ip pim neighbor
PIM Neighbor Table
Mode: B - Bidir Capable, DR - Designated Router, N - Default DR Priority,
      P - Proxy Capable, S - State Refresh Capable, G - GenID Capable
Neighbor          Interface                Uptime/Expires    Ver   DR
Address                                                            Prio/Mode
1.1.1.1           Serial3/0                00:19:31/00:01:24 v2    1 / S P G
2.2.2.2           Serial3/1                00:13:04/00:01:26 v2    1 / S P G
5.5.5.1           Serial3/5                00:09:22/00:01:43 v2    1 / S P G

R3#show ip pim neighbor
PIM Neighbor Table
Mode: B - Bidir Capable, DR - Designated Router, N - Default DR Priority,
      P - Proxy Capable, S - State Refresh Capable, G - GenID Capable
Neighbor          Interface                Uptime/Expires    Ver   DR
Address                                                            Prio/Mode
2.2.2.1           Serial3/1                00:13:36/00:01:25 v2    1 / S P G
3.3.3.2           Serial3/2                00:12:29/00:01:33 v2    1 / S P G

R3#show ip pim interface

Address          Interface                Ver/   Nbr    Query  DR     DR
                                          Mode   Count  Intvl  Prior
30.1.1.1         FastEthernet0/0          v2/D   0      30     1      30.1.1.1
2.2.2.2          Serial3/1                v2/D   1      30     1      0.0.0.0
3.3.3.1          Serial3/2                v2/D   1      30     1      0.0.0.0

R4#show ip pim interface

Address          Interface                Ver/   Nbr    Query  DR     DR
                                          Mode   Count  Intvl  Prior
40.1.1.1         FastEthernet0/0          v2/D   0      30     1      40.1.1.1
3.3.3.2          Serial3/2                v2/D   1      30     1      0.0.0.0
4.4.4.1          Serial3/3                v2/D   1      30     1      0.0.0.0

R4#show ip pim neighbor
PIM Neighbor Table
Mode: B - Bidir Capable, DR - Designated Router, N - Default DR Priority,
      P - Proxy Capable, S - State Refresh Capable, G - GenID Capable
Neighbor          Interface                Uptime/Expires    Ver   DR
Address                                                            Prio/Mode
3.3.3.1           Serial3/2                00:13:24/00:01:37 v2    1 / S P G
4.4.4.2           Serial3/3                00:13:14/00:01:15 v2    1 / S P G

R5#show ip pim neighbor
PIM Neighbor Table
Mode: B - Bidir Capable, DR - Designated Router, N - Default DR Priority,
      P - Proxy Capable, S - State Refresh Capable, G - GenID Capable
Neighbor          Interface                Uptime/Expires    Ver   DR
Address                                                            Prio/Mode
5.5.5.2           Serial3/5                00:11:22/00:01:40 v2    1 / S P G

R5#show ip pim interface

Address          Interface                Ver/   Nbr    Query  DR     DR
                                          Mode   Count  Intvl  Prior
5.5.5.1          Serial3/5                v2/D   1      30     1      0.0.0.0
50.1.1.1         FastEthernet0/0          v2/D   0      30     1      50.1.1.1

R5#show ip igmp group
IGMP Connected Group Membership
Group Address    Interface                Uptime    Expires   Last Reporter   Group Accounted
224.0.1.40       Serial3/5                00:12:24  stopped   5.5.5.1

(During testing and in the absence of IGMP-capable recipients we have to manually configure multicast group membership on a router interface. IOS provides command to designate group membership on an interface. The join-group command makes the router behave as a member of the specified group)


R5(config)#interface fastEthernet 0/0
R5(config-if)#ip igmp join-group 224.5.5.5
R5(config-if)#end

R5#show ip mroute
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, E - Extranet,
       X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
       U - URD, I - Received Source Specific Host Report,
       Z - Multicast Tunnel, z - MDT-data group sender,
       Y - Joined MDT-data group, y - Sending to MDT-data group,
       G - Received BGP C-Mroute, g - Sent BGP C-Mroute,
       Q - Received BGP S-A Route, q - Sent BGP S-A Route,
       V - RD & Vector, v - Vector
Outgoing interface flags: H - Hardware switched, A - Assert winner
 Timers: Uptime/Expires
 Interface state: Interface, Next-Hop or VCD, State/Mode

(*, 224.5.5.5), 00:02:49/00:02:49, RP 0.0.0.0, flags: DCL
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    FastEthernet0/0, Forward/Dense, 00:02:49/stopped
    Serial3/5, Forward/Dense, 00:02:49/stopped


(*, 224.0.1.40), 00:20:32/stopped, RP 0.0.0.0, flags: DCL
  Incoming interface: Null, RPF nbr 0.0.0.0
  Outgoing interface list:
    Serial3/5, Forward/Dense, 00:20:32/stopped

R1#ping 224.5.5.5 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 224.5.5.5, timeout is 2 seconds:

Reply to request 0 from 50.1.1.1, 140 ms
Reply to request 1 from 50.1.1.1, 148 ms
Reply to request 2 from 50.1.1.1, 144 ms
Reply to request 3 from 50.1.1.1, 184 ms
Reply to request 4 from 50.1.1.1, 112 ms

R2#ping 224.5.5.5 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 224.5.5.5, timeout is 2 seconds:

Reply to request 0 from 50.1.1.1, 128 ms
Reply to request 1 from 50.1.1.1, 36 ms
Reply to request 2 from 50.1.1.1, 44 ms
Reply to request 3 from 50.1.1.1, 84 ms
Reply to request 4 from 50.1.1.1, 76 ms

R3#ping 224.5.5.5 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 224.5.5.5, timeout is 2 seconds:

Reply to request 0 from 50.1.1.1, 240 ms
Reply to request 1 from 50.1.1.1, 64 ms
Reply to request 2 from 50.1.1.1, 64 ms
Reply to request 3 from 50.1.1.1, 156 ms
Reply to request 4 from 50.1.1.1, 128 ms

R4#ping 224.5.5.5 repeat 5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 224.5.5.5, timeout is 2 seconds:

Reply to request 0 from 50.1.1.1, 300 ms
Reply to request 0 from 50.1.1.1, 476 ms
Reply to request 1 from 50.1.1.1, 272 ms
Reply to request 1 from 50.1.1.1, 272 ms
Reply to request 2 from 50.1.1.1, 180 ms
Reply to request 2 from 50.1.1.1, 184 ms
Reply to request 3 from 50.1.1.1, 180 ms
Reply to request 3 from 50.1.1.1, 192 ms
Reply to request 4 from 50.1.1.1, 116 ms
Reply to request 4 from 50.1.1.1, 116 ms



Tuesday, 24 September 2019

IGMP (Internet Group Management Protocol)

IGMP

IGMP (Internet Group Management Protocol) is a networking protocol it is used with multicast by hosts and the routers. Hosts that want to receive traffic from a certain multicast group with a router using IGMP. There are three versions of IGMP; version 1, 2 and 3.




Enable communication between a router and connected hosts. 
The two most important goals of IGMP are as follows.
1. To inform a local multicast router that a host wants to receive multicast traffic for a specific group.
2. To inform local multicast routers that a host wants to leave a multicast group.

IGMP Versions

IGMP v1
IGMP v2 (by default)
IGMP V3


Internet Group Management Protocol version 1

IGMPv1 uses two specific message structures
Report message
                          Used by the client to join the group
Query messages
                          Used by router to see if the member of the group still exist
                          Always sent to 224.0.0.1 by multicast routers.


Internet Group Management Protocol (contend)




  • R1 sends periodic IGMP queries to the 224.0.0.1 address.
  • If only `one  member per group per subnet sends the IGMP report message to the router – in this case, H2
  • While the others host H1 and H3 suppress theirs.
  • IGMP query interval is 60 seconds and 180 delay timer.





 Internet Group Management Protocol version 2
 IGMPv2 brought a number of improvements.
  1. leave group message from host to the router.( apart from report and query)
  2. tunable timers
  3. queries election
  4. group specific queries


IGMPv2 leave group 




When a host want to leave the group they will send a IGMP  leave message to 224.0.0.2
Then router will query IGMP query message to 224.0.0.1 (all host multicast address)
As long as at least one client is in this group. Switch will forward IGMP membership report back to first hop router.

Group specific queries
  • In version 1 query send to all hosts on 224.0.0.1
  • In version 2 query generated to only devices to that specific group

Internet Group Management Protocol version 3



Allows us to do source specific multicast V1/v2 only support group specific multicast (*,g) join any source / specific group )\ V3 support source specific multicast (s,g) join.

Monday, 10 June 2019

Introduction to Multicast



In this chapter we’ll see the basics of multicast. 

First let’s talk about what multicast is… well in simple words we can say answer multicast is sending a message from a single source to selected multiple destinations.


There are three types of traffic that we can choose from for our networks:

Unicast
Broadcast
Multicast


Unicast If we want to send a message from one source to one destination, we use unicast.

broadcast If we want to send a message from one source to everyone, we use broadcast.

multicast if  we want to send a message from one source to a group of receivers? Then we use multicast..

Why do we want to use multicast instead of unicast or broadcast? 

Multimedia using Unicast 









Application sends one copy of each packet to every client. Used when only few client need to access the application. If the message has to be sent to a large group, the same information has to be carried multiple time, even on the same link. Bandwidth usage is proportional to number of users. Router make individual routing decision based on each pair of source and destination.


Multimedia traffic using broadcast


Application sends only copy of each packet using a broadcast. All end hosts need to process even if they don’t want. Not recommended implantation for applications delivering data, voice, or video to multiple receivers.

Multimedia traffic using multicast


The most efficient solution – in between broadcast and unicast. Server sends one copy of each packet to a special address that represent multiple clients. Server send out a single data stream to multiple clients.

Advantage of multicast

It saves bandwidth and controls network traffic by forcing the network to replicate packets only when necessary. Reduce network bandwidth consumption and host processing. Control network traffic and reduce server and CPU loads. 


Multicast Components

first we use a designated range of IP address that is used for multicast traffic. We use the class D range for this: 224.0.0.0 to 239.255.255.255. These addresses are only used as destination addresses,but not as source addresses. The source IP address will be the device that is sending the multicast traffic.

we use IGMP ( internet group management protocol ) for hosts to tell the routers when and which multicast traffic they want to receive.

To help the switch figure out where to forward multicast traffic, we can use IGMP Snooping. 


we use a multicast routing protocol: why? we see in the next chapter.
  • DVMRP (Distance Vector Multicast Routing Protocol)
  • MOSPF (Multicast Open Shortest Path First)
  • PIM (Protocol Independent Multicast)
how multicast work ?

step 1- Multicast server application configured with layer 3 address (class- D)
step 2- Multicast application installed on all the hosts.
step 3- Indicate router that thy want to receive multicast traffic for group (IGMP)
step 4- Multicast routing protocol forward multicast server. (PIM)
step 5- Calculate layer 2 multicast MAC address (IGMP Snoping/ CGMP)

This is basic of multicast, 
Thanks for reading 









PIM Sparse Mode

PIM Sparse Mode  ( PIM-SM )  PIM  Sparse Mode explicitly builds unidirectional shared trees rooted at a ( RP ) rendezvous point per...