[ 2004/11/12 15:44 | by 网络毛毛虫 ]
| |
什么是Cisco? (一)
Cisco是San Fransico的简称,ciscohttp://www.cisco.com 是最大的网络设备公司。Cisco以router起家,现在的revenue里面,router占40%,switch占 40%, service占20%. Cisco靠着兼并正成为一个全方位提供网络设备的公司。
什么是CCNA?
CCNA是Cisco Certified Network Associate的缩写。要参加CCNA的考试,最好手头有一张Cisco的document CD.如果没有,可以上网直接访问http://www.cisco.com
考过CCNA后,还可以参加更高级的CCNP的考试,CCNP需要考4门。会比CCNA难的多。再往上就是最值钱的CCIE。 如果你取得了CCIE的证书,拿个几十万美金的年薪并不为奇。CCIE有笔试和lab两部份。其实CCIE的笔试比CCNP容易,而且考的许多知识大多是4 、5年前的技术,比较旧了。但lab考试非常的难,要考两天。现在全世界就两个考点,其中一个在San Jose. 如果现在报名的话,要等4个月才能参加考试。

OSI Reference Model
其实OSI model等的基本网络的概念在MCSE考试中都已经学过了。所以我们一般建议大家参加完MCSE的考试再来参加CCNA的考试,不然你的知识面会异常的狭隘。 OSI model 有7 层,由下往上分别是:
7.application
6. presentation
5. Session
4. Transport
3. network
2. datalink (包括LLC和MAC两个sublayer)
1. physical

对于CCNA考试来说,你要知道每一层的定义、功能并有哪些特点。尤其是第3第4层,因为router就工作在第3第4层。并且要对

下面的概念有一定的了解:

Ethernet, Token Ring, 802.3, FDDI, 如果有什么不懂的,可以去查document CD.
要区分physical address 和logical address的区别。physical address 就是MAC address, 你可以在command prompt

里面敲: arp -a 纯吹組AC address. 而logical address是IP address或 IPX address.
physical address 工作在datalink layer, 而logical address work 在 network layer.
以下是一些考试中会遇到的component和 OSI model 7 layer的对应关系。

7.application -> Telnet, SMTP, FTP
6. presentation -> ASCII, EBCDIC, QuickTime, MPEG, GIF, JPG, TIFF
5. Session -> ZIP, SCP, NFS, SQL
4. Transport -> TCP, SPX, UDP, NBP, OSI transport protocol
3. network -> IP, IPX ,BGP, OSPF, RIP
2. datalink -> MAC address
1. physical

MAC address, 48 bits = 12 hexadecimal digits ,敲arp -a 看你network card的MAC address

前面6个hexadecimal digits是 Organizational Unique Identifier (OUI).跟厂家有关。但一个厂家可以有多个OUI, 象Cisco就有100多个OUI. 但相同的OUI 肯定来自同一个厂家。后面的 6个hexadecimal digits是由厂家指定的。这样保证在全世界不可能有两个相同的MAC address.

Connection oriented 和connectionless的区别

connection oriented是在连接前先建立connection, 这样保证了数据传输的reliability. 而connectionless是不建立
连接就传输。所以connectionless有更少的overhead,但不能保证数据的reliablity. 所以我们传E-mail要用connection

oriented的protocol, 而网上听歌,因为速度更重要,丢几个packets没关系,可以用connectionless的protocol.

在常见的protocol里面, TCP是connection-oriented, UDP是connectionless.

在MCSE考试里面, packets和frame是不分的,但在cisco的考试中间,有下面的对应情况:

7.application
6. presentation
5. Session
4. Transport -> Segments
3. network -> Packets/datagrams
2. datalink -> Frames
1. physical -> bits ( 0 or 1)

Flow control是比较难掌握的概念。有三种控制模式:

1. buffer, 是最常用的,其实你在网上传数据,一般都是先写到buffer里面,然后再传送的。如果你会winsocket编程,
你会发觉其实写个network 的application还是很简单的。只要懂得如何往buffer里面写东西就好了,其它的全由system来做

了。 :P

2. Source quench, 就是接收方让发送方减慢传输速度。

3. Windowing, 如果学过networking或MCSE, 对sliding window应该有所了解。其实windowing 就是你发n个packets后返回一个信息,告诉发送方这几个packets已经收到了,如果到一定时候没有收到这return的message, 那n个packets就要重发



Hierarchical vs. Flat Address Space

MAC address是Flat Address
domain name, IP address都是 hierarchical address

router

这是cisco考试中间最重要的概念,没事的时候,可以上网search "router" 多看看router到底是干什么的。:P

1. router 肯定有多个network interface, 一般一个network card有一个network interface
2. 连接多个不同的subnet
3. router 通过routing table来决定packets往哪边传,永远不可能往两个interface上传。万一遇到这种情况,会把packet drop 掉。
4. routing table可以人工加, 在command prompt里面,用route add就可以加routing table,但更常见的是安装routing protocol如RIP或OSPF。
5. router 工作在OSI 3 layer上。

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

