2009年4月26日星期日

Cisco E1配置白皮书

E1知识点总结
1、一条E1是2.048M的链路,用PCM编码。
2、一个E1的帧长为256个bit,分为32个时隙,一个时隙为8个bit。
3、每秒有8k个E1的帧通过接口,即8K*256=2048kbps。
4、每个时隙在E1帧中占8bit,8*8k=64k,即一条E1中含有32个64K。

E1帧结构
E1有成帧,成复帧与不成帧三种方式,在成帧的E1中第0时隙用于传输帧同步数据,其余31个时隙可以用于传输有效数据;在成复帧的E1中,除了第0时隙外,第16时隙是用于传输信令的,只有第1到15,第17到第31共30个时隙可用于传输有效数据;而在不成帧的E1中,所有32个时隙都可用于传输有效数据.

一. E1基础知识

E1信道的帧结构简述
  在E1信道中,8bit组成一个时隙(TS),由32个时隙组成了一个帧(F),16个 帧组成一个复帧(MF)。在一个帧中,TS0主要用于传送帧定位信号(FAS)、
CRC-4(循环冗余校验)和对端告警指示,TS16主要传送随路信令(CAS)、复帧定位信号和复帧对端告警指示,TS1至TS15和TS17至TS31共30个时隙传送话音或数据等信息。我们称TS1至TS15和TS17至TS31为“净荷”,TS0和TS16为“开销”。如果采用带外公共信道信令(CCS),TS16就失去了传送信令的用途,该时隙也可用来传送信息信号,这时帧结构的净荷为TS1至TS31,开销只有 TS0了。
由PCM编码介绍E1:
由PCM编码中E1的时隙特征可知,E1共分32个时隙TS0-TS31。每
个时隙为64K,其中TS0为被帧同步码,Si, Sa4, Sa5, Sa6,Sa7
,A比特占用, 若系统运用了CRC校验,则Si比特位置改传CRC校验
码。TS16为信令时隙, 当使用到信令(共路信令或随路信令)时,该
时隙用来传输信令, 用户不可用来传输数据。所以2M的PCM码型有

① PCM30 : PCM30用户可用时隙为30个, TS1-TS15,
TS17-TS31。TS16传送信令,无CRC校验。
② PCM31: PCM30用户可用时隙为31个, TS1-TS15,
TS16-TS31。TS16不传送信令,无CRC校验。
③ PCM30C: PCM30用户可用时隙为30个, TS1-TS15,
TS17-TS31。TS16传送信令,有CRC校验。
④ PCM31C: PCM30用户可用时隙为31个, TS1-TS15,
TS16-TS31。TS16不传送信令,有CRC校验。

CE1,就是把2M的传输分成了30个64K的时隙,一般写成N*64,
你可以利用其中的几个时隙,也就是只利用n个64K,必须接在ce1/pri上。


CE1----最多可有31个信道承载数据 timeslots 1----31
timeslots 0 传同步

二. 接口
G.703非平衡的75 ohm,平衡的120 ohm2种接口

三. 使用E1有三种方法,
1,将整个2M用作一条链路,如DDN 2M;
2,将2M用作若干个64k及其组合,如128K,256K等,这就是CE1;
3,在用作语音交换机的数字中继时,这也是E1最本来的用法,是把一条E1作为32个64K来用,但是时隙0和时隙15是用作signaling即信令的,所以一条E1可以传30路话音。PRI就是其中的最常用的一种接入方式,标准叫PRA信令。

用2611等的广域网接口卡,经V.35-G.703转换器接E1线。这样的成本应该比E1卡低的

目前DDN的2M速率线路通常是经HDSL线路拉至用户侧.
E1可由传输设备出的光纤拉至用户侧的光端机提供E1服务.

四. 使用注意事项
E1接口对接时,双方的E1不能有信号丢失/帧失步/复帧失步/滑码告警,但是双方在E1接口参数上必须完全一致,因为个别特性参数的不一致,不会在指示灯或者告警台上有任何告警,但是会造成数据通道的不通/误码/滑码/失步等情况。这些特性参数主要有;阻抗/ 帧结构/CRC4校验,阻有75ohm和120ohm两种,帧结构有PCM31/PCM30/不成帧三种;在新桥节点机中将PCM31和PCM30分别描述为CCS和CAS,对接时要告诉网管人员选择CCS,是否进行CRC校验可以灵活选择,关键要双方一致,这样采可保证物理层的正常。

五. 嘻嘻阿姨的问题
【 在 lzx (不倒翁) 的大作中提到: 】
: questions:
: 1. E1 与 CE1是由谁控制,电信还是互连的两侧的用户设备?用户侧肯定要求支持他们
: ,电信又是如何 分别实现的。
首先由电信决定,电信可提供E1和CE1两种线路,但一般用户的E1线路都是
CE1,除非你特别要只用E1,然后才由你的设备所决定,CE1可以当E1用,但
E1却不可以作CE1。

