当前位置:文档之家› 思科ASA防火墙命令

思科ASA防火墙命令

思科ASA防火墙命令
思科ASA防火墙命令

ASA配置命令

(config)#hostname asa802 配置主机名

(config)#domain-name https://www.doczj.com/doc/ca6012139.html, 配置域名

(config)#enable password asa802 配置特权密码

(config)#passwd cisco 配置远程登录密码(TELNET,SSH)(config-if)#nameif inside 配置接口名字

(config-if)#security-level 100 安全级别(0-100)

(config)#route接口名目标网段和掩码下一跳配置路由

#show route 查看路由表

配置TELNET接入

(config)#telnet(network|ip-address) mask interface-name

例: (config)#telnet 192.168.0.0 255.255.255.0 inside 允许192.168.0.0/24 telnet (config)#telnet timeout minutes(1~1440分钟默认5分钟)配置空闲超时时间

配置SSH接入

(1)为防火墙分配一个主机名和域名,因为生成RSA密匙对需要用到主机名和域名(2)生成RSA密匙对(config)#crypto key generate rsa modulus (512 | 768 | 1024 | 2048)(3)配置防火墙允许SSH接入(config)#ssh 192.168.0.0 255.255.255.0 inside (config)#ssh version(1|2)SSH版本

(config)#ssh timeout 30 配置SSH超时

(config)#show ssh session查看SSH会话

配置ASDM接入(自适应安全设备管理器)

(1)启用防火墙HTTPS服务器功能

(config)#http server enable (port) 默认使用443端口

(2)配置防火墙允许HTTPS接入

(config)#http {network|ip-address} mask interface-name

(3)指定ASDM映像的位置

(config)#asdm image disk0:/asdmfile

(4)配置客户端登录使用的用户名和密码

(config)#username user password password privilege 15

客户端使用ASDM步骤

(1)从网站https://www.doczj.com/doc/ca6012139.html,下载安装jiava runtime environment (JRE),这里下载的是jre-6u10-windows-i586-p.exe

(2) 在主机PC1上启动IE浏览器,输入ASA的IP地址

NA T网络地址转换

(config)#nat (interface_name) id local_ip mask

(启用nat-control,可以使用nat0 指定不需要被转换的流量)

如:(config)#nat(inside)1 192.168.0.0 255.255.255.0

GLOBAL命令

(config)#global (interface-name) nat-id (global-ip 【-global-ip】)

如: (config)#global (outside) 1 200.1.1.100-200.1.1.150

(config)#global (outside)1 Internet

查看地址转换条目show xlate

配置ACL

(config)#access-list in_to_out deny ip 192.168.0.0 255.255.255.0 any

应用到接口(config)#access-group in_to_out in interface inside

启用nat-control后从低安全级别访问高安全级别要配置NA T规则

Static NAT (config)#static (dmz,outside) 200.1.1.253 192.168.1.1

如要让外网的主机访问DMZ的WEB站点

(config)#static (dmz,outside) 200.1.1.253 192.168.1.1

(config)#access-list out_to_dmz permit tcp any host 200.1.1.253 eq www

(config)#access-group out_to_dmz in interface outside

ICMP协议

(config)#access-list 100 permit icmp any any echo-reply

(config)#access-list 100 permit icmp any any echo-unreachable

(config)#access-list 100 permit icmp any any time-exceeded

(config)#access-group 100 in interface outside

URL过滤

1)配置ACL

(config)#access-list tcp_filter permit tcp 192.168.0.0 255.255.255.0 any eq www

2)定义类关联到ACL

(config)#class-map tcp_filter_class

(config-cmap)#match access-list tcp_filter

(config-cmap)#exit

3)正则表达式

(config)#regex url1 “\.out\.com”定义名为url1的正则表达式URL后缀是https://www.doczj.com/doc/ca6012139.html, 4)类,关联正则表达式

(config)#class-map type regex match-any url_class

(config-camp)#match regex url1

(config-camp)#exit

5)类检查

(config)#class-map type inspect http http_url_class

(config-camp)#match not request header host regex class url_class

(config-camp)#exit

6)创建策略检查项

(config)#policy-map type inspect http http_url_policy

(config-pmap)#class http_url_class

(config-pmap-c)#drop-connection log drop数据包并关闭连接,并发送系统日志(config-pmap-c)#exit

(config-pmap)#exit

7)策略关联类

(config)#policy-map inside_http_url_policy

(config-pmap)#class tcp_filter_class

(config-pmap-c)#inspect http http_url_policy

(config-pmap-c)#exit

(config-pmap)#exit

8)应用到接口

(config)#service-policy inside_http_url_policy interface inside

保存配置

#write memory

#copy running-config startup-config

清除所有配置

(config)#clear configure all

清除access-list

(config)#clear configure access-list

配置日志

Log buffer (config)#l ogging enable

(config)#logging buffered informational (级别)

清除(config)#clear logging buffer

ASDM日志(config)#logging enable

(config)#logging asdm informational

清除(config)#clear longing asdm

配置日志服务器

(config)#logging enable

(config)#logging trap information

(config)#logging host inside 192.168.1.1

ASA基本威胁检测

(config)#threat-detection basic-threat

禁止IP分片通过

(config)#fragment chain 1

启用IDS功能

(config)#ip audit name name (info|attack) {action [alarm] [drop] [reset] } Alarm对info和attack消息进行警告,信息会出现在syslog服务器上Reset 丢弃数据包并关闭连接

Action定义策略采取的动作

如:(config)#ip audit name inside_ids_info info action alarm (config)#ip audit name inside_ids_attack attack action alarm

(config)#ip audit interface inside inside_ids_info

(config)#ip audit interface inside inside_ids_info

关闭ID为2000的签名

(config)#ip audit signature 2000 disable

启用ID为2000的签名

(config)#no ip audit signature 2000 disable

IPSec VPN

ISAKMP/IKE阶段1的配置命令

建立ISAKMP管理连接策略

Router(config))#crypto isakmp policy {1-10000}

指定管理连接建立的最后两个数据报文采用何种加密方式

Router (config-isakmp)#crypto {des | 3des | aea}

HASH命令指定验证过程采用HMAC的功能

Router (config-isakmp)#hash {sha|md5}

指定设备身份验证的方式

Router (config-isakmp)#euthentication {pre-share | rea-encr | rsa-sig}

指定DH密匙组,默认使用DH1

Router (config-isakmp)#group {1 | 2 | 5}

指定管理连接的生存周期,默认为86400s(24小时)

