溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

動態(tài)PNAT配置

發(fā)布時間:2020-07-14 10:27:25 來源:網(wǎng)絡(luò) 閱讀:3878 作者:貪戀你的莼 欄目:系統(tǒng)運(yùn)維

實(shí)驗(yàn)名稱:思科路由動態(tài)PNAT配置
實(shí)驗(yàn)拓?fù)洌?br/>實(shí)驗(yàn)環(huán)境:1、3臺路由器,
2、一臺交換機(jī)
Router 0 邊界路由器(內(nèi)網(wǎng)和外網(wǎng))
Router 1 邊界路由器(公網(wǎng)的內(nèi)網(wǎng)和外網(wǎng))
Pouter 2 內(nèi)網(wǎng)路由器 (公網(wǎng)的內(nèi)部網(wǎng)絡(luò))
3、兩臺PC
Pc2 pc3

實(shí)驗(yàn)思路:先把三臺路由器的地址配置好,
Router0 g0/0口是內(nèi)網(wǎng)網(wǎng)關(guān) 192.168.1.254/24
Router0 g0/1口是公網(wǎng)地址 100.1.1.1/24

                                 Router1   g0/0是公網(wǎng)外網(wǎng)地址 100.1.1.2/24
                                 Router1   g0/1 是公網(wǎng)內(nèi)網(wǎng)網(wǎng)關(guān) 200.1.1.1/24

                                 Router2 g0/0 是公網(wǎng)內(nèi)網(wǎng)地址  200.1.1.2/24

實(shí)驗(yàn)步驟:
1、 配置PC機(jī)地址:
Pc2:
IP : 192.168.10.1/24
網(wǎng)關(guān):192.168.10.254
Pc3
IP : 192.168.10.2/24
網(wǎng)關(guān):192.168.10.254
2、 配置Router 0
Continue with configuration dialog? [yes/no]: no

Press RETURN to get started!

Router>enable
Router#
Router#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int g0/0
Router(config-if)#no shtdown
^
% Invalid input detected at '^' marker.
Router(config-if)#
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

Router(config-if)#ip address 192.168.10.254 255.255.255.0
Router(config-if)#e
Router(config)#int g0/1
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up

Router(config-if)#ip address 100.1.1.1 255.255.255.0
Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

Router(config-if)#e
Router(config)#int g0/0
Router(config-if)#ip nat i
Router(config-if)#ip nat inside
Router(config-if)#e
Router(config)#int g0/1
Router(config-if)#ip nat o
Router(config-if)#ip nat outside
Router(config-if)#
Router(config-if)#
Router(config-if)#
Router(config-if)#e
Router(config)#
Router(config)#
Router(config)#
Router(config)#
Router(config)#acce
Router(config)#access-list 1 p
Router(config)#access-list 1 permit 192.168.10.0 0.0.0.255
Router(config)#ip nat i
Router(config)#ip nat inside s
Router(config)#ip nat inside source l
Router(config)#ip nat inside source list 1 interface g0/1
Router(config)#
Router(config)#
Router(config)#ip route 0.0.0.0 0.0.0.0 100.1.1.2
Router(config)#
3、 配置Router1
Continue with configuration dialog? [yes/no]: no

Press RETURN to get started!

Router>enable
Router#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int g0/0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

Router(config-if)#ip address 100.1.1.2 255.255.255.0
Router(config-if)#e
Router(config)#int g0/1
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up

Router(config-if)#ip address 200.1.1.1 255.255.255.0
Router(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up

Router(config-if)#
Router(config-if)#e
Router(config)#route rip
Router(config-router)#version 2
Router(config-router)#no auto-summary
Router(config-router)#network 200.1.1.0
Router(config-router)#network 100.1.1.0
Router(config-router)#p
Router(config-router)#passive-interface g0/0
Router(config-router)#
4、 配置Router 2
Continue with configuration dialog? [yes/no]: no

Press RETURN to get started!

Router>enable
Router#configure
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int g0/0
Router(config-if)#no shutdown

Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up

Router(config-if)#ip address 200.1.1.2 255.255.255.0
Router(config-if)#e
Router(config)#route rip
Router(config-router)#version 2
Router(config-router)#no auto-summary
Router(config-router)#network 200.1.1.0
Router(config-router)#
5、驗(yàn)證思路:
全部配置好先ping自己的網(wǎng)關(guān)在一步一步ping到公網(wǎng)的內(nèi)網(wǎng)

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI