Cisco / Packet Tracer vizsga parancsok
0. Alap parancsok
enable
configure terminal
hostname R1
no ip domain-lookup
service password-encryption
security passwords min-length 10
enable secret Admin12345
banner motd #Jogosulatlan hozzaferes tilos!#
line console 0
password Console12345
login
logging synchronous
exit
line vty 0 4
password Vty12345
login
exit
end
copy running-config startup-config
Ellenőrzés:
show running-config
show startup-config
show version
show ip interface brief
show interfaces
show ip route
show arp
show flash
show users
show history
Konfig törlés / újrakezdés:
erase startup-config
reload
! switchen VLAN adatbázis törlése:
delete flash:vlan.dat
reload
1. VLAN + access port + trunk
enable
conf t
vlan 103
name iroda103
exit
interface FastEthernet0/1
switchport mode access
switchport access vlan 103
exit
interface FastEthernet0/24
switchport mode trunk
! régebbi switchen, ha kéri:
! switchport trunk encapsulation dot1q
exit
end
show vlan brief
show interfaces trunk
copy run start
Több port egyszerre:
conf t
interface range FastEthernet0/3 - 8
switchport mode access
switchport access vlan 30
exit
2. Router-on-a-stick / Inter-VLAN routing
Switch oldalon trunk kell a router felé:
conf t
interface FastEthernet0/24
switchport mode trunk
exit
Router oldalon:
conf t
interface GigabitEthernet0/0
no ip address
no shutdown
exit
interface GigabitEthernet0/0.103
encapsulation dot1Q 103
ip address 10.0.103.1 255.255.255.0
no shutdown
exit
end
show ip interface brief
show ip route
Ha natív VLAN kell:
interface GigabitEthernet0/0.99
encapsulation dot1Q 99 native
ip address 10.0.99.1 255.255.255.0
3. Switch menedzsment IP + default gateway
conf t
interface vlan 1
ip address 192.168.1.20 255.255.255.0
no shutdown
exit
ip default-gateway 192.168.1.1
end
4. EtherChannel / Port-channel PAgP desirable
Fontos: a fizikai portokon azonos beállítás legyen.
conf t
interface range FastEthernet0/1 - 2
switchport mode trunk
channel-group 1 mode desirable
exit
interface Port-channel1
switchport mode trunk
exit
end
show etherchannel summary
show interfaces trunk
5. Statikus route + default route
Next-hop IP-vel:
conf t
ip route 192.168.16.0 255.255.255.0 192.168.15.1
ip route 0.0.0.0 0.0.0.0 209.165.200.226
end
show ip route
Kimenő interfésszel:
conf t
ip route 0.0.0.0 0.0.0.0 Serial0/0/1
end
Lebegő statikus útvonal admin distance értékkel:
ip route 192.168.4.0 255.255.255.0 192.168.9.1 200
6. OSPF + default route hirdetése
conf t
router ospf 10
network 10.0.103.0 0.0.0.255 area 0
passive-interface GigabitEthernet0/0.103
default-information originate
exit
end
show ip ospf neighbor
show ip protocols
show ip route
Ha default-information originate kell, legyen default route is:
ip route 0.0.0.0 0.0.0.0 Serial0/0/1
router ospf 10
default-information originate
OSPF költség / bandwidth:
interface Serial0/0/0
bandwidth 256
ip ospf cost 100
OSPF MD5 hitelesítés:
router ospf 1
area 0 authentication message-digest
exit
interface Serial0/0/0
ip ospf message-digest-key 10 md5 secretpassword
7. PPP + CHAP
A CHAP-nél a username a másik router hostname-je legyen.
R1 oldalon, ha a szomszéd neve R2:
conf t
hostname R1
username R2 password vizsga123
interface Serial0/0/0
encapsulation ppp
ppp authentication chap
no shutdown
exit
end
show interfaces serial 0/0/0
R2 oldalon:
conf t
hostname R2
username R1 password vizsga123
interface Serial0/0/0
encapsulation ppp
ppp authentication chap
no shutdown
exit
DCE oldalon órajel:
interface Serial0/0/0
clock rate 64000
Ellenőrzés / hibakeresés:
show interfaces serial 0/0/0
show controllers serial 0/0/0
debug ppp authentication
undebug all
8. Port Security
Legfeljebb 2 MAC, sticky, ne kapcsoljon le a port megsértéskor: restrict.
conf t
interface FastEthernet0/1
switchport mode access
switchport port-security
switchport port-security maximum 2
switchport port-security mac-address sticky
switchport port-security violation restrict
exit
end
show port-security interface FastEthernet0/1
show port-security address
copy run start
Sticky MAC törlés:
clear port-security sticky interface FastEthernet0/1 access
Err-disable visszahozás:
conf t
interface FastEthernet0/1
shutdown
no shutdown
9. NAT overload / PAT
Belső hálózat: 10.0.0.0/8, külső interfész: Serial0/0/1.
conf t
access-list 1 permit 10.0.0.0 0.255.255.255
interface Serial0/0/0
ip nat inside
exit
interface GigabitEthernet0/0
ip nat inside
exit
interface Serial0/0/1
ip nat outside
exit
ip nat inside source list 1 interface Serial0/0/1 overload
end
show ip nat translations
show ip nat statistics
Statikus NAT:
ip nat inside source static 10.10.10.2 209.165.200.225
Dinamikus NAT poollal:
ip nat pool public_access 209.165.200.242 209.165.200.253 netmask 255.255.255.224
access-list 1 permit 10.10.10.0 0.0.0.255
ip nat inside source list 1 pool public_access overload
10. SSH Cisco routeren
conf t
hostname R1
ip domain-name jedlik.eu
username rtradmin privilege 15 secret adminpswd
crypto key generate rsa
! válasz: 1024
ip ssh version 2
line vty 0 4
login local
transport input ssh
exit
end
show ip ssh
show ssh
copy run start
Ha Telnet + SSH is kell:
line vty 0 4
login local
transport input telnet ssh
11. IPv6 + dual stack
Routeren:
conf t
ipv6 unicast-routing
interface GigabitEthernet0/0
ip address 192.168.10.1 255.255.255.0
ipv6 address 2001:DB8:10::1/64
ipv6 address FE80::1 link-local
no shutdown
exit
end
show ipv6 interface brief
show ipv6 route
Switch SVI-n:
conf t
ipv6 unicast-routing
interface Vlan1
ipv6 address 2001:DB8:13C::1/64
ipv6 address FE80::1 link-local
no shutdown
exit
IPv4 fallback példa: 192.168.99.0/24 második 32-es hálózata.
- /27 maszk: 255.255.255.224
-
- hálózat: 192.168.99.0–31
-
- hálózat: 192.168.99.32–63
- első használható: 192.168.99.33
- utolsó használható: 192.168.99.62
interface Vlan99
ip address 192.168.99.62 255.255.255.224
no shutdown
exit
ip default-gateway 192.168.99.33
12. ACL alapok
Normál ACL:
access-list 1 permit host 172.16.2.88
access-list 1 permit 192.168.1.0 0.0.0.255
interface FastEthernet0/0
ip access-group 1 in
Kiterjesztett ACL:
access-list 101 permit ip host 192.168.1.10 host 192.168.5.10
access-list 101 deny ip 192.168.1.0 0.0.0.255 host 192.168.5.10
access-list 101 permit ip any any
interface FastEthernet0/0
ip access-group 101 in
HTTP engedélyezése adott szerverre:
access-list 122 permit tcp 192.168.1.0 0.0.0.255 host 192.168.2.89 eq 80
VTY vonalakra ACL: access-class, nem ip access-group.
access-list 5 permit 192.168.1.0 0.0.0.255
line vty 0 4
access-class 5 in
Ellenőrzés:
show access-lists
clear access-list counters
13. DHCP Cisco routeren
conf t
ip dhcp excluded-address 172.16.1.100 172.16.1.103
ip dhcp pool LAN-cimek
network 172.16.0.0 255.255.0.0
default-router 172.16.1.1
dns-server 172.16.1.103 172.16.2.103
lease 7
exit
end
show ip dhcp binding
show ip dhcp conflict
Más VLAN DHCP szerverhez továbbítása:
interface GigabitEthernet0/0.103
ip helper-address 10.0.254.254
14. STP / VTP gyors parancsok
STP root/prioritás:
spanning-tree vlan 1 priority 4096
show spanning-tree
show spanning-tree summary
show spanning-tree root
show spanning-tree blockedports
VTP:
vtp domain Csoport1
vtp mode server
vtp password jelszo
show vtp status
show vtp password
15. RIP / EIGRP / BGP röviden
RIPv2:
router rip
version 2
no auto-summary
network 10.0.0.0
default-information originate
passive-interface GigabitEthernet0/0
show ip protocols
show ip route
debug ip rip
undebug all
EIGRP:
router eigrp 100
network 10.0.0.0
no auto-summary
EIGRP MD5:
key chain discchain
key 1
key-string san-fran
exit
interface Serial0/0/0
ip authentication mode eigrp 100 md5
ip authentication key-chain eigrp 100 discchain
BGP alap:
router bgp 65001
neighbor 10.0.0.2 remote-as 65002
network 192.168.1.0 mask 255.255.255.0
show ip bgp