(Router config-isakmp)#lifetime seconds

查看上述配置

#show crypto isakmp policy

配置预共享密钥

Router(config))#crypto isakmp key {0 | 6} keystrin g address peer-address {subnet_mask}

0表示密钥为明文,6表示密钥被加密

Keystring表示密钥的具体内容

Peer-address表示对端与之共享密钥的对等体设备地址

Subnet_mask在这里为可选命令,如没有指定,默认使用255.255.255.255作为掩码

显示密钥是明文还是密文

#Show crypto isakmp key

加密预共享密钥

Router(config))#key config-key password-encrypt

New key: (最少为8为字母)

Confirm key:

Router(config))#password encryption aes

使用show run可以看到加密后的效果

ISAKMP/IKE阶段2的配置命令

(1) 配置crypto ACL (通常两端对端设备上的crypto ACL互为镜像) Router(config))#access-list access-list-number { deny | permit } protocol source source-wildcard destination destination-wildcard

(2) 配置阶段2的传输集

Router(config))#crypto ipsec transform-set transform_set_name transform1[transform2 [transform3]

Router (cfg-crypto-tran)#mode { tunnel | transport }

Transform_set_name为传输集的名称,该名称具有唯一性,不能与其他任何传输集相同

查看路由器上的传输集,show crypto ipsec transform-set

清除连接的生存周期

Clear crypto sa 或clear crypto ipsec sa

(3) 配置crypto map

Router(config))# crypto map map_name seq_num ipsec-isakmp

Map-name:crypto map的名称

Seq_num:crypto map的序列号,其范围是1-65535,数值越小,优先级越高

调用crypto ACL的名字或编号

Router(config)-crypto-m)# match address ACL_name_or_num

指定IPsec的对等体设备,即配置的设备应该与谁建立连接

Router(config)-crypto-m)# set peer { hostname | IP_address }

指定传输集的名称,这里最多可以列出6个传输集的名称

Router(config)-crypto-m)# set transform-set transform_set_name1

PFS(perfect forward secrecy)完美转发保密,保证两个阶段中的密钥只能使用一次

启用PFS并指定使用哪个DH密钥组(可选命令)

Router(config)-crypto-m)# set pfs [ group1 | group2 | group5 ]

指定SA的生存周期,默认数据连接的生存周期为3600s或4608000KB

Router(config)-crypto-m)#set security-association lifetime {seconds seconds | kilobytes kilobytes} 设定空闲超时计时器,范围60~86400s (默认关闭)

Router(config)-crypto-m)# set security-association idle-time seconds

查看管理连接所处的状态

show crypto isakmp policy

show crypto isakmp sa

show crypto ipsec transform-set

show crypto ipsec security-association lifetime

show crypto ipsec sa

show crypto map

在ASA上配置实现IPSec VPN

分公司网关ASA1的配置

基本配置

ASA1(config)#route outside 0 0 100.0.0.2

ASA1(config)#nat-control

ASA1(config)#nat (inside) 1 0 0

ASA1(config)#global (outside) 1 int

配置NAT豁免

ASA1(config)#access-list nonat extended permit ip 172.16.10.0 255.255.255.0 10.10.33.0 255.255.255.0

ASA1(config)#nat (inside) 0 access-list nonat

启用ISAKMP

ASA1(config)#crypto isakmp enable outside

配置ISAKMP策略

ASA1(config)#crypto isakmp policy 1

ASA1(config-isakmp-policy)#encryption aes

ASA1(config-isakmp-policy)#hash sha

ASA1(config-isakmp-policy)#authentication pre-share

ASA1(config-isakmp-policy)#group 1

配置预共享密钥

ASA1(config)#isakmp key benet address 200.0.0.1

ASA从7.0版本开始一般使用隧道组来配置

ASA1(config)#tunnel-group 200.0.0.1 type ipsec-l2l

ASA1(config)#tunnel-group 200.0.0.1 ipsec-attributes

ASA1(config-ipsec)#pre-shared-key benet

配置crypto ACL

ASA1(config)#access-list yfvpn extended permit ip 172.16.10.0 255.255.255.0 10.10.33.0 255.255.255.0

配置数据连接的传输集

ASA1(config)#crypto ipsec transform-set benet-set esp-aes esp-sha-hmac

配置crypto map并应用到outside接口上

ASA1(config)#crypto map benet-map 1 match address yfvpn

ASA1(config)#crypto map benet-map 1 set peer 200.0.0.1

ASA1(config)#crypto map benet-map 1 set transform-set benet-set

ASA1(config)#crypto map benet-map interface outside

接口安全级别对于IPSec流量的影响

流量无法通过具有相同安全级别的两个不同的接口

流量无法从同一接口进入后再流出

ASA(config)#same-security-traffic permit {intra-interface | inter-interface}

路由器实现NAT-T

Router(config)#ip nat inside source list access-list-number interface f0/1 overload Router(config)#ip nat inside source static udp local-ip 500 interface f0/1 500 Router(config)#ip nat inside source static udp local-ip 4500 interface f0/1 4500

debug crypto isakmp

初始状态

阶段1策略协商

生成随机数(用于验证)

身份验证

阶段1连接建立

阶段2参数协商

创建数据连接的SA

debug crypto ipsec

协商阶段2的传输集

匹配crypto ACL

SA建立

协商完成

show crypto isakmp sa

路由器搭建Easy VPN服务器

定义AAA

R1(config)#aaa new-model

R1(config)#aaa authentication login vpn_authen local

R1(config)#aaa authorization network vpn_author local

R1(config)#username cisco password cisco

定义阶段1的SA参数

R1(config)#crypto isakmp policy 10

R1(config-isakmp)#encryption aes 128

R1(config-isakmp)#hash sha

R1(config-isakmp)#authentication pre-share

R1(config-isakmp)#group 2

R1(config-isakmp)#exit

定义IP地址池

R1(config)#ip local pool vpn_pool 192.168.1.1 192.168.1.200

定义ACL用于分离隧道

R1(config)#access-list 101 permit ip 10.10.1.0 0.0.0.255 any

定义Easy VPN组及参数

R1(config)#crypto isakmp client configuration group vpn_group

R1(config-isakmp-group)#key groupkey

R1(config-isakmp-group)#pool vpn_pool

R1(config-isakmp-group)#acl 101

R1(config-isakmp-group)#exit

定义传输集

R1(config)#crypto ipsec transform-set vpn_transform esp-aes esp-sha-hmac

定义动态的Crypto Map条目

