Ⅰ 思科asa防火墙怎么激活
这个防火墙只需要配置即可,不需要激活的。
cisco ASA防火墙配置的方法:
常用命令有:nameif、interface、ip address、nat、global、route、static等。
具体使用方法请看说明书。
Ⅱ 思科防火墙怎样配置WEB界面
思科防火墙telnet、ssh、web登陆配置及密码配置,相关命令如下:
防火墙默认是不允许内/外网用户通过远程登陆或WEB访问的,需要相应得开启功能。
1、firewall(config)#telnet 192.168.10.0 255.255.255.0 inside 允许内网此网断内的机器Telnet到防火墙
2、配置从外网远程登陆到防火墙
Firewall(config)#domain-name cisco.com
firewall(config)# crypto key generate rsa
firewall(config)#ssh 0.0.0.0 0.0.0.0 outside
3、允许外网所有地址可以远程登录防火墙,也可以定义一格具体的地址可以从外网登陆到防火墙上,如:
firewall(config)#ssh 218.240.6.81 255.255.255.255 outside
firewall(config)#enable password cisco
4、由用户模式进入特权模式的口令
firewall(config)#passrd cisco
5、ssh远程登陆时用的口令
firewall(config)#username Cisco password Cisco
6、Web登陆时用到的用户名
firewall(config)#http enable
7、打开http允许内网10网断通过http访问防火墙
firewall(config)#http 192.168.10.0 255.255.255.0 inside
firewall(config)#pdm enable
firewall(config)#pdm location 192.168.10.0 255.255.255.0 inside
8、web登陆方式:https://172.16.1.1
Ⅲ 防火墙的配置命令是什么
1、nameif
设置接口名称,并指定安全级别,安全级别取值范围为1~100,数字越大安全级别越高。
使用命令:
PIX525(config)#
PIX525(config)#
PIX525(config)#nameifethernet2dmzsecurity50
2、interface
配置以太口工作状态,常见状态有:auto、100full、shutdown。
auto:设置网卡工作在自适应状态。
100full:设置网卡工作在100Mbit/s,全双工状态。
shutdown:设置网卡接口关闭,否则为激活。
命令:
PIX525(config)#interfaceethernet0auto
PIX525(config)#interfaceethernet1100full
PIX525(config)#
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_address
8、conit
管道conit命令用来设置允许数据从低安全级别的接口流向具有较高安全级别的接口。
语法:
conitpermit|denyprotocolglobal_ipport[-port]foreign_ip[netmask]
9、访问控制列表ACL
访问控制列表的命令与couit命令类似
10、侦听命令fixup
作用是启用或禁止一个服务或协议,
通过指定端口设置PIX防火墙要侦听listen服务的端口。
11、telnet
当从外部接口要telnet到PIX防火墙时,telnet数据流需要用vpn隧道ipsec提供保护或
在PIX上配置SSH,然后用SSHclient从外部到PIX防火墙。
12、显示命令:
showinterface;查看端口状态。
showstatic;查看静态地址映射。
showip;查看接口ip地址。
showconfig;查看配置信息。
showrun;显示当前配置信息。
writeterminal;将当前配置信息写到终端。
showcpuusage;显示CPU利用率,排查故障时常用。
showtraffic;查看流量。
showblocks;显示拦截的数据包。
showmem;显示内存
13、DHCP服务
PIX具有DHCP服务功能。
Ⅳ 思科防火墙命令行怎么看ip地址
1、查看MAC命令: show mac-address-table。
2、查看IP地址命令:show cdpne de(查看跟这台交换机链接设备的细致信息) 得到该交换机的IP地址。
juniper 防火墙类型有哪些? ——企业回答:JUNIPER我目前用的SSG20,感觉还是很好用滴。要说性价比嘛,感觉还是北京网安睿成科技有限公司的好。北京网安睿成科技有限公司是一家专业从事网络信息安全产品销售、网络安全方案集成及安全咨询服务的科技企业。公司位于中关村德胜科技园区,凭借...
cisco交换机怎么查看本交换机IP地址? —— router(config-if)#ip add 192.168.1.1 255.255.255.0 router(config-if)#no shutdown 谢谢采纳!
思科交换机常用的100个命令—— aptech2950(conf)#ip default-gateway 192.168.254 设置网关地址7:进入交换机某一端口interface fastehernet 0/17 以17 端口为例 switch> enable switch#c onfigure terminal switch(conf)#hostname aptch2950 aptech29...
求:思科3640交换机查看vlan命令和配置命令和配置以太网接口命令._网络... —— 1、查看vlan命令:Switch#show vlan#查看vlan数据库,vlan信息和所属接口 2、配置VLAN命令(交换机配置VLAN,并给将端口加入到该VLAN为例):cisco-sw1(config)#vlan 2cisco-sw1(config-vlan)#name testcisco-sw1(...
如何配置Cisco交换机的IP地址—— 如何配置Cisco交换机的IP地址的方法 1. 计算机命令:PCA login: root ;使用root用户 password: linux ;口令是linux shutdown -h now ;同init 0 关机 logout login ifconfig ;显示IP地址ifconfig eth0 netmask ;设置IP...
cisco交换机怎么查看本交换机IP地址? —— 首先,打开“开始”菜单——选择“运行”——输入“cmd”——按下“Enter”回车键,这样做可以打开“命令提示符”,在命令提示符中输入“ipconfig”,按下“Enter”回车键;Ethernet adapter 本地连接:Connection-specific ...
思科怎么查ip地址——IP查交换机端口 进入主交换机1、进入特权模式输入 show arp | inc 192.168.55.225(或者sh arp 192.168.55.225 )可以看到192.168.55.225 对应的mac地址0023.540d.47ed 2、show mac add | inc xxxx.xxxx.xxxx...
如何查看思科交换机的所有ip地址—— 超级终端或者TELNET、SSH下输入 show arp 就能看到该交换机连接的所有设备的IP地址MAC地址
cisco交换机怎么看mac地址—— 查交换机学习到的mac地址方法有下面几种:一、查看所有MAC地址执行命令display mac-address,查看所有的MAC地址表项。二、查看某个接口学习到的MAC地址执行命令display mac-address dynamic gigabitethernet1/0/1,查看接口GE...
思科交换机怎么查看IP地址对应的端口 —— 通过show ip interface brief 查看当前交换机所有端口的IP地址(三层接口或者vlan接口)通过show arp 查看通信的 arp表项,然后通过show mac address-table 或者show mac-address-table 查看从哪个接口学到的,从而定位IP地址...
Ⅳ Cisco常用的路由器交换机配置命令
cisco制造的路由器设备、交换机和其他设备承载了全世界80%的互联网通信,成为硅谷中新经济的传奇,那么你了解Cisco常用的路由器交换机配置命令吗?下面是我整理的一些关于Cisco常用的路由器交换机配置命令的相关资料,供你参考。
Cisco常用的路由器支持的命令:
路由器显示命令:
router#show run ;显示配置信息
router#show interface ;显示接口信息
router#show ip route ;显示路由信息
router#show cdp nei ;显示邻居信息
router#reload ;重新起动
路由器口令设置:
router>enable ;进入特权模式
router#config terminal ;进入全局配置模式
router(config)#hostname ;设置交换机的主机名
router(config)#enable secret xxx ;设置特权加密口令
router(config)#enable password xxb ;设置特权非密口令
router(config)#line console 0 ;进入控制台口
router(config-line)#line vty 0 4 ;进入虚拟终端
router(config-line)#login ;要求口令验证
router(config-line)#password xx ;设置登录口令xx
router(config)#(Ctrl+z) ; 返回特权模式
router#exit ;返回命令
路由器配置:
router(config)#int s0/0 ;进入Serail接口
router(config-if)#no shutdown ;激活当前接口
router(config-if)#clock rate 64000 ;设置同步时钟
router(config-if)#ip address ;设置IP地址
router(config-if)#ip address second ;设置第二个IP
router(config-if)#int f0/0.1 ;进入子接口
router(config-subif.1)#ip address ;设置子接口IP
router(config-subif.1)#encapsulation dot1q ;绑定vlan中继协议
router(config)#config-register 0x2142 ;跳过配置文件
router(config)#config-register 0x2102 ;正常使用配置文件
router#reload ;重新引导
路由器文件操作:
router# running-config startup-config ;保存配置
router# running-config tftp ;保存配置到tftp
router# startup-config tftp ;开机配置存到tftp
router# tftp flash: ;下传文件到flash
router# tftp startup-config ;下载配置文件
ROM状态:
Ctrl+Break ;进入ROM监控状态
rommon>confreg 0x2142 ;跳过配置文件
rommon>confreg 0x2102 ;恢复配置文件
rommon>reset ;重新引导
rommon> xmodem: flash: ;从console传输文件
rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IP
rommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码
rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IP
rommon>TFTP_FILE=c2600.bin ;指定下载的文件
rommon>tftpdnld ;从tftp下载
rommon>dir flash: ;查看闪存内容
rommon>boot ;引导IOS
静态路由:
ip route ;命令格式
router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;静态路由举例
router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例
动态路由:
router(config)#ip routing ;启动路由转发
router(config)#router rip ;启动RIP路由协议。
router(config-router)#network ;设置发布路由
router(config-router)#negihbor ;点对点帧中继用。
帧中继命令:
router(config)#frame-relay switching ;使能帧中继交换
router(config-s0)#encapsulation frame-relay ;使能帧中继
router(config-s0)#fram-relay lmi-type cisco ;设置管理类型
router(config-s0)#frame-relay intf-type DCE ;设置为DCE
router(config-s0)#frame-relay dlci 16 ;
router(config-s0)#frame-relay local-dlci 20 ;设置虚电路号
router(config-s0)#frame-relay interface-dlci 16 ;
router(config)#log-adjacency-changes ;记录邻接变化
router(config)#int s0/0.1 point-to-point ;设置子接口点对点
router#show frame pvc ;显示永久虚电路
router#show frame map ;显示映射
基本访问控制列表:
router(config)#access-list permit|deny
router(config)#interface ;default:deny any
router(config-if)#ip access-group in|out ;defaultut
例1:
router(config)#access-list 4 permit 10.8.1.1
router(config)#access-list 4 deny 10.8.1.0 0.0.0.255
router(config)#access-list 4 permit 10.8.0.0 0.0.255.255
router(config)#access-list 4 deny 10.0.0.0 0.255.255.255
router(config)#access-list 4 permit any
router(config)#int f0/0
router(config-if)#ip access-group 4 in
扩展访问控制列表:
access-list permit|deny icmp [type]
access-list permit|deny tcp [port]
例3:
router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echo
router(config)#access-list 101 permit ip any any
router(config)#int s0/0
router(config-if)#ip access-group 101 in
例3:
router(config)#access-list 102 deny tcp any 10.65.0.2 0.0.0.0 eq 80
router(config)#access-list 102 permit ip any any
router(config)#interface s0/1
router(config-if)#ip access-group 102 out
删除访问控制例表:
router(config)#no access-list 102
router(config-if)#no ip access-group 101 in
路由器的nat配置
Router(config-if)#ip nat inside ;当前接口指定为内部接口
Router(config-if)#ip nat outside ;当前接口指定为外部接口
Router(config)#ip nat inside source static [p] [port]
Router(config)#ip nat inside source static 10.65.1.2 60.1.1.1
Router(config)#ip nat inside source static tcp 10.65.1.3 80 60.1.1.1 80
Router(config)#ip nat pool p1 60.1.1.1 60.1.1.20 255.255.255.0
Router(config)#ip nat inside source list 1 pool p1
Router(config)#ip nat inside destination list 2 pool p2
Router(config)#ip nat inside source list 2 interface s0/0 overload
Router(config)#ip nat pool p2 10.65.1.2 10.65.1.4 255.255.255.0 type rotary
Router#show ip nat translation
rotary 参数是轮流的意思,地址池中的IP轮流与NAT分配的地址匹配。
overload参数用于PAT 将内部IP映射到一个公网IP不同的端口上。
外部网关协议配置
routerA(config)#router bgp 100
routerA(config-router)#network 19.0.0.0
routerA(config-router)#neighbor 8.1.1.2 remote-as 200
配置PPP验证:
RouterA(config)#username password
RouterA(config)#int s0
RouterA(config-if)#ppp authentication {chap|pap}
3.PIX防火墙命令
Pix525(config)#nameif ethernet0 outside security0 ;命名接口和级别
Pix525(config)#interface ethernet0 auto ;设置接口方式
Pix525(config)#interface ethernet1 100full ;设置接口方式
Pix525(config)#interface ethernet1 100full shutdown
Pix525(config)#ip address inside 192.168.0.1 255.255.255.0
Pix525(config)#ip address outside 133.0.0.1 255.255.255.252
Pix525(config)#global (if_name) natid ip-ip ;定义公网IP区间
Pix525(config)#global (outside) 1 7.0.0.1-7.0.0.15 ;例句
Pix525(config)#global (outside) 1 133.0.0.1 ;例句
Pix525(config)#no global (outside) 1 133.0.0.1 ;去掉设置
Pix525(config)#nat (if_name) nat_id local_ip [netmark]
Pix525(config)#nat (inside) 1 0 0
内网所有主机(0代表0.0.0.0)可以访问global 1指定的外网。
Pix525(config)#nat (inside) 1 172.16.5.0 255.255.0.0
内网172.16.5.0/16网段的主机可以访问global 1指定的外网。
Pix525(config)#route if_name 0 0 gateway_ip [metric] ;命令格式
Pix525(config)#route outside 0 0 133.0.0.1 1 ;例句
Pix525(config)#route inside 10.1.0.0 255.255.0.0 10.8.0.1 1 ;例句
Pix525(config)#static (inside, outside) 133.0.0.1 192.168.0.8
表示内部ip地址192.168.0.8,访问外部时被翻译成133.0.0.1全局地址。
Pix525(config)#static (dmz, outside) 133.0.0.1 172.16.0.8
中间区域ip地址172.16.0.8,访问外部时被翻译成133.0.0.1全局地址。
Cisco常用的交换机支持的命令:
交换机基本状态:
switch: ;ROM状态, 路由器是rommon>
hostname> ;用户模式
hostname# ;特权模式
hostname(config)# ;全局配置模式
hostname(config-if)# ;接口状态
交换机口令设置:
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 ;设置登录口令xx
switch#exit ;返回命令
交换机VLAN设置:
switch#vlan database ;进入VLAN设置
switch(vlan)#vlan 2 ;建VLAN 2
switch(vlan)#no vlan 2 ;删vlan 2
switch(config)#int f0/1 ;进入端口1
switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2
switch(config-if)#switchport mode trunk ;设置为干线
switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan
switch(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地址:
switch(config)#interface vlan 1 ;进入vlan 1
switch(config-if)#ip address ;设置IP地址
switch(config)#ip default-gateway ;设置默认网关
switch#dir flash: ;查看闪存
交换机显示命令:
switch#write ;保存配置信息
switch#show vtp ;查看vtp配置信息
switch#show run ;查看当前配置信息
switch#show vlan ;查看vlan配置信息
switch#show interface ;查看端口信息
switch#show int f0/0 ;查看指定端口信息
Ⅵ cisco防火墙配置的基本配置
激活以太端口必须用enable进入,然后进入configure模式
PIX525>enable
Password:
PIX525#config t
PIX525(config)#interface ethernet0 auto
PIX525(config)#interface ethernet1 auto
在默认情况下ethernet0是属外部网卡outside, ethernet1是属内部网卡inside,
inside在初始化配置成功的情况下已经被激活生效了,但是outside必须命令配置激活。 采用命令nameif
PIX525(config)#nameif ethernet0 outside security0
security100
security0是外部端口outside的安全级别(100安全级别最高)
security100是内部端口inside的安全级别,如果中间还有以太口,则security10,security20等等命名,多个网卡组成多个网络,一般情况下增加一个以太口作为DMZ(Demilitarized Zones非武装区域)。 采用命令为:ip address
如:内部网络为:192.168.1.0 255.255.255.0
外部网络为:222.20.16.0 255.255.255.0
PIX525(config)#ip address inside 192.168.1.1 255.255.255.0
PIX525(config)#ip address outside 222.20.16.1 255.255.255.0 在默然情况下,PIX的以太端口是不允许telnet的,这一点与路由器有区别。Inside端口可以做telnet就能用了,但outside端口还跟一些安全配置有关。
PIX525(config)#telnet 192.168.1.1 255.255.255.0 inside
PIX525(config)#telnet 222.20.16.1 255.255.255.0 outside
测试telnet
在[开始]->[运行]
telnet 192.168.1.1
PIX passwd:
输入密码:cisco 此功能与Cisco IOS基本上是相似的,也是Firewall的主要部分,有permit和deny两个功能,网络协议一般有IP|TCP|UDP|ICMP等等,如:只允许访问主机:222.20.16.254的www,端口为:80
PIX525(config)#access-list 100permit ip any host 222.20.16.254 eq www
deny ip any any
PIX525(config)#access-group 100 in interface outside NAT跟路由器基本是一样的,
首先必须定义IP Pool,提供给内部IP地址转换的地址段,接着定义内部网段。
PIX525(config)#global (outside) 1 222.20.16.100-222.20.16.200 netmask 255.255.255.0
PIX525(config)#nat (inside) 1 192.168.0.0 255.255.255.0
如果是内部全部地址都可以转换出去则:
PIX525(config)#nat (inside) 1 0.0.0.0 0.0.0.0
则某些情况下,外部地址是很有限的,有些主机必须单独占用一个IP地址,必须解决的是公用一个外部IP(222.20.16.201),则必须多配置一条命令,这种称为(PAT),这样就能解决更多用户同时共享一个IP,有点像代理服务器一样的功能。配置如下:
PIX525(config)#global (outside) 1 222.20.16.100-222.20.16.200 netmask 255.255.255.0
PIX525(config)#global (outside) 1 222.20.16.201 netmask
255.255.255.0
PIX525(config)#nat (inside) 1 0.0.0.0 0.0.0.0 在内部网络,为了维护的集中管理和充分利用有限IP地址,都会启用动态主机分配IP地址服务器(DHCP Server),Cisco Firewall PIX都具有这种功能,下面简单配置DHCP Server,地址段为192.168.1.100—192.168.1.200
DNS: 主202.96.128.68 备202.96.144.47
主域名称:
DHCP Client 通过PIX Firewall
PIX525(config)#ip address dhcp
DHCP Server配置
PIX525(config)#dhcpd address 192.168.1.100-192.168.1.200
inside
PIX525(config)#dhcp dns 202.96.128.68 202.96.144.47
PIX525(config)#dhcp domain 静态端口重定向(Port Redirection with Statics)
在PIX 版本6.0以上,增加了端口重定向的功能,允许外部用户通过一个特殊的IP地址/端口通过Firewall PIX
传输到内部指定的内部服务器。这种功能也就是可以发布内部WWW、FTP、Mail等服务器了,这种方式并不是直接连接,而是通过端口重定向,使得内部服务器很安全。
命令格式:
static
[(internal_if_name,external_if_name)]{global_ip|interface}
local_ip
[netmask
mask][max_cons[max_cons[emb_limit[norandomseq]]]
static
[(internal_if_name,external_if_name)]{tcp|udp}{global_ip|interface}
local_ip
[netmask
mask][max_cons[max_cons[emb_limit[norandomseq]]]
!----外部用户直接访问地址222.20.16.99
telnet端口,通过PIX重定向到内部主机192.168.1.99的telnet端口(23)。
PIX525(config)#static (inside,outside) tcp 222.20.16.99
telnet 192.168.1.99 telnet netmask 255.255.255.255 0 0
!----外部用户直接访问地址222.20.16.99
FTP,通过PIX重定向到内部192.168.1.3的FTP Server。
PIX525(config)#static (inside,outside) tcp 222.20.16.99
ftp 192.168.1.3 ftp netmask 255.255.255.255 0 0
!----外部用户直接访问地址222.20.16.208
www(即80端口),通过PIX重定向到内部192.168.123的主机的www(即80端口)。
www 192.168.1.2 www netmask 255.255.255.255 0 0
!----外部用户直接访问地址222.20.16.201
HTTP(8080端口),通过PIX重定向到内部192.168.1.4的主机的www(即80端口)。
8080 192.168.1.4 www netmask 255.255.255.255 0 0
!----外部用户直接访问地址222.20.16.5
smtp(25端口),通过PIX重定向到内部192.168.1.5的邮件主机的smtp(即25端口)
smtp 192.168.1.4 smtp netmask 255.255.255.255 0 0 显示命令show config
保存命令write memory
Ⅶ cisco CCNP 中常用到的命令
下面这些可能对你有帮助,如果不够你可以搜搜命令集就行了。
1.交换机支持的命令:
交换机基本状态:
switch: ;ROM状态, 路由器是rommon>
hostname> ;用户模式
hostname# ;特权模式
hostname(config)# ;全局配置模式
hostname(config-if)# ;接口状态
交换机口令设置:
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 ;设置登录口令xx
switch#exit ;返回命令
交换机VLAN设置:
switch#vlan database ;进入VLAN设置
switch(vlan)#vlan 2 ;建VLAN 2
switch(vlan)#no vlan 2 ;删vlan 2
switch(config)#int f0/1 ;进入端口1
switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2
switch(config-if)#switchport mode trunk ;设置为干线
switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan
switch(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地址:
switch(config)#interface vlan 1 ;进入vlan 1
switch(config-if)#ip address ;设置IP地址
switch(config)#ip default-gateway ;设置默认网关
switch#dir flash: ;查看闪存
交换机显示命令:
switch#write ;保存配置信息
switch#show vtp ;查看vtp配置信息
switch#show run ;查看当前配置信息
switch#show vlan ;查看vlan配置信息
switch#show interface ;查看端口信息
switch#show int f0/0 ;查看指定端口信息
2. 路由器支持的命令:
路由器显示命令:
router#show run ;显示配置信息
router#show interface ;显示接口信息
router#show ip route ;显示路由信息
router#show cdp nei ;显示邻居信息
router#reload ;重新起动
路由器口令设置:
router>enable ;进入特权模式
router#config terminal ;进入全局配置模式
router(config)#hostname ;设置交换机的主机名
router(config)#enable secret xxx ;设置特权加密口令
router(config)#enable password xxb ;设置特权非密口令
router(config)#line console 0 ;进入控制台口
router(config-line)#line vty 0 4 ;进入虚拟终端
router(config-line)#login ;要求口令验证
router(config-line)#password xx ;设置登录口令xx
router(config)#(Ctrl+z) ; 返回特权模式
router#exit ;返回命令
路由器配置:
router(config)#int s0/0 ;进入Serail接口
router(config-if)#no shutdown ;激活当前接口
router(config-if)#clock rate 64000 ;设置同步时钟
router(config-if)#ip address ;设置IP地址
router(config-if)#ip address second ;设置第二个IP
router(config-if)#int f0/0.1 ;进入子接口
router(config-subif.1)#ip address ;设置子接口IP
router(config-subif.1)#encapsulation dot1q ;绑定vlan中继协议
router(config)#config-register 0x2142 ;跳过配置文件
router(config)#config-register 0x2102 ;正常使用配置文件
router#reload ;重新引导
路由器文件操作:
router# running-config startup-config ;保存配置
router# running-config tftp ;保存配置到tftp
router# startup-config tftp ;开机配置存到tftp
router# tftp flash: ;下传文件到flash
router# tftp startup-config;下载配置文件
ROM状态:
Ctrl+Break ;进入ROM监控状态
rommon>confreg 0x2142 ;跳过配置文件
rommon>confreg 0x2102 ;恢复配置文件
rommon>reset ;重新引导
rommon> xmodem: flash: ;从console传输文件
rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IP
rommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码
rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IP
rommon>TFTP_FILE=c2600.bin ;指定下载的文件
rommon>tftpdnld ;从tftp下载
rommon>dir flash: ;查看闪存内容
rommon>boot ;引导IOS
静态路由:
ip route ;命令格式
router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.2 ;静态路由举例
router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例
动态路由:
router(config)#ip routing ;启动路由转发
router(config)#router rip ;启动RIP路由协议。
router(config-router)#network ;设置发布路由
router(config-router)#negihbor ;点对点帧中继用。
帧中继命令:
router(config)#frame-relay switching ;使能帧中继交换
router(config-s0)#encapsulation frame-relay ;使能帧中继
router(config-s0)#fram-relay lmi-type cisco ;设置管理类型
router(config-s0)#frame-relay intf-type DCE ;设置为DCE
router(config-s0)#frame-relay dlci 16 ;
router(config-s0)#frame-relay local-dlci 20 ;设置虚电路号
router(config-s0)#frame-relay interface-dlci 16 ;
router(config)#log-adjacency-changes ;记录邻接变化
router(config)#int s0/0.1 point-to-point ;设置子接口点对点
router#show frame pvc ;显示永久虚电路
router#show frame map ;显示映射
基本访问控制列表:
router(config)#access-list permit|deny
router(config)#interface ;default:deny any
router(config-if)#ip access-group in|out ;default:ut
例1:
router(config)#access-list 4 permit 10.8.1.1
router(config)#access-list 4 deny 10.8.1.0 0.0.0.255
router(config)#access-list 4 permit 10.8.0.0 0.0.255.255
router(config)#access-list 4 deny 10.0.0.0 0.255.255.255
router(config)#access-list 4 permit any
router(config)#int f0/0
router(config-if)#ip access-group 4 in
扩展访问控制列表:
access-list permit|deny icmp
wild>[type]
access-list permit|deny tcp
wild>[port]
例3:
router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echo
router(config)#access-list 101 permit ip any anyrouter(config)#int s0/0
router(config-if)#ip access-group 101 in
例3:
router(config)#access-list 102 deny tcp any 10.65.0.2 0.0.0.0 eq 80
router(config)#access-list 102 permit ip any any
router(config)#interface s0/1
router(config-if)#ip access-group 102 out
协议 路由协议 路由器配置 交换机配置 加密 上一页 1 2
QQread.com 推出Windows2003教程
win2003安装介绍 win2003网络优化 win2003使用技巧
win2003系统故障 服务器配置 专家答疑
帧中继命令:
router(config)#frame-relay switching ;使能帧中继交换router(config-s0)#encapsulation frame-relay ;使能帧中继router(config-s0)#fram-relay lmi-type cisco ;设置管理类型router(config-s0)#frame-relay intf-type DCE ;设置为DCErouter(config-s0)#frame-relay dlci 16 ;router(config-s0)#frame-relay local-dlci 20 ;设置虚电路号router(config-s0)#frame-relay interface-dlci 16 ;router(config)#log-adjacency-changes ;记录邻接变化router(config)#int s0/0.1 point-to-point ;设置子接口点对点router#show frame pvc ;显示永久虚电路router#show frame map ;显示映射
基本访问控制列表:
router(config)#access-list permit|deny router(config)#interface ;default:deny anyrouter(config-if)#ip access-group in|out ;default:ut
例1:
router(config)#access-list 4 permit 10.8.1.1
router(config)#access-list 4 deny 10.8.1.0 0.0.0.255
router(config)#access-list 4 permit 10.8.0.0 0.0.255.255
router(config)#access-list 4 deny 10.0.0.0 0.255.255.255
router(config)#access-list 4 permit any
router(config)#int f0/0
router(config-if)#ip access-group 4 in
扩展访问控制列表: access-list permit|deny icmp wild>[type]access-list permit|deny tcp wild>[port]例3:router(config)#access-list 101 deny icmp any 10.64.0.2 0.0.0.0 echorouter(config)#access-list 101 permit ip any anyrouter(config)#int s0/0router(config-if)#ip access-group 101 in例3:router(config)#access-list 102 deny tcp any 10.65.0.2 0.0.0.0 eq 80router(config)#access-list 102 permit ip any anyrouter(config)#interface s0/1router(config-if)#ip access-group 102 out
删除访问控制例表:
router(config)#no access-list 102
router(config-if)#no ip access-group 101 in
路由器的nat配置
Router(config-if)#ip nat inside ;当前接口指定为内部接口
Router(config-if)#ip nat outside ;当前接口指定为外部接口
Router(config)#ip nat inside source static [p] <私有IP><公网IP> [port]
Router(config)#ip nat inside source static 10.65.1.2 60.1.1.1
Router(config)#ip nat inside source static tcp 10.65.1.3 80 60.1.1.1 80
Router(config)#ip nat pool p1 60.1.1.1 60.1.1.20 255.255.255.0
Router(config)#ip nat inside source list 1 pool p1
Router(config)#ip nat inside destination list 2 pool p2
Router(config)#ip nat inside source list 2 interface s0/0 overload
Router(config)#ip nat pool p2 10.65.1.2 10.65.1.4 255.255.255.0 type rotary
Router#show ip nat translationrotary 参数是轮流的意思,地址池中的IP轮流与NAT分配的地址匹配。overload参数用于PAT 将内部IP映射到一个公网IP不同的端口上。
外部网关协议配置:
routerA(config)#router bgp 100
routerA(config-router)#network 19.0.0.0
routerA(config-router)#neighbor 8.1.1.2 remote-as 200
配置PPP验证:
RouterA(config)#username password
RouterA(config)#int s0
RouterA(config-if)#ppp authentication {chap|pap}
3.PIX防火墙命令
Pix525(config)#nameif ethernet0 outside security0 ;命名接口和级别
Pix525(config)#interface ethernet0 auto ;设置接口方式
Pix525(config)#interface ethernet1 100full ;设置接口方式
Pix525(config)#interface ethernet1 100full shutdown
Pix525(config)#ip address inside 192.168.0.1 255.255.255.0
Pix525(config)#ip address outside 133.0.0.1 255.255.255.252
Pix525(config)#global (if_name) natid ip-ip ;定义公网IP区间
Pix525(config)#global (outside) 1 7.0.0.1-7.0.0.15 ;例句
Pix525(config)#global (outside) 1 133.0.0.1 ;例句
Pix525(config)#no global (outside) 1 133.0.0.1 ;去掉设置
Pix525(config)#nat (if_name) nat_id local_ip [netmark]
Pix525(config)#nat (inside) 1 0 0内网所有主机(0代表0.0.0.0)可以访问global 1指定的外网。
Pix525(config)#nat (inside) 1 172.16.5.0 255.255.0.0内网172.16.5.0/16网段的主机可以访问global 1指定的外网。
Pix525(config)#route if_name 0 0 gateway_ip [metric] ;命令格式
Pix525(config)#route outside 0 0 133.0.0.1 1 ;例句
Pix525(config)#route inside 10.1.0.0 255.255.0.0 10.8.0.1 1 ;例句
Pix525(config)#static (inside, outside) 133.0.0.1 192.168.0.8表示内部ip地址192.168.0.8,访问外部时被翻译成133.0.0.1全局地址。
Pix525(config)#static (dmz, outside) 133.0.0.1 172.16.0.8中间区域ip地址172.16.0.8,访问外部时被翻译成133.0.0.1全局地址。