Basic
# write = copy running-config startup-config
# write erase
Ctrl-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 trunk
On 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
No comments:
Post a Comment