(二)
Microsoft的operating system叫Windows, Cisco的operating system 叫IOS。 其实Cisco router里面的chip都很便宜的,大多数也就是486的水平,现在的Pentium computer也就卖几百美金,为什么这个小小的router就敢卖好几千的美金。就是应该这个IOS。 如果说Microsoft是靠Windows垄断了市场,那么说Cisco是靠 IOS来垄断了市场,真是一点都不为过。
要configure a cisco router, 首先要熟悉cisco的 port,看 Cisco 2524的图, 你要知道下面的port.

console port: 其实就是serial port, 你要用console cable (Cisco的原装cable是蓝色的), 一头连在console port上,一头连在你PC的serial port上,然后用HyperTerminal 进行控制。 一般Cisco的router都是用console port进行configure的。

auxiliary port: 是辅助port的意思。一般是远程调试的时候用modem连接的。用处不是很大,在某些cisco的router里面都没有这auxilary port.

其它的AUI port或 10baseT的port应该不用介绍了吧? :P

一般Cisco的router都有扩展口, 你可以把 WIC (WAN interface card)插进去的。你可以根据你网络的需求,订购不同的WIC。

这设置router的时候,一般用 s0 代表 第一个serial port. e0 代表第一个 ethernet port. con0 代表第一个 console port.

Cisco router的命名是按从右往左,从下往上的顺序排列的。比如你有两个ethernet port, 左边那个就是e1, 右边那个就是 e0. 如果这两个ethernet port是上下排列的,下面那个就是e0, 上面那个就是e1. 在有的router里面,一个network module solt里面会有多个interface, 这时候你可以用 e1/0, e1/1, e1/2等符号来表示。

如果是第一个fast ethernet的话,用fa0来表示。

Cisco router的构造还是非常的简单的。IOS image是在flash memory里面的。flash memory 和一般memory的区别在于一般memory 的东西,你机器 power off后就没有了,而flash memory里面的东西还是存在的。 这IOS image等 router boot 起来的时候,把image 解压缩到RAM 里面,所以以后就和RAM 里面的IOS 打交道了。

另外cisco的一些configuration file是在 NVRAM里面的。 NVRAM是Non-Volatile RAM的意思。下面是NVRAM的定义。

Memory that holds its content without power. ROMs, PROMs, EPROMs and flash memory are examples. Disks and tapes may be called non-volatile memory, but they are usually considered storage devices. Sometimes the term refers to memory that is inherently volatile, but maintains its content because it is connected to a battery at all times.

IOS 的用户界面: Exec 是 CLI (Command Line interface) ,象MS-DOS, unix里面的command line都是 CLI的。而Windows是GUI (Graphic User Interface). CLI的特点是比较难学,但configure 起来比较快。现在Cisco也正在做Java 的GUI-based configuration software, 但大家还是喜欢CLI的。

要通过CCNA的考试,要三台router进行练习,如果没有条件的网友,可以找routersim等软件进行练习。

configure router的时候,一般是用console cable 连到console port上的。然后用WIndows 下的HyperTerminal 进行configure. 如果你有许多台的router, 你也可以把他们的serial port都连到Cisco的terminal server上,然后在别的机器上用telnet 就可以访问了。 第二种方案在有许多router的情况下比较方便,但你要添置新的设备terminal server.

输入正确的password后,你就可以进入cisco router了。

你第一个可以打的命令是 ? ,来看看到底支持哪些命令。

IOS has two mode: user mode , and privileged mode

其实user mode 对configuration 没什么太大的作用,只有privileged mode才是 configuration的关键。不少的router 不用password都可以进入。而从user mode 到privileged mode是一定要设password的。

从 user mode 到privileged mode, 你打 enable 或 en 就可以了。系统会问你password, 你敲入正确的password就可以进入了。
从 privileged 到mode user mode, 你要打 disable。

看上面的图,如果你在user mode, 提示符是> ,而如果是 privileged mode, 提示符是 #。 所以你设router的时候可以根据前面是 >还是 #来确定自己在什么mode.

进入privileged mode后,你还可以敲 config terminal 或 config t 进入 Global Configuration Mode ,这时的Prompt会变成: Router(config)#
退出 global configuration mode, 你敲 Ctrl + Z 可以退出 global configuration mode(如果有系统信息出现,可以打 Ctrl + r to resume the session).

在global configuration mode里面,敲int s0 可以进入 Interface-Specific Configuration Mode,s0 这里是第一个serial port. 你可以把s0换成别的interface来

configure 别的interface. global configuration mode前面的Prompt会是 Router(config-if)#

从Interface-Specific Configuration Mode退出,你可以敲exit.

下面是 从user mode -> privileged mode -> global confiuguration mode -> Interface-Specific Configuration Mode
再一步一步退出的演示。

login到router后,大家可以先练习一下如果修改password, 但一定要注意的是 因为你可以通过不同的方式连到cisco router上,所以大家一定要区分开你改的是哪个的password.

下面的命令把你的privileged mode 的password 改成了 meetchinese.

