公司網絡如何使用路由器(H3C路由器在企業網絡中的常用操作)
H3C路由器常用操作
接口的常規操作:
int g0/4
port link-mode route 將此接口設置為路由模式(3層模式)
ip address 1.1.1.1 16 給此接口設置IP地址,掩碼長度
映射內網主機(或主機端口)到公網(電信或聯通)的方法
映射電信公網IP(61開頭)的方法:
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端口
映射聯通公網IP(220開頭)的方法:
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 更改密碼為密文(cipher)123456
authorization-attribute level 3 設置用戶權限等級為3(最高)
service-type ssh telnet 設置登錄方式為ssh和telnet
service-type web 設置登錄方式為web