R1(config)#crypto dynamic-map vpn_dymap 10

R1(config-crypto-map)#set transform-set vpn_transform

定义静态的Crypto Map条目和XAUTH

R1(config)#crypto map mymap client authentication list vpn_authen

R1(config)#crypto map mymap isakmp authorization list vpn_author

R1(config)#crypto map mymap client configuration address respond

R1(config)#crypto map mymap 1000 ipsec-isakmp dynamic vpn_dymap 将Crypto Map应用到接口

R1(config)#int S1/0

R1(config-if)#crypto map mymap

路由器与硬件客户端之间的配置

Easy VPN硬件客户端R2的配置

建立Easy VPN远端配置

R2(config)#crypto ipsec client ezvpn myeasyvpn

R2(config-crypto-ezvpn)#connect auto

R2(config-crypto-ezvpn)#group vpn_group key groupkey

R2(config-crypto-ezvpn)#mode network-extension

R2(config-crypto-ezvpn)#peer 200.1.1.1

R2(config-crypto-ezvpn)#username cisco password cisco

R2(config)#int f0/0

R2(config-if)#crypto ipsec client ezvpn myeasyvpn inside

R2(config-if)#int s1/1

R2(config-if)#crypto ipsec client ezvpn myeasyvpn outside

R2(config-if)#End

crypto isakmp client ezvpn xauth

配置服务器端允许硬件客户端存储XAUTH认证信息

R1(config)#crypto isakmp client configuration group vpn_group

R1(config-isakmp-group)#save-password

配置路由器R2对VPN流量不做NAT转换

R2(config)#no access-list 1 permit 10.20.1.0 0.0.0.255

R2(config)#no ip nat inside source list 1 interface Serial1/1 overload

R2(config)# access-list 110 deny ip 10.20.1.0 0.0.0.255 10.10.1.0 0.0.0.255

R2(config)# access-list 110 permit ip any any

R2(config)#ip nat inside source list 110 interface Serial1/1 overload

使用命令R2#sh crypto ipsec client ezvpn检验Easy VPN的配置

Easy VPN基于ASA的配置

定义XAUTH(用户)验证

asa802(config)#username cisco password cisco

定义阶段1的SA参数

asa802(config)#crypto isakmp enable outside

asa802(config)#crypto isakmp policy 10

asa802(config-isakmp-policy)#encryption aes

asa802(config-isakmp-policy)#hash sha

asa802(config-isakmp-policy)#authentication pre-share

asa802(config-isakmp-policy)#group 2

asa802(config-isakmp-policy)#exit

定义IP地址池

asa802(config)#ip local pool vpn_pool 192.168.1.1-192.168.1.200

定义ACL用于分离隧道

asa802(config)# access-list split_tunnel permit ip 10.10.1.0 255.255.255.0 any

定义组策略

asa802(config)# group-policy vpn_group_policy internal

asa802(config)# group-policy vpn_group_policy attributes

asa802(config-group-policy)# split-tunnel-policy tunnelspecified

asa802(config-group-policy)# split-tunnel-network-list value split_tunnel

asa802(config-group-policy)# exit

建立隧道组

asa802(config)# tunnel-group vpn_group type ipsec-ra

asa802(config)# tunnel-group vpn_group general-attributes

asa802(config-tunnel-general)# address-pool vpn_pool

asa802(config-tunnel-general)# default-group-policy vpn_group_policy

asa802(config-tunnel-general)# exit

asa802(config)# tunnel-group vpn_group ipsec-attributes

asa802(config-tunnel-ipsec)# pre-shared-key groupkey

asa802(config-tunnel-ipsec)# exit

定义传输集

asa802(config)#crypto ipsec transform-set vpn_transform esp-aes esp-sha-hmac 定义动态的Crypto Map条目

asa802(config)#crypto dynamic-map vpn_dymap 10 set transform-set vpn_transform 定义静态的Crypto Map条目

asa802(config)#crypto map mymap 1000 ipsec-isakmp dynamic vpn_dymap 将Crypto Map应用到接口

asa802(config)# crypto map mymap interface outside

SSL VPN基于ASA的配置

定义XAUTH(用户)验证

asa802(config)#username cisco password cisco

在outside口启用WebVPN和SSLVPN

asa802(config)#webvpn

asa802(config-webvpn)#enable outside

asa802(config-webvpn)#svc image disk0:/sslclient-win-1.1.3.173.pkg

asa802(config-webvpn)#svc enable

asa802(config-webvpn)#exit

定义IP地址池

asa802(config)#ip local pool vpn_pool 192.168.1.1-192.168.1.200

定义ACL用于分离隧道

asa802(config)# access-list split_tunnel permit ip 10.10.1.0 255.255.255.0 any 定义组策略

asa802(config)# group-policy vpn_group_policy internal

asa802(config)# group-policy vpn_group_policy attributes

asa802(config-group-policy)#vpn-tunnel-protocol webvpn svc

asa802(config-group-policy)# split-tunnel-policy tunnelspecified

asa802(config-group-policy)# split-tunnel-network-list value split_tunnel asa802(config-group-policy)#webvpn

asa802(config-group-webvpn)#svc ask enable

asa802(config-group-webvpn)#exit

asa802(config-group-policy)# exit

建立隧道组

asa802(config)# tunnel-group vpn_group type webvpn

asa802(config)# tunnel-group vpn_group general-attributes

asa802(config-tunnel-general)# address-pool vpn_pool

asa802(config-tunnel-general)# default-group-policy vpn_group_policy

asa802(config-tunnel-general)# exit

asa802(config)# tunnel-group vpn_group webvpn-attributes

asa802(config-tunnel-webvpn)#group-alias groups enable

asa802(config-tunnel-webvpn)#exit

asa802(config)#webvpn

asa802(config-webvpn)#tunnel-group-list enable

asa802(config-webvpn)#exit

SSL VPN基于IOS路由器的配置

安装SVC软件

R1(config)#webvpn install svc flash:/sslclient-win-1.1.3.173.pkg 定义AAA,创建SSL VPN用户

R1(config)#aaa new-model

R1(config)#aaa authentication login vpn_authen local

R1(config)#username cisco password cisco

启用WebVPN,产生自签名证书

R1(config)#webvpn gateway vpn_gateway

R1(config-webvpn-gateway)#ip address 200.1.1.1 port 443

R1(config-webvpn-gateway)#inservice

R1(config-webvpn-gateway)#exit

定义IP地址池

R1(config)#ip local pool vpn_pool 192.168.1.1 192.168.1.200

