本文共 5200 字,大约阅读时间需要 17 分钟。
实验一:交换机端口类型配置
1.拓扑图如下图所示:
实验思路:将交换机SW1、SW2、SW3之间配置为trunk链路,其他接口配置为Hybrid链路; 实验配置名如下:
SW1
sysname SW1vlan batch 10 100 200interface Ethernet0/0/1port link-type hybrid port hybrid tagged vlan 10 100 200interface Ethernet0/0/2port link-type trunk port trunk allow-pass vlan all quitSW2sysname SW2vlan batch 10 100 200interface Ethernet0/0/1port link-type hybrid port hybrid tagged vlan 10 100 200interface Ethernet0/0/2port link-type trunk port trunk allow-pass vlan all interface Ethernet0/0/3port link-type trunk port trunk allow-pass vlan all quitSW3sysname SW3vlan batch 10 100 200interface Ethernet0/0/1port link-type hybrid port hybrid tagged vlan 10 100 200interface Ethernet0/0/3port link-type trunk port trunk allow-pass vlan allquit SW4sysname SW4vlan batch 10 100 200interface Ethernet0/0/1port link-type hybrid port hybrid tagged vlan 10 100 200interface Ethernet0/0/2port link-type hybrid port hybrid pvid vlan 10port hybrid untagged vlan 10 100port hybrid tagged vlan 200 interface Ethernet0/0/3port hybrid pvid vlan 10port link-type hybrid port hybrid untagged vlan 10 100 port hybrid tagged vlan 200quitSW5sysname SW5vlan batch 10 100 200interface Ethernet0/0/1port link-type hybrid port hybrid tagged vlan 10 100 200interface Ethernet0/0/2port link-type hybridport hybrid pvid vlan 100 port hybrid untagged vlan 10 100 200interface Ethernet0/0/3port link-type hybrid port hybrid pvid vlan 100port hybrid untagged vlan 10 100 200quitSW6sysname SW6vlan batch 10 100 200interface Ethernet0/0/1port link-type hybrid port hybrid tagged vlan 10 100 200interface Ethernet0/0/2port link-type hybrid port hybrid pvid vlan 200port hybrid untagged vlan 100 200port hybrid tagged vlan 10interface Ethernet0/0/3port link-type hybrid port hybrid pvid vlan 200port hybrid untagged vlan 100 200 port hybrid tagged vlan 10quit实验二:实现全网互通
1.以此拓扑为题,实现全网互通
配置思路:配置Vlan、静态路由 配置命令如下:
R1
system-viewsysname R1interface g0/0/1ip address 192.168.12.1 24interface g0/0/2ip address 192.168.10.254 24quitip route-static 0.0.0.0 0.0.0.0 192.168.12.2R2system-viewsysname R2interface g0/0/0ip address 192.168.12.2 24interface g0/0/1ip address 192.168.23.2 24interface g0/0/2ip address 192.168.30.1 24quitip route-static 192.168.10.0 24 192.168.12.1ip route-static 192.168.20.0 24 192.168.23.3ip route-static 192.168.100.0 24 192.168.30.2ip route-static 192.168.200.0 24 192.168.30.2R3system-viewsysname R3interface g0/0/0ip address 192.168.23.3 24interface g0/0/2ip address 192.168.20.254 24quitip route-static 0.0.0.0 0.0.0.0 192.168.23.2SW1system-viewsysname SW1vlan 10quitport-group 1group-member Ethernet 0/0/1 to Ethernet 0/0/3port link-type access port default vlan 10quitinterface Vlanif 10ip address 192.168.10.10 24quitip route-static 0.0.0.0 0.0.0.0 192.168.10.254SW2system-viewsysname SW2vlan batch 100 200 30interface GigabitEthernet 0/0/1port link-type access port default vlan 100interface GigabitEthernet 0/0/2port link-type access port default vlan 200interface GigabitEthernet 0/0/3port link-type access port default vlan 30interface Vlanif 100ip address 192.168.100.254 24interface Vlanif 200ip address 192.168.200.254 24interface Vlanif 30ip address 192.168.30.2 24quitip route-static 0.0.0.0 0.0.0.0 192.168.30.1user-interface vty 0 4authentication-mode passwordset authentication password cipher 123456user privilege level 15quitSW3system-viewsysname SW3vlan 20quitport-group 1group-member Ethernet 0/0/1 to Ethernet 0/0/3port link-type access port default vlan 20quit实验三:实现负载均衡
1.如下图所示,实现vlan10、vlan20流量负载均衡;
配置思路:配置多实例生成树 配置命令如下:
SW1
system-viewsysname SW1vlan batch 10 20port-group 1group-member Ethernet 0/0/1 Ethernet 0/0/2port link-type trunk port trunk allow-pass vlan allquitinterface Ethernet0/0/10port link-type accessport default vlan 10interface Ethernet0/0/20port link-type accessport default vlan 20quitstp region-configurationregion-name ntdinstance 10 vlan 10instance 20 vlan 20active region-configurationquitstp instance 10 root secondarystp instance 20 root secondarySW2system-viewsysname SW2vlan batch 10 20port-group 1group-member Ethernet 0/0/1 Ethernet 0/0/2port link-type trunk port trunk allow-pass vlan allquitinterface Ethernet0/0/10port link-type accessport default vlan 10quitstp region-configurationregion-name ntdinstance 10 vlan 10instance 20 vlan 20active region-configurationquitstp instance 10 root primarySW3system-viewsysname SW3vlan batch 10 20port-group 1group-member Ethernet 0/0/1 Ethernet 0/0/2port link-type trunk port trunk allow-pass vlan allquitinterface Ethernet0/0/20port link-type accessport default vlan 20quitstp region-configurationregion-name ntdinstance 10 vlan 10instance 20 vlan 20active region-configurationquitstp instance 20 root primary在此院哥祝愿大家 :
新春快乐,2019猪年大吉,猪事顺利 ^-^转载于:https://blog.51cto.com/11806823/2349258