: 2. CE1 是32个时隙都可用是吧?
CE1的0和16时隙不用,0是传送同步号,16传送控制命令,实际能用的只有30个
时隙1-15,16-30

: 3. E1/CE1/PRI又是如何区分的和通常说的2M的关系。和DDN的2M又如何关联啊?
E1 和CE1 都是E1线路标准,PRI是ISDN主干线咱,30B+D,DDN的2M是透明线路
你可以他上面跑任何协议。
E1和CE1的区别,当然可不可分时隙了。


: 4. E1/CE1/PRI与信令、时隙的关系
E1,CE1,都是32时隙,30时隙,0、16分别传送同步信号和控制信今,PRI采用
30B+D ,30B传数据,D信道传送信令, E1都是CAS结构,叫带内信令,PRI信令与
数据分开传送,即带外信令。

: 5. CE1可否接E1。

CE1 和E1 当然可以互联。但CE1必需当E1用,即不可分时隙使用。

: 6. 为实现利用CE1实现一点对多点互连,此时中心肯定是2M了,各分支速率是
N*64K<2m,分支物理上怎么接呢?>




2、链路为E1时, channel-group编号为0-30, Timeslot范围1-31.

3、使用show controllers e1观察controller状态,以下为帧类型为crc4时controllers正常

的状态



Router# show controllers e1
E1 2/0 is up.

Applique type is Channelized E1 - balanced

Deion: To DiWang Office

No alarms detected.

alarm-trigger is not set

Framing is NO-CRC4, Line Code is HDB3, Clock Source is Line.

Data in current interval (492 seconds elapsed):

0 Line Code Violations, 0 Path Code Violations

0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins

0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs

Total Data (last 24 hours)

0 Line Code Violations, 0 Path Code Violations,

0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins,

0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs



4、以下配置为E1连3条64K专线, 帧类型为NO-CRC4,非平衡链路,路由器具体配置如下:



Router#
Building configuration...
Current configuration:
!
version 11.2
no service udp-small-servers
no service tcp-small-servers
!
hostname Router
!
enable secret 5 $1$XN08$Ttr8nfLoP9.2RgZhcBzkk/
enable password Router
!
!
ip subnet-zero
!
controller E1 0
framing NO-CRC4
channel-group 0 timeslots 1
channel-group 1 timeslots 2
channel-group 2 timeslots 3
!
interface Ethernet0
ip address 133.118.40.1 255.255.0.0
media-type 10BaseT
!
interface Ethernet1
no ip address
shutdown
!
interface Serial0:0
ip address 202.119.96.1 255.255.255.252
no ip mroute-cache
!
interface Serial0:1
ip address 202.119.96.5 255.255.255.252
no ip mroute-cache
!
interface Serial0:2
ip address 202.119.96.9 255.255.255.252
no ip mroute-cache
!
no ip classless
ip route 133.210.40.0 255.255.255.0 Serial0:0
ip route 133.210.41.0 255.255.255.0 Serial0:1
ip route 133.210.42.0 255.255.255.0 Serial0:2
!
line con 0
line aux 0
line vty 0 4
password Router
login
!
end
-----------------------------------
谈谈Cisco IOS的E1端口配置技巧

在Cisco 4500,4700,7000和7500系列里面均支持E1(2.048Mbps)数率的接口。每一个E1端口可以按时隙分成30路64K数据线路和2路信号线路。这30个64K数据线路每一路均可以当作一条64K的专线。

  功 能 命 令

  在配置模式下,定义Controller E1 controller e1 slot/port

  定义line code linecode {ami |hdb3}

  定义字符帧 framing {crc4 |no-crc4}

  定义E1组 channel-group number timeslots range [speed {48| 56| 64}]

  指定串口属于那一个channel-group组 interface serial slot/port:channel-group

  注:

  slot/port——是针对7000或7500系列的,故区分槽口号和端口号。

  linecode——默认是HDB3.

  framing——默认是crc4,要与电信局参数匹配。

  channel-group——每个E1可以分成30个channel-group,把channel-group和时间

  槽对应起来。channel-group是0-30,timeslots是1-31.

  interface serial——在定义完E1 channel-group后,我们把group赋予成一个虚拟串口
-------------------------------------------------
E1配置(转贴)
E1接口介绍



E1接口可有两种配置:

l 作为信道化(Channelized)E1接口使用。

接口在物理上分为31个时隙,可以任意地将全部时隙分成若干组,每组时隙捆绑以后作为一个接口使用,其逻辑特性与同步串口相同,支持PPP、帧中继、LAPB和X.25等链路层协议。

