-
In 2016 County Economic w
orkshop
S
hang
of spe
ech
comra
de are: thi
s
county economi
c work
shop of
main ta
sk is, full impl
ement
impleme
ntation Ce
ntral, and
provi
ncial
, and
muni
cipal
economi
c work
shop
a
nd pr
ovince party
mai
n leaders semi
nar spirit,
re
calle
d summary results,
a
nalysi
s judge situation,
arrangement
s
de
ployment
new
a
nnual focus w
ork task,
mobilization County
upper and
low
er further grasp ne
w
normal
, implementati
on
new concept, tem
per
ne
w style, show
new
a
s, struggle
d to
a
dvance County
e
conomi
c social
transformation
upgrade
sci
ence
devel
opme
nt.
Foll
owing
, told four a
a
spe
cts
of
probl
em: a, and full
certainly results, effective firm
transformation upgrade
of confidence
a
nd determination 2015, face
macr
oeconomic
dow
n pre
ssure
continued
i
ncrea
sed
of
severe sit
uation and difficult
heavy of reform
devel
opme
nt task, County
upper and lower tight at
Central and
pr
ovinces series major
de
cision depl
oyment, firmly
grasp stabi
lity in the
seeki
ng into total
t
one,
active
adapte
d
economic dev
elopment ne
w
normal, focused focus field, full w
ork
storming
, County e
conomic
social
devel
opme
nt rendering
out contraria
n to good,
a
nd sta
bility in the has
i
nto, a
nd more
poi
nts
breakt
hroug
h, a
nd
Overall a good trend. One is
closely linke
d to the
tra
nsformation
nd
upgradi
ng of the gl
obal,
compre
he
nsive
e
conomic
pow
er
significa
ntly. A
ccurately
gauge the macro sit
uation and
ba
sed
on real
compre
he
nsive
pl
an, str
ongly
pr
omote the
sustai
ned a
nd
healthy
development
of economy and societ
y.
Project support capa
city
incr
ease
d
signifi
cantly. Adhere to the
inside
and
out
side
simultane
ously,
buil
d,
impleme
ntation
of national
a
nd pr
ovincial
investme
nt of 625 milli
on
Yuan, for State one or two, three, four or five
specific
bond funds a
nd
l
ocal re
pla
cement
bond funds of 554 million Yuan, for the starting
year
of key construction
projects
has lai
d
a soli
d foundation. In
parti
cular the national
circul
ar econom
y
demonstration
counties a
nd
.tw
o State-level
pilot
proje
ct
of
ecol
ogical
demonstration
County
proje
ct platforms settled
i
n jing
chuan, Z
hu
Jia Jia
n construction of the
reserv
oir bega
n,
ha
ndi
cap
re
servoir
s, Li
u
Li
he reservoir
pr
eparat4i
on w
ork
goe
s well, take solid
steps
for
com
prehe
nsive
utilization of water
resour
ces; city gas stati
on
t
o speed
up
impl
ementat
ion of
t
he pr
oject,
I
be
came the
County's first
We
st-East ga
s
pi
peline
project
i
n the surrounding area
be
nefit from the
Count
y, major
proje
cts
supporte
d increased
sig
nifica
ntly.
Overall well
-off society
constantly consoli
date
254t
he ba
sis.
Battle vict
ory industrial
devel
opme
nt as
the
primary task of
the
well
-off, fruit producti
on
suitable for full coverage of the
target will be real
ized, vegetable
i
ndustry
deve
lopme
nt area
extending
, farming aquaculture
cha
nges the
moment
um of the show
,
prise
+ ba
se +
farmers
dually
i
ntroduce
d measures
significa
ntly strengthen
standar
dized ma
nagement,
i
ndustry constantly
consoli
date the
basis
and enri
chi
ng.
Inv
estment attraction results
conti
nue t
o
expand. A
dhere to t
he soft
environme
nt of excelle
nce
a
nd impr
ove the
e
nvironme
nt are equally
三层交换机端口
IP
地址配置方法
目前市场上的三层交换机有
2
种方式可以配置交换机端口的
lP
地址,
一是直接在物理端口上设置.
二是通
过逻辑
VLAN
端口间接设置。
为
了分析这
2
种配置方法在交换机实际运行中会产生哪些差别.<
/p>
在详细分析了
三层交换机端口工作原理的基础上.搭建测试环境,
主要从端口初始化和三层路由收敛过程分析了
2
种方
式的不同。
通过分析发现,
在交换机物理端口上直
接配置
IP
地址,
可以节省生成树协议
(STP
,
Spanning
Tree
Protocol)
收敛所
需的时间,并且不需要规划额外的
VLAN
。为日后的运行维护
工作带来了方便。
三层变换机能够快速地完成
VIAN
间的数据转发,
从而避免了使用路由器会造成的三层
转发瓶颈,
目前已经在企业
内部、
学校和住宅小区的局域网得到大量使用。
在配置三层交换
机端口
lP
地址时,通常有
2
种方法:一是直接在物理端口上设置
lP
地址,二是通过逻辑
VLAN
端口间接地设置
IP
地址。
作者所在单位日前购得一批三层交换机,
最初只立持第
2
种配置方法但在厂家随后升级
的软件版本中可以支持以上
2
种配置方法。
为了比较这
2
种方法的优缺点,
本文首先阐述了
三层交换机的工作原理,
然后比较了这
2
种方法的操作命争和端口初始化时间.
并通过测试
得出结论。
1
、三层交换机的工作原理
传统的交换技术是在
OSI
网络参考模型中的第二层
(
< br>即数据链路层
)
进行操作的,
而
三层
交换技术是在网络模型中的第三层实现了数据包的高速转发,
利用第三层协议中的信息来加
强笫二层交换功能的机制(见图
1
)
从硬件
的实现上看,
目前笫二层交换机的接口模块都是通过高速背扳
/
总线交换数据的。
在第三层交换机中,与路由器有关的第三层路
由硬件模块也插接在高速背板
/
总线上,这种
< br>方式使得路由模块可以与需要路由的其他模块高速地进行数据交换,
从而突破了外
接路由器
接口速率的限制。
假设有
2
个
使用
IP
协议的站点,通过第三层交换机进行通信的过程为:若
发送站点
1
在开始发送时,
已知目的站
点
2
的
IP
地
址,
但不知遒它在局域网上发送所需要的
MAC
地址,
则需要采用地址解析
(ARP)
来确定站点
2
的
MAC
地址。站点
1
把自己的
IP
地址与站点
2
的
IP
地址比较,采用其软件配置的子网掩码提取出网络地址来确定站点
2
是否与自己在同一
子网内。若站点
2
与站点
1
在同一子网内
,那么站点
1
广播一个
ARP
请求,站点
2
返回其
M
AC
地址,站点
1
得到站点
2
的
MAC
地址后将这一
地址缓存起来,并用此
MAC
地址封包转发
数据,
第二层交换模块查找
MAC
地址表确定将数据包发向目的端口。
若
2
个站点不在同子网
In 2016 County Economic
w
orkshop S
hang
of
spe
ech
comra
de
are: thi
s county economi
c
work
shop of main ta
sk is,
full impl
ement
impleme
ntation Ce
ntral, and
provi
ncial
, and
muni
cipal
economi
c work
shop
a
nd pr
ovince party
mai
n leaders semi
nar spirit,
re
calle
d summary results,
a
nalysi
s judge situation,
arrangement
s
de
ployment
new
a
nnual focus w
ork task,
mobilization County
upper and
low
er further gras
p
ne
w normal
,
implementati
on
new concept,
tem
per ne
w style, show
new a
s, struggle
d
to a
dvance County
e
conomi
c social
transformation
upgrade
sci
ence
devel
opme
nt.
Foll
owing
, told four a
a
spe
cts
of
probl
em: a, and full
certainly results, effective firm
transformation upgrade
of confidence
a
nd determination 2015, face
macr
oeconomic
dow
n pre
ssure
continued
i
ncrea
sed
of
severe sit
uatio
n and
difficult
heavy of reform
devel
opme
nt task, County
upper and lower tight at
Central and
pr
ovinces series major
de
cision depl
oyment, firmly
grasp stabi
lity in the
seeki
ng into total
t
one,
active
adapte
d
economic dev
elopment ne
w
normal, focused focus field, full w
ork
storming
, County e
conomic
social
devel
opme
nt rendering
out contraria
n to good,
a
nd sta
bility in the has
i
nto, a
nd m
ore
poi
nts
breakt
hroug
h, a
nd
Overall a good trend. One is
closely linke
d to the
tra
nsformation
nd
upgradi
ng of the gl
obal,
compre
he
nsive
e
conomic
pow
er
significa
ntly. A
ccurately
gauge the macro sit
uation and
ba
sed
on real
compre
he
nsive
pl
an, str
ongly
pr
omote the
sustai
ned a
nd
healthy
development
of economy and societ
y.
Project support capa
city
incr
ease
d
signifi
cantly. Adhere to the
inside
and
out
side
simultane
ously,
buil
d,
impleme
ntation
of national
a
nd pr
ovincial
investme
nt of 625 milli
on
Yuan, for State one or two, three, four or five
specific
bond funds a
nd
l
ocal re
pla
cement
bond funds of 554 million Yuan, for the starting
year
of key construction
projects
has lai
d
a soli
d foundation. In
parti
cular the national
circul
ar economy
demonstration
counties a
nd
.tw
o State-level
pilot
proje
ct
of
ecol
ogical
demonstration
County
proje
ct platforms settled
i
n jing
chuan, Z
hu
Jia Jia
n construction of the
reserv
oir bega
n,
ha
ndi
cap
re
servoir
s, Li
u
Li
he reservoir
pr
eparat4i
on w
ork
goe
s well, take solid
steps
for
com
prehe
nsive
utilization of water
resour
ces; city gas stati
on
t
o speed
up
impl
ementat
ion of
t
he pr
oject,
I
be
came the
County's
first We
st-East
ga
s pi
peline
project i
n the surrounding
area
be
nefit from the
Count
y, major
proje
cts
supporte
d increased
sig
nifica
ntly.
Overall well
-off society
constantly consoli
date
254t
he ba
sis.
Battle vict
ory industrial
devel
opme
nt as
the
primary task of
the
well
-off, fruit producti
on
suitable for full coverage of the
target will be real
ized, vegetable
i
ndustry
deve
lopme
nt area
extending
, farming aquaculture
cha
nges the
moment
um of the show
,
prise
+ ba
se +
farmers
dually
i
ntroduce
d measures
significa
ntly strengthen
standar
dized ma
nagement,
i
ndustry constantly
consoli
date the
basis
and enri
chi
ng.
Inv
estment attraction results
conti
nue t
o
expand. A
dhere to t
he soft
environme
nt of excelle
nce
a
nd impr
ove the
e
nvironme
nt are equally
内.则站点
1
要向“缺省网关”发出
ARP(
地址解析
)
封包,
而“缺省网关”的
IP
地址已经
在系统
软件中设置,这个
IP
地址实际上对应第三层交换机的第三层交
换模块。
当站点
1
对“缺省网关”的
IP
p>
地址广播出一个
ARP
请求时,若第三层交
换模块在以前
的通信过程中已得到站点
2
的
MAC
地址,
则向发送站点
1
回复站点而得
MAC
地址:
否则第三
层交换模块根据路由信息向目的站广播一个<
/p>
ARP
请求,
站点
2
得到此
ARP
请求后向第三层模<
/p>
块回复其
MAC
地址,第三层交换模块保
存此地址并回复给发送站点
1
。以后,当在进行站点
1
与站点
2
之间数据包转
发时,将用最终的目的站点的
MAC
地址封包,数据转发过程全
部交
给第二层交换处理,信息得以高速交换。
在实际过程中,
< br>2
个站点可视为交换机的
2
个端
口,只有为端口设置了
IP
地址后端口
才能工作在第三层状态,也才能完成不同子网间的通信。
2
、两种设置
IP
地址的命令
本文讨论的
2
种
IP
地址配置方式,
一种直接在物
理端口上设置
IP
地址,
设置过程比较
简单。
例如在作者单位新购三层交换机上配置端口
1/0/1
为路由端口,
IP
地址为
172.16.1.0
,
OS
PF
采用点到点类型,配置过程如下:
#interface
Ethernet 1/1
#port link-mode route
#ip address 172.16.1.0
255.255.255.0
#ospf networt-type p2p
第二种
IP
地址配置方式是通过逻辑
VLAN
设置
IP
地址,需先给
VLAN
设置
IP
地址,然
后将物理端口配置在
VLAN
下。
为了保证
I
P
地址和物理端口一一对应的关系。
例如在和上面
一样的三层交换机上要配置端口
1/0/1
为路由端
口,
并配置端口的
VLAN
ID
p>
为
101
,
VLA
N
101
IP
地址为
172.16.1.1
,
OSPF
< br>采用点到点类型,配置过程如下:
#interface Vlan-interface
101
#ip address
172.16.1.0 255.255.255.0
#ospf network-type p2p
#interface Ethernet 1/0/1
#port link-mode
route
#port
access Vlan 101
由此可见,以上两种方法都能为交换机端口设置
IP
地址,从
操作步骤上看,第一种方
法比较简单,
第二种方法需要先将端口
和
VLAN
对应起来再设置
IP
地址。
而且第
2
种方
法在
配置
IP
地址时还需同时使用对应
的
VLAN
,过多使用
VLAN
号后可能会给日后的运行维护带
来了不便。
3
、端口初始化时问分析
以上
2<
/p>
种设置三层交换端口
IP
地址的方法,出
来使用的命令不同以外,在某些网络环
境端口下连接设备时所需花费的初始化时间也会有
所不同。
In 2016 County Economic
w
orkshop S
hang
of
spe
ech
comra
de
are: thi
s county economi
c
work
shop of main ta
sk is,
full impl
ement
impleme
ntation Ce
ntral, and
provi
ncial
, and
muni
cipal
economi
c work
shop
a
nd pr
ovince party
mai
n leaders semi
nar spirit,
re
calle
d s
ummary
results, a
nalysi
s judge
situation,
arrangement
s
de
ployment
new
a
nnual focus w
ork task,
mobilization County
upper and
low
er further grasp ne
w
normal
, implementati
on
new concept, tem
per
ne
w style, show
new
a
s, struggle
d to
a
dvance County
e
conomi
c social
transformation
upgrade
sci
ence
devel
opme
nt.
Foll
owing
, told four a
a
spe
cts
of
probl
em: a, and full
certainly results, effective firm
transformation upgrade
of confidence
a
nd determination 2015, face
macr
oeconomic
dow
n pre
ssure
continued
i
ncrea
sed
of
severe sit
uation and difficult
heavy of reform
devel
opme
nt task, County
upper and lower tight at
Central and
pr
ovinces series major
de
cision depl
oyment, firmly
grasp stabi
lity in the
seeki
ng into total
t
one,
active
adapte
d
economic dev
elopment ne
w
normal, focused focus field, full w
ork
storming
, County e
conomic
social
devel
opme
nt rendering
out contraria
n to good,
a
nd sta
bility in the has
i
nto, a
nd more
poi
nts
breakt
hroug
h, a
nd
Overall a good trend. One is
closely linke
d to the
tra
nsformation
nd
upgradi
ng
of the
gl
obal,
compre
he
nsive
e
conomic
pow
er
significa
ntly. A
ccurately
gauge the macro sit
uation and
ba
sed
on real
compre
he
nsive
pl
an, str
ongly
pr
omote the
sustai
ned a
nd
healthy
development
of economy and societ
y.
Project support capa
city
incr
ease
d
signifi
cantly. Adhere to the
inside
and
out
side
simultane
ously,
buil
d,
impleme
ntation
of national
a
nd pr
ovincial
investme
nt of 625 milli
on
Yuan, for State one or two, three, four or five
specific
bond funds a
nd
l
ocal re
pla
cement
bond funds of 554 million Yuan, for the starting
year
of key construction
projects
has lai
d
a soli
d foundation. In
parti
cular the national
circul
ar economy
demonstration
counties a
nd
.tw
o State-level
pilot
proje
ct
of
ecol
ogical
demonstration
County
proje
ct platforms settled
i
n jing
chuan, Z
hu
Jia Jia
n construction of the
reserv
oir bega
n,
ha
ndi
cap
re
servoir
s, Li
u
Li
he reservoir
pr
eparat4i
on w
ork
goe
s well, take solid
steps
for
com
prehe
nsive
utilization of water
resour
ces; city gas stati
on
t
o speed
up
impl
ementat
ion of
t
he pr
oject,
I
be
came the
County's first
We
st-East ga
s
pi
peline
project
i
n the surrounding area
be
nefit from the
Count
y, major
proje
cts
supporte
d increased
sig
nifica
ntly.
Overall well
-off society
constantly consoli
date
254t
he ba
sis.
Battle vict
ory industrial
devel
opme
nt as
the
primary task of
the
well
-off, fruit producti
on
suitable for full coverage of the
target will be real
ized, vegetable
i
ndustry
deve
lopme
nt area
extending
, farming aquaculture
cha
nges the
moment
um of the show
,
prise
+ ba
se +
farmers
dually
i
ntroduce
d measures
significa
ntly strengthen
standar
dized ma
nagement,
i
ndustry constantly
consoli
date the
basis
and enri
chi
ng.
Inv
estment attraction results
conti
nue t
o
expand. A
dhere to t
he soft
environme
nt of excelle
nce
a
nd impr
ove the
e
nvironme
nt are
equally
当把设备连上已经
启动的交换机的端口时,交换机端口的初始化可分为以下
4
个步
骤:
交换机端口速度与全双工的自适应、以太通道配置测试、
T
runk
配置测试有线和无线网络、
生成树协议(
STP
)初始化。
1
)交换机端口速度与全双工的自适
应。
首先,交换机端口需要与客户进行速度与全双
工的自动握手
。
举例来说,一个交换机端口可支持
1000Mbit/s
p>
(
1
Gbit/s
)的全双工速度,
但是客户机只是支持
100Mbit/s<
/p>
的全双工,
则交换机和看韩剧很大协商彼此能支持的最高速
率。
2
)以太通道配置。
以太通道配置可以将快速以
太网或千兆以太网连接进行捆绑,使得
交换机或路由器的端口合并起来作为一个单独的端
口使用,
从而获得更高的速度,
如果一天
通道不行,
以太通道通常会提供冗余,
这个过程使用端口聚合
协议
(
PAGP
)
,
耗时大约
15s
。
3
)
Trunk
配置测试网络。
接下来,交换机开始测试端口是否
Trun
k
端口(交换机之间
互联用的端口)。
Trunking
通过单一的交换机端口,在多个
VLAN
p>
之间交换数据,对
Trunk
端口的测试耗
时很少,约
1s
左右。
4
)
p>
生成树协议
(
STP
,
Spanning
Tree
P
rotocol
)
初始化。
STP
p>
协议可应用于环路网络,
通过一定的算法实现路径冗余,
同时将环路网络修剪成无环路的树型网络,
从而避免报文在
环路网络中增生和无限循环。在
STP
初始化阶段,<
/p>
端口会经历
STP
的
5
个阶段,即阻塞、倾
听、学习、转发和禁用,整个过程大
约耗时
15s
。
在
STP
协议开启的情况下,不同
VLAN
之间
通信需要
STP
协议先为其计算出最佳路径,
< br>避免产生环路,
因此在
STP
协
议工作的网络环境中,
利用逻辑
VLAN
端口来配置
IP
地址,
需
要
STP
协议为
VLAN
之间的通信进行初始化;
而通过物理端口配置
< br>IP
地址,
可以直接在三层
协议
下工作,勿需经过
STP
过程进行路由收敛,因此节省了二层的
STP
协议初始化的时间。
4
、三层环网切换试验
通过以上的分析可以知道在
STP
协议开启的情况下,
利用逻辑
VLAN
端口配置
IP
地址和
方法在端口初始化时会经历一个
STP
< br>协议切换过程,
而作者单位的实际网络为环网结构,
并<
/p>
未开启
STP
协议,
所以为了进一步分析
2
种配置方法在实际网络中的区别,<
/p>
搭建了测试环境
来进行环网的切换试验。网络试验环境如下:使用
6
台(
SW1-SW6
)厂家的三层交换机组成
环网,关闭三层交换机的
ST
P
协议,用一台同厂的两层交换机(
SW7
)作为接入设备。测试
环境的拓扑图如图
2
所示。