Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Dynamic PNAT configuration

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Lab name: Cisco routing dynamic PNAT configuration

Lab Topology:

Lab environment: 1 or 3 routers

2. One switch

Router 0 Border Router (intranet and extranet)

Router 1 Border Router (intranet and extranet of public network)

Pouter 2 intranet router (the internal network of the public network)

3. Two PC

Pc2 pc3

Experimental idea: first configure the addresses of the three routers

Router0 g0ap0 port is the intranet gateway 192.168.1.254Universe 24.

Router0 g0ax 1 is the public network address 100.1.1.1Accord24

Router1 g0swap 0 is the public network address 100.1.1.2, the public network address 24 Router1 g0, the public network gateway 200.1.1.1, the public network gateway, 24 Router2 g0, the public network address, 200.1.1.2, the public network address, 200.1.1.2.

The steps of the experiment:

1. Configure PC address:

Pc2:

IP: 192.168.10.1/24

Gateway: 192.168.10.254

Pc3

IP: 192.168.10.2/24

Gateway: 192.168.10.254

2. Configure 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 g0and0

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 g0bin1

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 g0and0

Router (config-if) # ip nat i

Router (config-if) # ip nat inside

Router (config-if) # e

Router (config) # int g0bin1

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 g0lap 1

Router (config) #

Router (config) #

Router (config) # ip route 0.0.0.0 0.0.0.0 100.1.1.2

Router (config) #

3. Configure 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 g0and0

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 g0bin1

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 g0and0

Router (config-router) #

4. Configure 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 g0and0

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. Verification ideas:

All configured to ping your own gateway and ping to the private network of the public network step by step

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 279

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report