l 作为非信道化(Unchannelized)E1接口使用。

接口在物理上作为一个2M速率的G.703同步串口,支持PPP、帧中继、LAPB和X.25等链路层协议。

E1接口配置
配置E1接口,首先必须在全局配置态下输入controller E1命令。

命令
作用

controller E1 /
配置E1接口

slot为E1控制器所在的槽号,

group为E1控制器的链路号。


注: 3700系列路由器中E1控制器为“controller E1 0/0”,5000系列路由器中对于一口E1控制器,链路号范围为0-0,对于四口E1控制器,链路号范围为0-3。E1控制器槽号为1-4。

举例:

Router_config#controller E1 0/0

Router_config_controller_E1_0/0#

E1接口的配置任务包括:

l 配置E1接口的物理参数,包括帧校验方式、线路编解码格式和线路时钟、回环传输模式等。一般采用缺省参数即可。

l 信道化(Channelized)E1接口要求配置channel-group参数,确定时隙捆绑方式。

l 非信道化(Unchannelized)E1接口不需配置channel-group参数。

l 配置接口(Interface) 参数,

配置E1接口的工作方式
E1接口缺省为信道化(Channelized)方式。可通过unframed命令设置为非信道化(Unchannelized)方式。

命令
作用

unframed
配置为非信道化(Unchannelized)方式

no unframed
配置为信道化(Channelized)方式


举例:

Router_config#controller E1 0/0

Router_config_controller_E1_0/0# unframed

Router_config_controller_E1_0/0# no unframed

配置E1接口的帧校验方式
E1接口支持对物理帧进行CRC32校验,缺省为不校验。

命令
作用

framing crc4
配置E1接口的帧校验方式为4字节CRC校验

no framing 或

framing no-crc4
配置E1接口的不进行帧校验


配置E1接口的线路编解码格式
E1接口支持两种线路编解码格式:AMI格式和HDB3格式

缺省为HDB3格式。



命令
作用

linecode ami
配置E1接口的线路编解码格式为AMI格式

no linecode 或

linecode hdb3
配置E1接口的线路编解码格式为HDB3格式


配置E1接口的时钟方式


当E1作为同步接口使用时,同样有DTE和DCE两种工作方式,也需要选择线路时钟。当两台路由器的E1接口直接相连时,必需使两端分别工作在DTE和DCE方式;当路由器的E1接口与交换机连接时,交换机为DCE设备,而路由器的E1接口需工作在DTE方式。

E1接口缺省工作在DTE方式。

命令
作用

clock internal
配置E1接口工作在DCE方式,使用芯片内部同步信号

clock external

no clock
配置E1接口工作在DTE方式,使用线路同步信号


配置E1接口的回环传输模式
在远端回环传输模式下,E1将端口上收到的报文从收到的通道上送回。

命令
作用

loopback local
配置E1接口工作在远端回环方式

no loop
取消远端回环设置


配置E1的发送脉冲模式
选择发送脉冲模式。当电缆类型为120Ω双绞线时,应执行Cable 120时。缺省时,默认为75Ω铜轴电缆(no cable),遵守ITU-T G.703标准。两者发送脉冲不同。

命令
作用

Cable 120
配置E1接口电缆类型为120Ω双绞线

No cable
缺省为75Ω同轴电缆。


禁止E1接口链路

可以禁止某个E1接口的使用。使端口上所有interface的line的状态均为down。

命令
作用

Shutdown
禁止该E1接口链路

No shutdown
恢复E1接口链路的使用


举例:

Router_config#controller E1 0/0

Router_config_controller_E1_0/0#shutdown

Router_config_controller_E1_0/0#no shutdown

配置E1接口的channel-group参数


channel-group为E1通道号,范围为0-30,timeslot为E1时隙号,范围为1-31。通道可以占用任何未分配的时隙,并能够任意组合时隙。E1通道配置成功后产生新的interface。

no channel-group清除channel-group的时隙捆绑,相应的interface也被删除。

命令
作用

channel-group channel-group timeslots { number | number1-number2 } [,number | number1-number2 ... ]
将E1接口的时隙捆绑为channel-group

no channel-group channel-group
取消channel-group时隙捆绑


举例:

Router_config#controller E1 0/0

Router_config_controller_E1_0/0#channel 5 timeslots 18,11-13,20,22,30-28,24-25

Router_config_controller_E1_0/0#interface s0/0:5

Router_config_interface_s0/0:5#

配置E1接口的interface参数
E1接口在信道化(Channelized)方式下,当配置的channel-group参数后,系统产生新的interface。其逻辑特性与同步串口相同。名字为serial/:,其中和controller E1 /一致。

E1接口在非信道化(Unchannelized)方式下,系统产生新的interface。名字为serial/:0

