Showing posts with label cisco. Show all posts
Showing posts with label cisco. Show all posts

Monday, March 7, 2016

Cisco IOS Commands Cheat Sheet Part#5


Zona Networking - Melanjutkan dari postingan Cisco IOS Commands Cheat Sheet Part#4 kali ini saya share yang terakhir yaitu Part#5.. 
sikat gan...
Read more

Cisco IOS Commands Cheat Sheet Part#4


Zona Networking - Melanjutkan dari postingan Cisco IOS Commands Cheat Sheet Part#3 kali ini saya share yang Part#4.. 
menuju tkp...

Access Control Lists:
Standard ACL: 1 – 99 and 1300 – 1999
•    Use a remark to describe the ACL (Optional):
R1(config)# access-list 1 remark ACL TO DENY ACCESS FROM SALES VLAN
•    Create the ACL, keeping the following in mind:
     •    ACL uses first-match logic.
     •    There is an implicit deny anyat the end of the ACL.
R1(config)# access-list 2 deny 192.168.1.77
R1(config)# access-list 2 deny 192.168.1.64 0.0.0.31
R1(config)# access-list 2 permit 10.1.0.0 0.0.255.255
R1(config)# access-list 2 deny 10.0.0.0 0.255.255.255
R1(config)# access-list 2 permit any

•    Enable the ACL on the chosen router interface in the correct direction (in or out):
R1(config-if)# ip access-group 2 out
•    Using standard ACL to limit telnet and SSH access to a router:
Create the ACL that defines the permitted telnet clients:
R1(config)# access-list 99 remark ALLOWED TELNET CLIENTS
R1(config)# access-list 99 permit 192.168.1.128 0.0.0.15

Apply the ACL inbound the vty lines
R1(config)# line vty 0 4
R1(config-line)# access-class 99 in

Extended ACL: 100 – 199 and 2000 – 2699
•    Extended ACL should be placed as close as possible to the source of the packet.
•   Extended ACL matches packets based on source & des.IP addresses, protocol, source & des. Port numbers andother criteria as well
R1(config)# access-list 101 remark MY_ACCESS_LIST
R1(config)# access-list 101 deny iphost 10.1.1.1 host 10.2.2.2
R1(config)# access-list 101 deny tcp 10.1.1.0 0.0.0.255 any eq 23
R1(config)# access-list 101 deny icmp 10.1.1.1 0.0.0.0 any
R1(config)# access-list 101 deny tcphost 10.1.1.0 host 10.0.0.1 eq 80
R1(config)# access-list 101 deny udphost 10.1.1.7 eq 53 any
R1(config)# access-list 101 permit ip any any
R1(config)# interface fastEthernet 0/0
R1(config-if)# ip access-group 101 in


Read more

Cisco IOS Commands Cheat Sheet Part#3


Zona Networking - Melanjutkan dari postingan Cisco IOS Commands Cheat Sheet Part#2 kali ini saya share yang Part#3.. 
Capcuss..

Router basic configuration:
This section includes IOS commands that are absolutely identical on both routers and switches, except the part of line aux 0 which is configured only on router because switches do not have an auxiliary port.
Router(config)# hostname R1
R1(config)# enable secret cisco
R1(config)# line con 0
R1(config-line)# password cisco
R1(config-line)# login
R1(config-line)# logging synchronous
R1(config-line)# exec-timeout 30 0
R1(config-line)# exit
R1(config)# line vty 0 4
R1(config-line)# password cisco
R1(config-line)# login
R1(config-line)# logging synchronous
R1(config-line)# exec-timeout 30 0
R1(config-line)# exit
R1(config)# line aux 0
R1(config-line)# password cisco
R1(config-line)# login
R1(config-line)# logging synchronous
R1(config-line)# exec-timeout 30 0
R1(config-line)# exit
R1(config)# banner motd $
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
UNAUTHORIZED ACCESS IS PROHIBITED
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
$
R1(config)# alias exec c configure terminal
R1(config)# alias exec s show ip interface brief
R1(config)# alias exec sr show running-config
R1(config)# no ip domain-lookup
R1(config)# service password-encryption
R1(config)# ip domain-name example.com
R1(config)# username admin password cisco
R1(config)# crypto key generate rsa
How many bits in the modulus [512]: 1024
R1(config)# ip ssh version 2
R1(config)# line vty 0 4
R1(config-line)# login local
R1(config-line)# transport input telnet ssh


Configuring router interfaces:
Clock rate is set only on the DCE side, typically the ISP side. On your router which is DTE you don’t need to set clocking.
R1(config)# interface fastEthernet 0/0
R1(config-if)# description LINK TO LOCAL LAN THROUGH SW1
R1(config-if)# ip address 172.16.1.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# interface serial 0/1/0
R1(config-if)# description WAN CONNECTION TO R2
R1(config-if)# ip address 10.1.1.1 255.255.255.252
R1(config-if)# clock rate 128000
R1(config-if)# no shutdown


