Lab 15-4: Cấu hình Sparse mode động
Mô tả
Ta sử dụng sơ đò sau
Cấu hình:
Host1 và Host2 Tương tự như trên
R2
!
hostname R2
!
enable password cisco
!
ip subnet-zero
no ip domain-lookup
ip host R3 192.168.1.18
ip host host1 192.168.3.2
ip host R5 192.168.1.6
ip host R4 192.168.1.14
ip host R2 192.168.1.22
ip host R1 192.168.1.1
!
ip multicast-routing
!
interface Loopback0
ip address 192.168.4.1 255.255.255.255
!
interface Ethernet0
ip address 192.168.3.1 255.255.255.0
ip pim sparse-mode
!
interface Serial0
ip address 192.168.1.17 255.255.255.252
ip pim sparse-mode
no ip mroute-cache
clockrate 64000
!
interface Serial1
ip address 192.168.1.22 255.255.255.252
ip pim sparse-mode
no ip mroute-cache
clockrate 64000
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
ip classless
ip pim spt-threshold infinity
ip pim send-rp-announce Loopback0 scope 50
!
End
R3
hostname R3
!
enable password cisco
!
no ip domain-lookup
!
ip multicast-routing
!
interface Loopback0
ip address 192.168.4.3 255.255.255.255
ip pim sparse-mode
!
interface Ethernet0/0
ip address 192.168.1.2 255.255.255.252
ip pim sparse-mode
!
interface Serial0/0
ip address 192.168.1.13 255.255.255.252
ip pim sparse-mode
no fair-queue
clockrate 64000
!
interface Serial0/1
ip address 192.168.1.18 255.255.255.252
ip pim sparse-mode
!
interface Ethernet1/1
ip address 192.168.2.1 255.255.255.0
ip pim sparse-mode
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
ip classless
ip pim send-rp-discovery Loopback0 scope 10
!
end
R4
!
hostname R4
!
enable password cisco
!
ip subnet-zero
no ip domain-lookup
ip multicast-routing
ip dvmrp route-limit 20000
!
interface Loopback0
ip address 192.168.4.2 255.255.255.255
no ip directed-broadcast
!
interface Ethernet0
ip address 192.168.1.5 255.255.255.252
no ip directed-broadcast
ip pim sparse-mode
no ip mroute-cache
!
interface Serial1
ip address 192.168.1.14 255.255.255.252
no ip directed-broadcast
ip pim sparse-mode
no ip mroute-cache
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip classless
ip pim send-rp-announce Loopback0 scope 50
!
End
R5#show run
!
hostname R5
!
enable password cisco
!
no ip domain lookup
!
ip multicast-routing
!
interface Loopback0
ip address 131.108.4.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.1.6 255.255.255.252
ip pim sparse-mode
no ip mroute-cache
no keepalive
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.2.2 255.255.255.0
ip pim sparse-mode
no ip mroute-cache
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
router rip
version 2
network 131.108.0.0
!
ip classless
End
Show ip mroute
R2# show ip mroute
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, 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 - Advertised via MSDP
Outgoing interface flags: H - Hardware switched
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode
(*, 224.0.1.39), 00:02:59/00:02:59, RP 0.0.0.0, flags: DP
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list: Null
(192.168.4.2, 224.0.1.39), 00:02:59/00:00:00, flags: PT
Incoming interface: Serial0, RPF nbr 192.168.1.18
Outgoing interface list: Null
(*, 224.0.1.40), 00:03:10/00:00:00, RP 0.0.0.0, flags: DJCL
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
Serial0, Forward/Sparse, 00:03:10/00:00:00
(192.168.4.3, 224.0.1.40), 00:02:26/00:02:33, flags: PCLT
Outgoing interface list: Null
(*, 227.1.1.1), 00:02:57/00:02:59, RP 192.168.4.2, flags: SJC
Incoming interface: Serial0, RPF nbr 192.168.1.18
Outgoing interface list:
Ethernet0, Forward/Sparse, 00:02:57/00:02:40
(192.168.2.3, 227.1.1.1), 00:00:27/00:02:32, flags: CJT
Incoming interface: Serial0, RPF nbr 192.168.1.18
Outgoing interface list:
Ethernet0, Forward/Sparse, 00:00:27/00:02:40
(*, 228.0.0.1), 00:03:09/00:02:59, RP 192.168.4.2, flags: SJC
Incoming interface: Serial0, RPF nbr 192.168.1.18
Outgoing interface list:
Ethernet0, Forward/Sparse, 00:03:09/00:02:38
(192.168.2.3, 228.0.0.1), 00:03:04/00:02:25, flags: CJT
Incoming interface: Serial0, RPF nbr 192.168.1.18
Outgoing interface list:
Ethernet0, Forward/Sparse, 00:03:04/00:02:37
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,
X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
U - URD, I - Received Source Specific Host Report, s - SSM
Outgoing interface flags: H - Hardware switched
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode
(*, 224.0.1.39), 00:00:10/00:02:49, RP 0.0.0.0, flags: DC
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
FastEthernet0/1, Forward/Sparse, 00:00:10/00:02:49
(*, 224.0.1.40), 00:00:28/00:00:00, RP 0.0.0.0, flags: DCL
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:00:28/00:02:56
(192.168.4.3, 224.0.1.40), 00:00:15/00:02:44, flags: CLT
Incoming interface: FastEthernet0/1, RPF nbr 192.168.2.1
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:00:15/00:02:56
(*, 227.1.1.1), 00:00:27/00:02:59, RP 192.168.4.2, flags: SCF
Incoming interface: FastEthernet0/0, RPF nbr 192.168.1.5
Outgoing interface list:
FastEthernet0/1, Forward/Sparse, 00:00:27/00:02:41
(192.168.2.3, 227.1.1.1), 00:00:27/00:02:32, flags: CFT
Incoming interface: FastEthernet0/1, RPF nbr 0.0.0.0
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:00:27/00:03:03
(*, 228.0.0.1), 00:00:19/00:03:29, RP 192.168.4.2, flags: SCF
Incoming interface: FastEthernet0/0, RPF nbr 192.168.1.5
Outgoing interface list:
FastEthernet0/1, Forward/Sparse, 00:00:19/00:03:29
(192.168.2.3, 228.0.0.1), 00:00:18/00:03:20, flags: CFT
Incoming interface: FastEthernet0/1, RPF nbr 0.0.0.0
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:00:18/00:03:11
Kiểm tra:
ping từ Host1 đến host2 ta có
R5#debug ip mpacket
IP multicast packets debugging is on
R5#
*Mar 1 01:25:02.483: IP: s=192.168.3.2 (FastEthernet0/1) d=227.1.1.1 (FastEthernet0/0) len 114, mforward
*Mar 1 01:25:04.483: IP: s=192.168.3.2 (FastEthernet0/1) d=227.1.1.1 (FastEthernet0/0) len 114, mforward
*Mar 1 01:25:05.555: %PIM-4-DEPRECATED_HELLO_TLV: Deprecated PIM Hello Option TLV 19 (Bidir TLV) from 192.168.2.1 (FastEthernet0/1)
*Mar 1 01:25:06.487: IP: s=192.168.3.2 (FastEthernet0/1) d=227.1.1.1 (FastEthernet0/0) len 114, mforward
*Mar 1 01:25:08.491: IP: s=192.168.3.2 (FastEthernet0/1) d=227.1.1.1 (FastEthernet0/0) len 114, mforward
*Mar 1 01:25:10.491: IP: s=192.168.3.2 (FastEthernet0/1) d=227.1.1.1 (FastEthernet0/0) len 114, mforward
R2#
01:28:21: IP: s=192.168.3.2 (Ethernet0) d=227.1.1.1 (Serial0) len 114, mforward
01:28:23: IP: s=192.168.3.2 (Ethernet0) d=227.1.1.1 (Serial0) len 114, mforward
01:28:25: IP: s=192.168.3.2 (Ethernet0) d=227.1.1.1 (Serial0) len 114, mforward
01:28:27: IP: s=192.168.3.2 (Ethernet0) d=227.1.1.1 (Serial0) len 114, mforward
01:28:29: IP: s=192.168.3.2 (Ethernet0) d=227.1.1.1 (Serial0) len 114, mforward
Mô tả
Ta sử dụng sơ đò sau
Cấu hình:
Host1 và Host2 Tương tự như trên
R2
!
hostname R2
!
enable password cisco
!
ip subnet-zero
no ip domain-lookup
ip host R3 192.168.1.18
ip host host1 192.168.3.2
ip host R5 192.168.1.6
ip host R4 192.168.1.14
ip host R2 192.168.1.22
ip host R1 192.168.1.1
!
ip multicast-routing
!
interface Loopback0
ip address 192.168.4.1 255.255.255.255
!
interface Ethernet0
ip address 192.168.3.1 255.255.255.0
ip pim sparse-mode
!
interface Serial0
ip address 192.168.1.17 255.255.255.252
ip pim sparse-mode
no ip mroute-cache
clockrate 64000
!
interface Serial1
ip address 192.168.1.22 255.255.255.252
ip pim sparse-mode
no ip mroute-cache
clockrate 64000
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
ip classless
ip pim spt-threshold infinity
ip pim send-rp-announce Loopback0 scope 50
!
End
R3
hostname R3
!
enable password cisco
!
no ip domain-lookup
!
ip multicast-routing
!
interface Loopback0
ip address 192.168.4.3 255.255.255.255
ip pim sparse-mode
!
interface Ethernet0/0
ip address 192.168.1.2 255.255.255.252
ip pim sparse-mode
!
interface Serial0/0
ip address 192.168.1.13 255.255.255.252
ip pim sparse-mode
no fair-queue
clockrate 64000
!
interface Serial0/1
ip address 192.168.1.18 255.255.255.252
ip pim sparse-mode
!
interface Ethernet1/1
ip address 192.168.2.1 255.255.255.0
ip pim sparse-mode
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
ip classless
ip pim send-rp-discovery Loopback0 scope 10
!
end
R4
!
hostname R4
!
enable password cisco
!
ip subnet-zero
no ip domain-lookup
ip multicast-routing
ip dvmrp route-limit 20000
!
interface Loopback0
ip address 192.168.4.2 255.255.255.255
no ip directed-broadcast
!
interface Ethernet0
ip address 192.168.1.5 255.255.255.252
no ip directed-broadcast
ip pim sparse-mode
no ip mroute-cache
!
interface Serial1
ip address 192.168.1.14 255.255.255.252
no ip directed-broadcast
ip pim sparse-mode
no ip mroute-cache
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
ip classless
ip pim send-rp-announce Loopback0 scope 50
!
End
R5#show run
!
hostname R5
!
enable password cisco
!
no ip domain lookup
!
ip multicast-routing
!
interface Loopback0
ip address 131.108.4.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.1.6 255.255.255.252
ip pim sparse-mode
no ip mroute-cache
no keepalive
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.2.2 255.255.255.0
ip pim sparse-mode
no ip mroute-cache
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
router rip
version 2
network 131.108.0.0
!
ip classless
End
Show ip mroute
R2# show ip mroute
IP Multicast Routing Table
Flags: D - Dense, S - Sparse, 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 - Advertised via MSDP
Outgoing interface flags: H - Hardware switched
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode
(*, 224.0.1.39), 00:02:59/00:02:59, RP 0.0.0.0, flags: DP
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list: Null
(192.168.4.2, 224.0.1.39), 00:02:59/00:00:00, flags: PT
Incoming interface: Serial0, RPF nbr 192.168.1.18
Outgoing interface list: Null
(*, 224.0.1.40), 00:03:10/00:00:00, RP 0.0.0.0, flags: DJCL
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
Serial0, Forward/Sparse, 00:03:10/00:00:00
(192.168.4.3, 224.0.1.40), 00:02:26/00:02:33, flags: PCLT
Outgoing interface list: Null
(*, 227.1.1.1), 00:02:57/00:02:59, RP 192.168.4.2, flags: SJC
Incoming interface: Serial0, RPF nbr 192.168.1.18
Outgoing interface list:
Ethernet0, Forward/Sparse, 00:02:57/00:02:40
(192.168.2.3, 227.1.1.1), 00:00:27/00:02:32, flags: CJT
Incoming interface: Serial0, RPF nbr 192.168.1.18
Outgoing interface list:
Ethernet0, Forward/Sparse, 00:00:27/00:02:40
(*, 228.0.0.1), 00:03:09/00:02:59, RP 192.168.4.2, flags: SJC
Incoming interface: Serial0, RPF nbr 192.168.1.18
Outgoing interface list:
Ethernet0, Forward/Sparse, 00:03:09/00:02:38
(192.168.2.3, 228.0.0.1), 00:03:04/00:02:25, flags: CJT
Incoming interface: Serial0, RPF nbr 192.168.1.18
Outgoing interface list:
Ethernet0, Forward/Sparse, 00:03:04/00:02:37
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,
X - Proxy Join Timer Running, A - Candidate for MSDP Advertisement,
U - URD, I - Received Source Specific Host Report, s - SSM
Outgoing interface flags: H - Hardware switched
Timers: Uptime/Expires
Interface state: Interface, Next-Hop or VCD, State/Mode
(*, 224.0.1.39), 00:00:10/00:02:49, RP 0.0.0.0, flags: DC
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
FastEthernet0/1, Forward/Sparse, 00:00:10/00:02:49
(*, 224.0.1.40), 00:00:28/00:00:00, RP 0.0.0.0, flags: DCL
Incoming interface: Null, RPF nbr 0.0.0.0
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:00:28/00:02:56
(192.168.4.3, 224.0.1.40), 00:00:15/00:02:44, flags: CLT
Incoming interface: FastEthernet0/1, RPF nbr 192.168.2.1
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:00:15/00:02:56
(*, 227.1.1.1), 00:00:27/00:02:59, RP 192.168.4.2, flags: SCF
Incoming interface: FastEthernet0/0, RPF nbr 192.168.1.5
Outgoing interface list:
FastEthernet0/1, Forward/Sparse, 00:00:27/00:02:41
(192.168.2.3, 227.1.1.1), 00:00:27/00:02:32, flags: CFT
Incoming interface: FastEthernet0/1, RPF nbr 0.0.0.0
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:00:27/00:03:03
(*, 228.0.0.1), 00:00:19/00:03:29, RP 192.168.4.2, flags: SCF
Incoming interface: FastEthernet0/0, RPF nbr 192.168.1.5
Outgoing interface list:
FastEthernet0/1, Forward/Sparse, 00:00:19/00:03:29
(192.168.2.3, 228.0.0.1), 00:00:18/00:03:20, flags: CFT
Incoming interface: FastEthernet0/1, RPF nbr 0.0.0.0
Outgoing interface list:
FastEthernet0/0, Forward/Sparse, 00:00:18/00:03:11
Kiểm tra:
ping từ Host1 đến host2 ta có
R5#debug ip mpacket
IP multicast packets debugging is on
R5#
*Mar 1 01:25:02.483: IP: s=192.168.3.2 (FastEthernet0/1) d=227.1.1.1 (FastEthernet0/0) len 114, mforward
*Mar 1 01:25:04.483: IP: s=192.168.3.2 (FastEthernet0/1) d=227.1.1.1 (FastEthernet0/0) len 114, mforward
*Mar 1 01:25:05.555: %PIM-4-DEPRECATED_HELLO_TLV: Deprecated PIM Hello Option TLV 19 (Bidir TLV) from 192.168.2.1 (FastEthernet0/1)
*Mar 1 01:25:06.487: IP: s=192.168.3.2 (FastEthernet0/1) d=227.1.1.1 (FastEthernet0/0) len 114, mforward
*Mar 1 01:25:08.491: IP: s=192.168.3.2 (FastEthernet0/1) d=227.1.1.1 (FastEthernet0/0) len 114, mforward
*Mar 1 01:25:10.491: IP: s=192.168.3.2 (FastEthernet0/1) d=227.1.1.1 (FastEthernet0/0) len 114, mforward
R2#
01:28:21: IP: s=192.168.3.2 (Ethernet0) d=227.1.1.1 (Serial0) len 114, mforward
01:28:23: IP: s=192.168.3.2 (Ethernet0) d=227.1.1.1 (Serial0) len 114, mforward
01:28:25: IP: s=192.168.3.2 (Ethernet0) d=227.1.1.1 (Serial0) len 114, mforward
01:28:27: IP: s=192.168.3.2 (Ethernet0) d=227.1.1.1 (Serial0) len 114, mforward
01:28:29: IP: s=192.168.3.2 (Ethernet0) d=227.1.1.1 (Serial0) len 114, mforward