可在该interface上封装PPP、帧中继、HDLC和X.25等 链路层协议。

举例:

信道化(Channelized)方式下:

Router_config#controller E1 0/0

Router_config_controller_E1_0/0#channel 1 timeslots 1-31

Router_config_controller_E1_0/0#int s0/0:1

Router_config_controller_s0/0:1#enca fr

Router_config_controller_s0/0:1#ip add 130.130.0.1 255.255.255.0

非信道化(Unchannelized)方式下:

Router_config#controller E1 0/0

Router_config_controller_E1_0/0#unframed

Router_config_controller_E1_0/0#int s0/0:0

Router_config_controller_s0/0:0#enca fr

Router_config_controller_s0/0:0#ip add 130.130.0.1 255.255.255.0

2009年4月17日星期五

E1端口配置

在Cisco 4500,4700,7000和7500系列里面均支持E1(2.048Mbps)数率的接口.每一个E1端口可以按时隙分成30路64K数据线路和2路信号线路.这30个64K数据线路每一路均可以当作一条64K的专线.
功 能        命 令
在配置模式下,定义Controller E1        controller e1 slot/port
定义line code        linecode {ami |hdb3}
定义字符帧        framing {crc4 |no-crc4}
定义E1组        channel-group number timeslots range [speed {48| 56| 64}]
指定串口属于那一个channel-group组        interface serial slot/port:channel-group
注:
slot/port----是针对7000或7500系列的,故区分槽口号和端口号.
linecode----默认是HDB3.
framing----默认是crc4,要与电信局参数匹配.
channel-group----每个E1可以分成30个channel-group,把channel-group和时间槽对应起来.channel-group是0-30,timeslots是1-31.
interface serial----在定义完E1 channel-group后,我们把group赋予成一个虚拟串口.
Channelized E1 Interface Example
假设是7500系列路由器,E1接口(MIP板)在插槽4上面.
一个channel-group可对应多个时间槽,本例中serial4/0:1有5*64Kbps的数率.具体配置过程如下:
Router#conf t
Router(config)#controller e1 4/0
Router(config-controller)#
Router(config-controller)#framing NO-CRC4
Router(config-controller)#channel-group 0 timeslots 1
(配置时隙1 为channel-group 0,即channel-group 0包含时隙1,它的带
宽就为64K)
Router(config-controller)#channel-group 1 timeslots 2,7-9,20
(配置时隙2,7,8,9,20为channel-group 1,它的带宽就为64*5=512K,在
这里7-9是指一个段,可以采用同样的命令配置多个channel-group,但需注意
channel-group对应不同的数字,而且一个时隙不能包含在多个组当中)
Router(config-controller)#exit
Router(config)#interface s4/0:0
Router(config-if)#ip address 16.217.30.2 255.255.255.252
Router(config-if)# encapsulation ppp
Router(config-if)#exit
Router(config)#interface Serial4/0:1
Router(config-if)# ip address 16.205.30.5 255.255.255.252
Router(config-if)# encapsulation ppp
(上述过程基本完成E1配置,现只需将相应端口no shut,然后保存配置即可)
下面是配置完成后关于e1的相应配置显示
Configuration for Router:
controller E1 0
framing NO-CRC4
channel-group 0 timeslots 1
channel-group 1 timeslots 2,7-9,20
!
interface Serial4/0:0
ip address 16.217.30.2 255.255.255.252
encapsulation ppp
!
interface Serial4/0:1
ip address 16.205.30.5 255.255.255.252
encapsulation ppp

Cisco 3640 VoIP配置实例





  下面是Cisco 3640的VOIP配置,结构是台北和上海两地做VOIP,后接阿尔卡特的PBX,里面有很多需要注意的地方。

台北配置代码:

