From b699a546fbe0b2bd24f8d9302c7688f2a0b22587 Mon Sep 17 00:00:00 2001 From: CGH0S7 <776459475@qq.com> Date: Wed, 3 Dec 2025 11:42:14 +0800 Subject: [PATCH] Update NAT lab --- myshixun/nat/PC1_startup.vpc | 2 + myshixun/nat/PC2_startup.vpc | 10 + myshixun/nat/R1_configs_i1_startup-config.cfg | 115 +++++ myshixun/nat/R2_configs_i2_startup-config.cfg | 110 +++++ myshixun/nat/nat.gns3 | 409 ++++++++++++++++++ 5 files changed, 646 insertions(+) create mode 100644 myshixun/nat/PC1_startup.vpc create mode 100644 myshixun/nat/PC2_startup.vpc create mode 100644 myshixun/nat/R1_configs_i1_startup-config.cfg create mode 100644 myshixun/nat/R2_configs_i2_startup-config.cfg create mode 100644 myshixun/nat/nat.gns3 diff --git a/myshixun/nat/PC1_startup.vpc b/myshixun/nat/PC1_startup.vpc new file mode 100644 index 0000000..56357c0 --- /dev/null +++ b/myshixun/nat/PC1_startup.vpc @@ -0,0 +1,2 @@ +set pcname PC1 +ip 192.168.1.10 192.168.1.1 24 diff --git a/myshixun/nat/PC2_startup.vpc b/myshixun/nat/PC2_startup.vpc new file mode 100644 index 0000000..405d17c --- /dev/null +++ b/myshixun/nat/PC2_startup.vpc @@ -0,0 +1,10 @@ +# This the configuration for PC2 +# +# Uncomment the following line to enable DHCP +# dhcp +# or the line below to manually setup an IP address and subnet mask +# ip 192.168.1.1 255.0.0.0 +# + +set pcname PC2 +ip 192.168.1.20 192.168.1.1 24 diff --git a/myshixun/nat/R1_configs_i1_startup-config.cfg b/myshixun/nat/R1_configs_i1_startup-config.cfg new file mode 100644 index 0000000..cb26c4b --- /dev/null +++ b/myshixun/nat/R1_configs_i1_startup-config.cfg @@ -0,0 +1,115 @@ +! + +! +version 12.4 +service timestamps debug datetime msec +service timestamps log datetime msec +no service password-encryption +! +hostname R1 +! +boot-start-marker +boot-end-marker +! +! +no aaa new-model +memory-size iomem 5 +no ip icmp rate-limit unreachable +! +! +ip cef +no ip domain lookup +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +ip tcp synwait-time 5 +! +! +! +! +! +interface FastEthernet0/0 + ip address 192.168.1.1 255.255.255.0 + ip nat inside + ip virtual-reassembly + duplex auto + speed auto +! +interface FastEthernet0/1 + no ip address + shutdown + duplex auto + speed auto +! +interface Serial1/0 + ip address 100.99.12.1 255.255.255.0 + ip nat outside + ip virtual-reassembly + serial restart-delay 0 +! +interface Serial1/1 + no ip address + shutdown + serial restart-delay 0 +! +interface Serial1/2 + no ip address + shutdown + serial restart-delay 0 +! +interface Serial1/3 + no ip address + shutdown + serial restart-delay 0 +! +! +no ip http server +no ip http secure-server +ip forward-protocol nd +! +! +ip nat inside source static 192.168.1.10 100.99.12.10 +ip nat inside source static 192.168.1.20 100.99.12.20 +! +no cdp log mismatch duplex +! +! +! +control-plane +! +! +! +! +! +! +! +! +! +line con 0 + exec-timeout 0 0 + privilege level 15 + logging synchronous +line aux 0 + exec-timeout 0 0 + privilege level 15 + logging synchronous +line vty 0 4 + login +! +! +end diff --git a/myshixun/nat/R2_configs_i2_startup-config.cfg b/myshixun/nat/R2_configs_i2_startup-config.cfg new file mode 100644 index 0000000..db516f4 --- /dev/null +++ b/myshixun/nat/R2_configs_i2_startup-config.cfg @@ -0,0 +1,110 @@ +! + +! +version 12.4 +service timestamps debug datetime msec +service timestamps log datetime msec +no service password-encryption +! +hostname R2 +! +boot-start-marker +boot-end-marker +! +! +no aaa new-model +memory-size iomem 5 +no ip icmp rate-limit unreachable +! +! +ip cef +no ip domain lookup +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +! +ip tcp synwait-time 5 +! +! +! +! +! +interface FastEthernet0/0 + no ip address + shutdown + duplex auto + speed auto +! +interface FastEthernet0/1 + no ip address + shutdown + duplex auto + speed auto +! +interface Serial1/0 + ip address 100.99.12.2 255.255.255.0 + serial restart-delay 0 +! +interface Serial1/1 + no ip address + shutdown + serial restart-delay 0 +! +interface Serial1/2 + no ip address + shutdown + serial restart-delay 0 +! +interface Serial1/3 + no ip address + shutdown + serial restart-delay 0 +! +! +no ip http server +no ip http secure-server +ip forward-protocol nd +! +! +! +no cdp log mismatch duplex +! +! +! +control-plane +! +! +! +! +! +! +! +! +! +line con 0 + exec-timeout 0 0 + privilege level 15 + logging synchronous +line aux 0 + exec-timeout 0 0 + privilege level 15 + logging synchronous +line vty 0 4 + login +! +! +end diff --git a/myshixun/nat/nat.gns3 b/myshixun/nat/nat.gns3 new file mode 100644 index 0000000..eaff6fa --- /dev/null +++ b/myshixun/nat/nat.gns3 @@ -0,0 +1,409 @@ +{ + "auto_close": true, + "auto_open": false, + "auto_start": false, + "drawing_grid_size": 25, + "grid_size": 75, + "name": "nat", + "project_id": "6e4aa82b-d761-4c10-b9e5-70d0ba6027bb", + "revision": 9, + "scene_height": 1000, + "scene_width": 2000, + "show_grid": false, + "show_interface_labels": false, + "show_layers": false, + "snap_to_grid": false, + "supplier": null, + "topology": { + "computes": [], + "drawings": [], + "links": [ + { + "filters": {}, + "link_id": "01bb9c53-fba9-432e-b799-ef0e9a0b1777", + "nodes": [ + { + "adapter_number": 0, + "label": { + "rotation": 0, + "style": "font-family: TypeWriter;font-size: 10.0;font-weight: bold;fill: #000000;fill-opacity: 1.0;", + "text": "e0", + "x": 67, + "y": 49 + }, + "node_id": "5eca993f-3ec5-4db8-8773-ad518ad764c5", + "port_number": 0 + }, + { + "adapter_number": 0, + "label": { + "rotation": 0, + "style": "font-family: TypeWriter;font-size: 10.0;font-weight: bold;fill: #000000;fill-opacity: 1.0;", + "text": "e0", + "x": 0, + "y": -4 + }, + "node_id": "c5f834b8-7026-4274-9ebd-ec74059c6fe5", + "port_number": 0 + } + ], + "suspend": false + }, + { + "filters": {}, + "link_id": "238dcbf6-1e23-4d0f-9fb3-4664a30a62f7", + "nodes": [ + { + "adapter_number": 0, + "label": { + "rotation": 0, + "style": "font-family: TypeWriter;font-size: 10.0;font-weight: bold;fill: #000000;fill-opacity: 1.0;", + "text": "e0", + "x": 69, + "y": 15 + }, + "node_id": "c4d8e2a9-d97e-4a8e-96c8-1413621db468", + "port_number": 0 + }, + { + "adapter_number": 0, + "label": { + "rotation": 0, + "style": "font-family: TypeWriter;font-size: 10.0;font-weight: bold;fill: #000000;fill-opacity: 1.0;", + "text": "e1", + "x": -1, + "y": 30 + }, + "node_id": "c5f834b8-7026-4274-9ebd-ec74059c6fe5", + "port_number": 1 + } + ], + "suspend": false + }, + { + "filters": {}, + "link_id": "652915ec-b91a-4af0-9342-df8c41f80f88", + "nodes": [ + { + "adapter_number": 0, + "label": { + "rotation": 0, + "style": "font-family: TypeWriter;font-size: 10.0;font-weight: bold;fill: #000000;fill-opacity: 1.0;", + "text": "e2", + "x": 74, + "y": 25 + }, + "node_id": "c5f834b8-7026-4274-9ebd-ec74059c6fe5", + "port_number": 2 + }, + { + "adapter_number": 0, + "label": { + "rotation": 0, + "style": "font-family: TypeWriter;font-size: 10.0;font-weight: bold;fill: #000000;fill-opacity: 1.0;", + "text": "f0/0", + "x": -5, + "y": 12 + }, + "node_id": "62f3bd1c-fd2f-4f48-947e-5816e7383706", + "port_number": 0 + } + ], + "suspend": false + }, + { + "filters": {}, + "link_id": "8ff5d0b6-a063-461e-8805-0efc89880d8f", + "nodes": [ + { + "adapter_number": 1, + "label": { + "rotation": 0, + "style": "font-family: TypeWriter;font-size: 10.0;font-weight: bold;fill: #000000;fill-opacity: 1.0;", + "text": "s1/0", + "x": 33, + "y": 22 + }, + "node_id": "62f3bd1c-fd2f-4f48-947e-5816e7383706", + "port_number": 0 + }, + { + "adapter_number": 1, + "label": { + "rotation": 0, + "style": "font-family: TypeWriter;font-size: 10.0;font-weight: bold;fill: #000000;fill-opacity: 1.0;", + "text": "s1/0", + "x": 33, + "y": 22 + }, + "node_id": "6e397fae-9859-4d1b-ba98-43195c3a7fb1", + "port_number": 0 + } + ], + "suspend": false + } + ], + "nodes": [ + { + "compute_id": "local", + "console": 5001, + "console_auto_start": false, + "console_type": "telnet", + "custom_adapters": [], + "first_port_name": null, + "height": 45, + "label": { + "rotation": 0, + "style": "font-family: TypeWriter;font-size: 10.0;font-weight: bold;fill: #000000;fill-opacity: 1.0;", + "text": "R2", + "x": 21, + "y": -25 + }, + "locked": false, + "name": "R2", + "node_id": "6e397fae-9859-4d1b-ba98-43195c3a7fb1", + "node_type": "dynamips", + "port_name_format": "Ethernet{0}", + "port_segment_size": 0, + "properties": { + "auto_delete_disks": true, + "aux": null, + "chassis": "3660", + "clock_divisor": 4, + "disk0": 0, + "disk1": 0, + "dynamips_id": 2, + "exec_area": 64, + "idlemax": 500, + "idlepc": "0x606436b8", + "idlesleep": 30, + "image": "c3660-telcoentk9-mz.124-25d.image", + "image_md5sum": "13b42ff8c0138d790ed3800e65d14cd2", + "iomem": 5, + "mac_addr": "cc02.024a.0000", + "mmap": true, + "nvram": 512, + "platform": "c3600", + "ram": 192, + "slot0": "Leopard-2FE", + "slot1": "NM-4T", + "slot2": null, + "slot3": null, + "slot4": null, + "slot5": null, + "slot6": null, + "sparsemem": true, + "system_id": "FTX0945W0MY", + "usage": "" + }, + "symbol": ":/symbols/router.svg", + "template_id": "e8a981b9-85e2-47e8-b41f-c1a7f81f9baa", + "width": 66, + "x": 174, + "y": -5, + "z": 1 + }, + { + "compute_id": "local", + "console": 5002, + "console_auto_start": false, + "console_type": "none", + "custom_adapters": [], + "first_port_name": null, + "height": 32, + "label": { + "rotation": 0, + "style": "font-family: TypeWriter;font-size: 10.0;font-weight: bold;fill: #000000;fill-opacity: 1.0;", + "text": "Switch1", + "x": 24, + "y": -35 + }, + "locked": false, + "name": "Switch1", + "node_id": "c5f834b8-7026-4274-9ebd-ec74059c6fe5", + "node_type": "ethernet_switch", + "port_name_format": "Ethernet{0}", + "port_segment_size": 0, + "properties": { + "ports_mapping": [ + { + "name": "Ethernet0", + "port_number": 0, + "type": "access", + "vlan": 1 + }, + { + "name": "Ethernet1", + "port_number": 1, + "type": "access", + "vlan": 1 + }, + { + "name": "Ethernet2", + "port_number": 2, + "type": "access", + "vlan": 1 + }, + { + "name": "Ethernet3", + "port_number": 3, + "type": "access", + "vlan": 1 + }, + { + "name": "Ethernet4", + "port_number": 4, + "type": "access", + "vlan": 1 + }, + { + "name": "Ethernet5", + "port_number": 5, + "type": "access", + "vlan": 1 + }, + { + "name": "Ethernet6", + "port_number": 6, + "type": "access", + "vlan": 1 + }, + { + "name": "Ethernet7", + "port_number": 7, + "type": "access", + "vlan": 1 + } + ] + }, + "symbol": ":/symbols/ethernet_switch.svg", + "template_id": "1966b864-93e7-32d5-965f-001384eec461", + "width": 72, + "x": -102, + "y": -31, + "z": 1 + }, + { + "compute_id": "local", + "console": 5003, + "console_auto_start": false, + "console_type": "telnet", + "custom_adapters": [], + "first_port_name": null, + "height": 59, + "label": { + "rotation": 0, + "style": "font-family: TypeWriter;font-size: 10.0;font-weight: bold;fill: #000000;fill-opacity: 1.0;", + "text": "PC1", + "x": 16, + "y": -25 + }, + "locked": false, + "name": "PC1", + "node_id": "5eca993f-3ec5-4db8-8773-ad518ad764c5", + "node_type": "vpcs", + "port_name_format": "Ethernet{0}", + "port_segment_size": 0, + "properties": {}, + "symbol": ":/symbols/vpcs_guest.svg", + "template_id": "19021f99-e36f-394d-b4a1-8aaa902ab9cc", + "width": 65, + "x": -220, + "y": -115, + "z": 1 + }, + { + "compute_id": "local", + "console": 5005, + "console_auto_start": false, + "console_type": "telnet", + "custom_adapters": [], + "first_port_name": null, + "height": 59, + "label": { + "rotation": 0, + "style": "font-family: TypeWriter;font-size: 10.0;font-weight: bold;fill: #000000;fill-opacity: 1.0;", + "text": "PC2", + "x": 15, + "y": -25 + }, + "locked": false, + "name": "PC2", + "node_id": "c4d8e2a9-d97e-4a8e-96c8-1413621db468", + "node_type": "vpcs", + "port_name_format": "Ethernet{0}", + "port_segment_size": 0, + "properties": {}, + "symbol": ":/symbols/vpcs_guest.svg", + "template_id": "19021f99-e36f-394d-b4a1-8aaa902ab9cc", + "width": 65, + "x": -222, + "y": 3, + "z": 1 + }, + { + "compute_id": "local", + "console": 5000, + "console_auto_start": false, + "console_type": "telnet", + "custom_adapters": [], + "first_port_name": null, + "height": 45, + "label": { + "rotation": 0, + "style": "font-family: TypeWriter;font-size: 10.0;font-weight: bold;fill: #000000;fill-opacity: 1.0;", + "text": "R1", + "x": 21, + "y": -25 + }, + "locked": false, + "name": "R1", + "node_id": "62f3bd1c-fd2f-4f48-947e-5816e7383706", + "node_type": "dynamips", + "port_name_format": "Ethernet{0}", + "port_segment_size": 0, + "properties": { + "auto_delete_disks": true, + "aux": null, + "chassis": "3660", + "clock_divisor": 4, + "disk0": 0, + "disk1": 0, + "dynamips_id": 1, + "exec_area": 64, + "idlemax": 500, + "idlepc": "0x606436b8", + "idlesleep": 30, + "image": "c3660-telcoentk9-mz.124-25d.image", + "image_md5sum": "13b42ff8c0138d790ed3800e65d14cd2", + "iomem": 5, + "mac_addr": "cc01.029b.0000", + "mmap": true, + "nvram": 512, + "platform": "c3600", + "ram": 192, + "slot0": "Leopard-2FE", + "slot1": "NM-4T", + "slot2": null, + "slot3": null, + "slot4": null, + "slot5": null, + "slot6": null, + "sparsemem": true, + "system_id": "FTX0945W0MY", + "usage": "" + }, + "symbol": ":/symbols/router.svg", + "template_id": "e8a981b9-85e2-47e8-b41f-c1a7f81f9baa", + "width": 66, + "x": 22, + "y": -8, + "z": 1 + } + ] + }, + "type": "topology", + "variables": null, + "version": "2.2.2", + "zoom": 100 +} \ No newline at end of file