企业部门IP划分拓扑:
注:使用S5700交换机及S3700交换机。
各PC机IP地址及网关参照下方拓扑图绿色背景文字。
按照题目要求设置各部门的IP地址,将各个端口分配到不同vlan10 20 30 40 50 100并按照拓扑连接。
假设一台主机对应一个部门,根据每个部门人数不同划分子网,将地址信息(ip地址,子网掩码,网关地址)配置到对应的PC上。
研发部(100人):IP地址 10.0.8.1-10.0.8.100子网掩码255.255.240.0 网关10.0.8.254
技术部(100人):IP地址10.0.32.1-10.0.32.100 子网掩码255.255.240.0网关 10.0.32.254
综合部(50人):IP地址 10.0.80.1-10.0.80.50子网掩码255.255.240.0网关 10.0.80.254
销售部(100人):IP地址 10.0.16.1-10.0.16.100子网掩码255.255.240.0 网关 10.0.16.254
财务部(50人):IP地址 10.0.64.1-10.0.64.50 子网掩码255.255.240.0 网关 10.0.64.254
远程(1人): IP地址 10.0.240.11 子网掩码 255.255.240.0 网关 10.0.240.254
需求:
1、创建Vlan
在SW1、SW2、LSW6、LSW7中创建Vlan10、20、30,LSW5创建Vlan2、10、20、30。
在SW3、SW4、LSW9、LSW10中创建Vlan 40、50、100,LSW8创建Vlan2、40、50、100。
2、划分部门Vlan
研发部的接口划分配置为Vlan10,
销售部的接口划分配置为Vlan20,
技术部的接口划分配置为Vlan30,
财务部的接口划分配置为Vlan40,
综合部的接口划分配置为Vlan50,
远程的接口划分配置为Vlan100 。
3、 配置trunk端口
4、 配置链路聚合
5、 配置生成树协议
将LSW5、LSW8设置为根桥
6、 静态路由( LSW5、 LSW8之间)
7、 配置网关
8、测试连通性
1.LSW5配置:
[SW5]vlan batch 2 10 20 30 //创建Vlan
[SW5]interface Vlanif 10
[SW5-Vlanif10]IP address 10.0.8.254 20 //设置Vlan IP及子网掩码
[SW5-Vlanif10]quit
[SW5]
[SW5]interface Vlanif 20
[SW5-Vlanif20]ip address 10.0.16.254 20
[SW5-Vlanif20]quit
[SW5]
[SW5]interface Vlanif 30
[SW5-Vlanif30]ip address 10.0.32.254 20
[SW5-Vlanif30]quit
[SW5]
[SW5]interface Vlanif 2
[SW5-Vlanif2]ip address 172.16.1.1 20
[SW5-Vlanif2]quit
[SW5]
[SW5]interface GigabitEthernet 0/0/4
[SW5-GigabitEthernet0/0/4]port link-type trunk
[SW5-GigabitEthernet0/0/4]port trunk allow-pass vlan 2 10 20 30
[SW5-GigabitEthernet0/0/4]quit
[SW5]
[SW5]interface GigabitEthernet 0/0/3
[SW5-GigabitEthernet0/0/3]port link-type trunk
[SW5-GigabitEthernet0/0/3]port trunk allow-pass vlan 10 20 30
[SW5-GigabitEthernet0/0/3]quit
[SW5]
[SW5]interface Eth-Trunk 0 //创建并进入聚合组Eth-Ttrunk0
[SW5-Eth-Trunk0]trunkport GigabitEthernet 0/0/1 //增加聚合组成员接口
[SW5-Eth-Trunk0]trunkport GigabitEthernet 0/0/2
[SW5-Eth-Trunk0]port link-type trunk
[SW5-Eth-Trunk0]port trunk allow-pass vlan 10 20 30
[SW5-Eth-Trunk0]quit
[SW5]
[SW5]stp region-configuration //进入MST域视图
[SW5-mst-region]region-name RG1 //配置MST域的域名
[SW5-mst-region]instance 1 vlan 2 //配置实例与VLAN映射关系
[SW5-mst-region]active region-configuration //激活MST域的配置
[SW5-mst-reaion]quit
[SW5]stp instance 1 root primary //配置当前设备为根桥设备。
[SW5]stp pathcost-standard legacy //配置端口路径开销计算方法。
[SW5]stp enable //开启STP
2.LSW6交换机配置:
<SW6>sys
Enter system view, return user view with Ctrl+Z.
[SW6]vlan batch 10 20 30
[SW6]interface GigabitEthernet 0/0/1
[SW6-GigabitEthernet0/0/1]port link-type trunk
[SW6-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20 30
[SW6-GigabitEthernet0/0/1]quit
[SW6]
[SW6]interface GigabitEthernet 0/0/2
[SW6-GigabitEthernet0/0/2]port link-type trunk
[SW6-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20 30
[SW6-GigabitEthernet0/0/2]quit
[SW6]
[SW]6interface Eth-Trunk 0
[SW6-Eth-Trunk0]mode lacp-static
[SW6-Eth-Trunk0]trunkport GigabitEthernet 0/0/24
[SW6-Eth-Trunk0]trunkport GigabitEthernet 0/0/23
[SW6-Eth-Trunk0]port link-type trunk
[SW6-Eth-Trunk0]port trunk allow-pass vlan 10 20 30
[SW6-Eth-Trunk0]quit
[SW6]
3.LSW7交换机配置:
[SW7]vlan batch 10 20 30
[SW7]interface GigabitEthernet 0/0/1
[SW7-GigabitEthernet0/0/1]port link-type trunk
[SW7-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20 30
[SW7-GigabitEthernet0/0/1]quit
[SW7]
[SW7]interface GigabitEthernet 0/0/2
[SW7-GigabitEthernet0/0/2]port link-type trunk
[SW7-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20 30
[SW7-GigabitEthernet0/0/2]quit
[SW7]
[SW7]interface GigabitEthernet 0/0/24
[SW7-GigabitEthernet0/0/24]port link-type trunk
[SW7-GigabitEthernet0/0/24]port trunk allow-pass vlan 10 20 30
[SW7-GigabitEthernet0/0/24]quit
[SW7]
4.SW1交换机配置:
<SW1>sys
Enter system view, return user view with Ctrl+Z.
[SW1]vlan batch 10 20 30
[SW1]interface GigabitEthernet 0/0/2
[SW1-GigabitEthernet0/0/2]port link-type trunk
[SW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20 30
[SW1-GigabitEthernet0/0/2]quit
[SW1]
[SW1]interface Ethernet0/0/1
[SW1-Ethernet0/0/1]port link-type access
[SW1-Ethernet0/0/1]port default vlan 10
[SW1-Ethernet0/0/1]quit
[SW1]
[SW1]interface Ethernet0/0/2
[SW1-Ethernet0/0/2]port link-type access
[SW1-Ethernet0/0/2]port default vlan 20
[SW1-Ethernet0/0/2]quit
[SW1]
[SW1]interface Ethernet0/0/3
[SW1-Ethernet0/0/3]port link-type access
[SW1-Ethernet0/0/3]port default vlan 30
[SW1-Ethernet0/0/3]quit
[SW1]
5.SW2交换机配置:
同SW1交换机配置一样
<SW2>sys
Enter system view, return user view with Ctrl+Z.
[SW2]vlan batch 10 20 30
[SW2]interface GigabitEthernet 0/0/2
[SW2-GigabitEthernet0/0/2]port link-type trunk
[SW2-GigabitEthernet0/0/2]port trunk allow-pass vlan 10 20 30
[SW2-GigabitEthernet0/0/2]quit
[SW2]
[SW2]interface Ethernet0/0/1
[SW2-Ethernet0/0/1]port link-type access
[SW2-Ethernet0/0/1]port default vlan 10
[SW2-Ethernet0/0/1]quit
[SW2]
[SW2]interface Ethernet0/0/2
[SW2-Ethernet0/0/2]port link-type access
[SW2-Ethernet0/0/2]port default vlan 20
[SW2-Ethernet0/0/2]quit
[SW2]
[SW2]interface Ethernet0/0/3
[SW2-Ethernet0/0/3]port link-type access
[SW2-Ethernet0/0/3]port default vlan 30
[SW2-Ethernet0/0/3]quit
[SW2]
6.LSW8交换机配置
[SW8]vlan batch 2 40 50 100
[SW8]interface Vlanif 40
[SW8-Vlanif40]ip address 10.0.64.254 20
[SW8-Vlanif40]quit
[SW8]
[SW8]interface Vlanif 50
[SW8-Vlanif50]ip address 10.0.80.254 20
[SW8-Vlanif50]quit
[SW8]
[SW8]interface Vlanif 100
[SW8-Vlanif100]ip address 10.0.240.254 20
[SW8-Vlanif100]quit
[SW8]
[SW8]interface Vlanif 2
[SW8-Vlanif2]ip address 172.16.1.2 20
[SW8-Vlanif2]quit
[SW8]
[SW8]interface GigabitEthernet 0/0/4
[SW8-GigabitEthernet0/0/4]port link-type trunk
[SW8-GigabitEthernet0/0/4]port trunk allow-pass vlan 2 40 50 100
[SW8-GigabitEthernet0/0/4]quit
[SW8]
[SW8]interface GigabitEthernet 0/0/1
[SW8-GigabitEthernet0/0/1]port link-type trunk
[SW8-GigabitEthernet0/0/1]port trunk allow-pass vlan 40 50 100
[SW8-GigabitEthernet0/0/1]quit
[SW8]
[SW8]interface Eth-Trunk 0
[SW8-Eth-Trunk0]trunkport GigabitEthernet 0/0/3
[SW8-Eth-Trunk0]trunkport GigabitEthernet 0/0/2
[SW8-Eth-Trunk0]port link-type trunk
[SW8-Eth-Trunk0]port trunk allow-pass vlan 40 50 100
[SW8-Eth-Trunk0]quit
[SW8]stp region-configuration //进入MST域视图
[SW8-mst-region]region-name RG1 //配置MST域的域名
[SW8-mst-region]instance 1 vlan 2 //配置实例与VLAN映射关系
[SW8-mst-region]active region-configuration //激活MST域的配置
[SW8-mst-reaion]quit
[SW8]stp instance 1 root primary //配置当前设备为根桥设备。
[SW8]stp pathcost-standard legacy //配置端口路径开销计算方法。
[SW8]stp enable
7.LSW10交换机配置:
<SW10>sys
Enter system view, return user view with Ctrl+Z.
[SW10]vlan batch 40 50 100
[SW10]interface GigabitEthernet 0/0/1
[SW10-GigabitEthernet0/0/1]port link-type trunk
[SW10-GigabitEthernet0/0/1]port trunk allow-pass vlan 40 50 100
[SW10-GigabitEthernet0/0/1]quit
[SW10]
[SW10]interface Eth-Trunk 0
[SW10-Eth-Trunk0]mode lacp-static
[SW10-Eth-Trunk0]trunkport GigabitEthernet 0/0/23
[SW10-Eth-Trunk0]trunkport GigabitEthernet 0/0/24
[SW10-Eth-Trunk0]port link-type trunk
[SW10-Eth-Trunk0]port trunk allow-pass vlan 40 50 100
[SW10-Eth-Trunk0]quit
[SW10]
8.LSW9交换机配置:
<SW9>sys
Enter system view, return user view with Ctrl+Z.
[SW9]vlan batch 40 50 100
[SW9]interface GigabitEthernet 0/0/1
[SW9-GigabitEthernet0/0/1]port link-type trunk
[SW9-GigabitEthernet0/0/1]port trunk allow-pass vlan 40 50 100
[SW9-GigabitEthernet0/0/1]quit
[SW9]
[SW9]interface GigabitEthernet 0/0/24
[SW9-GigabitEthernet0/0/24]port link-type trunk
[SW9-GigabitEthernet0/0/24]port trunk allow-pass vlan 40 50 100
[SW9-GigabitEthernet0/0/24]quit
[SW9]
9.SW3交换机配置:
<SW3>sys
Enter system view, return user view with Ctrl+Z.
[SW3]vlan batch 40 50 100
[SW3]interface GigabitEthernet 0/0/2
[SW3-GigabitEthernet0/0/2]port link-type trunk
[SW3-GigabitEthernet0/0/2]port trunk allow-pass vlan 40 50 100
[SW3-GigabitEthernet0/0/2]quit
[SW3]
[SW3]interface Ethernet0/0/1
[SW3-Ethernet0/0/1]port link-type access
[SW3-Ethernet0/0/1]port default vlan 40
[SW3-Ethernet0/0/1]quit
[SW3]
[SW3]interface Ethernet0/0/2
[SW3-Ethernet0/0/2]port link-type access
[SW3-Ethernet0/0/2]port default vlan 50
[SW3-Ethernet0/0/2]quit
[SW3]
10.SW4交换机配置:
<SW4>sys
Enter system view, return user view with Ctrl+Z.
[SW4]vlan batch 40 50 100
[SW4]interface GigabitEthernet 0/0/2
[SW4-GigabitEthernet0/0/2]port link-type trunk
[SW4-GigabitEthernet0/0/2]port trunk allow-pass vlan 40 50 100
[SW4-GigabitEthernet0/0/2]quit
[SW4]
[SW4]interface Ethernet0/0/1
[SW4-Ethernet0/0/1]port link-type access
[SW4-Ethernet0/0/1]port default vlan 40
[SW4-Ethernet0/0/1]quit
[SW4]
[SW4]interface Ethernet0/0/2
[SW4-Ethernet0/0/2]port link-type access
[SW4-Ethernet0/0/2]port default vlan 50
[SW4-Ethernet0/0/2]quit
[SW4]
[SW4]interface Ethernet0/0/3
[SW4-Ethernet0/0/3]port link-type access
[SW4-Ethernet0/0/3]port default vlan 100
[SW4-Ethernet0/0/3]quit
[SW4]
11.测试连通性
(1)PC1[研发部] Ping PC2及PC6
(2)PC1[研发部] Ping PC7及PC11
(3)PC11[远程] Ping PC8、PC5及PC3。