<code><br />Taipei#sh run<br />Building configuration...<br /><br />Current configuration:<br />!<br />version 12.0<br />service timestamps debug uptime(设定Debug跟踪日志显示其时间)<br />service timestamps log uptime(设定看Log时显示其时间)<br />no service password-encryption(口令不加密)<br />!<br />hostname Taipei(主机名)<br />!<br />enable secret 5 $1$R.66$z.BUjhNsJcIr8KCcS9uxG.<br />!<br />!<br />!<br />!<br />!<br />voice-card 1(定义语音卡1)<br />!<br />voice-card 3(定义语音卡3)<br />!<br />ip subnet-zero<br />no ip domain-lookup<br />!<br />isdn voice-call-failure 0<br />!<br />!<br />!<br />!<br />controller E1 1/0(配置 E1语音卡)<br />framing NO-CRC4<br />ds0-group 0 timeslots 1-15,17-31 type e&m-wink-start(定义语音卡的类型为E&M卡)<br />cas-custom 0<br />!<br />controller E1 3/0(配置 E1语音卡)<br />framing NO-CRC4<br />ds0-group 0 timeslots 1-15,17-31 type e&m-wink-start(定义语音卡的类型为E&M卡)<br />cas-custom 0<br />!<br />!<br />!<br />interface BRI0/0<br />no ip address<br />no ip directed-broadcast<br />shutdown<br />isdn guard-timer 0 on-expiry accept<br />!<br />interface FastEthernet0/0<br />no ip address<br />no ip directed-broadcast<br />shutdown<br />duplex auto<br />speed auto<br />!<br />   interface Serial0/0<br />description "Link to MainLand_ShangHai by NCIC lease line"<br />ip address 192.168.1.1 255.255.255.252<br />no ip directed-broadcast<br />no ip mroute-cache<br />no fair-queue<br />!<br />interface Serial0/1<br />no ip address<br />no ip directed-broadcast<br />shutdown<br />clockrate 2000000<br />!<br />ip classless<br />no ip http server<br />!<br />!<br />voice-port 1/0:0(配置模拟语音端口)<br />compand-type a-law<br />!<br />voice-port 3/0:0(配置模拟语音端口)<br />compand-type a-law<br />!<br />dial-peer voice 1 voip (定义拨号对等体到语音)<br />destination-pattern +445...(为拨号对等体分配电话号码,其中.为通配符)<br />session target ipv4:192.168.1.2(定义Voip路由,为对端的IP地址)<br />req-qos guaranteed-delay (语音数据流RVSP的保证,其中Guaranteed-dealy可用于保证整个网络的延时)<br />ip precedence 5(IP优先级,5为关键)<br />!<br />dial-peer voice 2 pots(定义拨号对等体到语音物理端口)<br />destination-pattern +3...(定义电话话码以3开头的)<br />port 1/0:0(定义语音端口)<br />!<br />dial-peer voice 3 pots(定义拨号对等体到语音物理端口)<br />destination-pattern +3...(定义电话话码以3开头的)<br />port 3/0:0(定义语音端口)<br />!<br />!<br />line con 0(设定登陆)<br />transport input none<br />line aux 0<br />line vty 0 4(允许用Telnet)<br />password cisco(口令为Cisco)<br />login<br />!<br />end<br /><br />Taipei#<br /></code></pre></td></tr></tbody></table><br /><br />上海一方的3640配置代码:<br /><br /><table bgcolor="#cccccc" border="1" cellpadding="5" cellspacing="0" width="100%"> <tbody> <tr> <td><pre><code><br />ShangHai#sh run<br />Building configuration...<br /><br />Current configuration:<br />!<br />version 12.0<br />service timestamps debug uptime<br />service timestamps log uptime<br />no service password-encryption<br />!<br />hostname ShangHai<br />!<br />enable secret 5 $1$dB/c$tnrMU9IxFCJdix5ssHAdH/<br />!<br />!<br />!<br />!<br />!<br />voice-card 1<br />!<br />voice-card 2<br />!<br />ip subnet-zero<br />no ip domain-lookup<br />!<br />isdn voice-call-failure 0<br />!<br />!<br />!<br />!<br />controller E1 1/0<br />framing NO-CRC4<br />ds0-group 0 timeslots 1-15,17-31 type e&m-immediate-start<br />cas-custom 0<br />! <br />   controller E1 2/0<br />framing N<br />ds0-group 0 timeslots 1-15,17-31 type e&m-immediate-start<br />cas-custom 0<br />!<br />!<br />!<br />interface BRI0/0<br />no ip address<br />no ip directed-broadcast<br />encapsulation ppp<br />isdn guard-timer 0 on-expiry accept<br />ppp multilink<br />!<br />interface FastEthernet0/0<br />no ip address<br />no ip directed-broadcast<br />shutdown<br />duplex auto<br />speed auto<br />!<br />interface Serial0/0<br />no ip address<br />no ip directed-broadcast<br />no ip mroute-cache<br />shutdown<br />no fair-queue<br />clockrate 2000000<br />!<br />interface Serial0/1<br />ip address 192.168.1.2 255.255.255.252<br />no ip directed-broadcast<br />!<br />ip classless<br />!<br />no ip http server<br />!<br />!<br />voice-port 1/0:0<br />compand-type a-law<br />!<br />voice-port 2/0:0<br />compand-type a-law<br />!<br />dial-peer voice 20 voip<br />destination-pattern +3...<br />session target ipv4:192.168.1.1<br />req-qos guaranteed-delay<br />ip precedence 5<br />!<br />dial-peer voice 10 pots<br />destination-pattern +448...<br />port 1/0:0<br />!<br />dial-peer voice 30 voip<br />destination-pattern +4...<br />session target ipv4:192.168.1.1<br />req-qos guaranteed-delay<br />ip precedence 5<br />!<br />dial-peer voice 40 pots<br />destination-pattern +449...<br />port 2/0:0<br />!<br />!<br />line con 0<br />transport input none<br />line aux 0<br />line vty 0 4<br />password cisco<br />login<br />!<br />end<br /><br />ShangHai#<br /></code>
(完)


