qq489498494 发表于 2018-7-11 12:24:58

Cisco 双出口NAT配置

具体配置:  version 12.2
  service timestamps debug uptime
  service timestamps log uptime
  no service password-encryption
  !
  hostname Router
  !
  ip subnet-zero
  call rsvp-sync
  !
  interface FastEthernet0/0         --------------------假设该端口为ISP 1接入端口
  ip address 192.168.1.2 255.255.255.0         --------分配地址
  ip nat outside                               --------指定为NAT Outside端口
  duplex auto
  speed auto
  !
  interface FastEthernet0/1         --------------------假设该端口为ISP 2接入端口
  ip address 192.168.2.2 255.255.255.0         --------分配地址
  ip nat outside                               --------指定为NAT Outside端口
  duplex auto
  speed auto
  !
  interface Ethernet1/0             --------------------假设该端口为内部网络端口
  ip address 100.100.255.254 255.255.0.0       --------分配地址
  ip nat inside                              --------指定为NAT Inside端口
  ip policy route-map t0          --------在该端口上使用route-map t0进行策略控制
  half-duplex
  !
  ip nat inside source list 1 interface FastEthernet0/0 overload    ------Nat转换,指定原地址为100.100.23.0的主机使用Fastethernet 0/0的地址进行转换
  ip nat inside source list 2 interface FastEthernet0/1 overload    ------Nat转换,指定原地址为100.100.24.0的主机使用Fastethernet 0/1的地址进行转换

  ip>  ip route 0.0.0.0 0.0.0.0 192.168.2.1       ------静态路由,对Internet的访问通过192.168.2.1(ISP2)链路
  ip route 0.0.0.0 0.0.0.0 192.168.1.1       ------静态路由,对Internet的访问通过192.168.1.1(ISP1)链路
  ip http server
  静太路由不起很大的作用,因为存在策略路由,主要是set int 要求有显示的去往目的的路由
  !
  access-list 1 permit 100.100.23.0 0.0.0.255----访问控制列表1,用于过滤原地址,允许100.100.23.0网段主机流量通过
  access-list 2 permit 100.100.24.0 0.0.0.255----访问控制列表2,用于过滤原地址,允许100.100.23.0网段主机流量通过
  如果做set int 备份,则acl1,acl2应该允许所有的,进行nat
  route-map t0 permit 10                      ----定义route-map t0,permit序列为10
  match ip address 1       ----检查原地址,允许100.100.23.0 网段地址
  set interface FastEthernet0/0               ----指定出口为Fastethetnet 0/0
  (set interface FastEthernet0/1) 我认为可以做备份
  !
  route-map t0 permit 20                     ----定义route-map t0,permit序列为20
  match ip address 2                  ----检查原地址,允许100.100.24.0 网段地址
  set interface FastEthernet0/1 ----指定出口为Fastethetnet 0/1
  !
  (set interface FastEthernet0/1) 我认为可做备份             !
  dial-peer cor custom
  line con 0
  line aux 0
  line vty 0 4
  !
  end
页: [1]
查看完整版本: Cisco 双出口NAT配置