公司网络如何使用路由器(H3C路由器在企业网络中的常用操作)

小编:小丢 更新时间:2022-12-04

H3C路由器常用操作

接口的常规操作:

int g0/4

port link-mode route 将此接口设置为路由模式(3层模式)

ip address 1.1.1.1 16 给此接口设置IP地址,掩码长度

映射内网主机(或主机端口)到公网(电信或联通)的方法

映射电信公网IP61开头)的方法:

int g0/1

nat server protocol tcp global 61.183.228.46 80 inside 10.2.199.3 80

映射内网主机10.2.199.3的80端口到外网IP 61.183.228.46的80端口

映射联通公网IP220开头)的方法:

int g0/0

nat server protocol tcp global 220.249.86.235 3389 inside 10.2.199.100 3389

映射内网主机10.2.199.100的3389端口到外网IP 220.249.86.235的3389端口

NAT转换的配置:

1. 定义acl,将容许进行转换的内部IP地址定义进来

acl number 3000

rule 0 permit ip 容许内部所有IP地址转换为外部公网IP

2. 配置nat 转换地址池(公网IP

nat address-group 1 进入地址组1

address 220.249.86.235 220.249.86.238 定义地址池

3. 在物理接口上应用

int g0/0

nat outbound 3000 address-group 1 将acl3000中定义的网络转换为地址组1中的地址

策略路由的配置(让有的部门走电信,让有的部门走联通)

1. 设置一条默认路由(默认走电信)

ip route-static 0.0.0.0 0.0.0.0 61.183.228.33 去往电信的默认路由

2.定义acl,将允许走联通线路的内部IP地址定义进来

acl number 3010 定义一条acl

rule 20 permit ip source 10.2.199.0 0.0.0.255 容许整个199网段走联通

3.定义一条基于策略的路由(policy-based-route

policy-based-route liantong node 1 建立一条基于策略的路由,名字叫liantong,是路由模式(node),编号为1

if-match acl 3010 如果符合acl 3010里定义的条目,就走liantong

apply ip-address next-hop 220.249.86.233 定义联通线路的网关

4. 在内网(G0/9)接口上应用这个策略路由

int g0/9

ip policy-based-route liantong 将前面定义的叫liantong的策略路由应用到这个接口

基于每IP(每用户)的限速

1. 定义一个acl,将所有要限速的网段或主机IP定义进来

acl number 3020

rule 0 permit ip source 10.2.199.0 0.0.0.255 源(上传)

rule 1 permit ip destination 10.2.199.0 0.0.0.255 目的(下载)

2. 在内网接口上做限速设置

nt g0/9

qos car inbound acl 3020 cir 5000 cbs 5000 ebs 0 green pass red discard

qos car outbound acl 3020 cir 5000 cbs 5000 ebs 0 green pass red discard

将acl3020里定义的网络或主机,限速为500KB/s左右

用户管理配置方法:

local-user admin 进入用户admin的管理模式

password cipher 123456 更改密码为密文(cipher123456

authorization-attribute level 3 设置用户权限等级为3(最高)

service-type ssh telnet 设置登录方式为sshtelnet

service-type web 设置登录方式为web

公司网络如何使用路由器(H3C路由器在企业网络中的常用操作)