使用以下路由器配置:
R1:
hostname R1
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
no ip icmp rate-limit unreachable
!
!
!
!
!
!
no ip domain lookup
ip multicast-routing
ip cef
no ipv6 cef
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address dhcp
ip nat outside
duplex full
!
interface FastEthernet1/0
ip address 192.168.1.1 255.255.255.0
ip nat inside
ip pim sparse-dense-mode
duplex full
!
interface FastEthernet2/0
ip address 192.168.2.1 255.255.255.0
ip nat inside
ip pim sparse-dense-mode
duplex full
!
router ospf 1
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 192.168.3.0 0.0.0.255 area 0
network 192.168.4.0 0.0.0.255 area 0
network 192.168.5.0 0.0.0.255 area 0
!
ip nat inside source list 1 interface FastEthernet0/0 overload
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
access-list 1 permit any
!
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line vty 0 4
login
!
!
end
R2:
hostname R2
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
no ip icmp rate-limit unreachable
!
!
!
!
!
!
ip name-server 8.8.8.8
ip multicast-routing
ip cef
no ipv6 cef
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 192.168.1.2 255.255.255.0
ip pim sparse-dense-mode
duplex full
!
interface FastEthernet1/0
ip address 192.168.3.1 255.255.255.0
ip pim sparse-dense-mode
duplex full
!
interface FastEthernet2/0
ip address 192.168.5.1 255.255.255.0
ip pim sparse-dense-mode
duplex full
!
router ospf 1
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 192.168.3.0 0.0.0.255 area 0
network 192.168.4.0 0.0.0.255 area 0
network 192.168.5.0 0.0.0.255 area 0
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 192.168.1.1
!
!
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line vty 0 4
login
!
!
end
R3:
hostname R3
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
no ip icmp rate-limit unreachable
!
!
!
!
!
!
ip name-server 8.8.8.8
ip multicast-routing
ip cef
no ipv6 cef
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
ip address 192.168.2.2 255.255.255.0
ip pim sparse-dense-mode
duplex full
!
interface FastEthernet1/0
ip address 192.168.4.1 255.255.255.0
ip pim sparse-dense-mode
duplex full
!
interface FastEthernet2/0
ip address 192.168.5.2 255.255.255.0
ip pim sparse-dense-mode
duplex full
!
router ospf 1
network 192.168.1.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 0
network 192.168.3.0 0.0.0.255 area 0
network 192.168.4.0 0.0.0.255 area 0
network 192.168.5.0 0.0.0.255 area 0
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
ip route 0.0.0.0 0.0.0.0 192.168.2.1
!
!
!
!
control-plane
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line vty 0 4
login
!
!
end
我尝试做的是配置多播 PIM 密集模式,这样我就可以使用 VLC 将视频从服务器流式传输到客户端。在 VLC 中,我选择了 Stream 选项,添加了视频,选择了流,然后在下一个目标中,我选择了 RTP/MPEG TS,在地址中我用端口 5004 写了 239.255.0.1,我禁用了转码并启动了流,但是视频某些原因不在服务器中播放。在客户端中,我使用 rtp://239.255.0.1:5004 连接到网络。流不工作,我不知道为什么。我正在模拟 GNS3 中的网络。