Configuring Router-On-Stick for vlan routing:
R1(config)# interface fastEthernet 0/0
R1(config-if)# no shutdown
R1(config)# interface fastEthernet 0/0.10
R1(config-subif)# encapsulation dot1q 10
R1(config-subif)# ip address 192.168.10.1 255.255.255.0
R1(config-subif)# interface fastEthernet 0/0.20
R1(config-subif)# encapsulation dot1q 20
R1(config-subif)# ip address 192.168.20.1 255.255.255.0


Static route:
•    Using next hop:
R1(config)# ip route 10.1.2.0 255.255.255.0 10.1.128.1
•    Using exit interface:
R1(config)# ip route 10.1.2.0 255.255.255.0 Serial 0/0
*Note: Exit interface can be used in point-to-point serial links.

Default Route:
R1(config)# ip route 0.0.0.0 0.0.0.0 199.1.1.1

RIPv2 Configuration:
R1(config)# router rip
R1(config-router)# version 2
R1(config-router)# network 10.0.0.0    ! written as an original class A
R1(config-router)# no auto-summary
R1(config-router)# passive-interface serial 0/0


Read more

Cisco IOS Commands Cheat Sheet Part#2


Zona Networking - Melanjutkan dari postingan Cisco IOS Commands Cheat Sheet Part#1 kali ini saya share yang Part#2.. 
Ok langsung saja...
Configuring port security:
•    Make the switch interface as access port:
SW1(config-if)# switchport mode access
•    Enable port security on the interface:
SW1(config-if)# switchport port-security
•    Specify the maximum number of allowed MAC addresses:
SW1(config-if)# switchport port-security maximum 1
•    Define the action to take when violation occurs:
SW1(config-if)# switchport port-security violation shutdown    ! options: shutdown, protect, restrict
•    Specify the allowed MAC addresses:
The sticky keyword is used to let the interface dynamically learns and configures the MAC addresses of the currently connected hosts.
SW1(config-if)# switchport port-security mac-address 68b5.9965.1195    ! options: H.H.H, sticky

Verify and troubleshoot port security:
•    Shows the entries of the mac address table:
SW1# show mac-address-table
•    Overview of port security of all interfaces:
SW1# show port-security
•    Shows detailed information about port security on the specified interface:
SW1# show port-security interface fa0/5

Configuring VLANs:
•    Create a new VLAN and give it a name:
SW1(config)# vlan 10
SW1(config-vlan)# name SALES
•    Assign an access interface to access a specific VLAN:
SW1(config)# interface fastEthernet 0/5
SW1(config-if)# switchport mode access
SW1(config-if)# switchport access vlan 10

Configuring an auxiliary VLAN for cisco IP phones:
SW1(config)# interface fastEthernet 0/5
! accessing vlan 10 (data) and 12 (VoIP)
SW1(config-if) #switchport access vlan 10
SW1(config-if) #switchport voice vlan 12

Configuring Trunks:
SW1(config)# interface fastEthernet 0/1
SW1(config-if)# switchport mode trunk    ! options: access, trunk, dynamic auto, dynamic desirable
SW1(config-if)# switchport trunk allowed vlan add 10    ! options: add, remove, all, except

Securing VLANs and Trunking:
•    Administratively disable unused interfaces:
SW1(config-if)# shutdown
•    Prevent trunking by disabling auto negotiation on the interface:
SW1(config-if)# nonegotiate    ! or hardcode the port asan access port
SW1(config-if)# switchport mode access
•    Assign the port to an unused VLAN:
SW1(config-if)# switchport access vlan 222

Configuring VTP:
•    Configure VTP mode:
The transparent VTP mode is used when an engineer wants to deactivate VTP on a particular switch
SW1(config)# vtp mode server    ! options: server, client, transparent
•    Configure VTP domain name:
SW1(config)# vtp domain EXAMPLE    ! case-sensitive
•    Configure VTP password (optional):
SW1(config)# vtp password cisco    ! case-sensitive
•    Configure VTP pruning (optional):
SW1(config)# vtp pruning   ! only works on VTP servers
•    Enable VTP version 2 (optional):
SW1(config)# vtp version 2

Read more

Cisco IOS Commands Cheat Sheet Part#1


Zona Networking - Beberapa waktu yang lalu saya iseng - iseng browsing eh nemu beginian :D
Yap ane nemu cheat sheet dari perintah - perintah (commands) IOS cisco. Jika kalian sedang belajar atau mengikuti ujian CCNA pasti perintah - perintah dibawah ini akan sering kalian gunakan baik di router atau di switch. 
Tapi perintah - perintah yang akan saya share menggunakan bahasa Inggris jadi jika kalian kurang paham silakan di translate sendiri hehe :v. Cekidot!
Read more