R1(config)#int lo0

R1(config-if)#ip address 192.168.1.254 255.255.255.0

R1(config-if)#exit

建立WebVPN环境

R1(config)#webvpn context vpn_context

R1(config-webvpn-context)#gateway vpn_gateway domain group1 R1(config-webvpn-context)#aaa authentication list vpn_authen

R1(config-webvpn-context)#inservice

R1(config-webvpn-context)#exit

定义组策略

R1(config)#webvpn context vpn_context

R1(config-webvpn-context)#policy group vpn_group_policy

R1(config-webvpn-group)#functions svc-enabled

R1(config-webvpn-group)#svc address-pool vpn_pool

R1(config-webvpn-group)#svc split include 10.10.1.0 255.255.255.0

R1(config-webvpn-group)#exit

R1(config-webvpn-context)#default-group-policy vpn_group_policy

R1(config-webvpn-context)#exit

SSL VPN客户端的配置

输入https://200.1.1.1/group1

自动安装客户端软件

安装证书

测试

通过show webvpn session context all查看会话信息

搭建RADIUS服务器

安装Cisco ACS软件

设置ACS管理员账号

配置RADIUS服务器,添加AAA客户端SW2

添加用户

配置用户组RADIUS属性

在交换机上配置802.1x认证

配置AAA

SW2(config)#aaa new-model

SW2(config)#radius-server host 10.0.0.203 auth-port 1812 acct-port 1813 key cisco 认证、统计端口和共享密钥必须与服务器配置相同

配置802.1x认证

SW2(config)#aaa authentication dot1x default group radius

配置802.1x授权

SW2(config)#radius-server vsa send authentication

SW2(config)# aaa authorization network default group radius

服务器要动态分配VLAN需要使用VSA属性

启用802.1x

SW2(config)# dot1x system-auth-control

SW2(config)#interface fastethernet 0/2

SW2(config-if)#switchport mode access

SW2(config-if)#dot1x port-control auto

命令dot1x port-control有3个参数

?force-authorized:端口始终处于授权状态(端口默认状态)

?force-unauthorized:端口始终处于非授权状态

?auto:根据认证结果决定端口的授权或非授权状态查看802.1x的相关配置

SW2#show dot1x all

Sysauthcontrol Enabled

Dot1x Protocol Version 2

Critical Recovery Delay 100

Critical EAPOL Disabled

Dot1x Info for FastEthernet0/2

-----------------------------------

PAE = AUTHENTICA TOR

PortControl = AUTO

ControlDirection = Both

HostMode = SINGLE_HOST

ReAuthentication = Disabled

QuietPeriod = 60

ServerTimeout = 30

…省略…

802.1x常见故障排查

一般处理流程

判断是单点故障,还是全局故障

?个别故障,一般情况下认证服务器应该工作正常

–检查用户名和密码

–检查交换机端口配置等

?全局故障,一般情况是认证服务器出现故障

–检查服务器网络连通是否正常

–检查服务器是否死机

–检查服务器配置是否有变动

–检查DHCP地址池是否用完

–检查服务器认证端口是否访问正常

根据不同的现象逐步排查

ASA 穿越代理的配置

定义触发认证的流量

ASA(config)# access-list http extended permit tcp any 192.168.100.0 255.255.255.0 eq 80

配置AAA 服务器

ASA(config)# aaa-server server_group protocol { RADIUS | TACACS+ }

ASA(config)# aaa-server server_group (interface_name ) host server_ipaddress

ASA(config-aaa-server-host)# key keyword

ASA(config-aaa-server-host)# authentication-port port

ASA(config-aaa-server-host)# accounting-port port

AAA 认证配置

ASA(config)# aaa authentication match acl_name

AAA 认证配置实例

ASA(config)# aaa authentication match http inside acs

AAA 授权配置

ASA(config)# aaa authorization match acl_name interface_name server_group

配置AAA 认证超时时间

ASA(config)# timeout uauth 0:05:00 absolute

ASA(config)# timeout uauth 0:05:00 inactivity

本地ACL 在端口应用配置

ASA(config)#access-group acl_name in interface inside [per-user-override]

配置per-user-override 参数

? 只有动态下发的ACL 有效 不配置per-user-override 参数

? 本地ACL 和动态下发的ACL 同时有效

思科交换机命令大全

思科交换机常用命令大全 1.1 用户模式与特权模式 用户模式:可以使用一些基本的查询命令 特权模式:可以对交换机进行相关的配置 进入特权模式命令:Switch>enable 退出特权模式命令:Switch#exit 启用命令查询:? 时间设置:Switch#clock set 时间(自选参数,参数必须符合交换机要求) 显示信息命令:Switch#show 可选参数 注意:可以用TAB键补齐命令,自选参数为用户自定义参数,可选参数为交换机设定参数 查看交换机配置: Switch#show running-config 保存交换机配置:Switch#copy running-config startup-config Switch#wr 查看端口信息:Switch#show interface 查看MAC地址表:Switch#show mac-address-table 查看交换机CPU的状态信息:Switch#show processes 1.2 全局配置模式 进入全局配置模式:Switch#configure terminal

主机名修改:Switch(config)#hostname 主机名(自选参数) 特权模式进入密码: Switch(config)#enable secret 密码(自选参数) 取消特权模式密码:Switch(config)#no enable secret 取消主机名设置: Switch(config)#no hostname 退出配置模式: Switch(config)#exit 需要特别注意的是在配置模式中无法使用show命令,如果要使用 的话show前必须加do和空格,例如:do show * 指定根交换机命令:Switch(config)#spanning-tree vlan 自选参数(VLAN号)root primary 例如: Switch(config)#spanning-tree vlan 1 root primary 需要注意的是:设置根交换机是基于VLAN的 关闭生成树协议命令:Switch(config)#no spanning-tree vlan 自选参数(VLAN 号) 例如: Switch(config)#no spanning-tree vlan 1 1.3 接口配置模式 进入接口配置模式:Switch(config)#interface 端口名称(可选参数) 启用端口:Switch(config-if)#no shutdown 停用端口:Switch(config-if)#shutdown 进入同种类型多端口配置:Switch(config)# interface range fastethernet 0/1-5 进入不同类型多端口配置:Switch(config)#interface range fastethernet 0/1-5,gigabitethernet 0/1-2

Cisco ASA配置

