cisco2600路由器新手配置手册内容摘要:

访问用户及密码 username username password password 设置特权密码 enable secret password 设置路由器名 hostname name 设置静态路由 ip route destination submask nexthop 启动 IP路由 ip routing 启动 IPX路由 ipx routing 端口设置 interface type slot/number 设置 IP地址 ip address address submask 设置 IPX网络 ipx work work 激活端口 no shutdown 物理线路设置 line type number 启动登录进程 login [local|tacacs server] 设置登录密码 password password 五、配置 IP 寻址 1. IP地址分类 IP地址分为网络地址和主机地址二个部分, A 类地址前 8 位为网络地址,后 24位为主机地址, B 类地址 16位为网络地址,后 16位为主机地址, C 类地址前 24位为网络地址,后 8 位为主机地址,网络地址范围如下表所示: 种类 网络地址范围 A 到 和 B 留 C 到 D E 2. 分配接口 IP地址 任务 命令 接口设置 interface type slot/number 为接口设置 IP地址 ip address ipaddress mask 掩玛( mask)用于识别 IP 地址中的网络地址位数, IP地址( ipaddress)和掩码( mask)相与即得到网络地址。 3. 使用可变长的子网掩码 通过使用可变长的子网掩码可以让位于不同接口的同一网络编号的网络使用不同的掩码,这样可以节省 IP地址,充分利用有效的 IP地址空间。 如下图所示: Router1和 Router2的 E0端 口均使用了 C 类地址 , Router1的 E0的网络地址为 ,掩码为 , Router2的 E0的网络地址为 ,掩码为 ,这样就将一个 C 类网络地址分配给了二个网,既划分了二个子网,起到了节约地址的作用。 4. 使用网络地址翻译( NAT) NAT( Network Address Translation)起到将内部私有地址翻译成外部合法的全局地址的功能,它使得不具有合法 IP地址的用户 可以通过 NAT访问到外部 Inter. 当建立内部网的时候 ,建议使用以下地址组用于主机 ,这些地址是由 Network Working Group(RFC 1918)保留用于私有网络地址分配的 .  Class A: to  Class B: to  Class C: to 命令描述如下: 任务 命令 定义一个标准访问列表 accesslist accesslistnumber permit source [sourcewildcard] 定义一个全局地址池 ip nat pool name startip endip {mask mask | prefixlength prefixlength} [type rotary] 建立动态地址翻译 ip nat inside source {list {accesslistnumber | name} pool name [overload] | static localip globalip} 指定内部和外部端口 ip nat {inside | outside} 如下图所示, 路由器的 Ether 0端口为 inside端口,即此端口连 接内部网络,并且此端口所连接的网络应该被翻译, Serial 0 端口为 outside端口,其拥有合法 IP地址(由 NIC或服务提供商所分配的合法的 IP地址) ,来自网络 为自己的合法地址,经由 Serial 0 口访问 Inter。 命令 ip nat inside source list 2 pool c2501 overload 中的参数 overload,将允许多个内部地址使用相同的全局地址(一个合法 IP地址,它是由 NIC或服务提供商所分配的地址)。 命令 ip nat pool c2501 mask 定义了全局地址的范围。 设置如下: ip nat pool c2501 mask interface Ether 0 ip address ip nat inside ! interface Serial 0 ip address ip nat outside ! ip route Serial 0 accesslist 2 permit ! Dynamic NAT ! ip nat inside source list 2 pool c2501 overload line console 0 exectimeout 0 0 ! line vty 0 4 end 六、配置静态路由 通过配置静态路由,用户可以 人为地指定对某一网络访问时所要经过的路径 ,在网络结构比较简单,且一般到达某一网络所经过的路径唯一的情况下采用静态路由。 任务 命令 建立静态路由 ip route prefix mask {address | interface} [distance] [tag tag] [permanent] Prefix :所要到达的目的网络 mask :子网掩码 address :下一个跳的 IP地址,即相邻路由器的端口地址。 interface :本地网络接口 distance:管理距离(可选) tag tag :tag值(可选) permanent :指定此路由即使该端口关掉也不被移掉。 以下在 Router1 上设置了访问 ,即当有目的地址属于 ,应将其路由到地址为 的相邻路由器。 在 Router3上设置了访问。 由于在 Router1 上端口 Serial 0 地址为 , 属于直连的网,已经存在访问 ,所以不需要在 Router1上添加静态路由。 Router1: ip route Router3: ip route ip route 同时由于路由器 Router3除了与路由器 Router2相连外,不再与其他路由器相连,所以也可以为它赋予一条 默认路由 以代替以上的二条静态路由, ip route 即只要没有在路由表里找到去特定目的地址的路径 ,则数据均被路由到地址为 的相邻路由器。 第二章 广域网协议设置 一、 HDLC HDLC是 CISCO路由器使用的缺省协议,一台新路由器在未指定封装协议时默认使用 HDLC封装。 1. 有关命令 端口设置 任务 命令 设置 HDLC封装 encapsulation hdlc 设置 DCE端线路速度 clockrate speed 复位一个硬件接口 clear interface serial unit 显示接口状态 show interfaces serial [unit] 1 注 : Cisco同步串口状态的例子 . Routershow interface serial 0 Serial 0 is up, line protocol is up Hardware is MCI Serial Inter address is , sub mask is MTU 1500 bytes, BW 1544 Kbit, DLY 20200 usec, rely 255/255, load 1/255 Encapsulation HDLC, loopback not set, keepalive set (10 sec) Last input 0:00:07, output 0:00:00, output hang never Output queue 0/40, 0 drops。 input queue 0/75, 0 drops Five minute input rate 0 bits/sec, 0 packets/sec Five minute output rate 0 bits/sec, 0 packets/sec 16263 packets input, 1347238 bytes, 0 no buffer Received 13983 broadcasts, 0 runts, 0 giants 2 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 2 abort 22146 packets output, 2383680 bytes, 0 underruns 0 output errors, 0 collisions, 2 interface resets, 0 restarts 1 carrier transitions 2. 举例 设置如下: Router1: interface Serial0 ip address clockrate 1000000 Router2: interface Serial0 ip address ! 3. 举例使用 E1线路实现多个 64K专线连接 . 相关命令 : 任务 命令 进入 controller配置模式 controller {t1 | e1} number 选择帧类型 framing {crc4 | nocrc4} 选择 linecode类型 linecode {ami | b8zs | hdb3} 建立逻辑通道组与时隙的映射 channelgroup number timeslots range1 显示 controllers接口状态 show controllers e1 [slot/port]2 注 : 1. 当链路为 T1时 ,channelgroup编号为 023, Timeslot范围 124。 当链路为 E1时 , channelgroup编号为 030, Timeslot范围 131. show controllers e1 观察 controller状态 ,以下为帧类型为 crc4时 controllers正常的状态 . Router show controllers e1 e1 0/0 is up. Applique type is Channelized E1 unbalanced Framing is CRC4, Line Code is HDB3 No alarms detected. Data in current interval (725 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 以下例子为 E1连接 3 条 64K专线 , 帧类型为 NOCRC4,非平衡链路 ,路由器具体设置如下 : shanxiwri t Building configuration... Current configuration: ! version no service udpsmallservers no service tcpsmallservers ! hostname shanxi ! enable secret 5 $1$XN08$enable password shanxi ! ! ip subzero ! controller E1 0 framing NOCRC4 channelgroup 0 timeslots 1 channelgroup 1 timeslots 2 channelgroup 2 timeslots 3 ! interface Ether0 ip address。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。