正確答案: enable configure terminal ip nat pool mypool 192.168.3.1 192.168.3.3 prefix-length 30 access-list 1 permit 10.10.0.0 0.0.0.255 ip nat inside source list 1 pool mypool interface g1/1 ip nat inside interface g1/2 ip nat outside.
為什麼這是答案
正確答案配置了動態 NAT,將內部來源網路 10.10.0.0/24 轉換為 NAT 池 mypool 中定義的公共 IP 位址範圍 192.168.3.1–192.168.3.3。access-list 1 permit 10.10.0.0 0.0.0.255 正確識別了內部來源網路。ip nat inside source list 1 pool mypool 將此 ACL 與 NAT 池關聯起來。interface g1/1 ip nat inside 和 interface g1/2 ip nat outside 正確標記了內部和外部介面。
其他選項錯誤在於:
第一個選項使用 ip nat outside destination list 1 pool mypool,這是用於靜態 NAT 或入站 NAT 的語法,而不是將內部來源轉換為外部位址。
第二個選項中的 0.0.0.254 萬用字元遮罩不正確,無法匹配整個 /24 子網路。
第三個選項使用 route map 而不是 access-list 來匹配流量,並且同樣使用 ip nat outside destination list 1 pool mypool 語法錯誤。