Разлика между версии на „Сравнение на команди при IOS и ASA“

от БАРЗИКТ Wiki
Направо към: навигация, търсене
 
(31 intermediate revisions by the same user not shown)
Ред 1: Ред 1:
 
[[Category:Cisco]]
 
[[Category:Cisco]]
{|
+
В примерните команди се разглежда Cisco ASA 5505 (курс CCNA Security).
! style="text-align:left;"| IOS
+
 
 +
{| class="wikitable"
 +
! | IOS
 
! ASA
 
! ASA
 +
 
|-
 
|-
|Bread
+
|erase startup-config
|Pie
+
reload
 +
|write erase
 +
reload
 +
 
 
|-
 
|-
|Butter
+
|Ctrl+C
|Ice cream
+
|q
 +
 
 +
|-
 +
|conf t
 +
enable secret ''[парола]''
 +
|conf t
 +
enable password ''[парола]''
 +
 
 +
|-
 +
|conf t
 +
line console 0
 +
password ''[парола]''
 +
 
 +
login
 +
|conf t
 +
passwd password ''[парола]''
 +
 
 +
|-
 +
|show ip interface brief
 +
|show interface ip brief
 +
 
 +
|-
 +
|show running-config
 +
|show running-config
 +
'''или'''
 +
 
 +
write terminal
 +
 
 +
|-
 +
|copy running-config startup-config
 +
|copy running-config startup-config
 +
'''или'''
 +
 
 +
write memory
 +
 
 +
|-
 +
|show ip route
 +
|show route
 +
 
 +
|-
 +
|show ip nat translations
 +
|show xlate
 +
 
 +
|-
 +
|show vlan
 +
|show switch vlan
 +
 
 +
|-
 +
|ip route ''[адрес]'' ''[маска]'' ''[next-hop]''
 +
|route ''[име на интерфейс]'' ''[адрес]'' ''[маска]'' ''[next-hop]''
 +
 
 +
|-
 +
|ip route 0.0.0.0 0.0.0.0 ''[next-hop]''
 +
|route ''[име на интерфейс]'' 0.0.0.0 0.0.0.0 ''[next-hop]''
 +
 
 +
|-
 +
|ip domain-name ''[име на домейн]''
 +
|domain-name ''[име на домейн]''
 +
 
 +
|-
 +
|interface VLAN 1
 +
ip address ''[адрес]'' ''[маска]''
 +
 
 +
no shutdown
 +
 
 +
interface gigabitethernet 0/1
 +
 
 +
switchport mode access
 +
 
 +
switchport access vlan 1
 +
 
 +
|interface vlan 1
 +
nameif ''[име - напр. inside]''
 +
 
 +
secuity-level ''[0-100]''
 +
 
 +
interface ethernet0
 +
 
 +
switchport access vlan 1
 +
 
 +
no shutdown
 +
 
 +
|-
 +
|line vty 0 15
 +
 
 +
password ''[парола]''
 +
 
 +
transport input telnet
 +
 
 +
login
 +
|passwd ''[парола]''
 +
 
 +
telnet ''[IP адрес|мрежа]'' ''[маска]'' ''[име на интерфейс]''
 +
 
 +
|-
 +
|ip domain-name ''[име на домейн]''
 +
 
 +
username ''[потребителско име]'' secret ''[парола]''
 +
 
 +
crypto key generate rsa modulus ''[размер на ключа]''
 +
 
 +
line vty 0 15
 +
 
 +
transport input ssh
 +
 
 +
login local
 +
|domain-name ''[име на домейна]''
 +
 
 +
aaa authentication ssh console LOCAL
 +
 
 +
username ''[потребителско име]'' password ''[парола]''
 +
 
 +
crypto key generate rsa modulus ''[размер на ключа]''
 +
 
 +
ssh ''[IP адрес|мрежа]'' ''[маска]'' ''[име на интерфейс]''
 +
 
 +
|-
 +
|ntp server ''[IP адрес]''
 +
 
 +
ntp authenticate
 +
 
 +
ntp authentication-key ''[номер на ключ]'' md5 ''[ключ]''
 +
 
 +
ntp trusted-key ''[номер на ключ]''
 +
|'''Аналогично'''
 +
 
 +
|-
 +
|ip dhcp pool ''[име]''
 +
 
 +
network ''[мрежови адрес]'' ''[префикс|маска]''
 +
 
 +
default-gateway ''[IP адрес]''
 +
 
 +
dns-server ''[IP адрес]''
 +
|dhcpd address ''[начален IP адрес]''-''[краен IP адрес]'' ''[име на интерфейс]''
 +
 
 +
dhcpd enable ''[име на интерфейс]''
 +
 
 +
dhcpd dns-server ''[IP адрес]''
 +
 
 +
dhcpd auto_config outside
 +
 
 +
|-
 +
|show ip dhcp binding
 +
|show dhcpd binding
 +
 
 +
|-
 +
|clear ip dhcp binding
 +
|clear dhcpd
 +
 
 +
|-
 +
|ip http server
 +
|http server enable
 +
http ''[IP адрес|мрежа]'' ''[маска]'' ''[име на интерфейс]''
 +
 
 +
|-
 +
|no ip http server
 +
|clear configure http
 +
 
 +
|-
 +
|ip access-list extended ACL-IN
 +
 
 +
deny tcp 10.0.0.0 '''0.255.255.255'''
 +
 
 +
permit ip any any
 +
 
 +
exit
 +
 
 +
 
 +
interface VLAN 1
 +
 
 +
ip access-group ACL-IN in
 +
|access-list ACL-IN extended deny tcp 10.0.0.0 '''255.0.0.0'''
 +
 
 +
access-list ACL-IN extended permit ip any any
 +
 
 +
 
 +
access-group ACL-IN in interface inside
 +
 
 +
|-
 +
|access-list 1 permit 10.0.0.0 0.255.255.255
 +
 
 +
interface gigabitethernet0/0
 +
 
 +
ip nat inside
 +
 
 +
interface gigabitethernet0/1
 +
 
 +
ip nat outside
 +
 
 +
 
 +
ip nat inside source list 1 interface gigabitethernet0/1 overload
 +
|interface gigabitethernet0/0
 +
 
 +
nameif inside
 +
 
 +
interface gigabitethernet0/1
 +
 
 +
nameif outside
 +
 
 +
 
 +
object network INSIDE-NAT
 +
 
 +
subnet 10.0.0.0 255.0.0.0
 +
 
 +
nat(inside, outside) dynamic interface
 +
 
 +
|-
 +
|ip nat inside source static 10.0.0.80 81.0.0.2
 +
|object network DMZ->NAT
 +
 
 +
host 10.0.0.80
 +
 
 +
nat(dmz,outside) static 81.0.0.2
 +
 
 +
 
 +
access-list OUT->DMZ permit ip any host 10.0.0.80
 +
 
 +
access-group OUT->DMZ in interface outside
 
|}
 
|}

