Cisco IOS configuration commands

A list of usefull cisco commands known as owglow.com/cisco

Index:


By: Elias Eskes
Exclusively for Educatoinal purposes.

basic setup


Set system time
clock set <Hour>:<Minutes>:<Seconds> <Day (number)> <Month (text)> <Year>

Set hostname:
hostname <hostname>

Set Domain name:
Ip domain-name <domain-name>

Set password: Privilege EXEC mode:
Enable password <password>

Disable Godawful DNS lookups:
no ip domain-lookup

Set password: User EXEC mode:
Line con 0
Password <password>
Login
End

Enable telnet password
line vty 0 4
password [password]
end

Encrypt passwords:
service password-encryption

Assign IP to VLAN:
Interface vlan 1
Ip address <ip-address> <Subnet-mask>
No shutdown
End

Assign IPv6 address to Interface:
Interface gig0/1
ipv6 address <ipv6-address>/<Subnet-mask>
No shutdown
End

Assign link local IPv6 address to Interface:
Interface gig0/1
ipv6 address <ipv6-address>/<Subnet-mask>
No shutdown
End

Set default gateway:
ip default-gateway <gateway_address>

Enable SSH:
---[Make sure there is an IP address assigned.]---
---[Make sure a Hostname and Domain name is set up]---
crypto key generate rsa
Line vty 0 4
transport intput ssh
login local
password <password>
end
username <username> password <password>

Disable Telnet
line vty 0 15
transport input ssh

Save the configuration changes
copy running-config startup-config

Erase startup config
erase startup-config

show interfaces:
show ip interface brief

show Information for one interface:
show interface <Interface name>

Routing


Add a static route
ip route <DST_ADDR> <DST_SUBNET> <GATEWAY>
Log

Enable IPv6 Unicast routing
ipv6 unicast-routing
Log

ACL


Apply ACL list to interface:
inteface <Interface>
ip access-group <Name of list to apply> <in/out>

Set up standard ACL:
access-list <number> <permit/deny> <Source format>

Set up an extended ACL
ip access-list extended <Name of list(Alphanumerical)> (HOVER FOR MORE INFORMATION!)
<permit/deny> <proto> <source format> <destination format> <operator> <port number>

Source/Destination format

Targetinformation in fieldExplained
Single hosthost <address>host indicates it's only that host
Single host<address>Single address, asuming 0.0.0.0 mask.
Single host<address> 0.0.0.0The mask of 0.0.0.0 indicates that there is no wildcard, only that address.
Entire Network<address(network)> 0.0.0.255the last bit (255) is the mask for the wildcard, every one bit will be a wildcard.
Entire Network (example 2)<address(network)> 0.255.255.255This example would be for a (ex) 10.0.0.0/8 network.
Everything (Wildcard)0.0.0.0 255.255.255.255mask of 255.255.255.255 indicating every bit is a wildcard.
Everything (Wildcard)anythe word any indicates a wildcard.

Mask sheet

masktargetAddress exampleFormated wildcard
0.0.0.0Single Host192.168.2.230- (no wildcard)
0.0.0.255255.255.255.0 subnet192.168.2.0/240.0.0.*
0.0.255.255255.255.0.0 subnet192.168.0.0/160.0.*
0.255.255.255255.0.0 subnet192.168.2.230/80.*
255.255.255.255Wildcard8.8.8.8*

Numbers/type

TypeStart numberEnd number
standard199
standard13001999
Extended200299
Extended20002699

osi model

#Name (OSI)Name (TCP)-(Common) Protocol
7ApplicationApplication-Firefox/Chrome
6Presentation--
5Session--
4TransportTransport-TCP/UDP
3networkNetworkIP addressesInternet Protocol
2Data-linkNetwork InterfaceMAC addressesEthernet
1Phsysical10100101001010101010UTP

Subnetting Tool sheet

Excel sheet that helps with subnetting
Lite: All clutter is hidden, clean sheet, Full: You can take a look at how it works, both have the same functionality

Click here for more information
Direct link to subnet calculator
Click here to download the sheets directly

LAZY AFFFF (configuration scripts)

DownloadHow to useDemo video
Autoconfigure script for telnetCTRL + K (run script)Enter the IP address you want the switch to have, add a space (in front of the IP address)https://youtu.be/g2wMCzjAgNo
Configuration script for Cisco switchCTRL + K (run script)read readme.txt + alter configuration filesAsk me in person

VLSM guide

Full guide to using my Variable Lentgh Subnet Mask Calculator; This will hopefully clarify the features of the following calculator that can be found on my site:

It can be used to calculate subnets, but also to automatically calculate complete networks.

Using the calculator just for subnets.

In this case you wil only have to fill out the first field that by default has "192.168.2.1/24" entered in it, this also is the field that will be highlighted when you come to the page, here you can type your IP address and add the Subnet mask by using a slash and then the subnet mask. You can also leave away the / and enter your mask in the little field next to the IP field. If you enter the subnet mask in the IP field the subnet mask field will be ignored.
Your results will be displayed in the output field, you can click the little copy buttons to copy the values to your clipboard.

Using the calculator to subnet.

There are a few ways to do to this, the easiest way to do this is by entering your network address in the IP field and then select the "Hosts" field. Type the number of hosts you need per network in this field and press enter, you should also see a table come up below.

You can just continue, you will need to check for yourself if it's still within your range.

The more polished way to do this is by first entering your range in the IP field, and adding that to the table by opening the table, adding a note and then clicking the "Store information" Button, After this you can update the subnet mask to what you need it to be (you will have to calculate what subnet mask you need by yourself.) add a new note. Then click "Store information and go to next network", this will store the information and update the IP address, you can now enter a new Subnet mask and continue.
The result will be a nicely formatted and well made up table, this table can also be copied to an Excel spreadsheet or a word document(Excel Recommended).




Hai, I use cookies to make things work - Made by: Elias Eskes - © 2017