16.nat地址转换

静态nat 一个内网地址,对于一个公网地址(写死了)

interface g0/0/1
nat static global 110.1.1.1    inside   10.1.1.2
                  路由公网地址            内部地址

动态nat 有两种类型,一种是普通nat(一个内网地址,对于一个公网地址,可以循环使用,如果内网主机数量超过外网数量,其他设备仍无法跟公网通信),另一种是pnat(一个内网地址,对于外网的一个端口),easy nat

普通nat(多个私有地址,对于一个公网地址的端口号)

        创建acl,用来匹配流量
        acl 2000
        acl 10
        rule 10 permit source 10.1.1.0 0.0.0.255

        建立nat地址池

        nat address-group 1   110.1.1.3 110.1.1.

            nat地址组     组号      用的公网地址范围

        ## 查看nat 地址组的命令 dis address-group


        进入边界路由的端口(跟公网通信)
        interface g0/0/1

        nat outbound 2000 address-gropu 1 not-pat


pnat(内网主机映射为公网地址的一个端口),最长用

        创建acl,用来匹配流量
        acl 2000
        acl 10
        rule 10 permit source 10.1.1.0 0.0.0.255

        建立nat地址池

        nat address-group 1   110.1.1.3 110.1.1.

            nat地址组     组号      用的公网地址范围

        ## 查看nat 地址组的命令 dis address-group


        进入边界路由的端口(跟公网通信)
        interface g0/0/1
        nat outbound 2000 address-gropu 1


easy nat(只绑定当前接口地址),适合于50台设备以下上午

        创建acl,用来匹配流量
        acl 2000
        acl 10
        rule 10 permit source 10.1.1.0 0.0.0.255

        ## 查看nat 地址组的命令 dis address-group


        进入边界路由的端口(跟公网通信)
        interface g0/0/1
        nat outbound 2000 address-gropu 1
posted @ 2021-10-02 23:35  mk-备忘  阅读(230)  评论(0)    收藏  举报