- User Exec Mode: basic commands and system information
show <?>
: Obtain informationcdp
: CDP informationclock
: Display the system clockcontrollers
: Interface controllers statusframe-relay
: Frame Relay informationhistory
: Display the session command historyinterfaces
: Interface status and configurationip
: IP informationroute
: Show routing tableroute rip
: Show routing table entries created by RIPprotocols
: Show active IP protocolsrip database
: Show information gathered by RIP
version
: System hardware and software
ping <IP address>
: Ping an IPtraceroute <IP address>
: Show the traceroute to an IP
- Privileged Exec Mode: detailed system information, toggle debug mode, save and restore system configuration
show <?>
: Obtain information- (Every command available in User Exec Mode)
access-list
: List access listsarp
: ARP tablerunning-config
: Current operating configurationstartup-config
: Contents of startup configurationcopy <source> <destination>
: Copy configurations
clear mac-address-table dynamic
: Erases the FDB of a switch
- Global Configuration Mode: configure system's global settings
hostname
: Change hostnamebanner
: Change the banner informationmotd
: Change message of the day
enable secret
: Add a login passwordno enable secret
: Disable the login passwordinterface
: Change interface configurationline console
: Change console line configurationline vty
: Change virtual terminal configurationip route <destination IP> <destination netmask> <next hop/interface>
: Add a static routeno ip route <destination IP> <destination netmask> <next hop/interface>
: Remove a static routerouter rip
: Enter RIP configurationversion <number>
: Select RIP versionnetwork <IP address>
: Add a network to enable RIP ondebug ip rip
: Enable RIP debug modeno debug ip rip
: Disable RIP debug modepassive-interface <interface> <slot>
: Renders an interface passive, which makes it so that it doesn't advertise networks
access-list <list number> permit <network address> <network wildcard>
: Create a permitted NAT addresses listip nat inside source list <list number> interface <outside interface> overload
: Translates the source IP address that goes outside and the destination IP address that goes insideip nat outside source list <list number> interface <outside interface> overload
: Translates the source IP address that goes inside and the destination IP address that goes outsideip nat inside source static <protocol> <IP inside> <Port inside> <IP outside> <Port outside>
: Adds a static NAT configuration (port forwarding)ip dhcp pool <pool name>
: Creates a DHCP address pooldefault-router <IP address>
: Assigns the default router for the selected poolnetwork <network address> <network netmask>
: Defines the addresses that will be assigned
ip dhcp excluded-address <IP address>
: Excludes the IP address from a pool
- Specific Configuration Mode: specifically configure an interface or a service on the router
shutdown
: Disable an interfaceno shutdown
: Enable an interfaceip address
: Select the interface's IP address and netmaskdescription
: Add a description to the interfacepassword
: Add a password to access a linelogin
: Force login for a lineip nat inside
: Mark interface as a private network interfaceip nat outside
: Mark interface as a public network interface
Note: the IPs, port numbers and interface identifiers used are generic. Use the ones that you need.
-
Identify NAT zones
You can do this through the
ip nat inside
command for private networks and through theip nat outside
command for public networks. -
Add an
access-list
as the outgoing NAT sourceTo do this, the NAT that connects the private network to the public network needs to allow forwarding to the public network. This is achieved through the commands:
access-list 1 permit 192.168.0.0 0.0.0.255 ip nat inside source list 1 interface fastethernet 0/1 overload
-
Create the port forwarding
You can now create a static route in the router through the command:
ip nat inside source static tcp 192.168.1.2 80 88.1.0.2 8888