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

NAT dynamic Network address Translation (practice)

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

Share

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

Topological structure diagram

Step 1: configure switch SWsw#conf t sw (config) # no ip routing / / turn off routing function sw (config) # int f1/0sw (config-if) # speed 100 / / configure rate sw (config-if) # dup full / / configure full duplex mode step 2: configure router R1 and set NAT

1. Configure router dual-arm routing

R1#conf tR1 (config) # int f0/0R1 (config-if) # ip add 192.168.100.1 255.255.255.0R1 (config-if) # no shutR1 (config-if) # int f0Greater 1 R1 (config-if) # ip add 12.0.0.1 255.255.255.0R1 (config-if) # no shutR1 (config-if) # ex

two。 Set up NAT address translation

R1 (config) # access-list 1 permit 192.168.100.0 0.0.0.255 / / set the internal address translation range R1 (config) # ip nat pool test 12.0.10 12.0.100 netmask 255.255.255.0 / set the external address translation range R1 (config) # ip nat inside source list 1 pool test / / call ip address pool R1 (config ) # int f0/0R1 (config-if) # ip nat inside / / apply NAT to internal port R1 (config-if) # int f0/1R1 (config-if) # ip nat outside / / apply NAT to external port R1 (config-if) # end step 3: configure client ip address PC1 > ip 192.168.100.10 192.168.100.1Checking for duplicate address...PC1: 192.168 .100.10 255.255.255.0 gateway 192.168.100.1PC2 > ip 192.168.100.20 192.168.100.1 Checking for duplicate address...PC1: 192.168.100.20 255.255.255.0 gateway 192.168.100.1PC3 > ip 12.0.0.12 12.0.0.1Checking for duplicate address...PC1: 12.0.0.12 255.255.255.0 gateway 12.0.0.1 fourth step: test network interoperability And use the debug function

1. Test interoperability

PC1 > ping 12.0.1284 bytes from 12.0.0.12 icmp_seq=1 ttl=63 time=31.244 ms84 bytes from 12.0.0.12 icmp_seq=2 ttl=63 time=31.282 ms84 bytes from 12.0.0.12 icmp_seq=3 ttl=63 time=46.897 ms84 bytes from 12.0.0.12 icmp_seq=4 ttl=63 time=46.834 ms84 bytes from 12.0.0.12 icmp_seq=5 ttl=63 time=31.210 msPC2 > ping 12.0.0.1284 bytes from 12.0.0.12 icmp_seq=1 ttl=63 time=46.864 ms84 bytes From 12.0.0.12 icmp_seq=2 ttl=63 time=46.864 ms84 bytes from 12.0.0.12 icmp_seq=3 ttl=63 time=31.242 ms84 bytes from 12.0.0.12 icmp_seq=4 ttl=63 time=31.273 ms84 bytes from 12.0.0.12 icmp_seq=5 ttl=63 time=31.208 ms

2.debug function to view the address translation process

R1#debug ip natIP NAT debugging is onR1#*Mar 100: 15 Mar 21.287: NAT*: slots 192.168.100.10-> 12.0.0.10, dice 12.0.0.12 [55463] * NAT*: slots 21.295: NAT*: slots 12.0.0.10-> 192.168.100.10 [55463] / / PC1 address translation succeeded R1#*Mar 100: 190.139: NAT*: slots 192.168.100.20-> 12.0.0.11 Dwatches 12.0.0.12 [55693] * Mar 100: 19 PC2 12.159: NAT*: slots 12.0.0.12, dudes 12.0.0.11-> 192.168.100.20 [55693] / / successful translation of the address

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: 0

*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