Packet Tracer
Packet Tracer
Info Command
Enter privileged EXEC mode Name# Switch> enable
Enter global configuration mode. Name(config)# Switch# configure terminal
Enter interface configuration mode for the SVI. Switch(config)# interface vlan 99
Configure the interface IPv4 address. Switch(config-if)# ip address 172.17.99.11 255.255.255.0
Configure the interface IPv6 address Switch(config-if)# ipv6 address 2001:db8:acad:99::11/64
Enable the interface. Switch(config-if)# no shutdown
Return to the privileged EXEC mode. Switch(config-if)# end
Configure the default gateway for the switch. Switch(config)# ip default-gateway 172.17.99.1
Prevent Domain Message after Invalid Command Switch(config)#no ip domain-lookup
Save the running config to the startup config Switch# copy running-config startup-config
CONFIGURE PASSWORDS
Info Mode Command
device name Switch(config)# Hostname NAME
Legal notification Switch(config)# banner motd #TEXT Here# announcements to those who log in to router
Secure user EXEC Switch(config)# line console 0
mode access Switch(config-line)# password Bavly
Switch(config-line)# login
Secure privileged Switch(config)# enable secret 123
secure VTY lines Switch(config-line)# line vty 0 15
Switch(config-line)# password 123
Switch(config-line)# login
ensure passwords Router(config)# security passwords min-length 9
are a minimum of a
specified length
Disable brute-force Router(config)# login block-for # attempts # within #
attack by max Router(config)# login block-for 120 attempts 3 within 60
number of attempts block vty login
Encrypt passwords Switch(config)# service password-encryption
automatically Router(config-line)# exec-timeout minutes seconds
disconnect an Router(config-line)# exec-timeout 3 30 (end seasion after 3 minutes and 30 sec)
inactive user command can be applied console, auxiliary, and vty lines
Disable the EXEC timeout
no exec-timeout
exec-timeout 0 0
FILTER SHOW COMMAND OUTPUT USING PIPE |
Info Command
Shows entire section that starts with expression Router# show running-config | section interface
Shows all the output lines from a certain point Router# show running-config | begin interface
Includes all output lines that match the expression Router# show running-config | include interface
Router# show ip interface brief | include up
Excludes all output lines that match the expression Router# show ip interface brief | exclude unassigned
Router# show running-config | exclude interface
VLAN
Info Mode Command
Create Switch(config)# vlan 5
Name Switch(config-vlan)# name CSE_Engineer
Show Switch# show vlan brief
Delete Switch(config-vlan)# no vlan 5
One by one One by one
Switch(config)# interface fa0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 5
TRUNK
Info Mode Command
Public Public (Connect ALL VALNS to parallel in another switch )
Switch(config)# int fa0/7
Switch(config-if)# switchport mode trunk First To Run
ROUTER-ON-A-STICK INTER-VLAN
Info Mode Command
Router(config)# int fa0/0
Router(config-if)# no shutdown
Router(config-if ip address 192.168.0.1 255.255.255.252
FLOATING STATIC
Mode Command
Switch(config)# ip route 6.6.6.0 255.255.255.0 3.3.3.2 2 administrative distance (AD)
Switch# Show run
IPv6 Static
Mode Command
Router(config)# ipv6 unicast-routing First To Run Routing using ipv6
Router(config)# int fa0/0 v6 اضيفip باقي الخطوات كما بالسابق لكن مع كل
Router(config)# no shut
Router#show ipv6 int brief
Router(config)# ipv6 add fec1::1/64
Router(config)#ipv6 route fec1::/64 2001::1
S FEC1::/64 [1/0]
via 2001::1
DYNAMIC ROUTING OSPF (STANDARD PROTCOL)
لكل مدخل وكل جهازIP نظبط اعدادت الراوتر ونعطيه: أوال
Initial Configuration
1. IP + SM + GW (End Devices)
2. no shutdown + IP + SM for Each interface of Router
Multilayer Switch Initial Configuration
1. IP + SM + GW (End Devices)
2. no switchport + IP + SM for Each interface of Router
3. ip routing in config to enable ip route command
Info Mode Command wild card mask
R0(config)# router ospf 10 Advertisements االعالن عن مداخل كل راوتر
255.255.255.0
R0(config-router)# network 10.10.10.0 0.0.0.255 area 0 -
Create R0(config-router)# network 192.168.1.0 0.0.0.255 area 0 255.255.255.0
=
R1(config)# router ospf 10 0.0.0.255
R1(config-router)# network 10.10.10.0 0.0.0.255 area 0
R1(config-router)# network 172.16.1.0 0.0.0.255 area 0
Another Way Router(config)# int fa0/0 باق المنافذ
عل يونفس الطريقة ي
Create Router(config-if)# ip ospf 10 area 0
prevent the Router(config)# router ospf 10
OSPF process Router(config-router)# passive-interface fa0/0 عل منفذ معي يOSPF تعطيل
Router(config-router)# passive-interface default عل كل المنافذ
يOSPF تعطيل
OSPF Priority Router(config)# int fa0/0
Router(config-if)# ip ospf priority 255
Clear OSPF Router(config)# clear ip ospf process
Show Router# show ip ospf neighbor
Dead interval is the period that the router waits to receive a Hello packet before
declaring neighbor down (OSPF removes that neighbor fromlink-state database (LSDB))
Cisco uses a default of 4 times the Hello interval
Propagate a Default Static Route in OSPFv2 نش مسار ثابت لجعل كل الرواتر تتبع راوتر معي نحو االنتنت
ر
DYNAMIC ROUTING EIGRP (CISCO PROTCOL)
Info Mode Command
Router0(config)# route eigrp 10
Router0(config-router)# network 10.10.10.0
Create Router0(config-router)# network 192.168.1.0
Router1(config)# route eigrp 10
Router1(config-router)# network 10.10.10.0
Router1(config-router)# network 192.168.2.0
DHCP SERVER
Info Mode Command
Name pool Router(config)# ip dhcp pool Dynm_IP
IP Network Router(dhcp-config)# network 192.168.2.0 255.255.255.0
IP Router Router(dhcp-config)# default-router 192.168.2.1
Dns Router(dhcp-config)# dns-server 8.8.8.8
Exclude IP Router(config)# ip dhcp excluded-address 192.168.2.1
Show Router# show ip dhcp binding
DHCP Relay Router0(config)# int fa0/0
Router0(config-if)# ip helper-address 10.10.10.1
DHCP Relay
STATIC NAT
Info Mode Command
Edge_Router(config)# ip nat inside source static 10.10.10.10 9.9.9.3
Edge_Router(config)# ip nat inside source static 10.10.10.11 9.9.9.4
Edge_Router(config)# ip nat inside source static 10.10.10.12 9.9.9.5
PAT
Info Mode Command
Edge_Router(config)# access-list 1 permit 10.10.10.0 0.0.0.63
Edge_Router(config)# ip nat inside source list 1 interface fastEthernet 0/1 overload
𝑺𝒉𝒖𝒕𝒅𝒐𝒘𝒏 (𝑫𝒆𝒇𝒂𝒖𝒍𝒕)
𝑽𝒊𝒐𝒍𝒂𝒕𝒊𝒐𝒏 → 𝑷𝒓𝒐𝒕𝒆𝒄𝒕 (𝑺𝒊𝒍𝒆𝒏𝒕𝒍𝒚)
𝑺𝒕𝒓𝒊𝒄𝒕 (𝑳𝒐𝒈 𝒊𝒕)
DHCP SNOOPING
Info Mode Command
Switch1(config)# ip dhcp snooping
Create on Switch1(config)# ip dhcp snooping vlan 1
Switch Switch1(config)# int range fa0/1-4
Switch1(config-if-range)# ip dhcp snooping limit rate 6 rate limit is set to six packets per second
Switch1(config)# int fa0/5
Switch1(config-if)# ip dhcp snooping trust
Create on Main-Router(config)# ip dhcp relay information trust-all
Router
DHCP SERVER AND RELAY FOR VLANS (ADVANCED)
1. Create DHCP pool for each vlan
ip dhcp excluded-address 192.168.1.1
ip dhcp excluded-address 192.168.1.65
ip dhcp excluded-address 192.168.1.129
ip dhcp excluded-address 192.168.1.161
interface FastEthernet0/0.20
encapsulation dot1Q 20
ip address 192.168.1.65 255.255.255.192
ip helper-address 192.168.2.1
interface FastEthernet0/0.40
encapsulation dot1Q 40
ip address 192.168.1.161 255.255.255.240
ip helper-address 192.168.2.1