In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Port multiplexing (PAT)
Setting method:
Method 1: Create an address pool (single address) as an external global address
Method 2: Do not establish address pool (set port as external address)
Method 1:
The topology diagram is as follows:
Experimental procedure:
1. Set the address of three PCs
PC1
PC1> PC1> ip 192.168.100.30 192.168.100.1Checking for duplicate address... PC1 : 192.168.100.30 255.255.255.0 gateway 192.168.100.1PC1>
PC2
PC2> PC2> 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.1PC2>
PC3
PC3> PC3> ip 10.0.0.10 10.0.0.1Checking for duplicate address... PC1 : 10.0.0.10 255.255.255.0 gateway 10.0.0.1PC3>
2. Set SW of Layer 2 Switch
sw#conf tEnter configuration commands, one per line. End with CNTL/Z.sw(config)#no ip routing //Turn off routing to make Layer 3 switch mirror become Layer 2 switch sw(config)#
3. Set route R1
R1#conf t Enter configuration commands, one per line. End with CNTL/Z.R1(config)#int f 0/0R1(config-if)#ip add 192.168.100.1 255.255.255.0 //Set IP address and subnet mask only R1(config-if)#no shut *Mar 1 0/0:06:33.063: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up*Mar 1 0/0:06:34.063: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to upR1(config-if)#int f 0/1R1(config-if)#ip add 10.0.0.1 255.0.0.0 //Set only IP address and subnet mask R1(config-if)#no shut R1(config-if)#ex *Mar 1 00:06:48.191: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up*Mar 1 00:06:49.191: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upR1(config)#Note: In theory, the whole network can be interconnected at this time, see the figure below for details. If you cannot connect, check the command yourself.
To meet the requirements of the experiment, the following will formally set up PAT (Port Multiplexing).
4. Perform PAT settings on route R1
R1(config)#access-list 1 permit 192.168.100.0 0.0.0.255 //Create standard ACLR1(config)#ip nat pool kgc 10.0.0.20 10.0.0.20 netmask 255.0.0.0 //Create address pool *Mar 1 00:08:29.815: %LINEPROTO-5-UPDOWN: Line protocol on Interface NVI0, changed state to upR1(config)#ip nat inside source list 1 pool kgc //create PATR1(config)#int f 0/1R1(config-if)#ip nat inside //Enable PATR1 internally (config-if)#int f 0/0R1(config-if)#ip nat outside //Enable PATR1 externally (config-if)#endR1#*Mar 1 00:10:27.007: %SYS-5-CONFIG_I: Configured from console by consoleR1#Verification Results
The experiment succeeded, and the IP address accessible from the external network was changed to the public network IP.
Method 2:
The topology diagram is as follows:
experimental procedure
All of the above settings for PC1, PC2, PC3, sw and R1 are the same as those for method 1, and will not be described too much. Here, only the setting and enabling of PAT are explained.
Set PATR1(config)#access-list 1 permit 192.168.100.0 0.0.0.255 //create ACLR1(config)#ip nat inside source list 1 interface f0/1 overload //Do not set the address pool, use the IP of external port f0/1 as the external global address R1(config)#R1(config)#int f 0/0 R1(config-if)#ip nat inside //Enable internal PATR1(config-if)#int f 0/1R1(config-if)#ip nat outside //Enable external PATR1 (config-if)#end R1#Experimental results
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.