国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學(xué)院 > 網(wǎng)絡(luò)通信 > 正文

一個以太口做Nat實例

2019-11-04 20:25:34
字體:
供稿:網(wǎng)友

  interface Loopback0
  ip address 10.0.1.1 255.255.255.252
  ip nat outside
  !--- Creates a virtual interface called Loopback 0 and assigns an
  !--- IP address of 10.0.1.1 to it. Defines interface Loopback 0 as
  !--- NAT outside.
  !
  !
  interface Ethernet0
  ip address 192.168.1.2 255.255.255.0 secondary
  ip address 10.0.0.2 255.255.255.0
  ip Nat inside
  !--- Assigns a PRimary IP address of 10.0.0.2 and a secondary IP
  !--- address of 192.168.1.2 to Ethernet 0. Defines interface Ethernet 0
  !--- as NAT inside. The 192.168.1.2 address will be used to communicate
  !--- through the CM to the CMTS and the Internet. The 10.0.0.2 address
  !--- will be used to communicate with the local hosts.
  
  ip policy route-map Nat-loop
  !--- Assigns route-map "Nat-loop" to Ethernet 0 for policy routing.
  !
  ip Nat pool external 192.168.2.2 192.168.2.3 prefix-length 29
  ip Nat inside source list 10 pool external overload
  ip Nat inside source static 10.0.0.12 192.168.2.1
  !--- NAT is defined: packets matching access-list 10 will be
  !--- translated to an address from the pool called "external".
  !--- A static NAT translation is defined for 10.0.0.12 to be
  !--- translated to 192.168.2.1 (this is for host 2 which needs
  !--- to be accessed from the Internet).
  
  ip classless
  !
  !
  ip route 0.0.0.0 0.0.0.0 192.168.1.1
  ip route 192.168.2.0 255.255.255.0 Ethernet0
  !--- Static default route set as 192.168.1.1, also a static
  !--- route for network 192.168.2.0/24 directly attached to
  !--- Ethernet 0
  !
  !
  access-list 10 permit 10.0.0.0 0.0.0.255
  !--- Access-list 10 defined for use by NAT statement above.
  
  access-list 102 permit ip any 192.168.2.0 0.0.0.255
  access-list 102 permit ip 10.0.0.0 0.0.0.255 any
  !--- Access-list 102 defined and used by route-map "Nat-loop"
  !--- which is used for policy routing.
  !
  Access-list 177 permit icmp any any
  !--- Access-list 177 used for debug.
  !
  route-map Nat-loop permit 10
  match ip address 102
  set ip next-hop 10.0.1.2
  !--- Creates route-map "Nat-loop" used for policy routing.
  !--- Route map states that any packets matching access-list 102 will
  !--- have the next hop set to 10.0.1.2 and be routed "out" the
  !--- loopback interface. All other packets will be routed normally.
  !
  end
  NAT-router#

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 靖江市| 宝丰县| 安达市| 横峰县| 塔河县| 清流县| 洛浦县| 镇平县| 区。| 虹口区| 广南县| 沂南县| 曲松县| 陕西省| 客服| 钟山县| 准格尔旗| 贵定县| 黎城县| 蕲春县| 台东县| 象山县| 得荣县| 昌江| 武强县| 阿鲁科尔沁旗| 饶阳县| 都安| 瑞丽市| 桐庐县| 武川县| 武乡县| 金阳县| 晋中市| 遂宁市| 中阳县| 北安市| 翁牛特旗| 望城县| 雷波县| 仙桃市|