华为交换机三层交换机与二层交换机联合配置

1、现学现卖,学了就得用上

2、环境描述

1)核心交换机S5700(华为)

2)接入交换机S3700(华为)

3、要求

1)不同vlan之间不能相互访问,每个vlan只能属于一个部门

2)部门1两台终端机配置分别如下

终端1:192.168.162.2/24 网关是:192.168.162.254

终端2:192.168.162.3/24 网关是:192.168.162.254

3)部门2两台终端机配置分别如下

终端1:192.168.163.2/24 网关是:192.168.163.254

终端2:192.168.163.3/24 网关是:192.168.163.254

4、核心交换机的基本配置如下:

[Huawei]di	
[Huawei]display cur	
[Huawei]display current-configuration 
#
sysname Huawei
#
vlan batch 21 1602 to 1603
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
acl number 3089
 rule 0 permit ip destination 255.255.255.255 0
 rule 1 permit ip source 192.168.162.0 0.0.0.255 destination 192.168.162.0 0.0.0
.255
 rule 2 deny ip
acl number 3090
 rule 0 permit ip destination 255.255.255.255 0
 rule 1 permit ip source 192.168.163.0 0.0.0.255 destination 192.168.163.0 0.0.0
.255
 rule 2 deny ip
#
traffic classifier 1602 operator and
 if-match acl 3089
#
traffic behavior 1602
 permit
#
traffic policy 1602
 classifier 1602 behavior 1602
#
drop-profile default
#
vlan 1602
 traffic-policy 1602 inbound
#
aaa
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default
 domain default_admin
 local-user admin password simple admin
 local-user admin service-type http
#
interface Vlanif1
#
interface Vlanif21
#
interface Vlanif1602
 ip address 192.168.162.254 255.255.255.0
#
interface Vlanif1603
 ip address 192.168.163.254 255.255.255.0
#
interface MEth0/0/1
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
interface GigabitEthernet0/0/4
#
interface GigabitEthernet0/0/5
#
interface GigabitEthernet0/0/6
#
interface GigabitEthernet0/0/7
#
interface GigabitEthernet0/0/8
#
interface GigabitEthernet0/0/9
#
interface GigabitEthernet0/0/10
#
interface GigabitEthernet0/0/11
#
interface GigabitEthernet0/0/12
#
interface GigabitEthernet0/0/13
#
interface GigabitEthernet0/0/14
#
interface GigabitEthernet0/0/15
#
interface GigabitEthernet0/0/16
#
interface GigabitEthernet0/0/17
#
interface GigabitEthernet0/0/18
#
interface GigabitEthernet0/0/19
#
interface GigabitEthernet0/0/20
#
interface GigabitEthernet0/0/21
#
interface GigabitEthernet0/0/22
#
interface GigabitEthernet0/0/23
#
interface GigabitEthernet0/0/24
#
interface NULL0
#
user-interface con 0
user-interface vty 0 4
#
return
5、接入交换机的基本配置

[Huawei]display c	
[Huawei]display cur	
[Huawei]display current-configuration 
#
sysname Huawei
#
vlan batch 1602 to 1603
#
cluster enable
ntdp enable
ndp enable
#
drop illegal-mac alarm
#
diffserv domain default
#
drop-profile default
#
aaa
 authentication-scheme default
 authorization-scheme default
 accounting-scheme default
 domain default
 domain default_admin
 local-user admin password simple admin
 local-user admin service-type http
#
interface Vlanif1
#
interface MEth0/0/1
#
interface Ethernet0/0/1
 port link-type access
 port default vlan 1602
#
interface Ethernet0/0/2
 port link-type access
 port default vlan 1602
#
interface Ethernet0/0/3
 port link-type access
 port default vlan 1603
#
interface Ethernet0/0/4
 port link-type access
 port default vlan 1603
#
interface Ethernet0/0/5
#
interface Ethernet0/0/6
#
interface Ethernet0/0/7
#
interface Ethernet0/0/8
#
interface Ethernet0/0/9
#
interface Ethernet0/0/10
#
interface Ethernet0/0/11
#
interface Ethernet0/0/12
#
interface Ethernet0/0/13
#
interface Ethernet0/0/14
#
interface Ethernet0/0/15
#
interface Ethernet0/0/16
#
interface Ethernet0/0/17
#
interface Ethernet0/0/18
#
interface Ethernet0/0/19
#
interface Ethernet0/0/20
#
interface Ethernet0/0/21
#
interface Ethernet0/0/22
#
interface GigabitEthernet0/0/1
 port link-type trunk
 port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
#
interface NULL0
#
user-interface con 0
user-interface vty 0 4
#
return
6、实验图



7、实验结果:


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值