Cisco ASA配置 思科防火墙ASA5520配置 思科防火墙ASA5520配置: 目的:1、内网可以上网 2、内网可以访问DMZ区域的服务器 3、外网可以通过公网IP访问DMZ区域的服务器 要求:1、内网的网段192.168.10.0 2、DMZ的网段192.168.5.0 3、外网IP地址:200.200.200.82 200.200.200.83 网关255.255.255.248(这个地址一般是运营商提供) 4、外网路由:200.200.200.81 5、DMZ区域的服务器IP地址:192.168.5.2 步骤1:配置接口inside、outside和dmz interface g0/0 speed auto duplex auto nameif inside Security-level 100 ip address 192.168.10.1 255.255.255.0 no shut exit interface g0/1 speed auto duplex auto nameif outside Security-level 0 ip address 200.200.200.82 255.255.255.248 no shut exit interface g0/2 speed auto duplex auto nameif dmz Security-level 50 ip address 192.168.5.1 255.255.255.0 no shut exit 步骤2、添加外网路由 route outside 0 0 200.200.200.81

思科Cisco路由器access-list访问控制列表命令详解

思科Cisco路由器access-list访问控制列表命令详解 Post by mrchen, 2010-07-25, Views: 原创文章如转载,请注明:转载自冠威博客 [ https://www.doczj.com/doc/ca6012139.html,/ ] 本文链接地址: https://www.doczj.com/doc/ca6012139.html,/post/Cisconetwork/07/Cisco-access-list.html CISCO路由器中的access-list(访问列表)最基本的有两种,分别是标准访问列表和扩展访问列表,二者的区别主要是前者是基于目标地址的数据包过滤,而后者是基于目标地址、源地址和网络协议及其端口的数据包过滤。 标准型IP访问列表的格式 ---- 标准型IP访问列表的格式如下: ---- access-list[list number][permit|deny][source address][address][wildcard mask][log] ---- 下面解释一下标准型IP访问列表的关键字和参数。首先,在access和list 这2个关键字之间必须有一个连字符"-"; 一、list nubmer参数 list number的范围在0~99之间,这表明该access-list语句是一个普通的标准型IP访问列表语句。因为对于Cisco IOS,在0~99之间的数字指示出该访问列表和IP协议有关,所以list number参数具有双重功能: (1)定义访问列表的操作协议; (2)通知IOS在处理access-list语句时,把相同的list number参数作为同一实体对待。正如本文在后面所讨论的,扩展型IP访问列表也是通过list number(范围是100~199之间的数字)而表现其特点的。因此,当运用访问列表时,还需要补充如下重要的规则: 在需要创建访问列表的时候,需要选择适当的list number参数。 二、permit|deny 允许/拒绝数据包通过 ---- 在标准型IP访问列表中,使用permit语句可以使得和访问列表项目匹配的数据包通过接口,而deny语句可以在接口过滤掉和访问列表项目匹配的数据包。

Cisco设备的基本配置命令

switch> 用户模式 1:进入特权模式 enable switch> enable switch# 2:进入全局配置模式 configure terminal switch> enable switch#c onfigure terminal switch(conf)# 3:交换机命名 hostname aptech2950 以aptech2950为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch-2950 aptech2950(conf)# 4:配置使能口令 enable password cisco 以cisco为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable password cisco 5:配置使能密码 enable secret ciscolab 以cicsolab为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# enable secret ciscolab 6:设置虚拟局域网vlan 1 interface vlan 1 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface vlan 1 aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip 和子网掩码 aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exit aptech2950(conf)#ip default-gateway 192.168.254 设置网关地址 7:进入交换机某一端口 interface fastehernet 0/17 以17端口为例switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech2950(conf)# interface fastehernet 0/17 aptech2950(conf-if)#

cisco交换机(Switch)配置命令大全

1.在基于IOS的交换机上设置主机名/系统名: switch(config)# hostname hostname 在基于CLI的交换机上设置主机名/系统名: switch(enable) set system name name-string 2.在基于IOS的交换机上设置登录口令: switch(config)# enable password level 1 password 在基于CLI的交换机上设置登录口令: switch(enable) set password switch(enable) set enalbepass 3.在基于IOS的交换机上设置远程访问: switch(config)# interface vlan 1 switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address 在基于CLI的交换机上设置远程访问: switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlan switch(enable) set ip route default gateway 4.在基于IOS的交换机上启用和浏览CDP信息: switch(config-if)# cdp enable switch(config-if)# no cdp enable

为了查看Cisco邻接设备的CDP通告信息: switch# show cdp interface [type modle/port] switch# show cdp neighbors [type module/port] [detail] 在基于CLI的交换机上启用和浏览CDP信息: switch(enable) set cdp {enable|disable} module/port 为了查看Cisco邻接设备的CDP通告信息: switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 5.基于IOS的交换机的端口描述: switch(config-if)# description description-string 基于CLI的交换机的端口描述: switch(enable)set port name module/number description-string 6.在基于IOS的交换机上设置端口速度: switch(config-if)# speed{10|100|auto} 在基于CLI的交换机上设置端口速度: switch(enable) set port speed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto} 7.在基于IOS的交换机上设置以太网的链路模式: switch(config-if)# duplex {auto|full|half} 在基于CLI的交换机上设置以太网的链路模式: switch(enable) set port duplex module/number {full|half}

思科基本配置命令详解

思科交换机基本配置实例讲解

目录 1、基本概念介绍............................................... 2、密码、登陆等基本配置....................................... 3、CISCO设备端口配置详解...................................... 4、VLAN的规划及配置........................................... 4.1核心交换机的相关配置..................................... 4.2接入交换机的相关配置..................................... 5、配置交换机的路由功能....................................... 6、配置交换机的DHCP功能...................................... 7、常用排错命令...............................................

1、基本概念介绍 IOS: 互联网操作系统,也就是交换机和路由器中用的操作系统VLAN: 虚拟lan VTP: VLAN TRUNK PROTOCOL DHCP: 动态主机配置协议 ACL:访问控制列表 三层交换机:具有三层路由转发能力的交换机 本教程中“#”后的蓝色文字为注释内容。 2、密码、登陆等基本配置 本节介绍的内容为cisco路由器或者交换机的基本配置,在目前版本的cisco交换机或路由器上的这些命令是通用的。本教程用的是cisco的模拟器做的介绍,一些具体的端口显示或许与你们实际的设备不符,但这并不影响基本配置命令的执行。 Cisco 3640 (R4700) processor (revision 0xFF) with 124928K/6144K bytes of memory. Processor board ID 00000000 R4700 CPU at 100MHz, Implementation 33, Rev 1.2

ASA防火墙8.3与7.0各种操作配置区别详解

Network Object NAT配置介绍 1.Dynamic NAT(动态NAT,动态一对一) 实例一: 传统配置方法: nat (Inside) 1 10.1.1.0 255.255.255.0 global (Outside) 1 202.100.1.100-202.100.1.200 新配置方法(Network Object NAT) object network Outside-Nat-Pool range 202.100.1.100 202.100.1.200 object network Inside-Network subnet 10.1.1.0 255.255.255.0 object network Inside-Network nat (Inside,Outside) dynamic Outside-Nat-Pool 实例二: object network Outside-Nat-Pool range 202.100.1.100 202.100.1.200 object network Outside-PAT-Address host 202.100.1.201 object-group network Outside-Address network-object object Outside-Nat-Pool network-object object Outside-PAT-Address object network Inside-Network (先100-200动态一对一,然后202.100.1.201动态PAT,最后使用接口地址动态PAT) nat (Inside,Outside) dynamic Outside-Address interface 教主认为这种配置方式的好处是,新的NAT命令绑定了源接口和目的接口,所以不会出现传统配置影响DMZ的问题(当时需要nat0 + acl来旁路)2.Dynamic PAT (Hide)(动态PAT,动态多对一) 传统配置方式: nat (Inside) 1 10.1.1.0 255.255.255.0 global(outside) 1 202.100.1.101 新配置方法(Network Object NAT) object network Inside-Network subnet 10.1.1.0 255.255.255.0 object network Outside-PAT-Address host 202.100.1.101 object network Inside-Network nat (Inside,Outside) dynamic Outside-PAT-Address

1-cisco路由器基本配置及远程登录

实训目的: (1)学习和掌握科路由器的配置方式和要求。 (2)学习和掌握科路由器的工作模式分类、提示符、进入方式。1、路由器的配置方式 ①超级终端方式。该方式主要用于路由器的初始配置,路由器不需要IP地址。基本方法是:计算机通过COM1/COM2口和路由器的Console口连接,在计算机上启用“超级终端”程序,设置“波特率:9600 ,数据位:8,停止位:1,奇偶校验: 无,校验:无”即可。常用 ②Telnet方式。该方式配置要求路由器必须配置了IP地址。基本方法是:计算机通过网卡和路由器的以太网接口相连,计算机的网卡和路由器的以太网接口的IP地址必须在同一网段。常用 ③其他方式:AUX口接MODEM,通过电话线与远方运行终端仿真软件的微机;通过Ethernet上的TFTP服务器;通过Ethernet上的SNMP网管工作站。 2、路由器的工作模式 在命令行状态下,主要有以下几种工作模式: ①一般用户模式。主要用于查看路由器的基本信息,只能执行少数命令,不能对路由 器进行配置。提示符为:Router>;进入方式为:Telnet或Console ②使能(特权)模式。主要用于查看、测试、检查路由器或网络,不能对接口、路由 协议进行配置。提示符为:Router#;进入方式为:Router>enable。 ③全局配置模式。主要用于配置路由器的全局性参数。提示符为:Router(config)#; 进入方式为:Router#config ter。 ④全局模式下的子模式。包括:接口、路由协议、线路等。其进入方式和提示符如下: Router(config)#ineterface e0 //进入接口模式 Router(config-if)#//接口模式提示符 Router(config)#rip //进入路由协议模式 Router(config-router)# //路由协议模式 Router(config)#line con 0 //进入线路模式

思科交换机路由器命令大全

思科交换机路由器命令 大全 YUKI was compiled on the morning of December 16, 2020

1. 交换机支持的命令:交换机基本状态: 交换机口令设置: switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式 switch(config)#hostname ;设置交换机的主机名 switch(config)#enable secret xxx ;设置特权加密口 令switch(config)#enable password xxa ;设置特权非 密口令switch(config)#line console 0 ;进入控制台 口switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;允许登录 switch(config-line)#password xx ;设置登录口令 xxswitch#exit ;返回命令 交换机VLAN设置:

switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端 口1switch(config-if)#switchport access vlan 2 ; 当前端口加入vlan 2switch(config-if)#switchport mode trunk ;设置为干线switch(config- if)#switchport trunk allowed vlan 1,2 ;设置允许 的vlanswitch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain ;设置发vtp域名switch(config)#vtp password ;设置发vtp密码switch(config)#vtp mode server ;设置发vtp模式switch(config)#vtp mode client ;设置发vtp模式 交换机设置IP地址: 交换机显示命令:

cisco防火墙配置的基本配置

cisco防火墙配置的基本配置 1、nameif 设置接口名称,并指定安全级别,安全级别取值范围为1~100,数字越大安全级别越高。 使用命令: PIX525(config)#nameifethernet0outsidesecurity0 PIX525(config)#nameifethernet1insidesecurity100 PIX525(config)#nameifethernet2dmzsecurity50 2、interface 配置以太口工作状态,常见状态有:auto、100full、shutdown。 auto:设置网卡工作在自适应状态。 100full:设置网卡工作在100Mbit/s,全双工状态。 shutdown:设置网卡接口关闭,否则为激活。 命令: PIX525(config)#interfaceethernet0auto PIX525(config)#interfaceethernet1100full PIX525(config)#interfaceethernet1100fullshutdown 3、ipaddress 配置网络接口的IP地址 4、global 指定公网地址范围:定义地址池。 Global命令的配置语法:

global(if_name)nat_idip_address-ip_address[netmarkglobal_mask] 其中: (if_name):表示外网接口名称,一般为outside。 nat_id:建立的地址池标识(nat要引用)。 ip_address-ip_address:表示一段ip地址范围。 [netmarkglobal_mask]:表示全局ip地址的网络掩码。 5、nat 地址转换命令,将内网的私有ip转换为外网公网ip。 6、route route命令定义静态路由。 语法: route(if_name)00gateway_ip[metric] 7、static 配置静态IP地址翻译,使内部地址与外部地址一一对应。 语法: static(internal_if_name,external_if_name)outside_ip_addrinside_ip_addre ss 8、conduit 管道conduit命令用来设置允许数据从低安全级别的接口流向具有较高安全级别的接口。 语法: conduitpermit|denyprotocolglobal_ipport[-port]foreign_ip[netmask]

cisco配置命令大全

933a LMI使用Q933A标准.LMI(Local management Interface)有3种:ANSI:T1.617;CCITTY:Q933A和CISCO特有的标准。 # fram-relay intf-typ ABC ABC为帧中继设备类型,它们分别是DTE设备,DCE交换机或NNI(网络接点接口)支持。# frame_relay interface_dlci 110 br 配置DLCI(数据链路连接标识符)。 # frame-relay map ip ABCD XXXX broadcast 建立帧中继映射。ABCD为对方ip地址,XXXX为本地DLCI号,broadcast允许广播向前转发或更新路由。 # no shutdown 激活本端口. # exit ---- 5 .帧中继子接口的配置: # conf t # int s0.1 point-to-point

对应S0的子接口1,点对点方式。 # ip addr ABCD XXXX ABCD为子口1的IP地址,XXXX为子网掩码。# frame-relay intreface-dlci 100 br 6.配置拨号备份 (1).配置备份主口 # conf t # int s0 S0为主口. # backup int asy 1 A1口为备份口. # backup delay 0 1 延时1秒. (2).配置虚拟接口 # conf t # ip addr ABCD XXXX

ABCD为虚拟接口IP地址,XXXX为子网掩码。 # encap ppp 封装ppp协议. # dialer in-band 激活随叫随拨功能. # dialer idle-timeout 7200 # dialer map ip ABCD modem-script call broadcast 6225481 br 映射对应的拨号口.ABCD为对方拨号口的ip地址,6225481为对应的电话号码。 # dialer_group 1 定义拨号组成员. (3).配置防火墙 # dialer_list 1 pro ip permit 允许ip协议通过。 (4).配置连接口令 # user name ABCD pass XXXX ABCD为对方主机名,XXXX为连接口令. (5).配置拨号字符串

思科ASA防火墙ASDM安装和配置

CISCO ASA防火墙ASDM安装和配置 准备工作: 准备一条串口线一边接台式机或笔记本一边接防火墙的CONSOLE 接口,通过开始——>程序——> 附件——>通讯——>超级终端 输入一个连接名,比如“ASA”,单击确定。 选择连接时使用的COM口,单击确定。 点击还原为默认值。 点击确定以后就可能用串口来配置防火墙了。 在用ASDM图形管理界面之前须在串口下输入一些命令开启ASDM。 在串口下输入以下命令: ciscoasa> ciscoasa> en Password: ciscoasa# conf t 进入全局模式 ciscoasa(config)# webvpn 进入WEBVPN模式 ciscoasa(config-webvpn)# username cisco password cisco 新建一个用户和密码ciscoasa(config)# int m 0/0 进入管理口 ciscoasa(config-if)# ip address 192.168.4.1 255.255.255.0 添加IP地址ciscoasa(config-if)# nameif guanli 给管理口设个名字 ciscoasa(config-if)# no shutdown 激活接口 ciscoasa(config)#q 退出管理接口 ciscoasa(config)# http server enable 开启HTTP服务 ciscoasa(config)# http 192.168.4.0 255.255.255.0 guanli 在管理口设置可管理的IP 地址 ciscoasa(config)# show run 查看一下配置 ciscoasa(config)# wr m 保存 经过以上配置就可以用ASDM配置防火墙了。 首先用交叉线把电脑和防火墙的管理口相连,把电脑设成和管理口段的IP地址,本例中设为192.168.4.0 段的IP打开浏览器在地址栏中输入管理口的IP地址: https://192.168.4.1 弹出一下安全证书对话框,单击“是” 输入用户名和密码(就是在串口的WEBVPN模式下新建的用户和密码),然后点击“确定”。出现也下对话框,点击“Download ASDM Launcher and Start ASDM”开始安装ASDM管理器,安装完以后从网上下载一个JAVA虚拟机软件(使用1.4以上Java 版本),进入https://www.doczj.com/doc/ca6012139.html,下载安装,安装完后点击下面的“R un ASDM as a Java Applet ”。 出现以下对话框,点击“是”。 出现以下对话框,输入用户名和密码(就是在串口的WEBVPN模式下新建的用户和密码),然后点击“是”。 出现以下对话框,点击“是”。 进入ASDM管理器。 这样就可以通过ASDM来配置防火墙了。 以后就可以直接使用ASDM来管理防火墙了。

思科PIX防火墙简单配置实例

思科PIX防火墙简单配置实例 在本期应用指南中,管理员可以学到如何设置一个新的PIX防火墙。你将设置口令、IP地址、网络地址解析和基本的防火墙规则。 假如你的老板交给你一个新的PIX防火墙。这个防火墙是从来没有设置过的。他说,这个防火墙需要设置一些基本的IP地址、安全和一些基本的防火墙规则。你以前从来没有使用过PIX防火墙。你如何进行这种设置?在阅读完这篇文章之后,这个设置就很容易了。下面,让我们看看如何进行设置。 基础 思科PIX防火墙可以保护各种网络。有用于小型家庭网络的PIX防火墙,也有用于大型园区或者企业网络的PIX防火墙。在本文的例子中,我们将设置一种PIX 501型防火墙。PIX 501是用于小型家庭网络或者小企业的防火墙。 PIX防火墙有内部和外部接口的概念。内部接口是内部的,通常是专用的网络。外部接口是外部的,通常是公共的网络。你要设法保护内部网络不受外部网络的影响。 PIX防火墙还使用自适应性安全算法(ASA)。这种算法为接口分配安全等级,并且声称如果没有规则许可,任何通信都不得从低等级接口(如外部接口)流向高等级接口(如内部接口)。这个外部接口的安全等级是“0”,这个内部接口的安全等级是“100”。 下面是显示“nameif”命令的输出情况: pixfirewall# show nameif nameif ethernet0 outside security0 nameif ethernet1 inside security100 pixfirewall# 请注意,ethernet0(以太网0)接口是外部接口(它的默认名字),安全等级是0。另一方面,ethernet1(以太网1)接口是内部接口的名字(默认的),安全等级是100。 指南 在开始设置之前,你的老板已经给了你一些需要遵守的指南。这些指南是: ·所有的口令应该设置为“思科”(实际上,除了思科之外,你可设置为任意的口令)。 ·内部网络是10.0.0.0,拥有一个255.0.0.0的子网掩码。这个PIX防火墙的内部IP地址应该是10.1.1.1。

CISCO AAA命令详解

AAA详解收藏 Authentication:用于验证用户的访问,如login access,ppp network access等。Authorization:在Autentication成功验证后,Authorization用于限制用户可以执行什么操作,可以访问什么服务。 Accouting:记录Authentication及Authorization的行为。 Part I. 安全协议 1>Terminal Access Controller Access Control System Plus (TACACS+) Cisco私有的协议。加密整个发给tacacs+ server的消息,用户的keys。 支持模块化AAA,可以将不同的AAA功能分布于不同的AAA Server甚至不同的安全协议,从而可以实现不同的AAA Server/安全协议实现不同的AAA功能。 配置命令: Router(config)# tacacs-server host IP_address [single-connection] [port {port_#}] [timeout {seconds}] [key {encryption_key}] Router(config)# tacacs-server key {encryption_key} 注: (1)single-connection:为Router与AAA Server的会话始终保留一条TCP链接,而不是默认的每次会话都打开/关闭TCP链接。 (2)配置两个tacacs-server host命令可以实现tacacs+的冗余,如果第一个server fail了,第二个server可以接管相应的服务。第一个tacacs-server host命令指定的server为主,其它为备份。 (3)配置inbound acl时需要permit tacacs+的TCP port 49。 (4) 如果两个tacacs-server使用不同的key,则需要在tacacs-server host命令中指定不同的encryption_key,否则可以使用tacacs-server key统一定制。但tacacs-server host命令中的key 定义优先于tacacs-server key命令。 Troubleshooting: 命令: #show tacacs #debug tacacs 关于TACACS+的操作信息。 #debug tacacs events 比debug tacacs更详细的信息,包括router上运行的TACACS+ processes 消息。 Router# show tacacs Tacacs+ Server : 10.0.0.10/49 Socket opens: 3 Socket closes: 3 Socket aborts: 0 Socket errors: 0 Socket Timeouts: 0 Failed Connect Attempts: 0 Total Packets Sent: 42 Total Packets Recv: 41 Expected Replies: 0

思科路由器基本配置与常用配置命令

思科路由器基本配置与常用配置命令(simple for CCNA) 启动接口,分配IP地址: router> router> enable router# router# configure terminal router(config)# router(config)# interface Type Port router(config-if)# no shutdown router(config-if)# ip address IP-Address Subnet-Mask router(config-if)# ^z 配置RIP路由协议:30秒更新一次 router(config)# router rip router(config-if)# network Network-Number router(config-if)# ^z 配置IGRP路由协议:90秒更新一次 router(config)# router igrp AS-Number router(config-if)# network Network-Number router(config-if)# ^z配置Novell IPX路由协议:Novell RIP 60秒更新一次 router(config)# ipx routing [node address] router(config)# ipx maximum-paths Paths router(config)# interface Type Port router(config-if)# ipx network Network-Number [encapsulation encapsulation-type] [secondary] router(config-if)# ^z配置DDR: router(config)# dialer-list Group-Number protocol Protocol-Type permit [list ACL-Number] router(config)# interface bri 0 router(config-if)# dialer-group Group-Number router(config-if)# dialer map Protocol-Type Next-Hop-Address name Hostname Telphone-Number router(config-if)# ^z配置ISDN: router(config)# isdn swith-type Swith-Type router(config-if)# ^z 配置Frame Relay: router(config-if)# encapsulation frame-relay [cisco | ietf ] router(config-if)# frame-relay lmi-type [ansi | cisco | q933a ] router(config-if)# bandwidth kilobits router(config-if)# frame-relay invers-arp [ Protocol ] [dlci ] router(config-if)# ^z配置标准ACL: router(config)# access-list Access-List-Number [ permit | deny ] source [ source-mask ] router(config)# interface Type Port router(config-if)# ip access-group Access-List-Number [ in | out ] router(config-if)# ^z配置扩展ACL: router(config)# access-list Access-List-Number [ permit | deny ] [ Protocol | Protocol-Number ] source source-wildcard [ Source-Port ] destination destination-wildcard [ Destination-Port ] [ established ]

思科防火墙登陆及设置过程

一、防火墙登陆过程telnet 192.168.0.1 输入:123 用户名:en 密码:srmcisco

Conf t Show run 二、公网IP与内网IP映射: static (inside,outside) 61.142.114.180 192.168.0.7 netmask 255.255.255.255 0 0

三、再打开端口:输入以下一笔命今如 access-list acl-out permit tcp any host 61.142.114.183 eq 5800 (打开外部5800端口) access-list acl-out permit tcp any host 61.142.114.183 eq 5900 (打开外部5900端口) access-list acl-out permit tcp any host 61.142.114.183 eq 1433 (打开外部1433端口) access-list acl-in permit tcp any host 61.142.114.183 eq 1433 (打开内部1433端口) access-list acl-in permit tcp any host 61.142.114.183 eq 5900 (打开内部5900端口) access-list acl-in permit tcp any host 61.142.114.183 eq 5800 (打开内部5800端口)

四、登出防火墙:logout 五、增加上网电脑 1、nat (inside) 1 192.168.0.188 255.255.255.255 0 0(上网电脑IP地址) 2、arp inside 192.168.0.188 000f.eafa.645d alias(绑定上网电脑网卡MAC地址)

Cisco交换机常用配置命令

Cisco交换机常用配置命令 CISCO交换机基本配置 switch>ena 進入特权模式 switch#erasenvram 全部清除交换机的所有配置 switch#reload 重新启动交换机(初始提示符为switch> ) ------------------------------------------------------------------------------------ CISCO交换机基本配置:Console端口连接 用户模式hostname>; 特权模式hostname(config)# ; 全局配置模式hostname(config-if)# ; 交换机口令设置: switch>enable ;进入特权模式 switch#config;进入全局配置模式 switch(config)#hostname cisco ;设置交换机的主机名 switch(config)#enable secret csico1 ;设置特权加密口令 switch(config)#enable password csico8 ;设置特权非密口令 switch(config)#line console 0 ;进入控制台口 switch(config-line)#line vty 0 4 ;进入虚拟终端 switch(config-line)#login ;虚拟终端允许登录 switch(config-line)#password csico6 ;设置虚拟终端登录口令csico6 switch#write 保存配置設置 switch#copy running-config startup-config 保存配置設置,與write一樣switch#exit;返回命令 配置终端过一会时间就会由全局配置模式自动改为用户模式,将超时设置为永不超时 switch#conf t switch(config)#line con 0 switch(config-line)#exec-timeout 0 --------------------------------------------------------------------------------- 交换机显示命令: switch#write;保存配置信息 switch#showvtp;查看vtp配置信息 switch#show run ;查看当前配置信息 switch#showvlan;查看vlan配置信息 switch#showvlan name vlan2 switch#show interface ;查看端口信息

相关主题
文本预览
相关文档 最新文档