交换机,路由器,防火墙
windows script host 的解决方法
[
|
2010/04/15 21:08]
|
2010/04/15 21:08]
1:手动删除以下注册表文件即可:
单击开始菜单 - 运行 - regedit.exe
[HKEY_CLASSES_ROOT\lnkfile\shell\open\command]
右边的"C:\\WINDOWS\\System32\\WScript.exe\"
单击开始菜单 - 运行 - regedit.exe
[HKEY_CLASSES_ROOT\lnkfile\shell\open\command]
右边的"C:\\WINDOWS\\System32\\WScript.exe\"
路由器配置DHCP服务器
[
|
2009/12/21 14:58]
|
2009/12/21 14:58]
此文 转载于 http://itcisco2009.blog.51cto.com/714329/183173
Cisco路由器上配置DHCP全程详解
【IT168 专稿】某单位使用Cisco 3620作为IOS DHCP Server,它和内网相连的fastethernet0端口的IP地址为192.168.1.4,二层交换机采用两台Cisco 2950,三层交换机采用一台Cisco 3550。
在整个网络中有二个VLAN,为简化描述,假设每个VLAN都采用24位网络地址,其中VLAN1的IP地址为192.168.1.254,VLAN2的IP地址为192.168.2.254。在Cisco设备上实现IOS DHCP Server功能以使各VLAN中的主机自动获得IP地址,如下图所示。

