cheat-sheets

Cheat sheets for various stuff

View the Project on GitHub bertvv/cheat-sheets

Cisco IOS

Working with console cables

sudo screen /dev/ttyUSB0 9600

Information

Task Command
Show IPv4 settings show ip interface brief
Show IPv6 settings show ipv6 interface brief
Show routing table show ip route
Show config show running-config
Show VLAN (switch) info show vlan

General configuration

Getting started:

Router>enable
Router#configure terminal
Router(config)#

config-if

Set an IPv6 address:

Router(config)#interface G0/0/0
Router(config-if)#ipv6 address 2001:DB8:0:1::/64
Router(config-if)#ipv6 enable
Router(config-if)#no shutdown
Router(config-if)#exit
Task Command
Enable crossover cable autodetect mdix auto

Load config from TFTP server

Example:

#copy tftp running-config
Address or name of remote host []? IP_ADDRESS
Source filename []? FILENAME
Destination filename [running-config]? 
Accessing tftp://IP_ADDRESS/FILENAME...
Loading FILENAME from IP_ADRESS (via INTERFACE): !
[OK - 1273 bytes]
...

Routing

IPv4 static routing

Task Command
Set default GW ip route 0.0.0.0 0.0.0.0 GW_ADDR
Route to network ip route NET_ADDR NET_MASK NEXT_HOP

IPv6 static routing

Task Command
Enable routing ipv6 unicast-routing
Directly attached static route ipv6 route 2001:DB8::/32 g1/0/0
Recursive static route ipv6 route 2001:DB8::/32 2001:DB8:3000:1

Resources:

Enable NAT

Enable DHCP

Router(config)#ip dhcp pool POOL_NAME
Router(dhcp-config)#network NET_ADDR NET_MASK
Router(dhcp-config)#default-router GW_ADDR
Router(dhcp-config)#dns-server DNS_ADDR
Router(dhcp-config)#ip dhcp excluded-address START END

Switch