日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

密码认证协议PAT怎么配置?

發布時間:2025/3/20 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 密码认证协议PAT怎么配置? 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

實驗目的

?

1.?理解PAT的轉換原理

2.?掌握PAT的配置方法

?

實驗拓撲

?

? ? ? ? ? ? ? ? ? ? ? ? ? ?關注微信公眾號:廈門微思網絡

實驗需求

?

1.?根據實驗拓撲圖,完成設備的基本配置;

2.?在R2上創建Loopback0接口,IP地址是9.2.6.7/32,模擬公網上的一臺服務器;

3.?在R1上配置PAT,使得PC1和PC2能夠復用E0/1接口地址訪問公網服務器。

?

實驗步驟

?

步驟1:設備的基本配置

配置PC1

  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
Router>enableRouter#configure terminalRouter(config)#hostname PC1PC1(config)#no ip routingPC1(config)#ip default-gateway 192.168.1.254PC1(config)#interface ethernet0/0PC1(config-if)#ip address 192.168.1.1 255.255.255.0PC1(config-if)#no shutdownPC1(config-if)#endPC1#

?

配置PC2:

  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
Router>enableRouter#configure terminalRouter(config)#hostname PC2PC2(config)#no ip routingPC2(config)#ip default-gateway 192.168.1.254PC2(config)#interface ethernet0/0PC2(config-if)#ip address 192.168.1.2 255.255.255.0PC2(config-if)#no shutdownPC2(config-if)#endPC2#

配置SW1

  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
Switch>enaSwitch#conf tSwitch(config)#no ip domain-lookupSwitch(config)#line console 0Switch(config-line)# logging sSwitch(config-line)# exec-t 0 0Switch(config-line)# exitSwitch(config)#hostname SW1SW1(config)#endSW1#

?

配置R1:

  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
Router>enableRouter#configure terminalRouter(config)#hostname R1R1(config)#no ip domain-lookupR1(config)#line console 0R1(config-line)#exec-timeout 0 0R1(config-line)#logging synchronousR1(config-line)#exitR1(config)#interface ethernet0/0R1(config-if)#ip address 192.168.1.254 255.255.255.0R1(config-if)#no shutdownR1(config-if)#exitR1(config)#interface ethernet0/1R1(config-if)#ip address 12.1.1.1 255.255.255.0R1(config-if)#no shutdownR1(config-if)#endR1#

?

配置R2:

  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
Router>enableRouter#configure terminalRouter(config)#hostname R2R2(config)#no ip domain-lookupR2(config)#line console 0R2(config-line)#exec-timeout 0 0R2(config-line)#logging synchronousR2(config-line)#exitR2(config)#interface loopback0R2(config-if)#ip address 9.2.6.7 255.255.255.255R2(config-if)#exitR2(config)#interface ethernet0/0R2(config-if)#ip address 12.1.1.2 255.255.255.0R2(config-if)#no shutdownR2(config-if)#endR2#

?

步驟2:配置PAT

配置R1

  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
  • ?
R1(config)#access-list 1 permit 192.168.1.0 0.0.0.255 //定義ACLR1(config)#ip nat inside source list 1 interface ethernet 0/1 overload //關聯ACL和outside接口R1(config)#interface ethernet 0/0R1(config-if)#ip nat inside //指定inside接口R1(config-if)#exitR1(config)#interface ethernet 0/1R1(config-if)#ip nat outside //指定outside接口R1(config-if)#exitR1(config)#ip route 0.0.0.0 0.0.0.0 12.1.1.2 //配置到達公網的默認路由

?

測試PC1訪問服務器:

  • ?
  • ?
  • ?
  • ?
  • ?
PC1#ping 9.2.6.7Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 9.2.6.7, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

?

測試PC2訪問服務器:

  • ?
  • ?
  • ?
  • ?
  • ?
PC2#ping 9.2.6.7Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 9.2.6.7, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

?

檢查R1的NAT表項:

  • ?
  • ?
  • ?
  • ?
  • ?
R1#show ip nat translationsPro Inside global Inside local Outside local Outside globalicmp 12.1.1.1:7 192.168.1.1:7 9.2.6.7:7 9.2.6.7:7icmp 12.1.1.1:5 192.168.1.2:5 9.2.6.7:5 9.2.6.7:5Inside global都是12.1.1.1,通過端口號區分不同的主機。

?

?

1

?

?

end?? ? ? ?微信公眾號:廈門微思網絡

?

總結

以上是生活随笔為你收集整理的密码认证协议PAT怎么配置?的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。