配置DHCP地址池、附加信息以及租约期限
DHCP服务器的数据库被组织成一个树形结构,树根是用于动态分配的所有网络段的地址池,树枝是子网地址池,树叶是手工绑定给节点的地址。具体操作步骤如下:
首先登陆到Cisco 3640路由器上:
ghq>enable
Password (输入路由器的特权口令)
ghq #config terminal (进入配置模式)
Enter configuration commands one per line. End with CNTL/Z.
ghqconfig # ip dhcp pool global(配置一个根地址池,global是地址池的名称,你可以采用有意义的字符串来表示)
ghq dhcp-config #network 192.168.0.0 255.255.0.0(动态分配的地址段)
ghqdhcp-config #domain-name ghq.com(为客户机配置域后缀)
ghqdhcp-config #dns-server 192.168.1.1(为客户机配置DNS服务器)
ghqdhcp-config #netbios-name-server 192.168.1.1(为客户机配置wins服务器)
ghqdhcp-config #netbios-node-type h-node(为客户机配置h节点模式)
ghqdhcp-config #lease 30 (地址租用期为30天)
ghqdhcp-config #ip dhcp pool vlan1 (为VLAN1配置地址池,本池是global池的子池,将从global继承域后缀、DNS服务器、wins服务器等参数)
ghqdhcp-config #network 192.168.1.0 255.255.255.0 (VLAN1动态分配192.168.1这个网段内可以被分配的地址,没有被排除的地址)
ghqdhcp-config#default-router 192.168.1.254 (为客户机配置默认的网关,即VLAN1的IP地址)
ghqdhcp-config #ip dhcp pool vlan2 (为VLAN2配置地址池,本池是global池的子池,将从global继承域后缀、DNS服务器、wins服务器等可继承的参数)
ghqdhcp-config#network 192.168.2.0 255.255.255.0
ghqdhcp-config #default-router 192.168.2.254
设置不能用于动态分配的IP地址
在整个网络中,有些IP地址需要静态的指定给一些特定的设备,例如路由器的端口、DNS服务器、wins服务器以及VLAN的地址等。显然,这些静态IP地址是不能用于动态分配的,这就需要将它们排除掉。其步骤如下:
ghqconfig #ip dhcp excluded-address 192.168.1.1 192.168.1.5 (IP地址 192.168.1.1至192.168.1.5不能用于动态分配)
ghqconfig # ip dhcp excluded-address 192.168.1.254
(IP地址192.168.1.254固定为VLAN1的地址,不能用于动态分配)
ghqconfig # ip dhcp excluded-address 192.168.2.254
(IP地址192.168.2.254固定为VLAN2的地址,不能用于动态分配)
设置DHCP数据库代理
DHCP数据库代理是用于存储DHCP绑定信息的一台主机,它可以是FTP、TFTP或者是RCP服务器。当然,如有必要,你可以配置多个DHCP数据库代理。同样,不配置DHCP数据库代理也是允许的,但这是以不能在DHCP数据库代理上存储地址冲突日志为代价的。如果我们不想配置数据库代理,只要取消掉地址冲突日志的记录功能即可,操作命令如下:
ghqconfig # no ip dhcp conflict logging (取消地址冲突记录日志)
配置路由器的静态路由表
要使客户机能从用作DHCP Server的路由器中自动获得IP地址,首要条件就是各个VLAN中的客户机都能和路由器通信,因此首先就需要在路由器中设置一个路由以使路由器能和各个客户机通信。我们可以按如下设置:
ghqconfig #ip route 192.168.1.0 255.255.255.0 FastEthernet0
(FastEthernet0为路由器和内网相连的以太网接口,该命令的作用是在以太网接口和VLAN1 192.168.1.254间建立一条静态路由。)
ghqconfig #ip route 192.168.2.0 255.255.255.0 FastEthernet0
(该命令在以太网接口和VLAN2 192.168.2.254间建立一条静态路由)
设置好之后,在配置模式中键入EXIT命令回到特权模式下,Ping一下VLAN1和VLAN2的IP地址192.168.1.254和192.168.2.254 ,如果能够Ping通则表明配置正确,可以直接进入下一步的保存过程。
在交换机上为不同的VLAN指定DHCP服务器地址
这一步骤只须在不同的VLAN中通过设置IP HELPER-ADDRESS即可搞定,指令如下:
switch>enable (进入交换机的特权模式)
Password
switch #config t (进入配置模式)
Enter configuration commandsone per line. End with CNTL/Z.
switch config #interface vlan1 (配置VLAN1)
switch config-if #ip helper-address 192.168.1.4(指定DHCP服务器的地址,即路由器的地址)
ghqconfig-if #interface vlan2 (配置VLAN2)
ghqconfig-if #ip helper-address 192.168.1.4
对所有直接连到客户机的二层访问端口开启Portfast功能
要使客户机正确获得IP地址,就需要将和客户机相连的交换机端口的Portfast功能打开(Cisco 2950)。这里需要特别注意的是,只能在连接一个单一客户机的二层端口上开启该功能,如果在一个连接到交换机或集线器的端口上开启该功就有可能引起广播风暴或“地址学习”问题。开启Portfast功能的步骤如下:
switch #configure terminal
switch config #interface interface-id
switch config-if #spanning-tree portfast (开启portfast功能)
switchconfig-if #end
客服端 配置自动获取地址就OK了
Cisco路由器上配置DHCP全程详解
【IT168 专稿】某单位使用Cisco 3620作为IOS DHCP Server,它和内网相连的fastethernet0端口的IP地址为192.168.1.4,二层交换机采用两台Cisco 2950,三层交换机采用一台Cisco 3550。
在整个网络中有二个VLAN,为简化描述,假设每个VLAN都采用24位网络地址,其中VLAN1的IP地址为192.168.1.254,VLAN2的IP地址为192.168.2.254。在Cisco设备上实现IOS DHCP Server功能以使各VLAN中的主机自动获得IP地址,如下图所示。
配置DHCP地址池、附加信息以及租约期限
DHCP服务器的数据库被组织成一个树形结构,树根是用于动态分配的所有网络段的地址池,树枝是子网地址池,树叶是手工绑定给节点的地址。具体操作步骤如下:
首先登陆到Cisco 3640路由器上:
ghq>enable
Password (输入路由器的特权口令)
ghq #config terminal (进入配置模式)
Enter configuration commands one per line. End with CNTL/Z.
ghqconfig # ip dhcp pool global(配置一个根地址池,global是地址池的名称,你可以采用有意义的字符串来表示)
ghq dhcp-config #network 192.168.0.0 255.255.0.0(动态分配的地址段)
ghqdhcp-config #domain-name ghq.com(为客户机配置域后缀)
ghqdhcp-config #dns-server 192.168.1.1(为客户机配置DNS服务器)
ghqdhcp-config #netbios-name-server 192.168.1.1(为客户机配置wins服务器)
ghqdhcp-config #netbios-node-type h-node(为客户机配置h节点模式)
ghqdhcp-config #lease 30 (地址租用期为30天)
ghqdhcp-config #ip dhcp pool vlan1 (为VLAN1配置地址池,本池是global池的子池,将从global继承域后缀、DNS服务器、wins服务器等参数)
ghqdhcp-config #network 192.168.1.0 255.255.255.0 (VLAN1动态分配192.168.1这个网段内可以被分配的地址,没有被排除的地址)
ghqdhcp-config#default-router 192.168.1.254 (为客户机配置默认的网关,即VLAN1的IP地址)
ghqdhcp-config #ip dhcp pool vlan2 (为VLAN2配置地址池,本池是global池的子池,将从global继承域后缀、DNS服务器、wins服务器等可继承的参数)
ghqdhcp-config#network 192.168.2.0 255.255.255.0
ghqdhcp-config #default-router 192.168.2.254
设置不能用于动态分配的IP地址
在整个网络中,有些IP地址需要静态的指定给一些特定的设备,例如路由器的端口、DNS服务器、wins服务器以及VLAN的地址等。显然,这些静态IP地址是不能用于动态分配的,这就需要将它们排除掉。其步骤如下:
ghqconfig #ip dhcp excluded-address 192.168.1.1 192.168.1.5 (IP地址 192.168.1.1至192.168.1.5不能用于动态分配)
ghqconfig # ip dhcp excluded-address 192.168.1.254
(IP地址192.168.1.254固定为VLAN1的地址,不能用于动态分配)
ghqconfig # ip dhcp excluded-address 192.168.2.254
(IP地址192.168.2.254固定为VLAN2的地址,不能用于动态分配)
设置DHCP数据库代理
DHCP数据库代理是用于存储DHCP绑定信息的一台主机,它可以是FTP、TFTP或者是RCP服务器。当然,如有必要,你可以配置多个DHCP数据库代理。同样,不配置DHCP数据库代理也是允许的,但这是以不能在DHCP数据库代理上存储地址冲突日志为代价的。如果我们不想配置数据库代理,只要取消掉地址冲突日志的记录功能即可,操作命令如下:
ghqconfig # no ip dhcp conflict logging (取消地址冲突记录日志)
配置路由器的静态路由表
要使客户机能从用作DHCP Server的路由器中自动获得IP地址,首要条件就是各个VLAN中的客户机都能和路由器通信,因此首先就需要在路由器中设置一个路由以使路由器能和各个客户机通信。我们可以按如下设置:
ghqconfig #ip route 192.168.1.0 255.255.255.0 FastEthernet0
(FastEthernet0为路由器和内网相连的以太网接口,该命令的作用是在以太网接口和VLAN1 192.168.1.254间建立一条静态路由。)
ghqconfig #ip route 192.168.2.0 255.255.255.0 FastEthernet0
(该命令在以太网接口和VLAN2 192.168.2.254间建立一条静态路由)
设置好之后,在配置模式中键入EXIT命令回到特权模式下,Ping一下VLAN1和VLAN2的IP地址192.168.1.254和192.168.2.254 ,如果能够Ping通则表明配置正确,可以直接进入下一步的保存过程。
在交换机上为不同的VLAN指定DHCP服务器地址
这一步骤只须在不同的VLAN中通过设置IP HELPER-ADDRESS即可搞定,指令如下:
switch>enable (进入交换机的特权模式)
Password
switch #config t (进入配置模式)
Enter configuration commandsone per line. End with CNTL/Z.
switch config #interface vlan1 (配置VLAN1)
switch config-if #ip helper-address 192.168.1.4(指定DHCP服务器的地址,即路由器的地址)
ghqconfig-if #interface vlan2 (配置VLAN2)
ghqconfig-if #ip helper-address 192.168.1.4
对所有直接连到客户机的二层访问端口开启Portfast功能
要使客户机正确获得IP地址,就需要将和客户机相连的交换机端口的Portfast功能打开(Cisco 2950)。这里需要特别注意的是,只能在连接一个单一客户机的二层端口上开启该功能,如果在一个连接到交换机或集线器的端口上开启该功就有可能引起广播风暴或“地址学习”问题。开启Portfast功能的步骤如下:
switch #configure terminal
switch config #interface interface-id
switch config-if #spanning-tree portfast (开启portfast功能)
switchconfig-if #end
客服端 配置自动获取地址就OK了
cisco 2500路由器实现ADSL接入
[
|
2009/11/30 11:28]
|
2009/11/30 11:28]
工程环境架构:adsl modem 一个 cisco 2500 路由器一个 公司内部地址网段为192.168.0./24
实验目的:公司内部网段可以通过路由器拨号上网。
实验步骤:
第一步: 配置虚拟专用拨号网络-VPDN
1 vpdn enable 开启路由器的虚拟专用拨号网络-vpdn
2 vpdn-group office 建立一个vpdn组
3 request-dialin 初始化一个vpdn tunnel
4 protocol pppoe 设置拨号协议为PPPoE
实验目的:公司内部网段可以通过路由器拨号上网。
实验步骤:
第一步: 配置虚拟专用拨号网络-VPDN
1 vpdn enable 开启路由器的虚拟专用拨号网络-vpdn
2 vpdn-group office 建立一个vpdn组
3 request-dialin 初始化一个vpdn tunnel
4 protocol pppoe 设置拨号协议为PPPoE
路由器的NAT配置
[
|
2009/11/27 17:44]
|
2009/11/27 17:44]
任务一:配 置静态NAT(用虚拟机做时,首先要将虚拟交换机关闭路由功能—no ip
routing)
Step1:配置路由器A 的端口IP 地址。
routerA#conf t
routerA(config)#int f0/0
routerA(config-if)#ip add 10.1.1.1 255.255.255.0
routerA(config-if)#no sh
routerA(config-if)#int s1/1
routerA(config-if)#ip add 192.168.1.1 255.255.255.0
routerA(config-if)#no sh
routerA(config-if)#exit
routerA(config)#exit
routerA#show run
Step2:路由器A 上配置到达子网172.16.1.0 的默认路由
routerA(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2
查看路由表信息
routerA#show ip route
Step3:设置内部局部地址10.1.1.2 和内部全局地址192.168.1.10 之间的静态地址
转换
routerA(config)#ip nat inside source static 10.1.1.2 192.168.1.10
设置内部局部地址10.1.1.3 和内部全局地址192.168.1.11 之间的静态地址
转换
routerA(config)#ip nat inside source static 10.1.1.3 192.168.1.11
查看NAT 配置信息
routerA(config)#show ip statistics
在内部端口及外部端口上启用NAT
routerA(config)#int f0/0
routerA(config-if)#ip nat inside
routerA(config)#int s1/1
routerA(config-if)#ip nat outside
step4:配置路由器B 端口IP 地址。
routerB#conf t
routerB(config)#int f0/0
routerB(config-if)#ip add 172.16.1.1 255.255.255.0
routerB(config-if)#no sh
routerB(config-if)#int s1/1
routerB(config-if)#ip add 192.168.1.2 255.255.255.0
routerB(config-if)#no sh
routerB(config-if)#exit
routerB(config)#exit
routerB#show run
Step5:路由器B 上配置到达子网10.1.1.0 的默认路由
routerB(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.1
查看路由表信息
routerB#show ip route
Step6:设置内部局部地址172.16.1.2 和内部全局地址192.168.1.20 之间的静态地
址转换
routerB(config)#ip nat inside source static 172.16.1.2 192.168.1.20
设置内部局部地址172.16.1.3 和内部全局地址192.168.1.21 之间的静态地
址转换
routerB(config)#ip nat inside source static 172.16.1.3 192.168.1.21
查看NAT 配置信息
routerB(config)#show ip statistics
在内部端口及外部端口上启用NAT
routerB(config)#int f0/0
routerB(config-if)#ip nat inside
routerB(config)#int s1/1
routerB(config-if)#ip nat outside
Step7:验证.
在主机10.1.1.2 上ping192.168.1.2
在主机172.16.1.3 上ping192.168.1.1
查看路由器A 的 NAT 地址转换表
routerA#show ip nat translations
查看路由器B 的NAT 地址转换表
routerB#show ip nat translations
任务二:配置动态NAT
step1.RuteA 端置IP 地址
routerA#conf t
routerA(config)#int f0/0
routerA(config-if)#ip add 10.1.1.1 255.255.255.0
routerA(config-if)#no sh
routerA(config-if)#int s1/1
routerA(config-if)#ip add 192.168.1.1 255.255.255.0
routerA(config-if)#no sh
routerA(config-if)#exit
routerA(config)#exit
routerA#show run
Step2:路由器A 上配置到达子网172.16.1.0 的默认路由
routerA(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2
查看路由表信息
routerA#show ip route
step3.定义内部网络中允许访问外部的控制列表
routerA(config)#access-list 1 permit 10.1.1.0 0.0.0.255
step4.定义合法的IP 地址池
routerA(config)#ip nat pool test0 192.168.1.100 192.168.1.150
netmask 255.255.255.0
step5.指定网络地址转换映射
routerA(config)#ip nat inside source list 1 pool test0
step6.在内部和外部端口上启用NAT
routerA(config)#int f0/0
routerA(config-if)#ip nat inside
routerA(config)#int s1/1
routerA(config-if)#ip nat outside
step7. RouteB 端置IP 地址
routerB#conf t
routerB(config)#int f0/0
routerB(config-if)#ip add 172.16.1.1 255.255.255.0
routerB(config-if)#no sh
routerB(config-if)#int s1/1
routerB(config-if)#ip add 192.168.1.2 255.255.255.0
routerB(config-if)#no sh
routerB(config-if)#exit
routerB(config)#exit
routerA#show run
Step8:路由器B 上配置到达子网172.16.1.0 的默认路由
routerB(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.1
查看路由表信息
routerB#show ip route
step9.定义内部网络中允许访问外部的控制列表
routerB(config)#access-list 1 permit 172.16.1.0 0.0.0.255
step10.定义合法的IP 地址池
routerB(config)#ip nat pool test0 192.168.1.151 192.168.1.200
netmask 255.255.255.0
step11.指定网络地址转换映射
routerB(config)#ip nat inside source list 1 pool test0
step12.在内部和外部端口上启用NAT
routerB(config)#int f0/0
routerB(config-if)#ip nat inside
routerB(config)#int s1/1
routerB(config-if)#ip nat outside
step13. 验证.
在主机10.1.1.2 上ping192.168.1.2
在主机172.16.1.3 上ping192.168.1.1
查看路由器A 的 NAT 地址转换表
routerA#show ip nat translations
查看路由器B 的NAT 地址转换表
routerB#show ip nat translations
任务三:PAT 配置(使用外部全局地址)
step1. RuteA 端置IP 地址
routerA#conf t
routerA(config)#int f0/0
routerA(config-if)#ip add 10.1.1.1 255.255.255.0
routerA(config-if)#no sh
routerA(config-if)#int s1/1
routerA(config-if)#ip add 192.168.1.1 255.255.255.0
routerA(config-if)#no sh
routerA(config-if)#exit
routerA(config)#exit
routerA#show run
Step2:路由器A 上配置到达子网172.16.1.0 的默认路由
routerA(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2
查看路由表信息
routerA#show ip route
step3.定义内部网络中允许访问外部的控制列表
routerA(config)#access-list 1 permit 10.1.1.0 0.0.0.255
step4.定义合法的IP 地址池
routerA(config)#ip nat pool only 192.168.1.3 192.168.1.3 netmask
255.255.255.0
step5.指定网络地址转换映射
routerA(config)#ip nat inside source list 1 pool only overload
step6.在内部和外部端口上启用NAT
routerA(config)#int f0/0
routerA(config-if)#ip nat inside
routerA(config)#int s1/1
routerA(config-if)#ip nat outside
step7. RuteB 端置IP 地址
routerB #conf t
routerB (config)#int f0/0
routerB (config-if)#ip add 10.1.1.1 255.255.255.0
routerB (config-if)#no sh
routerB (config-if)#int s1/1
routerB (config-if)#ip add 192.168.1.1 255.255.255.0
routerB (config-if)#no sh
routerB (config-if)#exit
routerB (config)#exit
routerB#show run
Step8:路由器B 上配置到达子网172.16.1.0 的默认路由
routerB (config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2
查看路由表信息
routerB #show ip route
step9.定义内部网络中允许访问外部的控制列表
routerB (config)#access-list 1 permit 172.16.1.0 0.0.0.255
step10.定义合法的IP 地址池
routerB (config)#ip nat pool only 192.168.1.4 192.168.1.4 netmask
255.255.255.0
step11.指定网络地址转换映射
routerB (config)#ip nat inside source list 1 pool only overload
step12.在内部和外部端口上启用NAT
routerB (config)#int f0/0
routerA(config-if)#ip nat inside
routerB (config)#int s1/1
routerB (config-if)#ip nat outside
step13. 验证.
在主机10.1.1.2 上ping192.168.1.2
在主机172.16.1.3 上ping192.168.1.1
查看路由器A 的 NAT 地址转换表
routerA #show ip nat translations
查看路由器B 的NAT 地址转换表
routerB#show ip nat translations
任务四:PAT 配置(复用路由器外部接口地址)
step1. RuteA 端置IP 地址
routerA#conf t
routerA(config)#int f0/0
routerA(config-if)#ip add 10.1.1.1 255.255.255.0
routerA(config-if)#no sh
routerA(config-if)#int s1/1
routerA(config-if)#ip add 192.168.1.1 255.255.255.0
routerA(config-if)#no sh
routerA(config-if)#exit
routerA(config)#exit
routerA#show run
Step2:路由器A 上配置到达子网172.16.1.0 的默认路由
routerA(config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2
查看路由表信息
routerA#show ip route
step3.指定网络地址转换映射
routerA(config)#ip nat inside source list 1 int erface s1/1 overload
step4.在内部和外部端口上启用NAT
routerA(config)#int f0/0
routerA(config-if)#ip nat inside
routerA(config)#int s1/1
routerA(config-if)#ip nat outside
step5. routerB 端置IP 地址
routerB #conf t
routerB (config)#int f0/0
routerB (config-if)#ip add 10.1.1.1 255.255.255.0
routerB (config-if)#no sh
routerB (config-if)#int s1/1
routerB (config-if)#ip add 192.168.1.1 255.255.255.0
routerB (config-if)#no sh
routerB (config-if)#exit
routerB (config)#exit
routerB #show run
Step6:路由器A 上配置到达子网172.16.1.0 的默认路由
routerB (config)#ip route 0.0.0.0 0.0.0.0 192.168.1.2
查看路由表信息
routerB #show ip route
step7.指定网络地址转换映射
routerB (config)#ip nat inside source list 1 interface s1/1 overload
step8.在内部和外部端口上启用NAT
routerB (config)#int f0/0
routerB (config-if)#ip nat inside
routerB (config)#int s1/1
routerB (config-if)#ip nat outside
step9. 验证.
在主机10.1.1.2 上ping192.168.1.2
在主机172.16.1.3 上ping192.168.1.1
查看路由器A 的 NAT 地址转换表
routerA#show ip nat translations
查看路由器B 的NAT 地址转换表
routerB#show ip nat translations
任务五:TCP 负载均衡实验拓扑图
Step1.配置各设备的IP 地址(略),关闭交换机的路由功能(no ip routing)
Step2.RouteA 上配置静态路由,下一跳指向172.16.1.2
RouteA(config)#ip route 0.0.0.0 0.0.0.0 172.16.1.2
step3.为虚拟主机定义一个标准的IP 访问控制列表
RouteA(config)#access-list 1 permit 10.1.1.127
Step4.为真实主机定义一个NAT 地址集
RouteA(config)#ip nat pool real 10.1.1.2 10.1.1.4 prefix-length 24
type rotary
Step5.设置访问控制列表与NAT 地址集之间的映射
RouteA(config)#ip nat inside destination list 1 pool real
Step6. 验证.
在主机10.1.1.2 上ping192.168.1.2
在主机172.16.1.3 上ping192.168.1.1
查看路由器A 的 NAT 地址转换表
routerA#show ip nat translations
查看路由器B 的NAT 地址转换表
routerB#show ip nat translations
设置端口镜像
[
|
2009/11/27 13:09]
|
2009/11/27 13:09]
华为交换机端口监听配置
华为交换机用户手册中,端口监听被称为“端口镜像”(Port Mirroring)。
使用Huawei Lanswitch View管理系统添加一个镜像端口:
选择 Device Setup或Stack Setup。
点击 Port Mirroring。
点击 Add按钮。对于堆叠,点击Switch并从列表选择一个交换机。
点击 Reflect from并选择流量将被镜像的端口。
点击 Reflect to并选上面所选择的端口上的
华为路由器端口监听配置
镜像是一个端口的数据射被映到另一个端口,进行数据分析。
[Quidway]monitor-port e0/8
[Quidway]port mirror e0/1
或:
[Quidway]port mirror e0/1 to e0/2 observing-port e0/8
一、思科交换机端口监听配置
CISCO交换机分为两种,在CATALYST家族中称监听端口为分析端口(analysis port)。
1、Catalyst 2900XL/3500XL/2950系列交换机端口监听配置(基于CLI)
以下命令配置端口监听:port monitor
例如,F0/1和F0/2、F0/5同属VLAN1,F0/1监听F0/2、F0/5端口:
interface FastEthernet0/1
port monitor FastEthernet0/2
port monitor FastEthernet0/5
port monitor VLAN1
2、Catalyst 4000/5000/6000系列机端口监听配置(基于交换IOS)
以下命令配置端口监听:
set span
例如,模块6中端口1和端口2同属VLAN1,端口3在VLAN2,端口4和5在VLAN2,端口2监听端口1和3、4、5,
set span 6/1,6/3-5 6/2
华为交换机用户手册中,端口监听被称为“端口镜像”(Port Mirroring)。
使用Huawei Lanswitch View管理系统添加一个镜像端口:
选择 Device Setup或Stack Setup。
点击 Port Mirroring。
点击 Add按钮。对于堆叠,点击Switch并从列表选择一个交换机。
点击 Reflect from并选择流量将被镜像的端口。
点击 Reflect to并选上面所选择的端口上的
华为路由器端口监听配置
镜像是一个端口的数据射被映到另一个端口,进行数据分析。
[Quidway]monitor-port e0/8
[Quidway]port mirror e0/1
或:
[Quidway]port mirror e0/1 to e0/2 observing-port e0/8
一、思科交换机端口监听配置
CISCO交换机分为两种,在CATALYST家族中称监听端口为分析端口(analysis port)。
1、Catalyst 2900XL/3500XL/2950系列交换机端口监听配置(基于CLI)
以下命令配置端口监听:port monitor
例如,F0/1和F0/2、F0/5同属VLAN1,F0/1监听F0/2、F0/5端口:
interface FastEthernet0/1
port monitor FastEthernet0/2
port monitor FastEthernet0/5
port monitor VLAN1
2、Catalyst 4000/5000/6000系列机端口监听配置(基于交换IOS)
以下命令配置端口监听:
set span
例如,模块6中端口1和端口2同属VLAN1,端口3在VLAN2,端口4和5在VLAN2,端口2监听端口1和3、4、5,
set span 6/1,6/3-5 6/2
思科3640 配置单臂路由
[
|
2009/11/26 17:32]
|
2009/11/26 17:32]
1.利用路由器R1、R2模拟PC,关闭其路由功能;
2.将路由器R1的Fa0/0端口的ip设为:192.168.1.2/24,默认网关设为:192.168.1.1;
3.将路由器R2的Fa0/0端口的ip设为:192.168.0.2/24,默认网关设为:192.168.0.1;
4.将交换机SW1关闭路由功能,作为二层交换机使用,并划分VLAN14、VLAN15两个VLAN;
5.将交换机SW1的Fa1/14端口加入到VLAN14中,将Fa1/15端口加入到VLAN15中;
6.在路由器R3的Fa0/0接口启用子接口Fa0/0.14(ip设为:192.168.0.1/24)、Fa0/0.15(ip设为:192.168.1.1/24)并封装相应的VLAN号;
图如下:
实验配置过程:
交换机SW1的配置清单:
1.划分VLAN:
SW1#vlan data
SW1(vlan)#vlan 14
SW1(vlan)#vlan 15
SW1(vlan)#exit
2.将端口加入到相应的VLAN:
SW1(config)#int fa1/14
SW1(config-if)#speed 100
SW1(config-if)#duplex full
SW1(config-if)#switchport mod acc
SW1(config-if)#switchport acc vlan 14
SW1(config-if)#exit
SW1(config)#int fa1/15
SW1(config-if)#duplex full
SW1(config-if)#switchport mod acc
SW1(config-if)#switchport acc vlan 15
SW1(config-if)#exit
3.为Fa1/13端口配置干道:
SW1(config)#int fa1/13
SW1(config-if)#switchport mod trunk
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#no shut
SW1(config-if)#exit
4.关闭交换机的路由功能:
SW1(config)#no ip routing
路由器R3的配置清单:
1.开启路由器R3的路由功能:
R3(config)#ip routing
2.启用子接口、封装VLAN并设置ip:
R3(config)#int fa0/0.14
R3(config-subif)#encapsulation dot1q 14
R3(config-subif)#ip add 192.168.0.1 255.255.255.0
R3(config-subif)#no shut
R3(config-subif)#exit
R3(config)#int fa0/0.15
R3(config-subif)#encapsulation dot1q 15
R3(config-subif)#ip add 192.168.1.1 255.255.255.0
R3(config-subif)#no shut
R3(config-subif)#exit
3.配置Fa0/0端口并启动该端口:
R3(config)#int fa0/0
R3(config-if)#duplex full
R3(config-if)#no shut
路由器R2的配置清单:
R2(config)#no ip routing
R2(config)#ip default-gateway 192.168.0.1
R2(config)#int fa0/0
R2(config-if)#duplex full
R2(config-if)#ip add 192.168.0.2 255.255.255.0
R2(config-if)#no shut
路由器R1的配置清单:
R1(config)#no ip routing
R1(config)#ip default-gateway 192.168.1.1
R1(config)#int fa0/0
R1(config-if)#duplex full
R1(config-if)#ip add 192.168.1.2 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
2.将路由器R1的Fa0/0端口的ip设为:192.168.1.2/24,默认网关设为:192.168.1.1;
3.将路由器R2的Fa0/0端口的ip设为:192.168.0.2/24,默认网关设为:192.168.0.1;
4.将交换机SW1关闭路由功能,作为二层交换机使用,并划分VLAN14、VLAN15两个VLAN;
5.将交换机SW1的Fa1/14端口加入到VLAN14中,将Fa1/15端口加入到VLAN15中;
6.在路由器R3的Fa0/0接口启用子接口Fa0/0.14(ip设为:192.168.0.1/24)、Fa0/0.15(ip设为:192.168.1.1/24)并封装相应的VLAN号;
图如下:
实验配置过程:
交换机SW1的配置清单:
1.划分VLAN:
SW1#vlan data
SW1(vlan)#vlan 14
SW1(vlan)#vlan 15
SW1(vlan)#exit
2.将端口加入到相应的VLAN:
SW1(config)#int fa1/14
SW1(config-if)#speed 100
SW1(config-if)#duplex full
SW1(config-if)#switchport mod acc
SW1(config-if)#switchport acc vlan 14
SW1(config-if)#exit
SW1(config)#int fa1/15
SW1(config-if)#duplex full
SW1(config-if)#switchport mod acc
SW1(config-if)#switchport acc vlan 15
SW1(config-if)#exit
3.为Fa1/13端口配置干道:
SW1(config)#int fa1/13
SW1(config-if)#switchport mod trunk
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#no shut
SW1(config-if)#exit
4.关闭交换机的路由功能:
SW1(config)#no ip routing
路由器R3的配置清单:
1.开启路由器R3的路由功能:
R3(config)#ip routing
2.启用子接口、封装VLAN并设置ip:
R3(config)#int fa0/0.14
R3(config-subif)#encapsulation dot1q 14
R3(config-subif)#ip add 192.168.0.1 255.255.255.0
R3(config-subif)#no shut
R3(config-subif)#exit
R3(config)#int fa0/0.15
R3(config-subif)#encapsulation dot1q 15
R3(config-subif)#ip add 192.168.1.1 255.255.255.0
R3(config-subif)#no shut
R3(config-subif)#exit
3.配置Fa0/0端口并启动该端口:
R3(config)#int fa0/0
R3(config-if)#duplex full
R3(config-if)#no shut
路由器R2的配置清单:
R2(config)#no ip routing
R2(config)#ip default-gateway 192.168.0.1
R2(config)#int fa0/0
R2(config-if)#duplex full
R2(config-if)#ip add 192.168.0.2 255.255.255.0
R2(config-if)#no shut
路由器R1的配置清单:
R1(config)#no ip routing
R1(config)#ip default-gateway 192.168.1.1
R1(config)#int fa0/0
R1(config-if)#duplex full
R1(config-if)#ip add 192.168.1.2 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
交换机路由器2系列,以及防火墙525命令汇总
[
|
2009/11/17 14:43]
|
2009/11/17 14:43]
交换机支持的命令:
交换机基本状态:
switch: ;交换机的ROM状态
rommon> ;路由器的ROM状态
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 ;查看指定端口信息
交换机基本状态:
switch: ;交换机的ROM状态
rommon> ;路由器的ROM状态
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
switch(config)#vtp password
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
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 ;查看指定端口信息




姓名:传奇
