在华为交换机上配置命令,要求研发部ip在192.168.1.0/24子网,属于vlan100,市场部ip在172.16.1.0/24子网,属于vlan200,工资服务器ip为192.168.10.10,属于vlan300,研发部在工作时间不能访问工资服务器,市场部不受限制
时间: 2025-01-14 12:17:24 浏览: 45
要在华为交换机上配置这些要求,可以按照以下步骤进行:
1. 创建VLAN并配置接口:
```plaintext
vlan batch 100 200 300
interface Vlanif100
ip address 192.168.1.1 255.255.255.0
interface Vlanif200
ip address 172.16.1.1 255.255.255.0
interface Vlanif300
ip address 192.168.10.1 255.255.255.0
```
2. 配置接口所属VLAN:
```plaintext
interface GigabitEthernet0/0/1
port link-type access
port default vlan 100
interface GigabitEthernet0/0/2
port link-type access
port default vlan 200
interface GigabitEthernet0/0/3
port link-type access
port default vlan 300
```
3. 配置ACL以限制研发部访问工资服务器:
```plaintext
acl number 3000
rule 5 deny ip source 192.168.1.0 0.0.0.255 destination 192.168.10.10 0
rule 10 permit ip
```
4. 配置时间段(工作时间):
```plaintext
time-range WORK_TIME 09:00 to 18:00 working-day
```
5. 应用ACL到VLAN100接口:
```plaintext
interface Vlanif100
traffic-filter acl 3000 inbound time-range WORK_TIME
```
6. 配置默认路由(如果需要):
```plaintext
ip route-static 0.0.0.0 0.0.0.0 192.168.10.1
```
以上配置完成后,研发部在工作时间将无法访问工资服务器,而市场部则不受限制。
阅读全文
相关推荐


