2009年4月16日星期四

cnc-gk-gw配置模板(转贴)

网守的配置模板:
version 12.0
service timestamps debug uptime
service timestamps log datetime msec
service timestamps debug date msec
no service password-encryption
!
hostname xxxx
!
!
!
!
ip subnet-zero
ip domain-name cnc.net.cn
ip name-server 10.0.10.109
!
interface FastEthernet0/0
ip address <x.x.x.x> 255.255.255.128
no ip redirects
no ip directed-broadcast
duplex auto
speed auto
standby 1 timers 5 15
standby 1 priority xxx(gk1: 110, gk2: 100) preempt(gk1 only)
standby 1 ip x.x.x.x(HSRP address)
!
ip classless
ip route 0.0.0.0 0.0.0.0 x.x.x.x(IP gateway address)
no ip http server
!
logging trap errors
logging x.x.x.x(syslog server address)
!
snmp-server community snmp view v1default RO
snmp-server community cncvoiplic RO
snmp-server community cncvoip2000 RW
snmp-server community public view v1default RO
snmp-server enable traps syslog
snmp-server host < CVM IP > snmp
snmp-server host < CVM IP> public
snmp-server host <CiscoWorks IP> snmp
snmp-server host <CiscoWorks IP > public
!
gatekeeper
zone local <zone name>(same with city name)
<domain name> x.x.x.x(local HSRP address)
!
!
!
zone remote < cnc-dir-gk > <CNC domain Name> <dir-gk IP > 1719
!
zone prefix <zone name> <prefix>
!
!
no zone subnet <zone name> default enable
zone subnet <zone name> x.x.x.x/mask (for GW) enable

!

zone prefix <cnc-dir-gk> *
gw-type-prefix 1#* default-technology
no shutdown
!
!
line con 0
transport input none
line aux 0
modem Dialin
modem autoconfigure discovery
speed 38400
line vty 0 4
exec-timeout 180 0
password cisco
login
!
ntp server <Primary NTP server > prefer
ntp server <Secondary NTP server>
end


网关的配置模板:

!International route 4, fail-over route for all world call
dial-peer voice 8<xx>000 voip (xx—tech prefix)
preference 5
destination-pattern 00T
dtmf-relay cisco-rtp h245-signal h245-alphanumeric
fax-rate 9600
tech-prefix <xx># (xx --- tech prefix)
voice-class codec 88
session target ras
!
process-max-time 200
gateway
!
interface Loopback0
ip address <IP address> <subnet mask>
no ip directed-broadcast
h323-gateway voip interface
h323-gateway voip id <zone name> ipaddr <GK IP addr> 1719
h323-gateway voip h323-id <GW-id> (same with hostname)
h323-gateway voip tech-prefix 2#
!
interface Ethernet0
ip address <IP address> <subnet mask>
no ip directed-broadcast
!
interface FastEthernet0
ip address <IP address> <subnet mask>
no ip directed-broadcast
!
no ip http server
ip classless
!
ip route 0.0.0.0 0.0.0.0 x.x.x.x (local gateway ip address)
!
ip radius source-interface Loopback0

GW GK 配置

