CCNA Khaled Marzouk
CCNA Khaled Marzouk
….…
Dest IP ………….……
dest wild card mask [operator+ src protocol information ] eq = equal
Lt = less than
For applay gt = greater than
-3-
Router (config) # interface serial 0
Router (config-if) # IP access-group { 1 : 99 } {in / out } .
☺Router(config)#Access-list 165 deny TCP host 192.168.5.1 host 192.168.1.1 eq 23
Router(config)#Access-list 165 permit IP any any [any any = 0.0.0.0 255.255.255.255 0.0.0.0 255.255.255.255]
☺Router (config) # interface FastEthernet 0/0
☺Router (config-if) # IP access-group 165 in
2) Named ACL:
Router(config)# IP Access-list { standard / extended } ACL name
2-1)standard:
For creation
Router(config-std-nacl)# { permit / deny} src IP Wild card mask
S
For applay
Router (config) # interface serial 0
Router (config-if) # IP access-group { ACL name} {in / out } .
☺Router(config)# IP Access-list standard Bassem
☺Router(config-std-nacl)# permit TCP host 192.168.1.0
☺Router(config-std-nacl)# permit IP any
☺Router(config) # interface Serial 0/0
☺Router (config-if) # IP access-group Bassem out
2-2)extended:
For creation rc IP
Router(config-ext-nacl)# { permit / deny} TCP / IP protocol Src IP Src wild card mask
Dest IP Dest wild card mask [operator+Dest protocol information]
eq = equal
Lt = less than
gt = greater than
For applay
Router (config) # interface serial 0
Router (config-if) # IP access-group { ACL name} {in / out } .
☺Router(config)# IP Access-list extended Bassem
Telnet or
☺Router(config-ext-nacl)# deny TCP 192.168.1.0 0.0.0.255 host 192.168.13.1 eq 23
☺Router(config-ext-nacl)# permit IP any any
☺Router(config) # interface Fastethernet 0/0
☺Router (config-if) # IP access-group Bassem in
To Software Recovery
1) Backup Software
Router # Copy flash TFTP [To Backup IOS]
Router # Copy startup-configuration TFTP [To Backup configuration]
2) Restore Software
Router # Copy TFTP startup-configuration [To Upgrade]
-4-
Router # Copy TFTP flash
Romman > TFTP dnld [to get IOS from TFTP server ,To recover IOS]
---------------------------------------------------------------------------------------------------------------
Other
(*): help features for IOS.
(?): help for all commands available of this mode.
Command? : Text help describing all the 1st parameter obtains of the command.
Router # show users number
Router (config) #clear line ……….. (After sh Users to know the number front of IP of the PC)
Router (config) # line con 0
Router (config-line) # logging synchronous (to write the command in one line after ctrl+z)
☺Router (config) # banner motd *…………..* message (to make message of the day)
A message-of-the-day (MOTD) banner can be displayed on all connected terminals.
Router # show IP int br ( to display the status of the interfaces ).
Up arrow ( ): recall the previous command = (ctrl + p).
Right arrow ( ): move the cursor forward in the current display command without deleting = (ctrl + F).
Left arrow ( ): move the cursor back in the current display command without deleting = (ctrl + b).
(Ctrl +a): to stop in the beginning of the line.
Router (config) # no IP domain-look up (to stop the domain search )
How do you assign Logical interface for specific interface
Router (config) # interface loopback 0
Router (config-if) # IP address IP Subnet mask
Switching
Switch # show MAC-address-table ( to display the MAC address table )
STP
Switch # show spanning-tree (to display root ID & bridge ID and status of ports RP, DP)
-5-
VLAN
Switch # show VLAN brief ( to display VLANs )
A) On switch:
1)To Add VLANs in VLAN Database Mode
Switch#vlan database
Switch(vlan)#vlan 3 name Vlan3
1')To Delete VLANs in VLAN Database Mode
Switch#vlan database
Switch(vlan)#no vlan 3
1)To modify VLANs in Global Mode
Switch#configure terminal
Switch(config)#vlan 3
Switch(config-vlan)#name Vlan3
1')To Delete VLANs in Global Mode
Switch#configure terminal
Switch(config)#no vlan 3
2)To assigning the Ports type in VLAN
Switch (config) # interface fastethernet 0/1
Switch (config-if) # switchport mode (access or trunk) ( to make access or trunk port )
Switch (config-if) # switchport (access or trunk) vlan 3
3)To make the trunking
Switch (config-if)# switchport encapsulation (ISL or dot1Q)
4)To configure VTP
Switch#show VTP status (to show status of VTP server /client /transparent)
name
Switch (config) # VTP domain ………………… ( to change the name of the domain )
server / client / transparent
Switch (config) # VTP mode …………..……………… ( state a mode )
*To put IP for VLAN
Switch (config) # interfacc VLAN 1
IP Subnet mask
Switch (config-if) # IP address …………… …………………
Switch (config-if) no shutdown
*To can telnet on switch remotely
IP of the interface which is connected to
-6-
Switch(config)#IP default-gateway …………………………………….. (to set default gateway to switch)
WAN
NAT
Router # show IP NAT translations ( to display who uses the NAT )
Inside Outside
(1) (2)
(1) Router (config-if ) # IP NAT inside (2) Router (config-if ) # IP NAT outside
1- Static :
Router (config) # IP NAT inside source static Local(privet) IP
….…………… Global(real) IP
……………..
2- Dynamic :
Name of pool Start IP ………
End IP netmask …………….
Subnet mask
Router (config) # IP NAT pool …………… ………
0 : 99 permit …………
Router (config) # Access-list ……… Src. Wild card mask
Src. IP [ ………………….]
0 : 99 Name
Router (config) # IP NAT inside source list ……. Pool ………………
3- PAT :
Name of pool Start IP ………
End IP netmask …………….
Subnet mask
Router (config) # IP NAT pool …………… ………
0 : 99 permit …………
Router (config) # Access-list ……… Src. Wild card mask
Src. IP [ ………………….]
Name
Router (config) # IP NAT inside source list ……. Pool ……………… Overload
-7-
-8-