
公司网络如何使用路由器(H3C路由器在企业网络中的常用操作)
H3C路由器常用操作
接口的常规操作:
intg0/4
portlink-moderoute将此接口设置为路由模式(3层模式)
ipaddress1.1.1.116给此接口设置IP地址,掩码长度
映射内网主机(或主机端口)到公网(电信或联通)的方法
映射电信公网IP(61开头)的方法:
intg0/1
natserverprotocoltcpglobal61.183.228.4680inside10.2.199.380
映射内网主机10.2.199.3的80端口到外网IP61.183.228.46的80端口
映射联通公网IP(220开头)的方法:
intg0/0
natserverprotocoltcpglobal220.249.86.2353389inside10.2.199.1003389
映射内网主机10.2.199.100的3389端口到外网IP220.249.86.235的3389端口
NAT转换的配置:
1.定义acl,将容许进行转换的内部IP地址定义进来
aclnumber3000
rule0permitip容许内部所有IP地址转换为外部公网IP
2.配置nat转换地址池(公网IP)
nataddress-group1进入地址组1
address220.249.86.235220.249.86.238定义地址池
3.在物理接口上应用
intg0/0
natoutbound3000address-group1将acl3000中定义的网络转换为地址组1中的地址
策略路由的配置(让有的部门走电信,让有的部门走联通)
1.设置一条默认路由(默认走电信)
iproute-static0.0.0.00.0.0.061.183.228.33去往电信的默认路由
2.定义acl,将允许走联通线路的内部IP地址定义进来
aclnumber3010定义一条acl
rule20permitipsource10.2.199.00.0.0.255容许整个199网段走联通
3.定义一条基于策略的路由(policy-based-route)
policy-based-routeliantongnode1建立一条基于策略的路由,名字叫liantong,是路由模式(node),编号为1
if-matchacl3010如果符合acl3010里定义的条目,就走liantong
applyip-addressnext-hop220.249.86.233定义联通线路的网关
4.在内网(G0/9)接口上应用这个策略路由
intg0/9
ippolicy-based-routeliantong将前面定义的叫liantong的策略路由应用到这个接口
基于每IP(每用户)的限速
1.定义一个acl,将所有要限速的网段或主机IP定义进来
aclnumber3020
rule0permitipsource10.2.199.00.0.0.255源(上传)
rule1permitipdestination10.2.199.00.0.0.255目的(下载)
2.在内网接口上做限速设置
ntg0/9
qoscarinboundacl3020cir5000cbs5000ebs0greenpassreddiscard
qoscaroutboundacl3020cir5000cbs5000ebs0greenpassreddiscard
将acl3020里定义的网络或主机,限速为500KB/s左右
用户管理配置方法:
local-useradmin进入用户admin的管理模式
passwordcipher123456更改密码为密文(cipher)123456
authorization-attributelevel3设置用户权限等级为3(最高)
service-typesshtelnet设置登录方式为ssh和telnet
service-typeweb设置登录方式为web