GW配置
  GW-GZ#show run
  Building configuration...
  Current configuration:
  !
  ! Last configuration change at 14:53:31 UTC Sat Jan 1 2000 by cisco
  ! NVRAM config last updated at 14:42:05 UTC Sat Jan 1 2000 by cisco
  !
  version 12.0
  service timestamps debug uptime
  service timestamps log uptime
  no service password-encryption
  !
  hostname GW-GZ
  !
  aaa new-model
  aaa authentication login h323 group radius
  aaa authentication login no_rad local
  aaa authorization exec h323 group radius
  aaa accounting connection h323 start-stop group radius
  enable secret 5 $1$Do8I$JbsgS2.d//KmrBHcAJqy2.
  enable password cisco
  !
  username cisco password 0 cisco
  !
  resource-pool disable
  !
  !
  clock calendar-valid
  ip subnet-zero
  no ip domain-lookup
  !
  mta receive maximum-recipients 0
  !
  !
  controller E1 0
  framing NO-CRC4
  ds0-group 0 timeslots 1-15,17-31 type r2-digital r2-compelled ani
  cas-custom 0
  unused-abcd 0 1 1 1
  country china
  answer-signal group-b 1
  dnis-digits min 1 max 18
  !
  controller E1 1
  clock source line secondary 1
  !
  controller E1 2
  clock source line secondary 2
  !
  controller E1 3
  clock source line secondary 3
  !
  !
  voice-port 0:0
  echo-cancel coverage 32
  cptone CN
  timeouts call-disconnect 0
  !
  gw-accounting h323 vsa
  dial-peer voice 797 pots
  application clid_authen_npw
  destination-pattern 0797T
  direct-inward-dial
  port 0:0
  prefix 0797
  !
  dial-peer voice 80797 voip
  destination-pattern 079T
  session target ras
  !
  process-max-time 200
  gateway
  !
  interface Ethernet0
  no ip address
  no ip redirects
  no ip directed-broadcast
  !
  interface Serial0
  no ip address
  no ip directed-broadcast
  no ip mroute-cache
  shutdown
  no fair-queue
  clockrate 2015232
  !
  interface Serial1
  no ip address
  no ip directed-broadcast
  shutdown
  no fair-queue
  clockrate 2015232
  !
  interface Serial2
  no ip address
  no ip directed-broadcast
  shutdown
  no fair-queue
  clockrate 2015232
  !
  interface Serial3
  no ip address
  no ip directed-broadcast
  shutdown
  no fair-queue
  clockrate 2015232
  !
  interface FastEthernet0
  ip address 10.123.15.60 255.255.255.0
  no ip directed-broadcast
  duplex auto
  speed auto
  h323-gateway voip interface
  h323-gateway voip id ganzhou ipaddr 10.123.15.69 1719
  h323-gateway voip h323-id GZ.jx.cpn
  h323-gateway voip tech-prefix 1#
  !
  no ip http server
  ip classless
  ip route 0.0.0.0 0.0.0.0 10.123.15.254
  !
  radius-server host 10.123.15.139 auth-port 1812 acct-port 1813
  radius-server retransmit 2
  radius-server timeout 4
  radius-server key voip
  radius-server vsa send accounting
  radius-server vsa send authentication
  !
  line con 0
  exec-timeout 0 0
  transport input none
  login authentication no_rad
  line aux 0
  line vty 0 4
  exec-timeout 120 0
  password cisco
  login authentication no_rad
  !
  end
  Active GK配置举例
  GK-NC1#show run
  Building configuration...
  Current configuration:
  !
  version 12.1
  service timestamps debug uptime
  service timestamps log uptime
  no service password-encryption
  !
  hostname GK-NC1
  enable secret 5 $1$Do8I$JbsgS2.d//KmrBHcAJqy2
  enable password cisco
  !
  !
  memory-size iomem 25
  ip subnet-zero
  no ip domain-lookup
  !
  !
  interface FastEthernet0/0
  ip address 10.123.15.61 255.255.255.0
  no ip redirects
  duplex auto
  speed auto
  standby 1 priority 105 preempt
  standby 1 ip 10.123.15.69
  !
  ip classless
  ip route 0.0.0.0 0.0.0.0 10.123.15.254
  no ip http server
  !
  !
  !
  gatekeeper
  zone local nanchang jx.cpn 10.123.15.69
  zone local ganzhou jx.cpn
  zone prefix nangchang 0791*
  zone prefix ganzhou 0797*
  gw-type-prefix 1#* default-technology
  arq reject-unknown-prefix
  lrq reject-unknown-prefix
  no shutdown
  !
  !
  line con 0
  exec-timeout 0 0
  login
  transport input none
  line aux 0
  line vty 0 4
  exec-timeout 120 0
  password cisco
  login
  !
  end
  

ASA防火墙NAT转换方法


近日做了个NAT,传上来给大家分享。每步都有注释。

nat-control命令
在6.3的时候只要是穿越防火墙都需要创建转换项,比如:nat;static等等,没有转换项是不能穿越防火墙的,但是到了7.0这个规则有了变化,不 需要任何转换项也能正常的像路由器一样穿越防火墙。但是一个新的命令出现了!当你打上nat-control这个命令的时候,这个规则就改变得和6.3时 代一样必须要有转换项才能穿越防火墙了。7.0以后开始 nat-control 是默认关闭的,关闭的时候允许没有配置NAT规则的前提下和外部主机通信,相当于路由器一样,启用NAT开关后内外网就必须通过NAT转换才能通信
1、定义外口
interface Ethernet0/0   进入端口
nameif outside    定义端口为外口
security-level 0    定义安全等级为0
no shut     激活端口
ip address ×.×.×.× 255.255.255.248  设置IP
2、定义内口
interface Ethernet0/1   
nameif inside    定义端口为内
security-level 100   定义端口安去昂等级为100
no shut
ip address 192.168.1.1 255.255.255.0

3、定义内部NAT范围。
nat (inside) 1 0.0.0.0 0.0.0.0    任何IP都可以NAT,可以自由设置范围。
4、定义外网地址池
global (outside) 1 10.21.67.10-10.21.67.14 netmask 255.255.255.240