Текуща версия към 16:17, 13 август 2015

В примерните команди се разглежда Cisco ASA 5505 (курс CCNA Security).

IOS ASA
erase startup-config

reload

write erase

reload

Ctrl+C q
conf t

enable secret [парола]

conf t

enable password [парола]

conf t

line console 0 password [парола]

login

conf t

passwd password [парола]

show ip interface brief show interface ip brief
show running-config show running-config

или

write terminal

copy running-config startup-config copy running-config startup-config

или

write memory

show ip route show route
show ip nat translations show xlate
show vlan show switch vlan
ip route [адрес] [маска] [next-hop] route [име на интерфейс] [адрес] [маска] [next-hop]
ip route 0.0.0.0 0.0.0.0 [next-hop] route [име на интерфейс] 0.0.0.0 0.0.0.0 [next-hop]
ip domain-name [име на домейн] domain-name [име на домейн]
interface VLAN 1

ip address [адрес] [маска]

no shutdown

interface gigabitethernet 0/1

switchport mode access

switchport access vlan 1

interface vlan 1

nameif [име - напр. inside]

secuity-level [0-100]

interface ethernet0

switchport access vlan 1

no shutdown

line vty 0 15

password [парола]

transport input telnet

login

passwd [парола]

telnet [IP адрес|мрежа] [маска] [име на интерфейс]

ip domain-name [име на домейн]

username [потребителско име] secret [парола]

crypto key generate rsa modulus [размер на ключа]

line vty 0 15

transport input ssh

login local

domain-name [име на домейна]

aaa authentication ssh console LOCAL

username [потребителско име] password [парола]

crypto key generate rsa modulus [размер на ключа]

ssh [IP адрес|мрежа] [маска] [име на интерфейс]

ntp server [IP адрес]

ntp authenticate

ntp authentication-key [номер на ключ] md5 [ключ]

ntp trusted-key [номер на ключ]

Аналогично
ip dhcp pool [име]

network [мрежови адрес] [префикс|маска]

default-gateway [IP адрес]

dns-server [IP адрес]

dhcpd address [начален IP адрес]-[краен IP адрес] [име на интерфейс]

dhcpd enable [име на интерфейс]

dhcpd dns-server [IP адрес]

dhcpd auto_config outside

show ip dhcp binding show dhcpd binding
clear ip dhcp binding clear dhcpd
ip http server http server enable

http [IP адрес|мрежа] [маска] [име на интерфейс]

no ip http server clear configure http
ip access-list extended ACL-IN

deny tcp 10.0.0.0 0.255.255.255

permit ip any any

exit


interface VLAN 1

ip access-group ACL-IN in

access-list ACL-IN extended deny tcp 10.0.0.0 255.0.0.0

access-list ACL-IN extended permit ip any any


access-group ACL-IN in interface inside

access-list 1 permit 10.0.0.0 0.255.255.255

interface gigabitethernet0/0

ip nat inside

interface gigabitethernet0/1

ip nat outside


ip nat inside source list 1 interface gigabitethernet0/1 overload

interface gigabitethernet0/0

nameif inside

interface gigabitethernet0/1

nameif outside


object network INSIDE-NAT

subnet 10.0.0.0 255.0.0.0

nat(inside, outside) dynamic interface

ip nat inside source static 10.0.0.80 81.0.0.2 object network DMZ->NAT

host 10.0.0.80

nat(dmz,outside) static 81.0.0.2


access-list OUT->DMZ permit ip any host 10.0.0.80

access-group OUT->DMZ in interface outside