Giáo trình thực hành BSCI Chương 7 – IP Multicasting
246
C
C
h
h
ư
ư
ơ
ơ
n
n
g
g
7
7
-
-
I
I
P
P
M
M
u
u
l
l
t
t
i
i
c
c
a
a
s
s
t
t
i
i
n
n
g
g
B
B
à
à
i
i
7
7
.
.
1
1
C
C
ấ
ấ
u
u
h
h
ì
ì
n
n
h
h
I
I
G
G
M
M
P
P
a
a
n
n
d
d
I
I
G
G
M
M
P
P
S
S
n
n
o
o
o
o
p
p
i
i
n
n
g
g
7
7
.
.
1
1
.
.
1
1
S
S
ơ
ơ
đ
đ
ồ
ồ
l
l
u
u
ậ
ậ
n
n
l
l
ý
ý
SW1
Lo2: 172.16.2.1/24
R2
Lo1: 172.16.1.1/24
Lo3: 172.16.3.1/24
R3
R1
Gi0/0
Fa0/0 Fa0/0
VLAN1 : 192.168.1.0/24
Fa0/1
Fa0/2
Fa0/3
7
7
.
.
1
1
.
.
2
2
M
M
ụ
ụ
c
c
t
t
i
i
ê
ê
u
u
b
b
à
à
i
i
t
t
h
h
ự
ự
c
c
h
h
à
à
n
n
h
h
Hiểu biết về IGMP, giao thức định tuyến PIM tại layer 3 và IGMP
snooping cải thiện hiệu quả multicast tại layer 2
7
7
.
.
1
1
.
.
3
3
C
C
ấ
ấ
u
u
h
h
ì
ì
n
n
h
h
v
v
à
à
h
h
ì
ì
n
n
h
h
v
v
ẽ
ẽ
m
m
i
i
n
n
h
h
h
h
ọ
ọ
a
a
Bước 1: Cấu hình cơ bản R1, R2, R3
R1
Router(config)#hostname R1
R1(config)#enable password cisco
R1(config)#no ip domain-lookup
R1(config)#banner motd ^C R1^C
R1(config)#line console 0
R1(config-line)# logging synchronous
R1(config-line)# password cisco
R1(config-line)# login
R1(config)#line vty 0 4
R1(config-line)# password cisco
R1(config-line)# login
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
247
R1(config)#interface Serial 0/3/0
R1(config-if)#ip address 10.1.100.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface gigabitEthernet 0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface loopback 1
R1(config-if)#ip address 172.16.1.1 255.255.255.0
R1(config-if)#exit
R2
Router(config)#hostname R2
R2(config)#enable password cisco
R2(config)#no ip domain-lookup
R2(config)#banner motd ^C R2^C
R2(config)#line console 0
R2(config-line)# logging synchronous
R2(config-line)# password cisco
R2(config-line)# login
R2(config)#line vty 0 4
R2(config-line)# password cisco
R2(config-line)# login
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 192.168.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface loopback 2
R2(config-if)#ip address 172.16.2.2 255.255.255.0
R2(config-if)#exit
R3
Router(config)#hostname R3
R3(config)#enable password cisco
R3(config)#no ip domain-lookup
R3(config)#banner motd ^C R3^C
R3(config)#line console 0
R3(config-line)# logging synchronous
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
248
R3(config-line)# password cisco
R3(config-line)# login
R3(config)#line vty 0 4
R3(config-line)# password cisco
R3(config-line)# login
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip address 192.168.1.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface loopback 3
R3(config-if)# ip address 172.16.3.3 255.255.255.0
R3(config-if)#exit
SW1
Router(config)#hostname SW1
SW1(config)#enable password cisco
SW1(config)#no ip domain-lookup
SW1(config)#banner motd ^C R3^C
SW1(config)#line console 0
SW1(config-line)# logging synchronous
SW1(config-line)# password cisco
SW1(config-line)# login
SW1(config)#line vty 0 4
SW1(config-line)# password cisco
SW1(config-line)# login
SW1(config)#interface vlan 1
SW1(config-if)#ip add 192.168.1.10 255.255.255.0
SW1(config-if)#exit
SW1(config)#interface range fastEthernet 0/1 - 3
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#exit
Bước 2: Cấu hình IP Multicast
Cấu hình trên R1
R1(config)#ip multicast-routing
R1(config)#interface gigabitEthernet 0/0
R1(config-if)#ip pim dense-mode
R1(config-if)#exit
Cấu hình trên R2
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
249
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip igmp join-group 229.7.7.7
R2(config-if)#exit
Cấu hình trên R3
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip igmp join-group 229.7.7.7
R3(config-if)#exit
Kiểm tra cấu hình
Hình 7.1.3-1: Show ip igmp groups trên R1
Hình 7.1.3-2: Show ip igmp interface trên R1
Hình 7.1.3-3: Show ip igmp membership trên R1
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
250
Hình 7.1.3-4: Show ip mroute trên R1
Hình 7.1.3-5: Show ip igmp groups trên R2
Hình 7.1.3-6: Show ip igmp membership trên R2
Hình 7.1.3-7: Show ip igmp groups trên R3
Hình 7.1.3-8: Show ip igmp membership trên R3
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
251
Hình 7.1.3-9: ping để kiểm tra trên R1
Hình 7.1.3-10: Show mac-address-table multicast trên R1
Bước 3: Cấu hình IGMP snooping trên SW1
SW1(config)#ip igmp snooping vlan 1 static 0100.5e07.0707 interface Fa0/9
Hình 7.1.3-11: Show mac-address-table multicast trên R1
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
252
B
B
à
à
i
i
7
7
.
.
2
2
R
R
o
o
u
u
t
t
i
i
n
n
g
g
I
I
P
P
M
M
u
u
l
l
t
t
i
i
c
c
a
a
s
s
t
t
w
w
i
i
t
t
h
h
P
P
I
I
M
M
D
D
e
e
n
n
s
s
e
e
M
M
o
o
d
d
e
e
7
7
.
.
2
2
.
.
1
1
S
S
ơ
ơ
đ
đ
ồ
ồ
l
l
u
u
ậ
ậ
n
n
l
l
ý
ý
Lo2: 192.168.2.1/24
R1
SW1
R2
SW1
Lo1: 192.168.1.1/24
R3
Lo3: 192.168.3.1/24
172
.
16.102
.
0/29
172.16.
203
.0/29
172.16.103.0/29
VLAN13: 172.16.13.0/24
VLAN20: 172.16.20.0/24
S0/3/0
S0/3/1
Gi0/0
S0/3/1
S0/3/0
Fa0/0
S0/0/0
S0/0/1
Fa0/0
Fa0/1 Fa0/3
Fa0/2
7
7
.
.
2
2
.
.
2
2
M
M
ụ
ụ
c
c
t
t
i
i
ê
ê
u
u
b
b
à
à
i
i
t
t
h
h
ự
ự
c
c
h
h
à
à
n
n
h
h
Thực thi IGMP
Xem lại cấu hình của EIGRP
Thực thi và kiểm tra hoạt động PIM-DM và adjacencies
Kiểm tra PIM-DM flooding và pruning
Khám phá các bảng định tuyến multicast
7
7
.
.
2
2
.
.
3
3
C
C
ấ
ấ
u
u
h
h
ì
ì
n
n
h
h
v
v
à
à
h
h
ì
ì
n
n
h
h
v
v
ẽ
ẽ
m
m
i
i
n
n
h
h
h
h
ọ
ọ
a
a
Bước 1: Cấu hình cơ bản R1, R2, R3
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
253
R1
Router(config)#hostname R1
R1(config)#enable password cisco
R1(config)#no ip domain-lookup
R1(config)#banner motd ^C R1^C
R1(config)#line console 0
R1(config-line)# logging synchronous
R1(config-line)# password cisco
R1(config-line)# login
R1(config)#line vty 0 4
R1(config-line)# password cisco
R1(config-line)# login
R1(config)#interface Serial 0/3/0
R1(config-if)#ip address 172.16.102.1 255.255.255.248
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface Serial 0/3/1
R1(config-if)#ip address 172.16.103.1 255.255.255.248
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface gigabitEthernet 0/0
R1(config-if)#ip address 172.16.13.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface loopback 1
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#exit
R2
Router(config)#hostname R2
R2(config)#enable password cisco
R2(config)#no ip domain-lookup
R2(config)#banner motd ^C R2^C
R2(config)#line console 0
R2(config-line)# logging synchronous
R2(config-line)# password cisco
R2(config-line)# login
R2(config)#line vty 0 4
R2(config-line)# password cisco
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
254
R2(config-line)# login
R2(config)#interface Serial 0/3/0
R2(config-if)#ip address 172.16.203.2 255.255.255.248
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface Serial 0/3/1
R2(config-if)#ip address 172.16.102.2 255.255.255.248
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 172.16.20.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface loopback 2
R2(config-if)#ip address 192.168.2.1 255.255.255.0
R2(config-if)#exit
R3
Router(config)#hostname R3
R3(config)#enable password cisco
R3(config)#no ip domain-lookup
R3(config)#banner motd ^C R3^C
R3(config)#line console 0
R3(config-line)# logging synchronous
R3(config-line)# password cisco
R3(config-line)# login
R3(config)#line vty 0 4
R3(config-line)# password cisco
R3(config-line)# login
R3(config)#interface Serial 0/0/0
R3(config-if)#ip address 172.16.103.3 255.255.255.248
R3(config-if)#clock rate 64000
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface Serial 0/0/1
R3(config-if)#ip address 172.16.203.3 255.255.255.248
R3(config-if)#no shutdown
R3(config-if)#exit
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
255
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip address 172.16.13.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface loopback 3
R3(config-if)# ip address 192.168.3.1 255.255.255.0
R3(config-if)#exit
SW1
Router(config)#hostname SW1
SW1(config)#enable password cisco
SW1(config)#no ip domain-lookup
SW1(config)#banner motd ^C R3^C
SW1(config)#line console 0
SW1(config-line)# logging synchronous
SW1(config-line)# password cisco
SW1(config-line)# login
SW1(config)#line vty 0 4
SW1(config-line)# password cisco
SW1(config-line)# login
SW1(config)#interface vlan 13
SW1(config-if)#exit
SW1(config)#interface vlan 20
SW1(config-if)#ip add 172.16.20.4 255.255.255.0
SW1(config-if)#no shutdown
SW1(config-if)#exit
SW1(config)#ip default-gateway 172.16.20.2
SW1(config)#interface fastEthernet 0/1
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#switchport access vlan 13
SW1(config-if-range)#exit
SW1(config)#interface fastEthernet 0/2
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#switchport access vlan 20
SW1(config-if-range)#exit
SW1(config)#interface fastEthernet 0/3
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#switchport access vlan 13
SW1(config-if-range)#exit
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
256
Bước 2: Cấu hình IGMP, join group 232.32.32.32
Cấu hình IGMP trên R1
R1(config)#interface loopback 1
R1(config-if)#ip igmp join-group 232.32.32.32
R1(config-if)#exit
Cấu hình IGMP trên R2
R2(config)#interface loopback 2
R2(config-if)#ip igmp join-group 232.32.32.32
R2(config-if)#exit
Cấu hình IGMP trên R3
R3(config)#interface loopback 3
R3(config-if)#ip igmp join-group 232.32.32.32
R3(config-if)#exit
Kiểm tra cấu hình
Hình 7.2.3-1: Show ip igmp groups trên R1
Hình 7.2.3-2: Show ip igmp membership trên R1
Hình 7.2.3-3: Show ip igmp groups trên R2
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
257
Hình 7.2.3-4: Show ip igmp membership trên R2
Hình 7.2.3-5: Show ip igmp groups trên R3
Hình 7.2.3-6: Show ip igmp membership trên R3
Bước 3: Cấu hình EIGRP
Cấu hình EIGRP trên R1
R1(config)#router eigrp 1
R1(config-router)# network 172.16.0.0
R1(config-router)# network 192.168.0.0 0.0.255.255
R1(config-router)#no auto-summary
R1(config-router)#exit
Cấu hình EIGRP trên R2
R2(config)#router eigrp 1
R2(config-router)# network 172.16.0.0
R2(config-router)# network 192.168.0.0 0.0.255.255
R2(config-router)#no auto-summary
R2(config-router)#exit
Cấu hình EIGRP trên R3
R3(config)#router eigrp 1
R3(config-router)# network 172.16.0.0
R3(config-router)# network 192.168.0.0 0.0.255.255
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
258
R3(config-router)#no auto-summary
R3(config-router)#exit
Kiểm tra cấu hình
Hình 7.2.3-7: Show ip eigrp neighbors trên R1
Hình 7.2.3-8: Show ip route eigrp trên R1
Hình 7.2.3-9: Show ip eigrp neighbors trên R2
Hình 7.2.3-10: Show ip route eigrp trên R3
Hình 7.2.3-11: Show ip eigrp neighbors trên R3
Hình 7.2.3-12: Show ip route eigrp trên R3
Bước 4: Cấu hình PIM-DM (dense-mode)
Cấu hình trên R1
R1(config)# ip multicast-routing
R1(config)#interface Serial 0/3/0
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
259
R1(config-if)# ip pim dense-mode
R1(config-if)#exit
R1(config)#interface Serial 0/3/1
R1(config-if)# ip pim dense-mode
R1(config-if)#exit
R1(config)#interface gigabitEthernet 0/0
R1(config-if)# ip pim dense-mode
R1(config-if)#exit
R1(config)#interface loopback 1
R1(config-if)# ip pim dense-mode
R1(config-if)#exit
Cấu hình trên R2
R2(config)# ip multicast-routing
R2(config)#interface Serial 0/3/0
R2(config-if)# ip pim dense-mode
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface Serial 0/3/1
R2(config-if)# ip pim dense-mode
R2(config-if)#exit
R2(config)#interface fastEthernet 0/0
R2(config-if)# ip pim dense-mode
R2(config-if)#exit
R2(config)#interface loopback 2
R2(config-if)# ip pim dense-mode
R2(config-if)#exit
Cấu hình trên R3
R3(config)# ip multicast-routing
R3(config)#interface Serial 0/0/0
R3(config-if)# ip pim dense-mode
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface Serial 0/0/1
R3(config-if)# ip pim dense-mode
R3(config-if)#exit
R3(config)#interface fastEthernet 0/0
R3(config-if)# ip pim dense-mode
R3(config-if)#exit
R3(config)#interface loopback 3
R3(config-if)# ip pim dense-mode
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
260
R3(config-if)#exit
Bước 5: Kiểm tra PIM Adjacencies
Hình 7.2.3-13: Show ip pim neighbor trên R1
Hình 7.2.3-14: Show ip pim neighbor trên R2
Hình 7.2.3-15: Show ip pim neighbor trên R3
Bước 6: Kiểm tra hoạt động Multicast Routing
Hình 7.2.3-16: mrinfo trên R1
Hình 7.2.3-17: mrinfo trên R2
Hình 7.2.3-18: mrinfo trên R3
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
261
Bước 7: Kiểm tra PIM-DM Flood-and-Prune Behavior
Hình 7.2.3-19: Show ip route 172.16.20.4 trên R1
Hình 7.2.3-20: Show ip route 172.16.20.4 trên R2
Hình 7.2.3-21: Show ip route 172.16.20.4 trên R3
R1#debug ip pim
PIM debugging is on
*Dec 16 17:55:30.834: PIM(0): Assert metric to source 172.16.20.4 is [90/20517120]
*Dec 16 17:55:30.834: PIM(0): We win, our metric [90/20517120]
*Dec 16 17:55:30.834: PIM(0): Prune Serial0/3/1/232.32.32.32 from (172.16.20.4/32, 232.32.32.32)
*Dec 16 17:55:30.834: PIM(0): Pruning immediately Serial0/3/1 (p2p)
*Dec 16 17:55:30.842: PIM(0): Received v2 Assert on Serial0/3/1 from 172.16.103.3
*Dec 16 17:55:30.842: PIM(0): Assert metric to source 172.16.20.4 is [90/20514560]
*Dec 16 17:55:30.842: PIM(0): We lose, our metric [90/20517120]
*Dec 16 17:55:30.842: PIM(0): Insert (172.16.20.4,232.32.32.32) prune in nbr 172.16.103.3's queue
*Dec 16 17:55:30.842: PIM(0): Send (172.16.20.4, 232.32.32.32) PIM-DM prune to oif Serial0/3/1 in Prune state
*Dec 16 17:55:30.842: PIM(0): (172.16.20.4/32, 232.32.32.32) oif Serial0/3/1 in Prune state
*Dec 16 17:55:30.842: PIM(0): Building Join/Prune packet for nbr 172.16.103.3
*Dec 16 17:55:30.842: PIM(0): Adding v2 (172.16.20.4/32, 232.32.32.32) Prune
*Dec 16 17:55:30.842: PIM(0): Send v2 join/prune to 172.16.103.3 (Serial0/3/1)
*Dec 16 17:55:30.842: PIM(0): Received v2 Assert on Serial0/3/0 from 172.16.102.2
*Dec 16 17:55:30.842: PIM(0): Assert metric to source 172.16.20.4 is [0/0]
*Dec 16 17:55:30.846: PIM(0): We lose, our metric [90/20517120]
*Dec 16 17:55:30.846: PIM(0): Insert (172.16.20.4,232.32.32.32) prune in nbr 172.16.102.2's queue
*Dec 16 17:55:30.846: PIM(0): Send (172.16.20.4, 232.32.32.32) PIM-DM prune to oif Serial0/3/0 in Prune state
*Dec 16 17:55:30.846: PIM(0): (172.16.20.4/32, 232.32.32.32) oif Serial0/3/0 in Prune state
*Dec 16 17:55:30.846: PIM(0): Building Join/Prune packet for nbr 172.16.102.2
*Dec 16 17:55:30.846: PIM(0): Adding v2 (172.16.20.4/32, 232.32.32.32) Prune
*Dec 16 17:55:30.846: PIM(0): Send v2 join/prune to 172.16.102.2 (Serial0/3/0)
*Dec 16 17:55:31.834: PIM(0): Received v2 Assert on Serial0/3/0 from 172.16.102.2
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
262
*Dec 16 17:55:31.834: PIM(0): Assert metric to source 172.16.20.4 is [0/0]
*Dec 16 17:55:31.834: PIM(0): We lose, our metric [90/20517120]
*Dec 16 17:55:31.834: PIM(0): Insert (172.16.20.4,232.32.32.32) prune in nbr 172.16.102.2's queue
*Dec 16 17:55:31.834: PIM(0): Send (172.16.20.4, 232.32.32.32) PIM-DM prune to oif Serial0/3/0 in Prune state
*Dec 16 17:55:31.834: PIM(0): (172.16.20.4/32, 232.32.32.32) oif Serial0/3/0 in Prune state
*Dec 16 17:55:31.834: PIM(0): Building Join/Prune packet for nbr 172.16.102.2
*Dec 16 17:55:31.834: PIM(0): Adding v2 (172.16.20.4/32, 232.32.32.32) Prune
*Dec 16 17:55:31.834: PIM(0): Send v2 join/prune to 172.16.102.2 (Serial0/3/0)
*Dec 16 17:55:31.842: PIM(0): Received v2 Assert on Serial0/3/1 from 172.16.103.3
*Dec 16 17:55:31.842: PIM(0): Assert metric to source 172.16.20.4 is [90/20514560]
*Dec 16 17:55:31.842: PIM(0): We lose, our metric [90/20517120]
*Dec 16 17:55:31.846: PIM(0): Insert (172.16.20.4,232.32.32.32) prune in nbr 172.16.103.3's queue
*Dec 16 17:55:31.846: PIM(0): Send (172.16.20.4, 232.32.32.32) PIM-DM prune to oif Serial0/3/1 in Prune state
*Dec 16 17:55:31.846: PIM(0): (172.16.20.4/32, 232.32.32.32) oif Serial0/3/1 in Prune state
*Dec 16 17:55:31.846: PIM(0): Building Join/Prune packet for nbr 172.16.103.3
*Dec 16 17:55:31.846: PIM(0): Adding v2 (172.16.20.4/32, 232.32.32.32) Prune
*Dec 16 17:55:31.846: PIM(0): Send v2 join/prune to 172.16.103.3 (Serial0/3/1)
Bước 8: Kiểm tra bảng định tuyến Multicast
Hình 7.2.3-22: Show ip mroute trên R1
Hình 7.2.3-23: Show ip mroute trên R2
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
263
B
B
à
à
i
i
7
7
.
.
3
3
R
R
o
o
u
u
t
t
i
i
n
n
g
g
I
I
P
P
M
M
u
u
l
l
t
t
i
i
c
c
a
a
s
s
t
t
w
w
i
i
t
t
h
h
P
P
I
I
M
M
S
S
p
p
a
a
r
r
s
s
e
e
M
M
o
o
d
d
e
e
7
7
.
.
3
3
.
.
1
1
S
S
ơ
ơ
đ
đ
ồ
ồ
l
l
u
u
ậ
ậ
n
n
l
l
ý
ý
Lo2: 192.168.2.1/24
R1
SW1
R2
SW1
Lo1: 192.168.1.1/24
R3
Lo3: 192.168.3.1/24
172
.
16.102
.
0/29
172.16.
203
.0/29
172.16.103.0/29
VLAN13: 172.16.13.0/24
VLAN20: 172.16.20.0/24
S0/3/0
S0/3/1
Gi0/0
S0/3/1
S0/3/0
Fa0/0
S0/0/0
S0/0/1
Fa0/0
Fa0/1 Fa0/3
Fa0/2
Hình 7.3.1-1: Hình vẽ sơ đồ luận lý
7
7
.
.
3
3
.
.
2
2
M
M
ụ
ụ
c
c
t
t
i
i
ê
ê
u
u
b
b
à
à
i
i
t
t
h
h
ự
ự
c
c
h
h
à
à
n
n
h
h
Cấu hình và kiểm tra hoạt động của PIM-SM và adjacencies
Cấu hình tĩnh RP (rendezvous point) và kiểm tra
7
7
.
.
3
3
.
.
3
3
H
H
ư
ư
ớ
ớ
n
n
g
g
d
d
ẫ
ẫ
n
n
c
c
ấ
ấ
u
u
h
h
ì
ì
n
n
h
h
v
v
à
à
h
h
ì
ì
n
n
h
h
v
v
ẽ
ẽ
m
m
i
i
n
n
h
h
h
h
ọ
ọ
a
a
Bước 1: Cấu hình cơ bản R1, R2, R3, SW1
R1
Router(config)#hostname R1
R1(config)#enable password cisco
R1(config)#no ip domain-lookup
R1(config)#banner motd ^C R1^C
R1(config)#line console 0
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
264
R1(config-line)# logging synchronous
R1(config-line)# password cisco
R1(config-line)# login
R1(config)#line vty 0 4
R1(config-line)# password cisco
R1(config-line)# login
R1(config)#interface Serial 0/3/0
R1(config-if)#ip address 172.16.102.1 255.255.255.248
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface Serial 0/3/1
R1(config-if)#ip address 172.16.103.1 255.255.255.248
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface gigabitEthernet 0/0
R1(config-if)#ip address 172.16.13.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface loopback 1
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#exit
R2
Router(config)#hostname R2
R2(config)#enable password cisco
R2(config)#no ip domain-lookup
R2(config)#banner motd ^C R2^C
R2(config)#line console 0
R2(config-line)# logging synchronous
R2(config-line)# password cisco
R2(config-line)# login
R2(config)#line vty 0 4
R2(config-line)# password cisco
R2(config-line)# login
R2(config)#interface Serial 0/3/0
R2(config-if)#ip address 172.16.203.2 255.255.255.248
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
265
R2(config-if)#exit
R2(config)#interface Serial 0/3/1
R2(config-if)#ip address 172.16.102.2 255.255.255.248
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 172.16.20.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface loopback 2
R2(config-if)#ip address 192.168.2.1 255.255.255.0
R2(config-if)#exit
R3
Router(config)#hostname R3
R3(config)#enable password cisco
R3(config)#no ip domain-lookup
R3(config)#banner motd ^C R3^C
R3(config)#line console 0
R3(config-line)# logging synchronous
R3(config-line)# password cisco
R3(config-line)# login
R3(config)#line vty 0 4
R3(config-line)# password cisco
R3(config-line)# login
R3(config)#interface Serial 0/0/0
R3(config-if)#ip address 172.16.103.3 255.255.255.248
R3(config-if)#clock rate 64000
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface Serial 0/0/1
R3(config-if)#ip address 172.16.203.3 255.255.255.248
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip address 172.16.13.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#interface loopback 3
R3(config-if)# ip address 192.168.3.1 255.255.255.0
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
266
R3(config-if)#exit
SW1
Router(config)#hostname SW1
SW1(config)#enable password cisco
SW1(config)#no ip domain-lookup
SW1(config)#banner motd ^C R3^C
SW1(config)#line console 0
SW1(config-line)# logging synchronous
SW1(config-line)# password cisco
SW1(config-line)# login
SW1(config)#line vty 0 4
SW1(config-line)# password cisco
SW1(config-line)# login
SW1(config)#interface vlan 13
SW1(config-if)#exit
SW1(config)#interface vlan 20
SW1(config-if)#ip add 172.16.201.4 255.255.255.0
SW1(config-if)#no shutdown
SW1(config-if)#exit
SW1(config)#ip default-gateway 172.16.20.2
SW1(config)#interface fastEthernet 0/1
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#switchport access vlan 13
SW1(config-if-range)#exit
SW1(config)#interface fastEthernet 0/2
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#switchport access vlan 20
SW1(config-if-range)#exit
SW1(config)#interface fastEthernet 0/3
SW1(config-if-range)#switchport mode access
SW1(config-if-range)#switchport access vlan 13
SW1(config-if-range)#exit
Bước 2: Cấu hình IGMP trên các loopback của router join group
232.32.32.32
Cấu hình IGMP trên R1
R1(config)#interface loopback 1
R1(config-if)#ip igmp join-group 232.32.32.32
R1(config-if)#exit
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
267
Cấu hình IGMP trên R2
R2(config)#interface loopback 2
R2(config-if)#ip igmp join-group 232.32.32.32
R2(config-if)#exit
Cấu hình IGMP trên R3
R3(config)#interface loopback 3
R3(config-if)#ip igmp join-group 232.32.32.32
R3(config-if)#exit
Kiểm tra cấu hình
Hình 7.3.3-1: Show ip igmp groups trên R1
Hình 7.3.3-2: Show ip igmp membership trên R1
Hình 7.3.3-3: Show ip igmp groups trên R2
Hình 7.3.3-4: Show ip igmp membership trên R2
Hình 7.3.3-5: Show ip igmp groups trên R3
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
268
Hình 7.3.3-6: Show ip igmp membership trên R3
Bước 3: Cấu hình EIGRP
Cấu hình EIGRP trên R1
R1(config)#router eigrp 1
R1(config-router)# network 172.16.0.0
R1(config-router)# network 192.168.0.0 0.0.255.255
R1(config-router)#no auto-summary
R1(config-router)#exit
Cấu hình EIGRP trên R2
R2(config)#router eigrp 1
R2(config-router)# network 172.16.0.0
R2(config-router)# network 192.168.0.0 0.0.255.255
R2(config-router)#no auto-summary
R2(config-router)#exit
Cấu hình EIGRP trên R3
R3(config)#router eigrp 1
R3(config-router)# network 172.16.0.0
R3(config-router)# network 192.168.0.0 0.0.255.255
R3(config-router)#no auto-summary
R3(config-router)#exit
Kiểm tra cấu hình
Hình 7.3.3-7: Show ip eigrp neighbors trên R1
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
269
Hình 7.3.3-8: Show ip route eigrp trên R1
Hình 7.3.3-9: Show ip eigrp neighbors trên R2
Hình 7.3.3-10: Show ip route eigrp trên R2
Hình 7.3.3-11: Show ip eigrp neighbors trên R3
Hình 7.3.3-12: Show ip route eigrp trên R3
Bước 4: Cấu hình PIM-SM (sparse-mode) trên tất cả các interface
Cấu hình trên R1
R1(config)# ip multicast-routing
R1(config)#interface Serial 0/3/0
R1(config-if)# ip pim sparse-mode
R1(config-if)#exit
R1(config)#interface Serial 0/3/1
R1(config-if)# ip pim sparse-mode
R1(config-if)#exit
R1(config)#interface gigabitEthernet 0/0
R1(config-if)# ip pim sparse-mode
Giáo trình thực hành BSCI Chương 7 – IP Multicasting
270
R1(config-if)#exit
R1(config)#interface loopback 1
R1(config-if)# ip pim sparse-mode
R1(config-if)#exit
Cấu hình trên R2
R2(config)# ip multicast-routing
R2(config)#interface Serial 0/3/0
R2(config-if)# ip pim sparse-mode
R2(config-if)#exit
R2(config)#interface Serial 0/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
R2(config)#interface loopback 2
R2(config-if)# ip pim sparse-mode
R2(config-if)#exit
Cấu hình trên R3
R3(config)# ip multicast-routing
R3(config)#interface Serial 0/0/0
R3(config-if)# ip pim sparse-mode
R3(config-if)#exit
R3(config)#interface Serial 0/0/1
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
R3(config)#interface loopback 3
R3(config-if)# ip pim sparse-mode
R3(config-if)#exit
Bước 5: Cấu hình RP trên R1, R2, R3
Cấu hình trên R1
R1(config)# ip pim rp-address 192.168.1.1
Cấu hình trên R2
R2(config)# ip pim rp-address 192.168.1.1
Cấu hình trên R3
R3(config)# ip pim rp-address 192.168.1.1