在Cisco router里面,在memory的configuration 叫做 run , 在 NVRAM里面的configuration 叫做 start.你的所有configuration 都先存在memory里面。 因为memory里面的东西关机后就会消失,你可以用copy run start 命令把 memory里面的configuration 存盘。当然你也可以用copy start run 命令把NVRAM里面的东西copy到 memory里面。大家要注意的是 copy start run 并不是把所有memory里面的东西都去掉,只留下 NVRAM里面configuration的东西,而只是有相同的configuaration进行覆盖。

等你把password设好后,可以在priviledge mode 里面敲 sh run 看你现在的configuration. 你会发现现在的密码没有加密,直接显示出来的,这样是很危险的。

你可以用enable secret 来把password encry了。然后你再敲sh run ,就会看见 encrypted password.

如果你不想用encrypted 的password, 敲 no enable secret 就好。

**做完所有的configuration, 千万别忘了用 copy run start 存盘。

如果你要修改进入console的password, 可以用蟧 router和TFTP server 进行通讯。

#copy tftp flash

以上命令把TFTP server上的IOS img load 到Cisco router上。

对于系统管理员,你也可以 用下面的命令把你router里面的IOS备份。

#copy flash tftp

CDP (Cisco Discovery Protocol)

你刚启动router的时候,可能里面什么都没有设, 这CDP可以让你看你邻居的router的情况。

/////////////////////////////////////////////////////////////////////////////////////////////////
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

(三)
在CCNA考试中,要分清楚下面的devices在什么layer工作。
Layer 3 devices: router
Layer 2 devices: Switch, bridge
Layer 1 devices: repeater, Hub

Switching is not very important for the CCNA exam. However you need to know the basic switching concepts.

To solve the network congestion problem

1. Create a smaller collision domain.
Ethernet uses CSMA/CD, here CD means collison detection. When two computers try to send the packet at the same time. Collison is found in the network. So none of the packet will be sent. They wait random
period of the time to resend the packet. If computers are in the same subnet, they are in the same collision domain. Creating a smaller collision domain means creating multiple subnets in your network.

2. increase the bandwidth, for example, upgrade your network to 100Mbps fast Ethernet.

LAN segmentation:

LAN segmentation means use bridge, router or switch to segment the network and create a smaller collision domain.

You need to know how a bridge, router, switch works. If you don't know how they work, take the MCSE networking essentials exam first.

Both bridge and router use the routing table to distinguish if the computer are in the same segment. (not subnet). A bridge connects two network segments of the same subnet. A router can connect two or more network segments of the different subnets.

For example, the subnet mask for your network is 255.255.255.0

(1.1.1.1 - 1.1.1.10)<----> Bridge <----> (1.1.1.100 - 1.1.1.120)

(1.1.1.1 - 1.1.1.10)<----> router <----> (1.1.2.1 - 1.1.2.10)

Bridge works on the MAC layer, it does not care of the upper layer protocol. You can use a bridge to connect the network using either routable protocol (TCP/IP, IPX/SPX) or unroutable protocol. You can only use a router to connect the network using the routable protocol(TCP/IP, IPX/SPX)

A bridge does not stop broadcasting, while using a router can prevent broadcasting.

A router supports multiple pathes, however, a bridge only supports spanning-tree.

区分 Switch & bridge
1. both layer 2 device
2. switch supports multiple ports, while bridge only supports two ports
3. bridge: hardware-optimized for speedy. concurrent switching, which reduces latency compared to transparent bridging.

Switching mode:

** The Ethernet header is 14 bytes.

1.Store-and-Forward: Store the entire packet and forward it. You can also minimize the error by checking CRC. Latency varies depending on frame size;
2.Cut-Through (Real-Time): Constant latency; no error checking
3.Fragment-Free: Waits 64 bytes before forwarding a frame – Constant latency (because the most possible errors occur in the first 64 bytes)

Low-end switch only supports store-and-forward.

full-duplex Ethernet

An extension to 10BaseT Ethernet that is implemented in a switched Ethernet environment, which has a dedicated line between the station and switch. It is built into the network adapter (NIC) and switch,
providing bi-directional transmission that boosts bandwidth from 10 to 20 Mbps.

Fast Ethernet (802.3u)

still use CSMA/CD

Gigabit Ethernet

1000BaseT (IEEE 802.3ab) : 2-pair CAT 5 UTP (100 m) UTP
1000BaseSX (IEEE 802.3z) : 2-strand multi-mode optical fiber (220-550m)
1000BaseLX (IEEE 802.3z) : 2-strand multi-mode or single-mode optical fiber (3000 m)

如果你有多个switch的话,如果你网络设计的时候有loop的时候,packets会一直在网络里面循环的传,产生broadcast storm.请比较一下用router 连的network, 因为有TTL (time to live)这个参数,所以到一定的时候packets就自动丢掉了。而switch的network里面没有TTL这个概念,所以如果你在switch network 里面如果有loop的话,就会一直传下去。

所以一般设计的时候采用spanning -tree的结构。但是spanning-tree没有fault-tolernce, 所以用spanning-tree protocol to provide layer2 redundence并解决loop的问题。

spanning-tree protocol其实也没什么,就是只enable一个port, 让现在的网络只支持 spanning-tree的结构,如果那个port出问题的话,再enable另外一个port来做fault-tolernce.

spanning-tree protocol(STP)有下面的特点:

