- 配置各接口的IP地址
[LSW1]vlan batch 10 40 50 [LSW1-GigabitEthernet0/0/1]port link-type access [LSW1-GigabitEthernet0/0/1]port default vlan 50 [LSW1-GigabitEthernet0/0/4]port link-type trunk [LSW1-GigabitEthernet0/0/4]port trunk allow-pass vlan 40 [LSW1-GigabitEthernet0/0/5]port link-type trunk [LSW1-GigabitEthernet0/0/5]port trunk allow-pass vlan 10 [LSW1]stp disable [LSW1-Vlanif10]ip add 10.1.1.1 24 [LSW1-Vlanif40]ip add 10.1.4.1 24 [LSW1-Vlanif50]ip add 192.168.5.1 24 [LSW2]vlan batch 20 60 [LSW2-GigabitEthernet0/0/5]port link-type trunk [LSW2-GigabitEthernet0/0/5]port trunk allow-pass vlan 20 [LSW2-GigabitEthernet0/0/1]port link-type trunk [LSW2-GigabitEthernet0/0/1]port trunk allow-pass vlan 60 [LSW2]stp disable [LSW2-Vlanif20]ip add 10.1.2.2 24 [LSW2-Vlanif60]ip add 192.168.6.2 24 [LSW3]vlan batch 30 60 [LSW3]stp disable [LSW3-GigabitEthernet0/0/1]port link-type trunk [LSW3-GigabitEthernet0/0/1]port trunk allow-pass vlan 60 [LSW3-GigabitEthernet0/0/5]port link-type trunk [LSW3-GigabitEthernet0/0/5]port trunk allow-pass vlan 30 [LSW3-Vlanif30]ip add 10.1.3.3 24 [LSW3-Vlanif60]ip add 192.168.6.3 24 [LSW4]vlan batch 40 70 80 [LSW4]stp disable [LSW4-GigabitEthernet0/0/2]port link-type access [LSW4-GigabitEthernet0/0/2]port default vlan 70 [LSW4-GigabitEthernet0/0/1]port link-type trunk [LSW4-GigabitEthernet0/0/1]port trunk allow-pass vlan 40 [LSW4-GigabitEthernet0/0/5]port link-type trunk [LSW4-GigabitEthernet0/0/5]port trunk allow-pass vlan 80 [LSW4-Vlanif40]ip add 10.1.4.4 24 [LSW4-Vlanif80]ip add 10.1.8.4 24 [LSW4-Vlanif70]ip add 192.168.7.4 24 [LSW5]vlan batch 10 20 30 80 [LSW5]stp disable [LSW5-GigabitEthernet0/0/1]port link-type trunk [LSW5-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 [LSW5-GigabitEthernet0/0/2]port link-type trunk [LSW5-GigabitEthernet0/0/2]port trunk allow-pass vlan 20 [LSW5-GigabitEthernet0/0/3]port link-type trunk [LSW5-GigabitEthernet0/0/3]port trunk allow-pass vlan 30 [LSW5-GigabitEthernet0/0/4]port link-type trunk [LSW5-GigabitEthernet0/0/4]port trunk allow-pass vlan 80 [LSW5-Vlanif10]ip add 10.1.1.5 24 [LSW5-Vlanif20]ip add 10.1.2.5 24 [LSW5-Vlanif30]ip add 10.1.3.5 24 [LSW5-Vlanif80]ip add 10.1.8.5 24 [LSW8]vlan batch 60 [LSW8-Ethernet0/0/1]port link-type trunk [LSW8-Ethernet0/0/1]port trunk allow-pass vlan 60 [LSW8-Ethernet0/0/2]port link-type trunk [LSW8-Ethernet0/0/2]port trunk allow-pass vlan 60 [LSW8-Ethernet0/0/3]port link-type access [LSW8-Ethernet0/0/3]port default vlan 60
- 配置单播路由协议-OSPF
[LSW1]ospf 1 [LSW1-ospf-1]area 0 [LSW1-ospf-1-area-0.0.0.0]network 10.1.4.0 0.0.0.255 [LSW1-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255 [LSW1-ospf-1-area-0.0.0.0]network 192.168.5.0 0.0.0.255 [LSW2]ospf 1 [LSW2-ospf-1]area 0 [LSW2-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255 [LSW2-ospf-1-area-0.0.0.0]network 192.168.6.0 0.0.0.255 [LSW3]ospf 1 [LSW3-ospf-1]area 0 [LSW3-ospf-1-area-0.0.0.0]network 10.1.3.0 0.0.0.255 [LSW3-ospf-1-area-0.0.0.0]network 192.168.6.0 0.0.0.255 [LSW4]ospf 1 [LSW4-ospf-1]area 0 [LSW4-ospf-1-area-0.0.0.0]network 10.1.4.0 0.0.0.255 [LSW4-ospf-1-area-0.0.0.0]network 10.1.8.0 0.0.0.255 [LSW4-ospf-1-area-0.0.0.0]network 192.168.7.0 0.0.0.255 [LSW5]ospf 1 [LSW5-ospf-1]area 0 [LSW5-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255 [LSW5-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255 [LSW5-ospf-1-area-0.0.0.0]network 10.1.3.0 0.0.0.255 [LSW5-ospf-1-area-0.0.0.0]network 10.1.8.0 0.0.0.255 - 使能组播路由功能,在各接口上使能PIM-DM功能
[LSW1]multicast routing-enable [LSW1-Vlanif10]pim dm [LSW1-Vlanif50]pim dm [LSW1-Vlanif40]pim dm [LSW2]multicast routing-enable [LSW2-Vlanif20]pim dm [LSW2-Vlanif60]pim dm [LSW3]multicast routing-enable [LSW3-Vlanif30]pim dm [LSW3-Vlanif60]pim dm [LSW4]multicast routing-enable [LSW4-Vlanif40]pim dm [LSW4-Vlanif70]pim dm [LSW4-Vlanif80]pim dm [LSW5]multicast routing-enable [LSW5-Vlanif10]pim dm [LSW5-Vlanif20]pim dm [LSW5-Vlanif30]pim dm [LSW5-Vlanif80]pim dm - 在连接用户主机的接口上使能IGMP功能
[LSW1-Vlanif50]igmp enable [LSW2-Vlanif60]igmp enable [LSW3-Vlanif60]igmp enable - 验证配置
|