h3c的虚拟网络设备,配置用户context。
system-view;
context context1; //进入context1配置视图
alloc interface gigate 1/0/0 to 1/0/11 //导入接口。集中式设备需要全部导入,不知道这条对不对
context start;
进去contxet1:
system-view;
switch-to context context1
在context1 修改设备名称,以与默认context区别
system-view;
sysname ctx1;
--
然后是在context1中配置;
需要配置接口ip,把接口口导入安全域,配置安全策略(安全策略不需要绑定到哪里,自动全局生效);
system-view;
interface gigateenternet 1/0/1
ip address 192.168.1.101/24
system-view;
security-zone Trust;
import interface gigateenternet 1/0/1;
system-view;
secutity-policy ip
rule [rule-id] name mypolicy
action pass;
--
自此,设备配通。开启网页登录服务:
ip http enable;
设置admin账户密码:
local-user admin
password simple xxxx
后面就就可以在网页上配置了,就不用记命令了。
下面配置LB环境。
主机网口配置第二个ip;
设备接口配置sub ip:
system-view;
interface gigateenternet 1/0/1
ip address 192.168.2.100/24 sub