我从一位老同事那里得到了这台 Cisco 7301 路由器,我用它来练习 Cisco 的东西。现在我有一个测试网络设置,其中一个接口作为我的“WAN”,另一个接口带有子接口作为我的第 2 层交换机。
我想对子接口进行 NAT,但是在任何地方我都没有看到任何 IP NAT 命令!
我在 Google 上查找过,总是从其他问题和文章/博客中获得相同的 IP NAT 命令,但我似乎根本无法在该路由器上找到该命令。
还有人熟悉这个路由器吗?我不太清楚为什么这个命令在任何地方都无法识别。我检查了全局配置提示符、接口配置提示符。什么都没有……
当前配置
Building configuration...
Current configuration : 1821 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
ip subnet-zero
ip cef
!
!
no ip domain-lookup
!
ip dhcp pool VLAN10
network 10.10.10.0 255.255.255.0
default-router 10.10.10.1
dns-server 8.8.8.8
!
ip dhcp pool VLAN20
network 20.20.20.0 255.255.255.0
default-router 20.20.20.1
dns-server 8.8.8.8
!
ip dhcp pool VLAN30
network 30.30.30.0 255.255.255.0
default-router 30.30.30.1
dns-server 8.8.8.8
!
no mpls traffic-eng auto-bw timers frequency 0
call rsvp-sync
!
!
!
!
!
!
!
!
interface GigabitEthernet0/0
ip address dhcp
duplex auto
speed auto
media-type rj45
no negotiation auto
no clns route-cache
!
interface GigabitEthernet0/1
no ip address
duplex auto
speed auto
media-type rj45
no negotiation auto
no clns route-cache
!
interface GigabitEthernet0/1.1
encapsulation dot1Q 1 native
ip address 10.0.0.1 255.255.255.0
!
interface GigabitEthernet0/1.10
encapsulation dot1Q 10
ip address 10.10.10.1 255.255.255.0
!
interface GigabitEthernet0/1.20
encapsulation dot1Q 20
ip address 20.20.20.1 255.255.255.0
!
interface GigabitEthernet0/1.30
encapsulation dot1Q 30
ip address 30.30.30.1 255.255.255.0
!
interface GigabitEthernet0/2
no ip address
shutdown
duplex auto
speed auto
media-type rj45
no negotiation auto
no clns route-cache
!
ip classless
!
no ip http server
!
!
!
access-list 100 permit ip 10.10.10.0 0.0.0.255 192.168.0.0 0.0.0.255
access-list 100 permit ip 30.30.30.0 0.0.0.255 192.168.0.0 0.0.0.255
!
!
!
control-plane
!
!
dial-peer cor custom
!
!
!
!
line con 0
stopbits 1
line aux 0
stopbits 1
line vty 0 4
login local
!
!
end
我添加了access-list
希望,希望它能够允许我的 VLAN 上的客户端进行 ping8.8.8.8
操作,或者至少允许流量通过我的 ASA 到达互联网,但它没有起作用。
例子
我运行的示例命令是Router(config)# ip nat pool VLAN10 10.10.10.0 10.10.10.254 255.255.255.0
我得到的结果是:
Router(config)#ip nat pool VLAN10 10.10.10.0 10.10.10.254 255.255.255.0
^
% Invalid input detected at '^'
Router(config)#
无论我在哪里运行此命令,路由器都无法识别它。
系统信息
Router#show version
Cisco IOS Software, 7301 Software (C7301-P-M), Version 12.2(25)S15, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Fri 07-Dec-07 19:21 by tinhuang
ROM: System Bootstrap, Version 12.3(4r)T4, RELEASE SOFTWARE (fc1)
Router uptime is 2 minutes
System returned to ROM by power-on
System image file is "disk0:c7301-p-mz.122-25.S15.bin"
Cisco 7301 (NPE) processor (revision F) with 491520K/32768K bytes of memory.
Processor board ID 74838790
SB-1 CPU at 700Mhz, Implementation 1025, Rev 0.2, 512KB L2 Cache
1 slot midplane, Version 2.0
Last reset from power-on
3 Gigabit Ethernet interfaces
509K bytes of NVRAM.
31488K bytes of ATA PCMCIA card at slot 0 (Sector size 512 bytes).
32768K bytes of Flash internal SIMM (Sector size 256K).
Configuration register is 0x2102
更新
之后的命令IP
Router(config)#ip ?
Global IP configuration subcommands:
---- Omitted ----
mroute Configure static multicast routes
msdp MSDP global commands
multicast Global IP Multicast Commands
multicast-routing Enable IP multicast forwarding
name-server Specify address of name server to use
nbar NBAR - Network Based Application Recognition
options IP Options treatment
ospf OSPF
pim PIM global commands
policy-list Define IP Policy list
prefix-list Build a prefix list
radius RADIUS configuration commands
---- Omitted ----
答案1
您有一个服务提供商映像 (P)。该映像不支持 NAT 功能。您需要获取 IP 映像或企业映像。(c7301-is-mz 或 c7301-js-mz)