1. IEEE 802.1d
2. prevent routing loops in a bridge or switched network
3. STP enable the port when one switch is down

STP Convergence Steps:

1.Elect one Root Bridge
2.Elect one Root Port per non-Root Bridge
3.Elect one Designated Port per segment

VLAN

create a broadcast domain (在CCNA考试中,broadcast domain和IP subnet是一个概念) by one or more switches

VLAN的关键是在switch连接支持trunk link.Cisco的switch支持trunk link,但不是所有的switch都支持的。所以并不是所有的switch都支持VLAN。

Switch <== trunk link ==> switch

trunk link is a configuration in switch.use Frame tagging to add VLAN ID number to the packet.

TCP/IP

familiar with the following terms:

IP, ARP, RARP, BootP, ICMP

IP address schema

IP address = network ID + subnet ID + host ID

|<------------IP address----------->|
| network ID | subnet ID | host ID |
|<----subnet mask ------>|

Class A, begin with 0, subnet mask: 255.0.0.0
class B, begin with 10, subnet mask: 255.255.0.0
class C, begin wiht 110, subnet mask: 255.255.255.0

For an IP address, first of all, check it begins with 0, 10 or 110 to

see if it is a class A, class B or class C network.

Secondly, ANDING the subnet mask, you can get the network ID.

Determine the Number of Required Network IDs
1.One for each subnet
2.One for each wide-area network connection

Cisco supports IP unumbered, so you don't need to have one network ID for each network connection. But other vendors might not support IP unumbered.

For the CCNA exam, you need to know how to calculate the class, subnet mask and broadcast address.如何从二进制转成10进制,10进制转成2进制。

2进制转10进制比较简单。

由右往左,
第一位乘以 2的0次方,
第二位乘以 2的1次方,
第三位乘以 2的2次方,
第四位乘以 2的3次方,
。。。
把所有的数字加起来就好了。

10进制转2进制稍微麻烦一些。但一次一次的除以2,就可以得出结果。因为老美的算术的普遍水平连国内的小学生都比不了,(90%以上的人都不会9 x9乘法口诀)所以大家不用太紧张。
:P

Broadcast address:

subnet ID
inverse the subnet ID 0 --> 1 , 1 -->0
IP ANDING the inversed subnet ID

Q: What is the valid IP address range in the subnet of 172.37.2.56 with

12 subnet bits?

1. 172 begin with 10, so it is a class B network.
2. -> default subnet mask is 16 bits.
3. new subnet mask = 16 bits + 12 bits = 28 bits
4. convert the 172.37.2.56 to binary
5. begin IP address: change the last 4 bits to 0001, change the last 4 bits to 1110.

Configure IP address in Cisco

Because IP address is interface specific, you need to go to interface

Router>nable
Router#config t
Router(config)#int s0
Router(config-if)#ip address 172.16.20.2 255.255.255.0
Router(config-if)#int e0
Router(config-if)#ip address 172.16.10.1 255.255.255.0
Router(config-if)#^Z



[转贴]CISCO全攻略(2)
在cisco router里面 ping return result 有下面几种:

! --> OK
. --> Time out
u --> unreachable

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//////////////////////////////////////////////////////////////////////////////////////////////////////////

IP routing (四)
IP routing在CCNA考试中是比较重要的部份,虽然在Cisco的router上configure the IP
routing 的命令并不多,但中间的原理比较的多。如果你MCSE的TCP/IP考试复习的比较好的,对这一部份的理解应该不是很难,但是如果你MCSE中的T CP/IP课程没有学好,或没有参加过MCSE考试的话,对这一部分你需要花费更多的精力。

IP routing 有两种:

static routing 和dynamic routing

顾名思义,static routing要让你人工的configure 所有的routing table,
虽然系统的overhead比较少,但人总是会犯错误的。如果你网络中间configuration经常变化的话,用static routing 会非常的费事。

用下面的命令configure the static routing table
RouterA(config)#ip route 1.1.2.0 255.255.255.0 1.1.1.1

上面命令的意思是如果你要道1.1.2.0这个subnet(subnet mask is
255.255.255.0), 你要通过 1.1.1.1这个IP address. 1.1.1.1
一般是另外一台router上的一个interface.

dynamice routing 需要routing protocol(象RIP 和OSPF)的介入.
在CCNA的考试中,大家要区分开 routing protocol 和routed protocol的区别。routing
protocol是帮你来建routing table的。不然的话,如果你使用static routing,
你要人工configure the routing table. 而routed protocol是指这个network
protocol 是否能routable, 也就是是否可以用router 来连接这个protocol.
象TCP/IP, IPX/SPX是routed protocol(或routable protocol). 而NetBEUI是unroutable
protocol.

主要的routing protocol有以下一些:

1. Interior Routing Protocols:
1.1 Distance Vector
RIP, IGRP
1.2 Link State
OSPF
1.3 Balanced Hybrid
EIGRP
2. Exterior Routing Protocols
EGP, BGP

在实际中用的最广的是RIP和OSPF。而EIGRP和IGRP是Cisco独创的,所以只有在Cisco的router上才支持。

RIP

