Anahtara isim (hostname) vermek
Switch(config)# hostname Admin-SW Admin-SW(config)#
Anahtar SVI (Switch Virtual Interface) arayüzünü yapılandırmak
Admin-Sw(config)# interface vlan1 Admin-Sw(config-if)# ip address 192.168.0.10 255.255.255.0 Admin-Sw(config-if)# no shutdown
Anahtara uzaktan erişebilmesi için varsayılan ağ geçidi atamak
Switch(config)# ip default-gateway 192.168.0.1
Yapılandırmaları kalıcı hale getirmek için NVRAM’e kayıt etmek
Switch# copy running-config startup-config
Belirlenen aralıktaki (Gi 0/1 den 10’a kadar) anahtar arayüzleri altına girmek
switch(config)# interface range g0/ 1 - 10 switch(config-if-range)#
Anahtar arayüzlerini yapılandırmak
Switch(config)# interface g0/1 Switch(config-if)# duplex {auto | full | half} Switch(config-if)# speed {10 | 100 | 1000 | auto}
Yapılandırma doğrulama komutları (show)
Switch# show running-configuration Switch# show startup-config Switch# show interface g0/1
Yönlendiriciye isim vermek
Router> enable Router# configure terminal Router(config)# hostname AYD AYT(config)#
Yönlendirici ethernet (LAN) arayüzünü yapılandırmak
Router# configure terminal Router(config)# interface g0/0 Router(config-if)#ip address 192.168.1.1 255.255.255.0 Router(config-if)#no shutdown Router(config-if)#description Internet Link
Statik Yönlendirme Yapılandırmak
ip route destination-network mask {next-hop-address | outboundinterface} [distance]
[permanent]
RouterB(config)# ip route 172.17.0.0 255.255.0.0 172.16.0.1
Varsayılan Rota Yapılandırmak
ip route 0.0.0.0 0.0.0.0 [ip-address-of-the-next-hop-router |
outbound-interface]
RouterB(config)# ip route 0.0.0.0 0.0.0.0 172.16.0.2
Yapılandırma doğrulama komutları (show)
RouterA# show ip route
Standart ACL Yapılandırmak
access-list access-list-number {permit | deny} source-address
[wildcard-mask]
access-list-number Standart ACL için 1 ile 99 arasındadır.
RouterA(config)# access-list 10 deny 192.168.0.0 0.0.255.255 RouterA(config)# access-list 10 permit any
Gelişmiş ACL Yapılandırmak
access-list access-list-number {permit | deny} protocol sourceaddress source-wildcard [operator port] destination-address destination-wildcard
[operator port]
access-list-number Gelişmiş ACL için 100 ile 199 arasındadır.
RouterA(config)# access-list 101 deny tcp 172.16.4.0 0.0.0.255 172.16.3.0 0.0.0.255 eq 21 RouterA(config)# access-list 101 permit ip any any RouterA(config)# interface g 0/0 RouterA(config-if)# access group 101 in
İsimli (Named) ACL Yapılandırmak
RouterA(config)# ip access-list extended block-ping RouterA(config-ext-nacl)# deny icmp 172.160.0.0 0.0.3.255 host 192.168.0.101 echo RouterA(config-ext-nacl)# permit ip any any
Yapılandırma doğrulama komutları (show)
RouterA# show ip interface RouterA# show running-config RouterA# show access-list
Statik NAT Yapılandırmak
RouterB(config)# ip nat inside source static 192.168.10.5 216.1.1.3 RouterB(config)# int g0 RouterB(config-if)# ip nat outside RouterB(config-if)# int g1 RouterB(config-if)# ip nat inside
Dinamik NAT Yapılandırmak
RouterB(config)# ip nat pool cisco 216.1.1.1 216.1.1.14 netmask 255.255.255.240 (creates a NAT pool called cisco) RouterB(config)# access-list 10 permit 192.168.10.0 0.0.0.15 (defines the IP addresses that will be translated) RouterB(config)# ip nat inside source list 10 pool cisco (establishes dynamic translation of access list 10 with the NAT pool named cisco) RouterB(config)# int g0 RouterB(config-if)# ip nat outside RouterB(config-if)# int g1 RouterB(config-if)# ip nat inside
PAT Yapılandırmak
RouterA(config)# access-list 99 permit 10.0.0.1 RouterA(config)# ip nat inside source list 99 interface g0/1 overload RouterA(config)# interface g0/0 RouterA(config-if)# ip nat inside RouterA(config-if)# exit RouterA(config)# interface g0/1 RouterA(config-if)# ip nat outside RouterA(config-if)# exit RouterA(config)# exit
Yapılandırma doğrulama komutları (show)
RouterA# show ip nat translations RouterA# show ip nat statistics
Cihaz Erişimini Güvenli Hale Getirmek
Router(config)# enable password cisco Router(config)# enable secret cisco123
enable secret parolası MD5 ile şifrelenir.
Router(config)# line console 0 Router(config-line)# login Router(config-line)# password cisco345 Router(config-line)# exec-timeout 15 Router(config-line)# line vty 0 4 Router(config-line)# login Router(config-line)# password cisco567
exec-timeout komutu ile 15 dakika işlem yapılmaması halinde iletişim kesilir.
Tüm parolaları Type 7 ile Şifrelemek
Router(config)# service password-encryption
SSH Yapılandırmak
RouterA(config)# username AYD password tanergunal RouterA(config)# ip domain-name cisco.com RouterA(config)# crypto key generate rsa The name for the keys will be: RouterA.cisco.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 take a few minutes. How many bits in the modulus [1024]: % Generating 1024 bit RSA keys ...[OK] RouterA(config)# ip ssh ver 2 RouterA(config)# line vty 0 15 RouterA(config-line)# login local RouterA(config-line)# transport input ssh
VTY Erişimini Güvenli Hale Getirmek
Router(config)# access list 10 permit ip 192.168.10.0 0.0.0.255 Router(config)# line vty 0 15 Router(config-line)# access-class 10 in
Banner MOTD Mesajı Yapılandırmak
Router(config)# banner motd # Enter TEXT message. End with the character '#'. Warning only authorized users many access this switch. # Router(config)#
Anahtar Bağlantı Noktası (switchport security) Yapılandırmak
SWA(config)# int f0/1 SWA(config-if)# switchport mode access SWA(config-if)# switchport port-security SWA(config-if)# switchport port-security max 1 SWA(config-if)# switchport port-security mac-address sticky SWA(config-if)# switchport port-sec violation shutdown
Yapılandırma doğrulama komutları (show)
SWA# show port-security
VLAN Oluşturmak
SW1(Cat2960(config)# vlan 10 SW1(config-vlan)# name Admin SW1(config-vlan)# vlan 20 SW1(config-vlan)# name Sales
Arayüzleri VLAN’e atamak
SW1(config)# int f0/1 SW1(config-if)# switchport access vlan 10 SW1(config-if)# int f0/2 SW1(config-if)# switchport access vlan 20
Yapılandırma doğrulama komutları (show)
SW1# show vlan id vlan ID SW1# show vlan brief SW1# show vlan
Trunk Yapılandırmak
SW1(config)# interface g0/1 SW1(config-if)# switchport mode trunk SW1(config-if)# interface g0/2 SW1(config-if)# switchport mode dynamic desirable SW1(config-if)# switchport trunk allowed vlan 10-50
allowed komutu ile bu trunktan geçmesine izin verilen VLAN’ler belirlenir.
Yapılandırma doğrulama komutları (show)
SW1# show interface trunk SW1# show interfaces interface-id trunk
Çubuk Yönlendirici İle (Router on a Stick) VLAN’ler Arası Yönlendirme Yapılandırmak
RouterB(config)# int f0/0 RouterB(config-if)# ip address 192.168.1.1 255.255.255.0 RouterB(config-if)# int f0/0.10 RouterB(config-if)# ip address 192.168.10.1 255.255.255.0 RouterB(config-if)# encapsulation dot1q 10 RouterB(config-if)# int f0/0.20 RouterB(config-if)# ip address 192.168.20.1 255.255.255.0 RouterB(config-if)# encapsulation dot1q 20
Yönlendiricide DHCP Yapılandırmak
Router(config)# ip dhcp pool tanergunal Router(dhcp-config)# network 192.168.1.0 /24 Router(dhcp-config)# default-router 192.168.1.1 Router(dhcp-config)# dns-server 192.168.1.10 Router(dhcp-config)# domain-name AYD.com Router(dhcp-config)# lease 30 0 Router(dhcp-config)# exit Router(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.50
DHCP Relay Agent Yapılandırmak
Router(config)# int f0/0 Router(config-if)# ip helper-address 192.168.11.200
Yapılandırma doğrulama komutları (show)
Router# show ip dhcp pool Router# show ip dhcp binding Router# show ip dhcp conflict
Tek Alanda OSPF Yapılandırmak
RouterA(config)# router ospf 10 RouterA(config-router)# network 192.168.10.0 0.0.0.255 area 0
Çoklu Alanda OSPF Yapılandırmak
RouterA(config)# router ospf 1 RouterA(config-router)# network 172.16.0.0 0.0.255.255 area 0 RouterA(config-router)# network 192.168.1.0 0.0.0.255 area 1
Yapılandırma doğrulama komutları (show)
RouterA# show ip protocols RouterA# show ip route RouterA# show ip ospf interface
IPv6 Yönlendirmeyi Etkinleştimek ve IPv6 Adres Atamak
RouterA(config)# ipv6 unicast-routing RouterA(config)# interface g 0/0 RouterA(config-if)# ipv6 address 2001:0d02::2:0100/64
Arayüze otomatik IPv6 Adres Atamak
Router(config)# interface g 0/0 Router(config-if)# ipv6 address autoconfig
IPv6 Statik Yönlendirme Yapılandırmak
Router(config)# ipv6 route 2001:DB8:A01::/48 g0/0
IPv6Varsayılan Rota Yapılandırmak
Router(config)# ipv6 route ::/0 g0/0
Yapılandırma doğrulama komutları (show)
Router# show ipv6 route
OSPFv3 Yapılandırmak
Router(config)# ipv6 router ospf 10 Router(config-rtr)# router-id 1.1.1.1 Router(config-rtf)# interface g0/0 Router(config-if)# ipv6 ospf 1 area 0 Router(config-if)# interface g0/1 Router(config-if)# ipv6 ospf 1 area 0
Yapılandırma doğrulama komutları (show)
Router# show ipv6 route ospf Router# show ipv6 ospf neighbor Router# show ipv6 ospf
STP Yapılandırmak
SW1(config)# spanning-tree vlan 1 root primary
STP Portfast Yapılandırmak
SwitchA(config-if)# spanning-tree portfast
STP BPDUGuard Yapılandırmak
SwitchA(config)# spanning-tree portfast bpduguard default
Yapılandırma doğrulama komutları (show)
SwitchA# show spanning-tree
EtherChannel Yapılandırmak
Switch(config)# interface port-channel 1 Switch(config-if)# switchport mode trunk Switch(config-if)# interface range g 1/1-2 Switch(config-if-range)# channel-group 1 mode active
Yapılandırma doğrulama komutları (show)
SwitchA# show etherchannel summary SwitchA# show etherchannel port-channel
HSRP Yapılandırmak
R1(config-if)# standby 1 priority 150 (default priority is 100) R1(config-if)# standby 1 preempt R1(config-if)# standby 1 ip 192.168.1.254
Yapılandırma doğrulama komutları (show)
R1# show standby
EIGRP Yapılandırmak
RouterA(config)# router eigrp 100 RouterA(config-router)# network 192.168.3.0 RouterA(config-router)# network 192.168.4.0
Yapılandırma doğrulama komutları (show)
Router# show ip eigrp neighbors Router# show ip route eigrp Router# show ip eigrp protocols Router# show ip eigrp topology
IPv6 için EIGRP Yapılandırmak
RouterA(config)# ipv6 unicast-routing RouterA(config)# ipv6 router eigrp 10 RouterA(config-rtr)# no shutdown RouterA(config-rtr)# interface g0/0 RouterA(config-if)# ipv6 eigrp 10 RouterA(config-rtr)# interface g0/1 RouterA(config-if)# ipv6 eigrp 10
Yapılandırma doğrulama komutları (show)
Router# show ipv6 eigrp topology Router# show ipv6 eigrp neighbors Router# show ipv6 route eigrp
Yönlendiricide Seri Arayüzü (WAN) Yapılandırmak
RouterA(config)# interface s 0/0 RouterA(config-if)# bandwidth 128 RouterA(config-if)# clock rate 128000 RouterA(config-if)# no shutdown Router(config-if)# encapsulation hdlc Router(config-if)# encapsulation ppp
CHAP Yapılandırmak
Router(config)# hostname RouterB RouterB(config)# username RouterA password cisco RouterB(config)# int s0 RouterB(config-if)# ppp authentication chap
Yapılandırma doğrulama komutları (show)
RouterB# show int s0
GRE Tünel Yapılandırmak
R1(config)# interface Tunnel0 R1(config-if)# ip address 192.168.255.1 255.255.255.0 R1(config-if)# tunnel mode gre ip R1(config-if)# tunnel source 192.168.1.1 R1(config-if)# tunnel destination 192.168.1.2 R2(config)# interface Tunnel0 R2(config-if)# ip address 192.168.255.2 255.255.255.0 R2(config-if)# tunnel mode gre ip R2(config-if)# tunnel source 192.168.1.2 R2config-if)# tunnel destination 192.168.1.1
Yapılandırma doğrulama komutları (show)
R1# show ip interface tunnel
SNMP Yapılandırmak
RouterA(config)# snmp-server community tanergunal RW RouterA(config)# snmp-server location ankara RouterA(config)# snmp-server contact Taner Gunal
Syslog Yapılandırmak
RouterA(config)# logging 192.168.1.150 RouterA(config)# logging trap warning
NTP Yapılandırmak
R1(config)# ntp master 1 R2(config)# ntp server 10.0.0.1
Yapılandırma doğrulama komutları (show)
R2# show ntp associations R2# show ntp status
NOT: Cemal TANER tarafından hazırlanmıştır.