Cisco_Command_Guide
Cisco_Command_Guide
IP Address
N P
OSI Layer Layer 2 M
Layer 3 IP P Class
- Class A , Class B Class C IP Decimal (human
language) Binary,Octel and Hexa (Machine Language)
M
- - - - -
0000 0000-0010 - - - - b
b b
8 bit = 1 Byte
1024 B = 1 Kilobyte (KB)
1024KB = 1 Megabyte (MB)
1024MB = 1 Gigabyte (GB)
b b b
P P -b -
N
b -b -b
P P
Class A = 1.0.0.0 to 126.255.255.255
Class B = 128.0.0.0 to 191.255.255.255
CCNA 640-802 Page 1 of 128
P
-
P b
O P IANA (Internet Assigned Numbers Authority)
P N P
High Order Bit
b b b
b b
bit
b
Loop back address b
b b b b
N b
N N Network Addres N
O
N b
N -
O
N b N
-
Private
Address P N P L O
IP Subnetting
IP Subnetting Building Building Small
Office 4 IP IANA IANA
register N APNIC
website http://www.apnic.net/ site b
N IP - 203.81.162.22 Yatanarpon Teleport Name Register
b P P
P P b M
b
b
P b
b
b b M P
N O -b
b N
N N N
b M
Network Host ID
b N b M O
b M N
P b M O -
Answer: 255.255.254.0
----------------------------------------------------------------------------------------------------------------------------- ----------
Question: What valid host range is the IP address 172.16.205.218/26 a part of?
IP
IP 172 Class B Default /16 10 bits Host
/26 255.255.255.192 Octet 256
192 64 64 series 172.16.205.0/26 172.16.205.64 172.16.205.128
172.16.205.192 IP 172.16.205.218 172.16.205.192 Network
Network Broadcast 172.16.205.193 172.16.205.254
Answer: 10.121.47.254
----------------------------------------------------------------------------------------------------------------------------- ----------
Question: What is the first valid host on the subnetwork that the node 172.22.154.105/24 belongs to?
Answer: 172.22.154.1
----------------------------------------------------------------------------------------------------------------------------- ----------
Question: What is the broadcast address of the network 172.21.60.0/22?
Answer: 172.21.63.255
----------------------------------------------------------------------------------------------------------------------------------- ----
Question: Which subnet does host 172.18.62.52/27 belong to?
Answer: 172.18.62.32
b b
Router A - 60 hosts
Router B - 25 hosts
Router C - 25 hosts
Router D - 10 hosts
b oct b b b
M O
b
192.168.0.0/26 192.168.0.64/26 192.168.0.128/26 192.168.0.192/26
b
b
b b
Routing
N N
b
b
172.16.64.0 10101100.00010000.01000000.00000000
172.16.65.0 10101100.00010000.01000001.00000000
172.16.66.0 10101100.00010000.01000010.00000000
172.16.67.0 10101100.00010000.01000011.00000000
Common bits: 10101100.00010000.010000xx.00000000
172.16.68.0 10101100.00010000.01000100.00000000
172.16.69.0 10101100.00010000.01000101.00000000
172.16.70.0 10101100.00010000.01000110.00000000
172.16.71.0 10101100.00010000.01000111.00000000
172.16.68.0/22
Step 3 -
172.16.72.0 10101100.00010000.01001000.00000000
172.16.73.0 10101100.00010000.01001001.00000000
172.16.74.0 10101100.00010000 01001010.00000000
172.16.75.0 10101100.00010000 01001011.00000000
172.16.76.0 10101100.00010000.01001100.00000000
172.16.77.0 10101100.00010000.01001101.00000000
172.16.78.0 10101100.00010000.01001110.00000000
172.16.79.0 10101100.00010000.01001111.00000000
Common bits: 10101100.00010000.01001xxx
172.16.72.0/21
Command
Router>enable = Router>en
Short Key
Router#configure terminal
Router#conf t
Tab Key Command
Router#sh = Router#show
Router#exit L
Router>exit
Router(config-if)#exit Current Mode
Router(config)#
Router(config)#exit Current Mode
Router#
Router#show ? Command
List
Router#show interfaces Interfaces
Router#show interface serial 0/0 Serial 0/0 interface
Router#show ip interface brief Interfaces summary
Router#show controllers serial 0 DCE/DTE Clock Rate
Router#show clock
*13:56:00 YGN Thu 26 July 2012
Router#show history command
Router#show flash Flash memory info
Router#show version Firmware version
Router#show arp ARP Table
YGN#show running-config config file
YGN#show startup-config N M config file
YGN#sh users
Line User Host(s) Idle Location
0 con 0 idle 00:04:09
*67 vty 0 idle 00:00:00 192.168.1.20 Active User
do Command
Router(config)#hostname YGN N
YGN(config)#
YGN(config)#no hostname N
Router(config)#
Router Restart
YGN#reload
Password
YGN(config)#line console 0
YGN(config-line)#password console
YGN(config-line)#login Login o
fastethernet interface
YGN(config)#line vty 0 4
YGN(config-line)#login local login
YGN(config-line)#transport input ssh login
YGN(config)#ntp-server 192.168.1.10
For Router Security
Router
YGN#conf t b M
YGN(config)#username super privilege 15 secret super Admin User create
YGN(config)#line vty 0 1 Telnet Configuration
YGN(config-line)#login local User Database
YGN(config-line)#transport input ssh P
YGN(config-line)#exit Sub interface
YGN(config)#ip domain-name abc.com setting
YGN(config)#crypto key generate rsa
The name for the keys will be: YGN.abc.com
Choose the size of the key modulus in the range of 360 to
2048 for your General Purpose Keys. Choosing a key modulus
greater than 512 may takea few minutes.
How many bits in the modulus [512]: 1024
% Generating 1024 bit RSA keys, keys will be non-
exportable...[OK]
YGN(config)#
HQ(config)#int f0/1
HQ(config-if)#ip helper-address 192.168.0.10
HQ(config-if)#exit
HQ(config)#
B1(config)#int f0/0
B1(config-if)#ip helper-address 192.168.0.10
B1(config-if)#int f0/1
B1(config-if)#ip helper-address 192.168.0.10
B1(config-if)#exit
B2(config)#int f0/0
B2(config-if)#ip helper-address 192.168.0.10
B2(config-if)#int f0/1
B2(config-if)#ip helper-address 192.168.0.10
B2(config-if)#exit
B2(config)#
B3(config)#int f0/0
B3(config-if)#ip helper-address 192.168.0.10
B3(config-if)#int f0/1
B3(config-if)#ip helper-address 192.168.0.10
B3(config-if)#exit
1.power off
2.power on
4.Rommon>
5.Rommon>confreg 0x2142
6.Rommon>reset
9.router(config)#config-register 0x2102
10.router#reload
HQ#sh cdp
Global CDP information:
Sending CDP packets every 60 seconds
Sending a holdtime value of 180 seconds
Sending CDPv2 advertisements is enabled
HQ#sh cdp neighbors Neighbor Devices
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Br
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID Local Intrfce Holdtme Capability Platform Port ID
Switch Fas 0/0 156 S 2950 Fas 0/1
Switch Fas 0/1 156 S 2950 Fas 0/1
B2 Ser 0/0/1 163 R C1841 Ser 0/0/0
B3 Ser 0/1/1 163 R C1841 Ser 0/0/0
B2 Ser 0/1/0 163 R C1841 Ser 0/0/1
B1 Ser 0/0/0 164 R C1841 Ser 0/0/0
HQ#sh cdp interface
Vlan1 is administratively down, line protocol is down
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
FastEthernet0/0 is up, line protocol is up
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
HQ#sh cdp neighbors detail (or) Neighbor Device Information
HQ#sh cdp entry *
HQ(config)#no cdp run CDP Protocol
HQ(config)#int f0/0 Interface CDP
HQ(config-if)#no cdp enable
HQ(config-if)#int f0/1
HQ(config-if)#no cdp enable
ARP (Address Resolution Protocol)
Server N
Username: console
Password:
HQ>
Configuration Local Host File For Name to IP
YGN#erase startup-config
Restore Config File from TFTP Server
Link
rommon1#xmodem –c filename.bin
Do you wish to continue y/n? y
Hyper Terminal
TransferSend File (or)
Tera Term
FileTransferxmodemsend and then browse
File location
Convergence
Metric
Load Balancing
Administrative Distance
Time to Convergence
Scalability
Classless
Failure of a link
Introduction of a new link
Failure of a router
Change of link parameters
RIP Timers
Triggered Update
Synchronized Update
Routing Loop
Count to Infinity
Holddown Timer
Split Horizontal Rule
Route Poisoning
Poison Reverse
Default TTL
R1(config)#router rip
R1(config-router)#network 172.30.0.0
R2(config)#router rip
R2(config-router)#network 172.30.0.0
R2(config-router)#network 192.168.4.0
R3(config)#router rip
R3(config-router)#network 192.168.4.0
R3(config-router)#network 192.168.1.0
PN R3 ISP Router R2 RIP Network Default
Route Distribute
Exercise 3.
R1(config)#router rip
R1(config-router)#network 172.30.0.0
R1(config-router)#network 209.165.200.0
R1(config-router)#version 2
R1(config-router)#no auto-summary
R2(config)#router rip
R2(config-router)#network 10.0.0.0
R2(config-router)#network 209.165.200.0
R2(config-router)#version 2
R2(config-router)#no auto-summary
R3(config)#router rip
R3(config-router)#network 172.30.0.0
R3(config-router)#network 209.165.200.0
R3(config-router)#version 2
R3(config-router)#no auto-summary
DUAL Algorithm
Administrative Distance
Internal EIGRP – 90
External EIGRP – 170
Summary EIGRP Route – 5
R1(config)#router eigrp 10
R1(config-router)#network 172.16.0.0
R1(config-router)#network 192.168.10.0 Classful auto summarized
R1(config-router)#no auto-summary #absent null 0 route path
R1(config)#int s0/0
R1(config-if)#bandwidth 64
R1(config-if)#int s0/1
R1(config-if)#bandwidth 1544
R2(config)#router eigrp 10
R2(config-router)#network 172.16.3.0 255.255.255.252
R2(config-router)#network 172.16.2.0 255.255.255.0
R2(config-router)#network 192.168.10.8 255.255.255.252
R2(config-router)#no auto-summary
R2(config)#int s0/0 Interface serial 0/0
R2(config-if)#bandwidth 64 Bandwidth
R2(config-if)#int s0/1
R2(config-if)#bandwidth 1024
R3(config)#router eigrp 10
R3(config-router)#network 192.168.10.8 0.0.0.3
R3(config-router)#network 192.168.1.0 0.0.0.255
R3(config-router)#network 192.168.10.4 0.0.0.3
R3(config-router)#no auto-summary
R3(config)#int s0/0
R3(config-if)#bandwidth 1024
R3(config-if)#int s0/1
R3(config-if)#bandwidth 1544
Successor
Feasible Successor ( backup path)
Feasible Distance
Feasible Condition
Reported Distance ( Router Network Neighbors
Router )
R2(config)#router eigrp 10
R2(config-router)#network 10.0.0.0
R2(config-router)#auto-summary Auto summary
R1(config)#router eigrp 10
R1(config-router)#network 172.16.0.0
R1(config-router)#network 192.168.10.0
R1(config-router)#no auto-summary
R2(config)#router eigrp 10
R2(config-router)#network 172.16.0.0
R2(config-router)#network 192.168.10.0
R2(config-router)#no auto-summary
R3(config)#router eigrp 10
R3(config-router)#network 192.168.10.0
R3(config-router)#network 192.168.1.0
R3(config-router)#no auto-summary
R3(config-route)#exit
R3(config)#int lo 0
R3(config-if)#ip add 192.168.0.1 255.255.255.0
R3(config)#int lo 2
R3(config-if)#ip add 192.168.2.1 255.255.255.0
R3(config)#int lo 3
R3(config-if)#ip add 192.168.3.1 255.255.255.0
R3(config)#router eigrp 10
R3(config-router)#network 192.168.0.0
R3(config-router)#network 192.168.2.0
R3(config-router)#network 192.168.3.0
R3(config)#int s0/0 Interface
R3(config-if)#ip summary-address eigrp 10 192.168.0.0 255.255.252.0 Manual Summarization
R3(config)#int s0/0
R3(config-if)#ip summary-address eigrp 10 192.168.0.0 255.255.252.0
5. Routers Network
Topology map
R1-R2(10.10.10.0)
R1(config)#int s0/0
R1(config-if)#bandwidth 64
R1(config-if)#int s0/1
R1(config-if)#bandwidth 1544
R2(config)#int s0/0
R2(config-if)#bandwidth 64
R2(config-if)#int s0/1
R2(config-if)#bandwidth 1024
R3(config)#int s0/0
R3(config-if)#bandwidth 1544
R3(config-if)#int s0/1
R3(config-if)#bandwidth 1024
R1-R3-R2(10.10.10.0)
AD Cost
R1-R3-R2(10.10.10.0)
Cost= 108/BW(bps)+108/BW(bps)
=162
R1(config)#router ospf 1
R1(config-router)#auto-cost reference-bandwidth ?
<1-4294967> The reference bandwidth in terms of
Mbits per second
R1(config-router)#auto-cost reference-bandwidth 108 1010
10000
Admin cost
R1-R3-R2(10.10.10.0)
Router ID
1. -
2. Loopback Interface
3. Physical IP
Router-ID L b
R1(config)#int lo 0
R1(config-if)#ip add 192.168.11.11 255.255.255.255
R2(config)#int lo 0
R2(config-if)#ip add 192.168.11.22 255.255.255.255
R3(config)#int lo 0
R3(config-if)#ip add 192.168.11.33 255.255.255.255
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
Reload or use "clear ip ospf process" command, for this to take effect
R1(config-router)#end
R1#clear ip ospf process
Reset ALL OSPF processes? [no]: y
R1#
R2(config)#router ospf 2
R2(config-router)#router-id 2.2.2.2
Reload or use "clear ip ospf process" command, for this to take effect
R2(config-router)#end
R2#clear ip ospf process
Reset ALL OSPF processes? [no]: y
R2#
R3(config)#router ospf 3
R3(config-router)#router-id 3.3.3.3
Reload or use "clear ip ospf process" command, for this to take effect
R3(config-router)#end
R3#clear ip ospf process
Reset ALL OSPF processes? [no]: y
R3#
R1(config)#int lo 1
R1(config-if)# ip address 172.20.0.1 255.255.255.252
R1(config-if)#exit
R1(config)#ip route 0.0.0.0 0.0.0.0 lo 1
R1(config)#router ospf 1
R1(config-router)#default-information originate
Type E1
R1(config)#router ospf 1
R1(config-router)#default-information originate metric-type 1
R1(config-router)#
R1(config)#int lo 1
R1(config-if)#ip ospf network point-to-point
R2(config)#int lo 2
R2(config-if)#ip ospf network point-to-point
R3(config)#int lo 3
R3(config-if)#ip ospf network point-to-point
R3(config)#int lo 100
R3(config-if)#ip ospf network point-to-point
R3(config-if)#int lo 101
R3(config-if)#ip ospf network point-to-point
R3(config-if)#int lo 102
R3(config-if)#ip ospf network point-to-point
R3(config-if)#int lo 103
R3(config-if)#ip ospf network point-to-point
R1(config)#router ospf 1
R1(config-router)#router-id 1.1.1.1
Reload or use "clear ip ospf process" command, for this to take effect
R1(config-router)#end
R1#clear ip ospf process
Reset ALL OSPF processes? [no]: y
R1#
R2(config)#router ospf 1
R2(config-router)#router-id 2.2.2.2
Reload or use "clear ip ospf process" command, for this to take effect
R2(config-router)#end
R2#clear ip ospf process
Reset ALL OSPF processes? [no]: y
R2#conf t
R2(config)#router ospf 1
R2(config-router)#area 23 virtual-link 3.3.3.3
R3(config)#router ospf 1
R3(config-router)#router-id 3.3.3.3
Reload or use "clear ip ospf process" command, for this to take effect
R3(config-router)#exit
R3(config)#end
R3#clear ip ospf process
Reset ALL OSPF processes? [no]: y
R3#
R3(config)#router ospf 1
R3(config-router)#area 23 virtual-link 2.2.2.2
R3(config)#router ospf 1
R3(config-router)#area 100 range 192.168.100.0 255.255.252.0
Multiaccess Network
Point-to-Point
Boradcast Multiaccess
Nonbroadcast Multiaccess (NBMA)
Point-to-multipoint
Virtual links
Network Routers
Exercise
R1(config)#int f0/0
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#router ospf 1
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0
R1(config-router)#exit
R1(config)#int lo 0
R1(config-if)#ip add 111.111.111.1 255.255.255.255
R1(config-if)#
R2(config)#int lo 0
R2(config-if)#ip add 111.111.111.2 255.255.255.255
R2(config-if)#
R3(config)#int lo 0
R3(config-if)#ip add 111.111.111.3 255.255.255.255
R3(config-if)#
R4(config)#int lo 0
R4(config-if)#ip add 111.111.111.4 255.255.255.255
R4(config-if)#
R5(config)#int lo 0
R5(config-if)#ip add 111.111.111.5 255.255.255.255
R5(config-if)#
R6(config)#int f0/0
R6(config-if)#ip add 192.168.1.6 255.255.255.0
R6(config-if)#no shut
R6(config-if)#int lo 0
R6(config-if)#ip add 111.111.111.6 255.255.255.255
R6(config-if)#exit
R6(config)#router ospf 1
R6(config-router)#network 192.168.1.0 0.0.0.255 area 0
R6(config-router)#exit
R6 Project
L b Router ID
RIP O P
BW Delay Load
R2(config-router)#exit
R2(config)#router ospf 1
R2(config-router)#redistribute eigrp 10 subnets
R2(config-router)#exit
? command (help)
PC4 P
Port
S1#sh port-security interface f0/1
Port Security : Enabled
Port Status : Secure-shutdown
Violation Mode : Shutdown
Aging Time : 0 mins
Aging Type : Absolute
SecureStatic Address Aging : Disabled
Maximum MAC Addresses :1
Total MAC Addresses :1
Configured MAC Addresses :0
Sticky MAC Addresses :1
Last Source Address:Vlan : 00E0.A377.D11D:1
Security Violation Count :1
S1#conf t P
S1(config)#int f0/1
S1(config-if)#shutdown
S1(config-if)#no shut
Switch Password
PC>telnet 192.168.2.5
Trying 192.168.2.5 ...Open
User Access Verification
Username:
VLAN Trunking
VLAN hopping is a computer security exploit, a method of attacking networked resources on a Virtual LAN
(VLAN). The basic concept behind all VLAN hopping attacks is for an attacking host on a VLAN to gain access
to traffic on other VLANs that would normally not be accessible. There are two primary methods of VLAN
hopping: switch spoofing and double tagging. Both attack vectors can be easily mitigated with proper
switchport configuration.
Switch spoofing
In a switch spoofing attack, an attacking host imitates a trunking switch by speaking the tagging and trunking
protocols (e.g. Multiple VLAN Registration Protocol, IEEE 802.1Q, VLAN Trunking Protocol) used in maintaining
a VLAN. Traffic for multiple VLANs is then accessible to the attacking host.
Mitigation
Switch spoofing can only be exploited when interfaces are set to negotiate a trunk. To prevent this attack on
Cisco IOS, use one of the following methods [1]:
2. Ensure that ports that are not meant to be trunks are explicitly configured as access ports
Double tagging
In a double tagging attack, an attacking host connected on a dot1q interface prepends two VLAN tags to
packets that it transmits. The packet (which corresponds to the VLAN that the attacker is really a member of)
is forwarded without the first tag, because it is the native VLAN. The second (false) tag is then visible to the
second switch that the packet encounters. This false VLAN tag indicates that the packet is destined for a target
host on a second switch. The packet is then sent to the target host as though it originated on the target VLAN
bypassing the network mechanisms that logically isolate VLANs from one another. However, this attack allows
to send packets toward the second switch, but possible answers are not forwarded to the attacking host.
Mitigation
Double Tagging can only be exploited when switches use "Native VLANs" [2]. Ports with a specific access VLAN
(the native VLAN) don't apply a VLAN tag when sending frames, allowing the attacker's fake VLAN tag to be
1. Simply do not put any hosts on VLAN 1 (The default VLAN). i.e., assign an access VLAN other than VLAN 1
to every access port
2. Change the native VLAN on all trunk ports to an unused VLAN ID.
Example
As an example of a double tagging attack, consider a secure web server on a VLAN called VLAN1. Hosts on
VLAN1 are allowed access to the web server; hosts from outside the VLAN are blocked by layer 3 filters. An
attacking host on a separate VLAN, called VLAN2, creates a specially formed packet to attack the web server.
It places a header tagging the packet as belonging to VLAN2 on top of another header tagging the packet as
belonging to VLAN1. When the packet is sent, the switch on VLAN2 sees the VLAN2 header and removes it,
and forwards the packet. The VLAN2 switch expects that the packet will be treated as a standard TCP packet
by the switch on VLAN1. However, when the packet reaches VLAN1, the switch sees a tag indicating that the
packet is part of VLAN1, and so bypasses the layer 3 handling, treating it as a layer 2 packet on the same
logical VLAN. The packet thus arrives at the target server as though it was sent from another host on VLAN1,
ignoring any layer 3 filtering that might be in place.
Switch 1 to 5
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int f0/0 Interface f0/0
Router(config-if)#no shutdown Interface
Router(config-if)#int f0/0.10 F0/0 subinterface create
Router(config-subif)#encapsulation dot1Q 10 (vlan name) VLAN dot1Q Route
Router(config-subif)#ip add 192.168.10.1 255.255.255.0
Router(config-subif)#int f0/0.20
Intervlan Routing with Layer3 Switch (Routing with virtual interface lan)
P P
Trunk b
VTP pruning function use by reducing unnecessary flooded traffic, such as broadcast, multicast, unknown,
and flooded unicast packets. VTP pruning save and increases available bandwidth by restricting flooded traffic
to those trunk links that the traffic must use to access the appropriate network devices. By default, VTP
pruning is disabled. VTP pruning does not prune traffic from VLANs that are pruning-ineligible.
VLAN 1(default) is always pruning-ineligible, meaning traffic from VLAN 1 cannot be pruned in any
situation.
Pruning eligibility is based only on the VLANs that need the given broadcast information across the
trunks. It is not related with the number of ports assigned to that VLAN.
VTP Pruning does not change, add, or delete the VLANs in a VTP domain, it simply reduces the
broadcast and multicast traffic.
VTP version 2 and VTP version 1 are not interoperable on network devices in the same
VTP domain. Every network device in the VTP domain must use the same VTP version.
Do not enable VTP version 2 unless every network device in the VTP domain supports
version 2.
Layer3 Switch
Switch(config)#hostname L3
L3(config)#int range f0/1-2
L3(config-if-range)#switchport trunk encapsulation dot1q
L3(config-if-range)#switchport mode trunk
L3(config-if-range)#exit
L3(config)#vtp mode server
L3(config)#vtp domain cisco VTP Configuration
L3(config)#vtp password cisco
L3(config)#vlan 10
L3(config-vlan)#name HR
L3(config-vlan)#vlan 20
L3(config-vlan)#name Sale
L3(config-vlan)#vlan 30
L3(config-vlan)#name Manager
L3(config-vlan)#vlan 40 VLAN creation & define
L3(config-vlan)#name Account description
L3(config-vlan)#vlan 50
L3(config-vlan)#name Operation
L3(config-vlan)#vlan 60
L3(config-vlan)#name Security
L3(config)#vlan 99
L3(config-vlan)#name Native_Trunk
Switch(config)#hostname SW2
SW2(config)#int range f0/1-2
SW2(config-if-range)#switchport mode trunk
SW2(config-if-range)#exit
SW2(config)#vtp mode client
L3(config)#vlan 10
L3(config-vlan)#name HR
L3(config-vlan)#vlan 20
L3(config-vlan)#name Sale
L3(config-vlan)#vlan 30
L3(config-vlan)#name Manager
L3(config-vlan)#vlan 40
L3(config-vlan)#name Account
L3(config-vlan)#vlan 50
L3(config-vlan)#name Operation
L3(config-vlan)#vlan 60
L3(config-vlan)#name Security
L3(config-vlan)#vlan 99
L3(config-vlan)#name Native
L3(config-vlan)#exit
L3(config)#int f0/3
L3(config-if)#switchport mode access
L3(config-if)#switchport port-security
L3(config-if)#switchport port-security violation protect
L3(config-if)#switchport access vlan 10
L3(config-if)#switchport voice vlan 10 VOIP
L3(config-if)#int f0/4
L3(config-if)#switchport mode access
L3(config-if)#switchport port-security
L3(config-if)#switchport port-security violation protect
L3(config-if)#switchport access vlan 20
L3(config-if)#switchport voice vlan 20
L3(config-if)#int f0/5
L3(config-if)#switchport mode access
L3(config-if)#switchport port-security
L3(config-if)#switchport port-security violation protect
L3(config-if)#switchport access vlan 30
L3(config-if)#switchport voice vlan 30
L3(config-if)#int f0/6
L3(config-if)#switchport mode access
L3(config-if)#switchport port-security
L3(config-if)#switchport port-security violation protect
L3(config-if)#switchport access vlan 40
L3(config-if)#switchport voice vlan 40
L3(config-if)#int f0/7
L3(config-if)#switchport mode access
L3(config-if)#switchport port-security
L3(config-if)#switchport port-security violation protect
L3(config-if)#switchport access vlan 50
L3(config-if)#switchport voice vlan 50
L3(config-if)#int f0/8
L3(config-if)#switchport mode access
L3(config-if)#switchport port-security
L3(config)#ip routing
L3(config)#int vlan10
L3(config-if)#ip add 10.10.10.1 255.255.255.0
L3(config-if)#int vlan20
L3(config-if)#ip add 10.10.20.1 255.255.255.0
L3(config-if)#int vlan30
L3(config-if)#ip add 10.10.30.1 255.255.255.0
L3(config-if)#int vlan40
L3(config-if)#ip add 10.10.40.1 255.255.255.0
L3(config-if)#int vlan50
L3(config-if)#ip add 10.10.50.1 255.255.255.0
L3(config-if)#int vlan60
L3(config-if)#ip add 10.10.60.1 255.255.255.0
L3(config-if)#exit
L3(config)#ip dhcp excluded-address 10.10.10.1
10.10.10.50
L3(config)#ip dhcp excluded-address 10.10.20.1
10.10.20.50
L3(config)#ip dhcp excluded-address 10.10.30.1
10.10.30.50
L3(config)#ip dhcp excluded-address 10.10.40.1
10.10.40.50
L3(config)#ip dhcp excluded-address 10.10.50.1
10.10.50.50
L3(config)#ip dhcp excluded-address 10.10.60.1
10.10.60.50
L3(config)#ip dhcp pool vlan10
L3(dhcp-config)#network 10.10.10.0 255.255.255.0
L3(dhcp-config)#default-router 10.10.10.1
L3(dhcp-config)#option 150 ip 192.168.0.1 option 150 – ph svr
L3(dhcp-config)#ip dhcp pool vlan20 192.168.0.1 - CME Address
L3(dhcp-config)#network 10.10.20.0 255.255.255.0
L3(dhcp-config)#default-router 10.10.20.1
L3(config)#int f0/9
L3(config-if)#no switchport IP switchport mode
L3(config-if)#ip add 192.168.0.2 255.255.255.252
L3(config-if)#no shut
SWA(config)#vtp mode client
SWA(config)#vtp password cisco
SWA(config)#int f0/3
SWA(config-if)#switchport mode access
SWA(config-if)#switchport port-security
SWA(config-if)#switchport port-security violation protect
SWA(config-if)#switchport access vlan 10
SWA(config-if)#switchport voice vlan 10
SWA(config-if)#int f0/4
SWA(config-if)#switchport mode access
CME(config)#ephone 1 P P
CME(config-ephone)#type cipc Type = softphone
CME(config-ephone)#mac-address 000A.F3CA.14B1 Computer Mac Address
CME(config-ephone)#button 1:1 Ext no. (9101)
CME(config-ephone)#ephone 2
CME(config-ephone)#type cipc
CME(config-ephone)#mac-address 0001.638E.60BA
CME(config-ephone)#button 1:2
CME(config)#telephony-service
CME(config-telephony)#ip source-address 192.168.0.1 port
2000
Switch(config)#sh spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0001.6435.13E5
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Non-Root Switch P P
Path Cost
10 GB 2
1 GB 4
100 MB 19
10 MB 100
Cost 19
19+19
Rapid PVST
Rapid PVST Backup Link 2s User Reliable
P
ACL
Exercise 1
B1(config)#int f0/0
B1(config-if)#ip access-group 10 out
B1(config)#int f0/0
B1(config-if)#ip access-group 12 out
access-list 110 permit tcp 192.168.7.0 0.0.0.255 any eq 7.0 Network 0.0 Network website
80
access-list 110 permit udp 192.168.7.0 0.0.0.255 host website DNS
192.168.0.10 eq 53 Service
access-list 110 permit udp any eq 68 any eq 67 Client DHCP Service
(68 client 67
server )
int f0/1 Access-List Interface
ip access-group 110 in
access-list 111 deny tcp 192.168.7.0 0.0.0.255 host Website cisco.com website
192.168.0.11 eq 80 deny (Remark – Deny
ACL )
access-list 111 permit tcp 192.168.7.0 0.0.0.255 any eq website P
80
access-list 111 permit udp 192.168.7.0 0.0.0.255 host
192.168.0.10 eq 53
access-list 111 permit udp any eq 68 any eq 67
int f0/1
ip access-group 112 in
Name Access-List
R1#sh clock
R1(config)#clock timezone YGN 6 30
R1#clock set 19:00:00 11 Oct 2012
R1(config)#ntp master ntp server
R2(config)#ntp server 192.168.123.1 Time Setting NTP Server
R2(config)#clock timezone YGN 6 30
R1(config)#time-range RDP
R1(config-time-range)#?
Time range configuration commands:
absolute absolute time and date
default Set a command to its defaults
exit Exit from time-range configuration mode
no Negate a command or set its defaults
periodic periodic time and date
B2(config)#access-list 120 deny tcp 10.10.7.0 0.0.0.255 host 10.10.15.50 0.0.0.255 eq 110
L Guest Network Internal Mail Server POP3
B2(config)#int f0/0.17
B2(config-subif)#ip access-group 120 in
Static NAT (one to one)- Mapping an unregistered IP address to a registered IP address on a one-to-
one basis. Particularly useful when a device needs to be accessible from outside the network.
In static NAT, the computer with the IP address of 192.168.0.10 will always translate to 213.81.71.69:
In dynamic NAT, the computer with the IP address of 192.168.32.10 will translate to the first available
address in the range from 213.18.123.100 to 213.18.123.150:
In overloading, each computer on the private network is translated to the same IP address
(213.18.123.100) but with a different port number assignment:
DNS Server
NAT(config)#ip nat inside source list 30 pool MYPOOL overload Overload PAT
HTTP/HTTPS DNS Allow N