1. Updates every 30 seconds (RIP) or 90 seconds (IGRP)
2. Hop/Metric-based route selection

code:
--------------------------------------------------------------------------------

10M 10M R1 -------- R2 ------R3 |____________________| 56K

--------------------------------------------------------------------------------

如果你的router按上面的方式连接,R1和R3之间有两条路径 ------- 和
__________的。
对RIP来说, 它会比较两条路径:如果走------。中间要经过一个router,
而如果走____ 中间没有router, 所以RIP会选______这条路径。虽然它并不是最快的。

在CCNA考试中从R1到R2叫做一个hop, 从R2到R3也要一个hop. 如果走
----,要两个hop. 而走___,只要一个hop. 所以RIP永远是找hop最少的路径。

Routing Loop

想象有下面的情况:

code:
--------------------------------------------------------------------------------

R1 ---------R2 | | subnet1 subnet2

--------------------------------------------------------------------------------

如果R1刚传出subnet1的信息,subnet1却down了,这个时候R2会收到subnet1的信息。
过30秒钟后,R1上没有subnet1的信息,但会从R2再传回来,只是hop加1。
然后R1又会把这个信息传出去,传到R2的时候,R2会认为这个信息从R1来的,只是hop再加1。一直这样下去,就形成了routing
loop.

1. 解决的办法有下面一些,在Cisco router里面都是支持的。

1.Counting to infinity
如果hop到15的时候,算成是infinity,就不会再advertise
back了。让对方router里面的内容expire.
2.Split horizon
从哪个interface来的,就不advertise back了。
但split horizon并不能解决所有的问题,因为有可能有R3.
subnet1的信息虽然不能传会R1,但会传到R3, R3还会传到R1的。

3.Hold-down
根据invalid period, 象90秒以后,hold-down.
When learning about a failed route, ignore any new information about
that subnet for a time equal to the hold-down timer

Three events that will reset hold-down timer:
1.Hold-down timer expires
2. The router receives a processing task proportional to the number of
links in the internetwork
3. Another update is received indicating the network status has changed

4.Route poisoning (Poison Reverse)

一般的如果subnet1 down了的话,一般不mention subnet1 down, 但route
poisoning告诉附近的router subnet1 down了。 而不用象hold-down,
要90秒以后再hold down.

5. trigged updates

如果R1 刚advertise subnet1 的信息到R2,subnet2, 对trigged updates
来说,并不用等30秒再advertise, 而是立即advertise.

用下面的命令config RIP.

Router#config t
Router(config)#router rip
RouterA(config-router)#network 1.1.1.0
RouterA(config-router)#^Z
RouterA#sh ip route

用下面的命令config IGRP

Router#config t
RouterA(config)#no router rip
RouterA(config)#router igrp 99
RouterA(config-router)#network 1.1.1.0
RouterA(config-router)#^Z

因为无法比较source的reliability.
IOS Default Administrative Distances
Directly Connected 0
Static Route 1
IGRP 100
OSPF 110
RIP 120
Unkown 255

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
/////////////////////////////////////////////////////////////////////////////////////////////////////////////


03-01-21 08:54


summerdream
初级会员

注册日期: 2003 Jan
来自:
发帖数量: 8

