CLI commands: - ConnorEast/Tech-Journal GitHub Wiki

General CLI commands

CLI Section CLI command Purpose
Router # enable When the router is not set to enabled, configurations will not take effect and it will be unable to link anything.
Router # "Conf T" &OR "Configure Terminal" This will pull up the terminal section which will allow you to modify ports & interfaces
Router(config) # "interface fa0/0" Accesses the interface of fastethernet 0/0. This by proxy allows for the implementation of IP space.
Router(config) # interface range fa0/0-6 Access the first 6 FA ports for further configuration
Router(config) # int vlan [vlan #] Goes to the setup interface of the Vlan allowing for further modifications.
Router(config) # router rip transfers you to the routing section
Any exit Brings you to the previous menu.

Higher Level Setup / assignment CLI commands

CLI Section CLI command Purpose
Router(config-if) # ip address [network ID] [netMask] Sets the ip of a specified port / vlan to a specified network ID.
switch(config-router)# version 2 This sets RIP to Version 2 which may fix potential issues.
switchport access vlan 100 Sets a specified port / port range to be subject to rules relating to vlan 100. This includes ip specifications and is used for DHCP allocation.
Router# "show ip int" &OR "show ip interface" this shows all configured interfaces and their leased IP address space.
Router# show ip int br | inc Vlan This command shows all current VLAN configurations relating to the interfaces present on the router.
Router# copy run start This saves a copy of the current status of the router.

DHCP/DNS commands

CLI Section CLI command Purpose
Router(config-if) ip helper-address 10.10.6.2 When set on Vlans, it helps identify a singular ip space all devices should communicate with for IP allocation regardless of network.

Configuring NAT [Network Address Translation]

CLI Section CLI command Purpose
(config)# interface serial 0/0/0 After setting interfaces, you must confirm the serial ports have addresses leased. The command used to access the interface is as such
(config-if)# clock rate 64000 This sets the data transfer rate for the serial cabling to 64000
(config-if)# bandwidth 64 This command sets the bandwidth of the serial cable to 64.
(config)# ip nat pool [insert-pool-name] [Public-facing-IP] [Public-facing-IP] 255.0.0.0 sets the ip face for the outfacing web connection
(config)# ip route [Destination-Address] [Subnet-Mask] [Next-Hop] This command manually configures and edits a specified routing table in order to tell it to send traffic meant for the destination address to a specified hop location (in this case a serial connector)
(Config-if)# ip nat inside This command translates IP's from public to private so external devices can communicate with internal devices
(Config-if)# ip nat outside This command translates IP's from private to public so internal devices can contact external devices.
(config)# ip nat inside source static [Private-IP] [Public-IP] this command forces nat to use the static public-IP of X when the private IP wishes to communicate with a device on another network.

Configuring PAT [Port Address Translation]

CLI Section CLI command Purpose
(config)# ip route 0.0.0.0 0.0.0.0 [Gateway-IP] This sets all traffic as being able to access the default route/Gateway
(config)# ip nat pool test 30.0.0.120 30.0.0.120 netmask 255.0.0.0 This creates an IP pool of a singular IP for devices to be able to pool from.
(config)# access-list 1 permit [Private-IP] [Reflected-SubMask] This command states that the Private-IP space should be added to a list of IP's.
(config)# ip nat inside source list 1 pool test overload This command takes the contents of your "access-list" [the private IP space] and sets it to use the pool created for its outgoing network.
# Show ip nat translations This command shows all of the IPs that have communicated with outgoing networks and on what port they have communicated from

Configuring OSPF

CLI Section CLI command Purpose
#(config) router ospf [Insert-Instance] This command enables OSPF on a router. Where it states [Insert-Instance] replace that with a number such as 1
#(config-router) network [destination-network] [inverted-CIDR] area 0 This command enables the destination address to be routed to as it is a member of area 0. area is simply a location to state where devices can listen and talk to each other

CLI Section CLI command Purpose
#(config) ipv6 general-prefix [Prefix-Name] [IPV6-Network-Adress::64] Sets the general IPv6 network for a specific router. Must be done in CLI
#(config)# ipv6 unicast-routing Enables IPv6 Routing on the network router.
(config-if)# ipv6 address [IPV6-Network-Address::64] When done on a FA/GE port, it sets the IP of the connection to a IPv6 network address.
(config-if)# ipv6 address autoconfig When done on a FA/GE that has had the general-prefix set; the IPv6 address will be automatically configured
(config-if)# ipv6 rip process[insert#] enable Used to enable RIP routing with ipv6. This will allow for the creation of an ipv6 routing table
⚠️ **GitHub.com Fallback** ⚠️