Showing posts with label CISCO. Show all posts
Showing posts with label CISCO. Show all posts
CISCO Router Commands
Basic
# write = copy running-config startup-config # write eraseCtrl-R = refresh line Ctrl-Z = end Ctrl-A = beginning of a line Ctrl-E = end of the line Ctrl-D = Delete previous char Ctrl-W = delete previous word
IP Address, subnetting
Class A: starts with 0x0xxxxxxx (0-127), 127=128-1 Class B: starts with 0x10xxxxxx (128-191), 191 = 128+64-1 Class C: starts with 0x110xxxxx(192-223), 223 = 128+64+32-1 Class D: starts with 0x1110xxxx(224-239), 239= 128+64+32+16-1 Class E: starts with 0x11110xxx(240-255) not used.List DHCP lease and clients
show dhcp server show dhcp lease show ip dhcp binding
NAT
config t interface gigabitethernet 0/1 ip nat inside end # forward ssh ip nat inside source static tcp 192.168.10.1 22 interface BVI3 22 # turn it off no ip nat inside source static tcp 192.168.10.1 22 interface BVI3 22
SVI - Switch Virtual Interface
There is no physical interface for the VLAN and the SVI provides the Layer 3 processing for packets from all switch ports associated with the VLAN. - There is one-to-one mapping between a VLAN and SVI# int vlan 1 # ip address 192.168.0.254 255.255.255.0 # int vlan 2 # ip address 192.168.1.254 255.255.255.0# ip default gateway 192.168.1.254
IP Routing
# ip routing # no ip routing
Static Routing
# ip route 0.0.0.0 0.0.0.0 192.168.1.5 # ip route 192.168.0.0 255.255.255.0 192.168.2.5 # show ip route 192.168.0.1
RIPv2
# conf t # router rip # version 2 # no auto-summary # network 192.168.1.0 # network 192.168.3.0
Router on a Stick, sub-interfaces
On the switch, configure the link to router as trunk# switchport trunk encapsulation dot1q # switch mode trunk # show interfaces trunkOn the router interface, remove IP on the main interface
# int fa0/0 # no ip address # int fa0/0.2 # encapsulation dot1Q 2 # ip address 192.168.1.1 255.255.255.0 # int fa0/0.4 # encapsulation dot1Q 4 # ip address 192.168.3.1 255.255.255.0 # show ip route
CISCO Switch Commands
Show Commands
show version show boot show running-config show ip interface show file system show ip int brief | excl unassigned dir cd
Configure IP
enable configure t interface vlan1 ip address 192.168.11.200 255.255.255.0 no shutdown
Upgrade
Method 1, copy tar file and extract tar filecopy tftp://192.168.11.1/c2960c405-universalk9-tar.150-2.SE.tar c2960c405-universalk9-tar.150-2.SE.tar verify /md5 flash:/c2960c405-universalk9-tar.150-2.SE.tar config terminal boot system flash:/c2960c405-universalk9-mz.150-2.SE/c2960c405-universalk9-mz.150-2.SE.bin
Method 2, use archive commands which works with tar archive
archive download-sw /leave-old-sw /reload tftp://192.168.11.1/c2960c405-universalk9-tar.150-2.SE.tar
Method 3, bin file upgrade
copy tftp://192.168.11.1/c3560c405ex-universalk9-mz.150-2.SE.bin c3560c405ex-universalk9-mz.150-2.SE.bin config terminal boot system flash:c3560c405ex-universalk9-mz.150-2.SE.bin
Other commands
? copy ? delete /force /recursive c2960c405-universalk9-mz.150-2.SE copy system:running-config tftp://192.168.11.1/running-config copy nvram:startup-config tftp://192.168.11.1/startup-config copy running-config startup-config show ip int brief | excl unassigned
vlan
config t interface vlan303 ip address dhcp end ##wan interface GigabitEthernet0/10 switchport access vlan 303 switchport mode access no cdp enable spanning-tree portfast spanning-tree bpdufilter enable ##lan interface GigabitEthernet 0/5 switchport access vlan 303 switchport mode access
Subscribe to:
Posts (Atom)