global (outside) 1 interface  当ISP只分配给一个IP是,直接使用分配给外口的IP地址。
5、设置默认路由
route outside 0 0 218.17.148.14  指定下一条为IPS指定的网关地址
查看NAT转换情况
show xlate


2009年4月15日星期三

用ScribeFire来写blogger博客

步骤:

以我的blogger账号为例:

1. 申请blogger账号

https://www.blogger.com/start

2. 设置scribefire

我创建的blog地址为 http://shizh.blogspot.com/

开始:
①输入博客的URL: http://shizh.blogspot.com/

手动设置:
②选择blogger
③填写API URL: https://www.blogger.com/feeds/4670315869282463882/posts/default

下一步:
④输入用户名密码:输入我的用户名密码

下一步:
⑤Finish:提示成功添加。

设置帐户的关键一步:API URL,应该使用https://www.blogger.com/feeds/blogID/posts/default,注意https,另外关于那个blogid,在控制台页面,把鼠标放在"编辑帖子"那个地方,就可以看到浏览器下面有网址显示的,最后面就是自己的id了。

3. 使用scribefire写文档

重新打开ScribeFire就能看到博客选项卡上已经显示登陆的blogger,可以写一个简单的测试页面,点击右下角的"发布到“SHIZH””按钮既可以发布到blog上。


这里的前提是要改一下scribefire的设置,去掉默认为草稿,如下图。



4. 在文档中插入图片

在工具栏点击"添加图片"按钮,选择"upload an image form your computer"菜单上传本地的图片,

在弹出的对话框中选择图片存放为止,确认对话框点击API即可,成功后就可以显示图片,图片会上传到picasa的相册中。


2009年4月14日星期二

思科E1配置白皮书

E1知识点总结


2009年4月12日星期日

E1线路配置 VWIC2-1MFT-G703 卡

此卡我是插在2811路由器上的

把卡插在2811上后show run你会看到card type command needed for slot/vwic-slot 0/1提示

下面是具体配置

(config)#card type card type E1 0 1 指定卡的类型为E1 插在0槽1slot

然后你再show run将会看到 controller E1 0/1/0

(config)#controller e1 0/1/0

#channel-group 0 timeslots 1-31 (0为你所分时隙的子接口 1-31说明你把所有的时隙都给了这个接口所使用)

然后系统会提示s0/1/0:0UP了

此时你可以配置S0/1/0:0接口了,如果你没有配置上面的两个步骤你show ip int b 是看不到s0/1/0这个接口的

int s0/1/0:0

ip addr 1.1.1.1 255.255.255.0 可以配置你的IP啦:-)

exit

ASA配置精华

【转载】
一:6个基本命令: nameif、 interface、 ip add


二:基本配置步骤:
step1: 命名接口名字
nameif ethernet0 outside security0
nameif ethernet1 inside security100
nameif ethernet2 dmz security50

**7版本的配置是先进入接口再命名。

step2:配置接口速率

interface ethernet0 10full auto
interface ethernet1 10full auto
interface ethernet2 10full

step3:配置接口地址

ip address outside 218.106.185.82
ip address inside 192.168.100.1 255.255.255.0
ip address dmz 192.168.200.1 255.255.255.0

step4:地址转换(必须)

* 安全高的区域访问安全低的区域(即内部到外部)需NAT和global;
nat(inside) 1 192.168.1.1 255.255.255.0
global(outside) 1 222.240.254.193 255.255.255.248

*** nat (inside) 0 192.168.1.1 255.255.255.255 表示192.168.1.1这个地址不需要转换。直接转发出去。

* 如果内部有服务器需要映射到公网地址(外网访问内网)则需要static和conduit或者acl.
static (inside, outside) 222.240.254.194 192.168.1.240
static (inside, outside) 222.240.254.194 192.168.1.240 10000 10

后面的10000为限制连接数,10为限制的半开连接数。

conduit permit tcp host 222.240.254.194 eq www any
conduit permit icmp any any (这个命令在做测试期间可以配置,测试完之后要关掉,防止不必要的漏洞)

ACL实现的功能和conduit一样都可实现策略访问,只是ACL稍微麻烦点。conduit现在在7版本已经不能用了。
Access-list 101 permit tcp any host 222.240.254.194 eq www
Access-group 101 in interface outside (绑定到接口)

***允许任何地址到主机地址为222.240.254.194的www的tcp访问。

Step5:路由定义:
Route outside 0 0 222.240.254.193 1
Route inside 192.168.10.0 255.255.255.0 192.168.1.1 1

**如果内部网段不是直接接在防火墙内口,则需要配置到内部的路由。

Step6:基础配置完成,保存配置。
Write memory write erase 清空配置
reload