Anahtara isim (hostname) vermek
1 2 |
Switch(config)# hostname Admin-SW Admin-SW(config)# |
Anahtar SVI (Switch Virtual Interface) arayüzünü yapılandırmak
1 2 3 |
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
1 |
Switch(config)# ip default-gateway 192.168.0.1 |
Yapılandırmaları kalıcı hale getirmek için NVRAM’e kayıt etmek
1 |
Switch# copy running-config startup-config |
Belirlenen aralıktaki (Gi 0/1 den 10’a kadar) anahtar arayüzleri altına girmek
1 2 |
switch(config)# interface range g0/ 1 - 10 switch(config-if-range)# |
Anahtar arayüzlerini yapılandırmak
1 2 3 |
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)
1 2 3 |
Switch# show running-configuration Switch# show startup-config Switch# show interface g0/1 |
Yönlendiriciye isim vermek
1 2 3 4 |
Router> enable Router# configure terminal Router(config)# hostname AYD AYT(config)# |
Yönlendirici ethernet (LAN) arayüzünü yapılandırmak
1 2 3 4 5 |
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]
1 |
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]
1 |
RouterB(config)# ip route 0.0.0.0 0.0.0.0 172.16.0.2 |
Yapılandırma doğrulama komutları (show)
1 |
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.
1 2 |
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.
1 2 3 4 5 |
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
1 2 3 4 |
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)
1 2 3 |
RouterA# show ip interface RouterA# show running-config RouterA# show access-list |
Statik NAT Yapılandırmak
1 2 3 4 5 6 |
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
1 2 3 4 5 6 7 8 9 10 11 12 |
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
1 2 3 4 5 6 7 8 9 10 |
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)
1 2 |
RouterA# show ip nat translations RouterA# show ip nat statistics |
Cihaz Erişimini Güvenli Hale Getirmek
1 2 |
Router(config)# enable password cisco Router(config)# enable secret cisco123 |
enable secret parolası MD5 ile şifrelenir.
1 2 3 4 5 6 7 |
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
1 |
Router(config)# service password-encryption |
SSH Yapılandırmak
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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
1 2 3 |
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
1 2 3 4 5 |
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
1 2 3 4 5 6 |
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)
1 |
SWA# show port-security |
VLAN Oluşturmak
1 2 3 4 |
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
1 2 3 4 |
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)
1 2 3 |
SW1# show vlan id vlan ID SW1# show vlan brief SW1# show vlan |
Trunk Yapılandırmak
1 2 3 4 5 |
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)
1 2 |
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
1 2 3 4 5 6 7 8 |
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
1 2 3 4 5 6 7 8 |
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
1 2 |
Router(config)# int f0/0 Router(config-if)# ip helper-address 192.168.11.200 |
Yapılandırma doğrulama komutları (show)
1 2 3 |
Router# show ip dhcp pool Router# show ip dhcp binding Router# show ip dhcp conflict |
Tek Alanda OSPF Yapılandırmak
1 2 |
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
1 2 3 |
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)
1 2 3 |
RouterA# show ip protocols RouterA# show ip route RouterA# show ip ospf interface |
IPv6 Yönlendirmeyi Etkinleştimek ve IPv6 Adres Atamak
1 2 3 |
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
1 2 |
Router(config)# interface g 0/0 Router(config-if)# ipv6 address autoconfig |
IPv6 Statik Yönlendirme Yapılandırmak
1 |
Router(config)# ipv6 route 2001:DB8:A01::/48 g0/0 |
IPv6Varsayılan Rota Yapılandırmak
1 |
Router(config)# ipv6 route ::/0 g0/0 |
Yapılandırma doğrulama komutları (show)
1 |
Router# show ipv6 route |
OSPFv3 Yapılandırmak
1 2 3 4 5 6 |
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)
1 2 3 |
Router# show ipv6 route ospf Router# show ipv6 ospf neighbor Router# show ipv6 ospf |
STP Yapılandırmak
1 |
SW1(config)# spanning-tree vlan 1 root primary |
STP Portfast Yapılandırmak
1 |
SwitchA(config-if)# spanning-tree portfast |
STP BPDUGuard Yapılandırmak
1 |
SwitchA(config)# spanning-tree portfast bpduguard default |
Yapılandırma doğrulama komutları (show)
1 |
SwitchA# show spanning-tree |
EtherChannel Yapılandırmak
1 2 3 4 |
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)
1 2 |
SwitchA# show etherchannel summary SwitchA# show etherchannel port-channel |
HSRP Yapılandırmak
1 2 3 |
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)
1 |
R1# show standby |
EIGRP Yapılandırmak
1 2 3 |
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)
1 2 3 4 |
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
1 2 3 4 5 6 7 |
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)
1 2 3 |
Router# show ipv6 eigrp topology Router# show ipv6 eigrp neighbors Router# show ipv6 route eigrp |
Yönlendiricide Seri Arayüzü (WAN) Yapılandırmak
1 2 3 4 5 6 |
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
1 2 3 4 |
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)
1 |
RouterB# show int s0 |
GRE Tünel Yapılandırmak
1 2 3 4 5 6 7 8 9 10 |
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)
1 |
R1# show ip interface tunnel |
SNMP Yapılandırmak
1 2 3 |
RouterA(config)# snmp-server community tanergunal RW RouterA(config)# snmp-server location ankara RouterA(config)# snmp-server contact Taner Gunal |
Syslog Yapılandırmak
1 2 |
RouterA(config)# logging 192.168.1.150 RouterA(config)# logging trap warning |
NTP Yapılandırmak
1 2 |
R1(config)# ntp master 1 R2(config)# ntp server 10.0.0.1 |
Yapılandırma doğrulama komutları (show)
1 2 |
R2# show ntp associations R2# show ntp status |
NOT: Cemal TANER tarafından hazırlanmıştır.