Cisco路由配置语句汇总
+ 在Linux下成功运行最新的QQ和MSN
+ 网络最经典命令行-网络安全工作者的必杀技 启动接口,分配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 <--通告标准A,B,C类网-->
router(config-if)# ^z
配置IGRP路由协议:90秒更新一次
router(config)# router igrp AS-Number <-- AS-Number范围1~65535-->
router(config-if)# network Network-Number <--通告标准A,B,C类网-->
router(config-if)# ^z
配置Novell IPX路由协议:Novell RIP 60秒更新一次
router(config)# ipx routing [node address]
router(config)# ipx maximum-paths Paths <--设置负载平衡,范围1~512-->
router(config)# interface Type Port
router(config-if)# ipx network Network-Number [encapsulation encapsulation-type] [secondary] <--通告标准A,B,C类网-->
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 <--配置ISDN交换机类型,中国使用basic-net3-->
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 ]
<--配置静态Invers ARP表:
router(config)# frame-relay Protocol Protocol-Address DLCI [ Broadcast ] [ ietf | cisco ] [ payload-compress | packet-by-packet ]
-->
<--设置Keepalive间隔:
router(config-if)# keepalive Number
-->
<--为本地接口指定DLCI:
router(config-if)# frame-lelay local-dlci Number
-->
<--子接口配置:
router(config-if)# interface Type Port.Subininterface-Number [ multipoint | point-to-point ]
router(config-subif)# ip unnumbered Interface
router(config-subif)# frame-lelay local-dlci Number
-->
router(config-if)# ^z
配置标准ACL:
router(config)# access-list Access-List-Number [ permit | deny ] source [ source-mask ] <-- Access-List-Number 范围:1~99标准ACL;100~199扩展ACL;800~899标准IPX ACL;900~999扩展IPX ACL;1000~1099 IPX SAP ACL;600~699Apple Talk ACL-->
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 ]
router(config)# interface Type Port
router(config-if)# ip access-group Access-List-Number [ in | out ]
router(config-if)# ^z
配置命名ACL:
router(config)# ip access-list [ standard | extended ] ACL-Name
router(config [ std- | ext- ] nacl)# [ permit | deny ] [ IP-Access-List-Test-Conditions ]
router(config [ std- | ext- ] nacl)# no [ permit | deny ] [ IP-Access-List-Test-Conditions ]
router(config [ std- | ext- ] nacl)# ^z
router(config)# interface Type Port
router(config-if)# ip access-group [ACL-Name | 1~199 ] [ in | out ]
router(config-if)# ^z
配置DCE时钟:
router# show controllers Type Port <--确定DCE接口-->
router(confin-if)# clock rate 64000 <--进入DCE接口设置时钟速率-->
router(config-if)# ^z
配置PPP协议:
router(config)# username Name password Set-Password-Here <--验证方建立数据库-->
router(config)# interface Type Port
router(config-if)# encapsulation ppp <--启动PPP协议-->
router(config-if)# ppp outhentication [ chap | chap pap | pap chap | pap ] <--选择PPP认证-->
router(config-if)# ppp pap sent-username Name password Password <--发送验证信息-->
router(config-if)# ^z
PAP单向认证配置实例:
验证方:
router-server(config)# username Client password 12345 <--验证方建立数据库-->
router-server(config)# interface serial 0
router-server(config-if)# encapsulation ppp
router-server(config-if)# ppp authentication pap <--选择使用PAP实现PPP认证-->
router-server(config-if)# ^z
被验证方:
router-client(config-if)# encapsulation ppp
router-client(config-if)# ppp pap sent-username Client password 12345 <--发送验证信息-->
router-client(config-if)# ^z
PAP双向认证配置实例:
路由器 A:
routerA(config)# username B password 12345
routerA(config)# interface serial 0
routerA(config-if)# encapsulation ppp
routerA(config-if)# ppp authentication pap
routerA(config-if)# ppp pap sent-username A password 54321
routerA(config-if)# ^z
路由器 B:
routerB(config)# username A password 54321
routerB(config)# interface serial 1
routerB(config-if)# encapsulation ppp
routerB(config-if)# ppp authentication pap
routerB(config-if)# ppp pap sent-username B password 12345
routerB(config-if)# ^z
CHAP单向认证配置实例:
验证方:
router-server(config)# username router-client password 12345
router-server(config)# interface serial 0
router-server(config-if)# encapsulation ppp
router-server(config-if)# ppp authentication chap
router-server(config-if)# ^z
被验证方:
router-client(config-if)# encapsulation ppp
router-client(config-if)# ppp authentication chap
router-client(config-if)# ppp chap hostname router-client
router-client(config-if)# ppp chap password 12345
router-client(config-if)# ^z
CHAP双向认证配置实例:
路由器 A:
routerA(config)# username routerB password 12345
routerA(config)# interface serial 0
routerA(config-if)# encapsulation ppp
routerA(config-if)# ppp authentication chap
routerA(config-if)# ppp chap hostname routerA
routerA(config-if)# ppp chap password 54321
routerA(config-if)# ^z
在Linux下成功运行最新的QQ和MSN大家现在烦恼怎样同时运行最新的QQ和MSN,我的思路有两个,一是QQ for gaim0.64+gaim0.71,二是QQ for gaim0.64+kmess 1.3(支持MSN6.0),那我们开始安装吧.
一、QQ for gaim0.64+gaim0.71
1、先下载gaim0.64、gaim-0.64-libqqpatched和gaim0.71
2、安装gaim 0.64
cd /root
tar xvfz gaim-0.64-libqqpatched.tar.gz
cd gaim-0.64
./configure --prefix=/usr/bin/gaim
make
make install
3、安装libqq
cd /usr/local/share/pixmaps/gaim/status/default
tar xvfz ~/gaim-0.64/libqqpatched/qqfaces.tar.gz
cd /usr/local/share/pixmaps/gaim/smileys/default/
tar xvfz ~/gaim-0.64/libqqpatched/qq_smiley.tar.gz
cp ~/gaim-0.64/libqqpatched/wry.dll ~/.gaim
rm /usr/local/lib/gaim/libqq*.so
cp ~/gaim-0.64/libqqpatched/libqq-0.0.3-xfer-0.64-gcc32.so /usr/bin/gaim
4、安装Gaim 0.71 & msn
compile nspr (
http://www.mozilla.org/projects/nspr/) tar zxvf nspr-4.3.tar.gz
cd nspr-4.3
mkdir build
mkdir inst
cd build
../mozilla/nsprpub/configure --prefix=~/nspr-4.3/inst
make
make install
cp -rfL dist/* /usr
compile nss (
http://www.mozilla.org/projects/security/pki/nss) tar zxvf nss-3.8.tar.gz
cd nss-3.8
echo 'INCLUDES += -I/usr/include/nspr -I$(DIST)/include/dbm'
>> mozilla/security/coreconf/headers.mk
sed -e 's:$(DIST)/lib/$(LIB_PREFIX)plc4:/usr/lib/$(LIB_PREFIX)plc4:' -e 's:$(DIST)/lib/$(LIB_PREFIX)plds4:/usr/lib/$(LIB_PREFIX)plds4:' -i mozilla/security/nss/lib/ckfw/builtins/Makefile
sed -e 's:$(DIST)/lib/$(LIB_PREFIX)plc4:/usr/lib/$(LIB_PREFIX)plc4:' -e 's:$(DIST)/lib/$(LIB_PREFIX)plds4:/usr/lib/$(LIB_PREFIX)plds4:' -i mozilla/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile
sed -e 's:SOURCE_PREFIX = $(CORE_DEPTH)/../dist:SOURCE_PREFIX = $(CORE_DEPTH)/dist:' -i mozilla/security/coreconf/source.mk
cp mozilla/security/coreconf/Linux2.5.mk mozilla/cdsecurity/coreconf/Linux2.6.mk
cd mozilla/security/coreconf
make BUILD_OPT=1
cd -; cd mozilla/security/dbm
make BUILD_OPT=1
cd -; cd mozilla/security/nss
make BUILD_OPT=1
cd -; cd mozilla/security/dist
mkdir /usr/lib/nss
cp -L */lib/*.a /usr/lib/nss
cp */lib/*.so /usr/lib
mkdir /usr/include/nss
cp private/nss/*.h /usr/includes/nss
cp public/nss/*.h /usr/include/nss
compile gaim-0.71
tar jxvf gaim-0.71.tar.bz2
cd gaim-0.71
./configure --prefix=/usr --with-nss-includes=/usr/include/nss --with-nspr-includes=/usr/include/nspr
(you should see SSL/Library/Libraries.....: Mozilla NSS)
make && make install
安装后的设置。
a) 现在gaim0.64主程序在/usr/bin/gaim,插件目录是/usr/lib/gaim/;gaim0.71编译安装后,主程序是/usr/local/bin/gaim,插件目录是/usr/local/lib/gaim。gaim的默认安装目录在下载源码编译时是可以更改的,具体请在gaim的源码目录中用 ./configure --help 命令查看。
b) gaim默认的配置文件是用户目录下面的.gaimrc(文件名前面有个点),也可以用用户指定的其他配置文件,这是实现不同版本gaim共存的关键。以我的系统为例,具体做法是:
先运行0.64版的gaim,即/usr/bin/gaim,然后只安装libqq插件,帐号也只设置一个qq的帐号。退出后,将生成的 .gaimrc 文件改名为 .gaimrc-0.64, 即
mv .gaimrc .gaimrc-0.64
c) 再运行0.71版的gaim,即/usr/local/bin/gaim,此时可以安装其他的插件,设置其他的帐号,退出后,也将 .gaimrc改名,如:
mv .gaimrc .gaimrc-0.71
d) 运行时的命令
如果想要用0.64版的gaim,运行命令是:
/usr/bin/gaim -f $HOME/.gaimrc-0.64
同理,运行0.71版gaim的命令是:
/usr/local/bin/gaim -f $HOME/.gaimrc-0.71
可以在桌面分别建立这两个命令的快捷方式,就可以方便地使用两个版本的gaim了。
二、QQ for gaim0.64+kmess 1.3
1、载gaim0.64、gaim-0.64-libqqpatched和kmess 1.3
2、安装和运行QQ plugin 0.0.3 + Gaim 0.64
1)Install gaim 0.64
cd /root
tar xvfz gaim-0.64-libqqpatched.tar.gz
cd gaim-0.64
./configure
make
make install
2)Install libqq
cd /usr/local/share/pixmaps/gaim/status/default
tar xvfz ~/gaim-0.64/libqqpatched/qqfaces.tar.gz
cd /usr/local/share/pixmaps/gaim/smileys/default/
tar xvfz ~/gaim-0.64/libqqpatched/qq_smiley.tar.gz
cp ~/gaim-0.64/libqqpatched/wry.dll ~/.gaim
rm /usr/local/lib/gaim/libqq*.so
cp ~/gaim-0.64/libqqpatched/libqq-0.0.3-xfer-0.64-gcc32.so /usr/local/lib/gaim
3)Run gaim
3、安装kmess1.3
# cd /usr/lib
# ln -s libmimelib.so.1 /usr/lib/libmimelib.so
# ./configure --prefix=/usr
# make
# make install
呵呵,两种方法自己选择。
网络最经典命令行-网络安全工作者的必杀技网络最经典命令行-网络安全工作者的必杀技
1.最基本,最常用的,测试物理网络的
ping 192.168.0.8 -t ,参数-t是等待用户去中断测试
2.查看DNS、IP、Mac等
A.Win98:winipcfg
B.Win2000以上:Ipconfig/all
C.NSLOOKUP:如查看河北的DNS
C:\>nslookup
Default Server: ns.hesjptt.net.cn
Address: 202.99.160.68
>server 202.99.41.2 则将DNS改为了41.2
> pop.pcpop.com
Server: ns.hesjptt.net.cn
Address: 202.99.160.68
Non-authoritative answer:
Name: pop.pcpop.com
Address: 202.99.160.212
3.网络信使
Net send 计算机名/IP * (广播) 传送内容,注意不能跨网段
net stop messenger 停止信使服务,也可以在面板-服务修改
net start messenger 开始信使服务
4.探测对方对方计算机名,所在的组、域及当前用户名 (追捕的工作原理)
ping -a IP -t ,只显示NetBios名
nbtstat -a 192.168.10.146 比较全的
5.netstat -a 显示出你的计算机当前所开放的所有端口
netstat -s -e 比较详细的显示你的网络资料,包括TCP、UDP、ICMP 和 IP的统计等
6.探测arp绑定(动态和静态)列表,显示所有连接了我的计算机,显示对方IP和MAC地址
arp -a
7.在代理服务器端
捆绑IP和MAC地址,解决局域网内盗用IP!:
ARP -s 192.168.10.59 00 -50-ff-6c-08-75
解除网卡的IP与MAC地址的绑定:
arp -d 网卡IP
8.在网络邻居上隐藏你的计算机
net config server /hidden:yes
net config server /hidden:no 则为开启
9.几个net命令
A.显示当前工作组服务器列表 net view,当不带选项使用本命令时,它就会显示当前域或网络上的计算机上的列表。
比如:查看这个IP上的共享资源,就可以
C:\>net view 192.168.10.8
在 192.168.10.8 的共享资源
资源共享名 类型 用途 注释
--------------------------------------
网站服务 Disk
命令成功完成。
B.查看计算机上的用户帐号列表 net user
C.查看网络链接 net use
例如:net use z: \192.168.10.8\movie 将这个IP的movie共享目录映射为本地的Z盘
D.记录链接 net session
例如: C:\>net session
计算机 用户名 客户类型 打开空闲时间
-------------------------------------------------------------------------------
\192.168.10.110 ROME Windows 2000 2195 0 00:03:12
\192.168.10.51 ROME Windows 2000 2195 0 00:00:39
命令成功完成。
10.路由跟踪命令
A.tracert pop.pcpop.com
B.pathping pop.pcpop.com 除了显示路由外,还提供325S的分析,计算丢失包的%
11.关于共享安全的几个命令
A.查看你机器的共享资源 net share
B.手工删除共享(可以编个bat文件,开机自运行,把共享都删了!)
net share c$ /d
net share d$ /d
net share ipc$ /d
net share admin$ /d
注意$后有空格。
C.增加一个共享:
c:\net share mymovie=e:\downloads\movie /users:1
mymovie 共享成功。
同时限制链接用户数为1人。
12.在DOS行下设置静态IP
A.设置静态IP
CMD
netsh
netsh>int
interface>ip
interface ip>set add "本地链接" static IP地址 mask gateway
B.查看IP设置
interface ip>show address
Arp
显示和修改“地址解析协议 (ARP)”缓存中的项目。ARP 缓存中包含一个或多个表,它们用于存储 IP 地址及其经过解析的以太网或令牌环物理地址。计算机上安装的每一个以太网或令牌环网络适配器都有自己单独的表。如果在没有参数的情况下使用,则 arp 命令将显示帮助信息。
语法
arp [-a [InetAddr] [-N IfaceAddr]] [-g [InetAddr] [-N IfaceAddr]] [-d InetAddr [IfaceAddr]] [-s InetAddr EtherAddr [IfaceAddr]]
参数
-a [InetAddr] [-N IfaceAddr]
显示所有接口的当前 ARP 缓存表。要显示指定 IP 地址的 ARP 缓存项,请使用带有 InetAddr 参数的 arp -a,此处的 InetAddr 代表指定的 IP 地址。要显示指定接口的 ARP 缓存表,请使用 -N IfaceAddr 参数,此处的 IfaceAddr 代表分配给指定接口的 IP 地址。-N 参数区分大小写。
-g [InetAddr] [-N IfaceAddr]
与 -a 相同。
-d InetAddr [IfaceAddr]
删除指定的 IP 地址项,此处的 InetAddr 代表 IP 地址。对于指定的接口,要删除表中的某项,请使用 IfaceAddr 参数,此处的 IfaceAddr 代表分配给该接口的 IP 地址。要删除所有项,请使用星号 (*) 通配符代替 InetAddr。
-s InetAddr EtherAddr [IfaceAddr]
向 ARP 缓存添加可将 IP 地址 InetAddr 解析成物理地址 EtherAddr 的静态项。要向指定接口的表添加静态 ARP 缓存项,请使用 IfaceAddr 参数,此处的 IfaceAddr 代表分配给该接口的 IP 地址。
在命令提示符显示帮助。
注释
InetAddr 和 IfaceAddr 的 IP 地址用带圆点的十进制记数法表示。
物理地址 EtherAddr 由六个字节组成,这些字节用十六进制记数法表示并且用连字符隔开(比如,00-AA-00-4F-2 A-9C)。
通过 -s 参数添加的项属于静态项,它们不会 ARP 缓存中超时。如果终止 TCP/IP 协议后再启动,这些项会被删除。要创建永久的静态 ARP 缓存项,请在批处理文件中使用适当的 arp 命令并通过“计划任务程序”在启动时运行该批处理文件。
只有当网际协议 (TCP/IP) 协议在 网络连接中安装为网络适配器属性的组件时,该命令才可用。
范例
要显示所有接口的 ARP 缓存表,可键入:
arp -a
对于指派的 IP 地址为 10.0.0.99 的接口,要显示其 ARP 缓存表,可键入:
arp -a -N 10.0.0.99
要添加将 IP 地址 10.0.0.80 解析成物理地址 00-AA-00-4F-2 A-9C 的静态 ARP 缓存项,可键入:
arp -s 10.0.0.80 00-AA-00-4F-2 A-9C
At
计划在指定时间和日期在计算机上运行命令和程序。at 命令只能在“计划”服务运行时使用。如果在没有参数的情况下使用,则 at 列出已计划的命令。
语法
at [\ComputerName] [{[ID] [/delete] /delete [/yes]}]
at [[\ComputerName] hours:minutes [/interactive] [{/every:date[,...] /next:date[,...]}] command]
参数
\computername
指定远程计算机。如果省略该参数,则 at 计划本地计算机上的命令和程序。
ID
指定指派给已计划命令的识别码。
/delete
取消已计划的命令。如果省略了 ID,则计算机中所有已计划的命令将被取消。
/yes
删除已计划的事件时,对来自系统的所有询问都回答“是”。
hours:minutes
指定命令运行的时间。该时间用 24 小时制(即从 00:00 [午夜] 到 23:59)的 小时: 分钟格式表示。
/interactive
对于在运行 command 时登录的用户,允许 command 与该用户的桌面进行交互。
/every:
在每个星期或月的指定日期(例如,每个星期四,或每月的第三天)运行 command 命令。
date
指定运行命令的日期。可以指定一周的某日或多日(即,键入 M、T、W、Th、F、S、Su)或一个月中的某日或多日(即,键入从 1 到31 之间的数字)。用逗号分隔多个日期项。如果省略了 date,则 at 使用该月的当前日。
/next:
在下一个指定日期(比如,下一个星期四)到来时运行 command。
command
指定要运行的 Windows 命令、程序(.exe 或 .com 文件)或批处理程序(.bat 或 .cmd 文件)。当命令需要路径作为参数时,请使用绝对路径,也就是从驱动器号开始的整个路径。如果命令在远程计算机上,请指定服务器和共享名的通用命名协定 (UNC) 符号,而不是远程驱动器号。
/?
在命令提示符显示帮助。
注释
Schtasks 是功能更为强大的超集命令行计划工具,它含有 at 命令行工具中的所有功能。对于所有的命令行计划任务,都可以使用 schtasks 来替代 at。有关 schtasks 的详细信息,请参阅“相关主题”。
使用 at
使用 at 命令时,要求您必须是本地 Administrators 组的成员。