(续
(五)
上次讲了TCP/IP,今天来谈谈Novell 的IPX/SPX. 其实在考MCSE的时候有许多和Novell有关的题目,但大多数是让NT 或2000如何给NetWare client 提供service的。而许多人考过MCSE以后,对Novell内部的工作还不是很清楚。
我们可以先来比较一下IPX/SPX, 和TCP/IP。

IPX和IP类似,工作在network layer.
SPX和TCP类似,工作在transport layer.

看IPX/SPX 和TCP/IP的用法就很有意思, 我觉得TCP/IP的说法比较直观,因为TCP在transport layer, IP 在network layer, transport layer在network layer 上面,所以 用TCP/IP, TCP 在IP的上面。 而IPX/SPX却正好相反, 明明SPX在IPX的上面,写的时候IPX反而在SPX上面。很没有道理。

其实IPX/SPX这也就是Novell自己一家做的protocol了,所以怎么订都有它自己来订。不象TCP/IP是业界的标准。而从历史上来看,不开放的系统是没有前途的。A pple就是一个活生生的例子。而Novell也犯了同样的错误。所以现在只能惨淡经营了。

SAP 是一个IPX的protocol. 让server间每60秒交换一下信息,知道别的server上有什么resources. 每个计算机都有个SAP table. SAP有SAP identifier ( 4 == file server, 7 = printer server)

和TCP/IP 相比,这种每个server上都有SAP table的模式不是很scalable.无法扩建很大的网路。
RIP 是 distance-vector protocol
NLSP Netware Link Service Protocol, 是link-state routing protocol

当一台client要访问一个network resource, 它会发出一个 IPX broadcast GNS (GetNearestServer) request。The server responds with a GNS response

当你在一台router上安装IPX后,在router上也产生了一个SAP table. 因为router连接的是两个网络,所以router 上的SAP table包括所连接网络的信息。而router也每隔60秒发送SAP table到所有的network. 这样可以连接所有的资源。

没有global的IPX addressing,所以IP address不用象IP address,有不够用的情况。

IPX address = IPX network number + node number

IPX network number是固定的32位的。
node number也是固定的,48位的。一般是用MAC address,这样保证没有相同的号码。

因为IPX中的 IPX network number 和 node number的位数都是固定的,所以在IPX中,你不用做subnetting.

在设置router的时候,对于一些serial port, 因为没有MAC address, 你可以用router上ethernet的MAC address, 虽然serial port和ethernet的MAC address是一样的,但是前面的IPX network number是不一样的。所以整个的IPX address还是不重复的。

如果对一个interface想加multiple IP address
IP address 1.1.1.1 255.255.255.0 sec
如果要去掉 no ip address 1.1.1.1 255.255.255.0

IPX encapsualtion有下面几种。
Ethernet:
Ethernet_802.3 novell-ether (Default)
Ethernet_802.2 sap
Ethernet_II arpa
Ethernet_snap snap
Token Ring:
Token-Ring sap (default)
Token-Ring_snap snap
FDDI:
Fddi_snap snap (default)
Fddi_802.2 sap
Fddi_Raw novell-fddi
Serial (WAN)
HDLC (Default)

如果要enable the IPX routing,用下面的命令:

Router(config)#ipx routing

如果用下面的命令:

Router(config)#ipx routing 0200.aaaa.aaaa

因为WAN interface没有MAC address, 这里就告诉router 用0200.aaaa.aaaa作为WAN interfaces的IPX node address.

如果你要在两个interface上设不同的network IPX number

Router(config)#int e0
Router(config-if)#ipx network 8010
Router(config-if)#int s0
Router(config-if)#ipx network 8020
Router(config-if)#^Z

你也可以在一个interface上加两个network IPX number, 这样在最后加sec就可以了。这和IP address的configuration是一样的,如果你想要给一个interface放两个IP address, 也是在最后加sec. 如果想取消IP address, 打 no ip address....

Router(config)#int e0
Router(config-if)#ipx network 8010
Router(config-if)#ipx network 9010 encapsulation sap sec
Router(config-if)#^Z

//////////////////////////////////////////////////////////////////////////////////////////////////
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

(六)

Cisco的security主要指下面的两个概念:
traffic shapping和traffic filtering,traffic
shapping是比较高深的技术,在CCNA中,只要知道traffic filtering就可以了。
traffic shapping : 改变traffic的走向. QoS
traffic filtering: 控制某个interface 能否通过什么样的traffic

对于traffic filtering, 你要设 access list. 对于access
list的设置,要作两步的工作,先设置access list, 然后再apply到不同的interface.
对于interface 来说,还分为inbound (进入)和outband(出去)的traffic. 对于inbound
traffic 和outbound traffic,可以apply 不同的access list.

对于CCNA考试来说:
INBOUND是指from the network into the router
OUTBOUND是指from the router to the network

如果在一个interface的同一个direction(INBOUND或OUTBOND), 你可以apply
多个access-list. 但是只能对于相同的access-list type,只能有一个.

Router(config)#access-list ?
<1-99> IP standard access list
<100-199> IP extended access list
<1000-1099> IPX SAP access list
<800-899> IPX standard access list
<900-999> IPX extended access list

新apply的access-list永远是放到access-list的最下面,如果你要把access-list插到中间,一般要把所有的access-list
delete 掉以后,再重新写。 Cisco router
处理有关的traffic的时候,如果发现第一个有关的access-list,就apply
到router。如果在access-list里面没有任何有关的定义,就deny. 有人也许会问,怎么可能deny?
我如果没有设access-list的时候,应该是所有traffic都可以走才对。
其实这个deny要这么理解,如果你没有apply access-list,
就不对traffic进行控制。而如果有任何一个access-list
apply到有关的interface,Cisco从security上面考虑,任何没有定义的traffic都deny.

不知道为什么Cisco要用Wildcat mask来控制access-list. 其实本来用subnet
mask就挺好的。 wildcat mask 就是把所有subnet
mask中的1变成0,把所有的0变成1。在CCNA考试中,可以用下面的方法算 wildcat mask.

255.255.255.255 - subnet mask = wildcat mask

比如说如果你的subnet mask是 255.255.192.0, 所以你的 wildcat mask 是

255.255.255.255
- 255.255.192.0
___________________
0.0.62.255

wildcat mask 的意思就是可以不管最后n位的IP address.

设置 stand IP access list

access-list [number] [permit or deny] [source address]

这里的source address 有三种方式:

1. ip address, 如 1.1.1.1
2. 一个subnet,提供 network ID 和 wildcat mask , 比如 1.1.1.0
0.0.0.255
3. any: 所有的traffic

Example:

Router(config)#access-list 10 permit 1.1.1.1
Router(config)#int s0
Router(config-if)#ip access-group 10 in
Router(config-if)#^Z

这样设以后,只有从1.1.1.1来的traffic才能到router. 其他任何的IP
traffic都不能过了,但如果是IPX的traffic还是可以过的。

取消access-list 10 ,用 no access-list 10

如果你想deny 1.1.1.2的access inbound access.

你要用两个命令:

access-list 11 deny 1.1.1.2
access-list 11 permit any

如果你不用第二行,我们说过, by default, 会deny 任何的traffic,
所以必须加第二行。另外如果是define the access-list, 不用管 inbound 或outbound.
只是在apply access-list的时候,才要用inbound或 outbound.

再来看看一个更有趣的问题,如果你按下面设置的话:
access-list 11 permit any
access-list 11 deny 1.1.1.2

那么你还是没有deny 1.1.1.2的traffic, 因为Cisco
router只看第一行,找到了match, 它就不管下一行了。

如果你现在想让1.1.1.0 subnet里面除
1.1.1.3的机器外都通过的话,要用下面的命令

access-list 12 deny 1.1.1.3
access-list 12 deny 1.1.1.0 0.0.0.255

Show access-list有下面一些:

RouterC#sh access-lists
RouterC#sh ip access-lists
RouterC#sh ip int s0 //看是否被apply到不同的interface

设置 extended IP access list

access-list [number] [permit or deny] [protocol] [source] [destination]
[port]

protocol 有下面一些选择: IP, IPX, UDP, ICMP

Router(config)#access-list 110 permit tcp host 1.1.1.2 1.1.5.0
0.0.0.255 eq www

www就是80。 是指 http的traffic,我们访问webserver的port default是
80,但一般我们都
不打,其实,你完全可以用http://www.meetchinese.com:80来访问
Meetchinese.com的homepage, 这里的80就是port number.
上面的语句就是 让1.1.1.2的机器可以访问 1.1.5.0 subnet里面的web server.
除eq外,还可以用 gt (greater than) , lt (less than)
.如果你要管理所有大于1000的port number, 可以用 gt 1000。

Router(config)#access-list 110 permit icmp host 1.1.1.2 1.1.5.0
0.0.0.255

上面的语句就是让1.1.1.2的机器可以接收1.1.5.0 subnet的ICMP的message,
也就是1.1.1.2可以ping 1.1.5.0的subnet.

RouterC(config)#int s0
RouterC(config-if)#ip access-group 110 in
RouterC(config-if)#^Z

上面的语句就apply access-list到interface s0 inbound的traffic

下面的命令在configure的时候会常用到的:

sh access-list
sh ip access-list
sh log
clear access-list counter
sh ip interface
sh run

Standard IPX Access Lists

access-list [number] [permit or deny] [source] [destination]

Router(config)#access-list 888 permit 8020 –1
Router(config)#access-list 888 deny -1 –1
Router(config)#int s0
Router(config-if) #ipx access-group 888 in
Router(config-if)#^Z

这里用-1代表any

Extended IPX Access Lists

access-list [number] [permit or deny] [protocol] [source] [socket]
[destination] [socket]

IPX里面的socket和IP里面的port number类似。一般都用all
来做configuration.

RouterA(config)#access-list 999 permit any 8020 all 8020 all

8020 是 IPX network number.
any是指所有的protocol.

RouterA(config)#access-list 999 deny any 8040 all any all
RouterA(config)#int s0 RouterA(config-if)#ipx access-group 999 in
RouterC(config-if)#^Z

而在extended IPX access lists是用any, 不是用 -1.

HDLC (High-Level Data Link Control)

serial port的default encryption 就是HDLC。
你可以用下面的命令看你s0的encapsulation HDLC is derived from SDLC and specifies an encapsulation
method of data on synchronous serial data links.

Router#sh int s0

如果要设置HDLC,直接敲下面的命令。

encapsulation HDLC

由于HDLC没有addressing
的功能,所以设置非常的简单。你也只能用HDLC连接两个serial port而已。由于没有addressing, 所以不可能用HDLC 连接3个serial
ports.

Frame Relay

Frame Relay就是把frame 直接relay(传递)过去。不象X.25, 有很多的error
correction等的功能。因为现在的line都比较稳定,所以没有必要做那么多的error
correction。因为简单,所以更efficient.

Frame Relay 是工作在第二层的protocol.
所以你可以在ISDN,T1,ADSL等的network上设置frame relay.

下面是典型的frame relay 连接图。

code:
--------------------------------------------------------------------------------

Local Loop Local LoopRouter1-- Centrol Office----Frame Relay Cloud --- Centrol Office --Router2 T1 T1

--------------------------------------------------------------------------------

如果公司要连接San Francisco和New York的Office,
直接用T1连接费用非常的高。如果用Frame Relay, 你只要在你公司的router和Frame Relay的local centrol
office连接。
而中间走Frame relay的network.

Frame Relay中最关键的概念是CIR(Commited Info Rate):
CIR是你申请的保证最低的transmission rate. 这是指保证给你你最低的transmission rate.
而你的network一般都会工作在更高的速度上。

其实现在更好的办法是把你公司的网络连到Internet Serivce Provider.
然后中间走Internet. 你再在两边router上设VPN(Virtual Private Network).
随着Internet越来越普及,所以Frame Relay的生意将会越来越萧条。

Frame Relay的设备有两种: DTE和DCE。

DTE(Data terminal equipment)是用户的节点。比如terminals, personal
computers, routers, and bridges.

DTE(Data circuit-terminating equipment)是提供frame relay
传输的公司的设备。一般来说,packet switches 会是DTE. (虽然routers
或其他的设备也可以设成DCE)。

DTE and DCE devices are logical entities. That is, DTE devices initiate
a communications exchange, and DCE devices respond

code:
--------------------------------------------------------------------------------

Digital Phone line frame relay CloudRouter -- DSU/CSU---------------------CO -------//------- CO | Router --DSU/CSU --------------

--------------------------------------------------------------------------------

CO: Central Office,离你最近的提供frame relay的office
DSU/CSU 是作为T1的layer 1 device
Demarcation(demarc): 就是提供Frame
relay的公司的线路和你公司自己的线路的交接点。
从demarc point 到center office 那一段叫做local loop. 从demarc point
到自己的网络里面的所有的device都叫做CPE(Customer Premise Equipment)
DLCI(Data Link Connection Identifier),类似于MAC address, 是frame
relay里面用的address.

Frame Relay Virtual Circuits(VC)

实际上就是两个DTE之间logical connection. 它是connection-oriented.

DLCI number 在Cisco router里面支持的是从16-1007。

Global DLCI number. global DLCI number就象你自己家的电话号码。
Local DLCI number, 就是你要call的DLCI number,
这也是你在router上设VC时候要confiugre的number.

RouterA ----------- RouterB
20 21
假设你routerA的global DLCI number是20。 routerB的global DLCI
number是21。
如果你在routerA上面要和router B连接,你要建立一个VC.这个时候,你要dial
router B
的DLCI number, 也就是21。所以这21就是routerA的local DLCI number.

DLCI number是work 在layer 2的。而IP address是work
在layer3的,所以可以用下面的mapping 把IP address map 到DLCI number.

在router设置的时候,只要设置local DLCI number, 而global DLCI
number是frame relay company 控制的。你在router上不用设置。

code:
--------------------------------------------------------------------------------

RouterA ----------- RouterB 20 21 1.1.1.1 1.1.1.2

--------------------------------------------------------------------------------

让routerA按下面的方式设置:

RouterA(config-if)#frame-relay map 1.1.1.2 21

你也可以让Local Management Interface (LMI)
来自动进行layer3到layer2的转换。

LMI是由Cisco Systems, StrataCom, Northern Telecom, and Digital
Equipment Corporation四家公司制度的。

Frame relay有两种encapsulation types: Cisco (default) and IETF
如果你连接两台Cisco
router,可以用Cisco,而如果和其它方的router连接,要用IETF。

RouterB(config)#int s0/0
RouterB(config-if)
#encapsulation frame-relay ?
ieft Use RFC1490 encapsulation

LMI type有下面几种,在新的IOS里面,都是自动detect的。所以没有必要设置。

RouterB(config-if)#frame-relay lmi-type ?
cisco ansi q933a

RouterB(config)#int s0/0
RouterB(config-if)#encapsulation frame-relay
RouterB(config-if)#frame-relay interface-dlci 51
RouterB(config-fr-dlci)#exit
RouterB(config)#^Z

由于用了DLCI,所以不用做人工mapping了。

PPP
PPP实际上是用了HDLC的encapsulation. 然后加上了LCP和NCP的支持。
Link Control Protocol (LCP) -- An extensible LCP is used to establish,
configure, and test the data link connection
- Authentication using either PAP (Password Authentication Protocol) or
CHAP (Challenge-Handshake Authentication Protocol)
- Data compression

Network Control Protocols (NCPs) -- A family of NCPs are used to
establish and configure different network layer protocols.

RouterA --- RouterB

RouterA(config)#int s0
RouterA(config-if)#encapsulation ppp
RouterA(config-if)#ppp authentication chap
RouterA(config-if)#exit
RouterA(config)#username RouterB password meetchinese
RouterA(config)#^z

这里的user password 两边必须是一样的。
这里的RouterB是对方的router的名字。

ISDN
是2B +D channel. B channel 是64K。 D channel 是16K。
ISDN 可以用 PPP, HDLC or LAPD 作为 encapsulation protocol

TE2 + TA = TE1

ISDN reference points 有下面几种:

R reference point
S reference point
T reference point
U reference point
从左往右是按RSTU字母排列的。

code:
--------------------------------------------------------------------------------

TE1 -- NT2 -- NT1 -- ISDN network -- NT1 -- NT2 --TE1 | | | S T UTE2 -- TA---NT2 -- NT1 --- ISDN network -- NT1 -- NT2 --TA--TE2 | | | | R S T U

--------------------------------------------------------------------------------

ISDN Protocol有下面三种
E protocols apply to ISDN on an existing telephone network
I protocols deal with concepts, terminology, and services
Q protocols deal with switching and signaling

ISDN configuration:

Router(config)#isdn switch-type dms-100
Router(config)#int bri
Router(config-if)#encapsulation ppp
Router(config-if)#isdn spid1 555555111101
Router(config-if)#isdn spid2 555555222202
Router(config-if)#exit
Router(config)#^z



技术文章 | 评论(0) | 引用(0) | 阅读(2158)
 
发表评论
   
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]