企业部门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\2\6\7\5
vlan batch 10 20 30
SW3\4\9\10\8
vlan batch 40 50 100
2.规划vlan
SW1\2\3\4
interface Ethernet 0/0/1
port link-type access
port default vlan 10(20 30 40 50 100)
quit
3.配置trunk端口
SW1\6\7\2
interface Ethernet 0/0/2
port link-type trunk
port trunk allow-pass vlan 10 20 30
quit
SW3\4\9\10
interface Ethernet 0/0/2
port link-type trunk
port trunk allow-pass vlan 40 50 100
4.配置链路聚合
SW6
interface Eth-Trunk 1
mode lacp-static
quit
interface GigabitEthernet 0/0/24
interface GigabitEthernet 0/0/23
interface Eth-Trunk 1
port link-type trunk
port trunk allow-pass vlan 10 20 30
5.配置生成树协议
SW5\8设置位根桥
stp enable
stp mode stp
6.静态路由
SW5
vlan 1
quit
interface vlanif 1
ip address 172.16.1.1 24
quit
ip route-static 0.0.0.0 0.0.0.0 172.16.1.2
SW8
vlan 1
quit
interface vlanif 1
ip address 172.16.1.2 24
quit
ip route-static 0.0.0.0 0.0.0.0 172.16.1.1
7.配置网关
SW5
interface vlanif 10
ip address 10.0.8.254
quit
interface vlanif 20
ip address 10.0.16.254
quit
interface vlanif 30
ip address 10.0.32.254
SW8
interface vlanif 40
ip address 10.0.64.254
quit
interface vlanif 50
ip address 10.0.80.254
quit
interface vlanif 100
ip address 10.0.240.254
quit
案例实操
1.SW1交换机
<Huawei>system-view
[Huawei]sysname SW1
[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]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]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]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
2.SW2交换机
<Huawei>system-view
[Huawei]sysname SW2
[SW2]vlan batch 10 20 30
[SW2]interface GigabitEthernet 0/0/2
[SW2-GigabitEthernet0/0/2]port link-