接口的常规操作:
int g0/4
port link-mode route 将此接口设置为路由模式(3层模式)
1 16 给此接口设置IP地址,掩码长度, ip address 1。
映射内网主机(或主机端口)到公网(电信或联通)的方法
映射电信公网IP(61开头)的方法:
int g0/1
nat server protocol tcp global 61,46 80 inside 10。
46的80端口,3的80端口到外网IP 61, 映射内网主机10。
映射联通公网IP(220开头)的方法:
int g0/0
235 3389 inside 10, nat server protocol tcp global 220,100 3389。
235的3389端口, 映射内网主机10,100的3389端口到外网IP 220。
NAT转换的配置:
定义acl,将容许进行转换的内部IP地址定义进来。
acl number 3000
rule 0 permit ip 容许内部所有IP地址转换为外部公网IP
配置nat 转换地址池(公网IP)。
nat address-group 1 进入地址组1
235 220,238 定义地址池, address 220。
在物理接口上应用。
int g0/0
nat outbound 3000 address-group 1 将acl3000中定义的网络转换为地址组1中的地址
策略路由的配置(让有的部门走电信,让有的部门走联通)
设置一条默认路由(默认走电信)。
ip route-static 0,33 去往电信的默认路由。
2.定义acl,将允许走联通线路的内部IP地址定义进来
acl number 3010 定义一条acl
rule 20 permit ip source 10,255 容许整个199网段走联通。
定义一条基于策略的路由(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,233 定义联通线路的网关。
在内网(G0/9)接口上应用这个策略路由。
int g0/9
ip policy-based-route liantong 将前面定义的叫liantong的策略路由应用到这个接口
基于每IP(每用户)的限速
定义一个acl,将所有要限速的网段或主机IP定义进来。
acl number 3020
rule 0 permit ip source 10,255 源(上传)。
rule 1 permit ip destination 10,255 目的(下载)。
在内网接口上做限速设置。
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









