-
实用标准
华为三层交换机配置方法(
1
)
(2008-07-21 11:27:34)
转载
标签:
分类:
工作汇报
杂谈
本文以河南平临高速所使用的华为华三通信的
H3C
S3600-28P-SI
为例,
配置前首先<
/p>
要确定型号后缀是
SI
还是
EI
,
EI
的支持所有协议
,
SI
的不支持
OSPS
动态协议,
因此
SI
配置路
由时可以使用静态协议和
RIP
协议,具体配置如下:
//
进入系统视图
[H3C]display current-configuration
//
显示当前配置
//
以下开始配置
< br>//
第一步:划分
VLAN
,并
描述
vlan 1
description local-S3600
vlan
2
description link-to-
wenquan
vlan 3
description link-to-ruzhou
vlan 4
description link-to-xiaotun
vlan 5
description link-to-baofeng
vlan 6
description link-to-pingxi
vlan 7
description link-to-pingnan
vlan 8
文档大全
实用标准
description Uplink-to-Putian
vlan 9
description link-to-pingxicentre
//
第二步:给
VLAN
划网关
interface
Vlan-interface2
description
link to wenquan
ip address
10.41.77.41 255.255.255.192
interface
Vlan-interface3
description
link to ruzhou
ip address
10.41.77.105 255.255.255.192
interface
Vlan-interface4
description
link to xiaotun
ip address
10.41.77.169 255.255.255.192
interface
Vlan-interface5
description
link to baofeng
ip address
10.41.77.233 255.255.255.192
interface
Vlan-interface6
description
link to pingxi
ip address
10.41.78.41 255.255.255.192
interface
Vlan-interface7
description
link to pingnan
ip address
10.41.78.105 255.255.255.192
interface
Vlan-interface8
description
uplink to putian
ip address
10.41.244.102 255.255.255.252
interface
Vlan-interface9
description
link to pingxicentre
ip
address 10.41.80.233 255.255.255.192
文档大全
实用标准
//
第三步:给
VLAN
指定端口
interface
Ethernet1/0/2
description
link to wenquan
port access
vlan 2
interface Ethernet1/0/3
description link to ruzhou
port access vlan 3
interface Ethernet1/0/4
description link to xiaotun
port access vlan 4
interface
Ethernet1/0/5
description
link to baofeng
port access
vlan 5
interface Ethernet1/0/6
description link to pingxi
port access vlan 6
interface Ethernet1/0/7
description link to pingnan
port access vlan 7
interface
Ethernet1/0/8
description
uplink to putian
port
access vlan 8
interface Ethernet1/0/9
to Ethernet1/0/24
description link to pingxicentre
port access vlan 9
//
第四步:配置路由协议
//
(
1
)用
RIP
配动态路由
rip
network
10.41.77.41
network
10.41.77.105
文档大全
实用标准
network 10.41.77.169
network 10.41.77.233
network 10.41.78.41
network 10.41.78.105
network 10.41.80.233
network 10.41.244.102
//
(
2
)配静态路由(只用对远
华为三层交换机配置命令
分类
:
默认栏目
2007.6.2 07:28
作者:
weiwei2501
|
评论:
1
|
阅读:
0
Enable
//
进入私有模式
Configure terminal
//
进入全局模式
service password-encryption
//
对密码进行加密
hostname Catalyst 3550-12T1
//
给三层交换机定义名称
enable password 123456.
//enable
密码
Enable
secret 654321
//enable
的加密密码(应
该是乱码而不是
654321
这样)
Ip subnet-zero
//
允许使用全
< br>0
子网(默认都是打开的)
Ip name-server 172.16.8.1 172.16.8.2
//
三层交换机名字
Catalyst 3550-12T1<
/p>
对
应的
IP
地址
是
172.16.8.1
Service dhcp
//
提供
DHCP
服务
ip routing
//
启用三层交换机上的路由模块
Exit
Vtp mode
server
//
定
义
VTP
工作模式为
sever
模式
Vtp domain
centervtp
//
定义
VTP
域的名称为
centervtp
Vlan 2 name vlan2
//
定
义
vlan
并给
vlan
取名(如果不取名的话,
vlan2
的名字应该
p>
是
vlan002
)
Vlan 3 name vlan3
Vlan 4
name vlan4
Vlan 5 name vlan5
Vlan 6 name vlan6
Vlan 7
name vlan7
文档大全
实用标准
Vlan 8 name
vlan8
Vlan 9 name vlan9
Exit
interface Port-channel 1
//
进入虚拟的以太通道组
1
Interface gigabitethernet 0/1
//
进入模块
0
上的吉比特以太口
1
channel-group 1 mode on
//
把
这个接口放到快速以太通道组
1
中
Interface gigabitethernet 0/2
//
同上
channel-group 1 mode on
port-channel
load-balance
src-dst-ip
//
定义快速以太通道组的负载均衡方式(依靠源和目的
IP
的方式)
interface
gigabitethernet 0/3
//
进入模块
0
上的吉比特以太口
3
interface gigabitethernet 0/4
//
同上
interface gigbitethernet 0/5
//
同上
interface gigbitethernet 0/6
//
同上
interface gigbitethernet 0/7
//
进
入模块
0
上的吉比特以太口
7
no shutdown
spanning-tree
vlan 6-9 cost 1000
//
在生成树中,
vlan6-9
的开销定
义为
10000
interface range
gigabitethernet 0/8
–
10
//
进入模块
0
上的吉比特以太口
8,9,10
no shutdown
spanning-tree portfast
//
在这些接口上使用
portfa
st
(使用
portfast
以后,在
生成树的
时候不参加运算,直接成为转发状态)
interface gigabitethernet 0/11
//
进入模块
0
上的吉比特以太口
11
interface gigabitethernet
0/12
//
同上
interface vlan 1
//
进
入
vlan1
的逻辑接口(不是物理接口,用来给
vlan
做路由用)
ip
address 172.16.1.7 255.255.255.0
//
配
置
IP
地址和子网掩码
no shutdown
standby 1 ip
172.16.1.9
//
开启了冗余热备份(
HSRP<
/p>
),冗余热备份组
1
,虚拟路由
器的
IP
地址为
172
.16.1.9
standby
1
priority
110
preempt
//
定
义这个三层交换机在冗余热备份组
1
中的优先级为
110
,
preempt
是
用来开启抢占模式
interface vlan 2
//
同上
ip address 172.16.2.252 255.255.255.0
no shutdown
standby 2 ip
172.16.2.254
文档大全
实用标准
standby 2
priority 110 preempt
ip access-group
101 in
//
在入方向上使用扩展的访问控制列表
101
interface vlan 3
//
同上
ip address
172.16.3.252 255.255.255.0
no shutdown
standby 3 ip 172.16.3.254
standby 3 priority 110 preempt
ip access-group 101 in
interface vlan 4
//
同上
ip address 172.16.4.252 255.255.255.0
no shutdown
standby 4 ip
172.16.4.254
standby 4 priority 110
preempt
ip access-group 101 in
interface vlan 5
ip address 172.16.5.252 255.255.255.0
no shutdown
standby 5 ip
172.16.5.254
standby 5 priority 110
preempt
ip access-group 101 in
interface vlan 6
ip address 172.16.6.252 255.255.255.0
no shutdown
standby 6 ip
172.16.6.254
standby 6 priority 100
preempt
interface vlan 7
ip address 172.16.7.252 255.255.255.0
no shutdown
standby 7 ip
172.16.7.254
standby 7 priority 100
preempt
interface vlan 8
ip address 172.16.8.252 255.255.255.0
文档大全
实用标准
no shutdown
standby 8 ip 172.16.8.254
standby 8 priority 100 preempt
interface vlan 9
ip address 172.16.9.252 255.255.255.0
no shutdown
standby 9 ip
172.16.9.254
standby 9 priority 100
preempt
access-list 101
deny ip any 172.16.7.0 0.0.0.255
//
扩展的访问控制列表
101
access-list 101 permit ip any any
Interface vlan 1
//
进入
vlan1
这个逻辑接口
Ip
helper-address 172.16.8.1
//
可以转发广播(
helper
-
address
的作用就是把广播转化
为单播
,然后发向
172.16.8.1
)
Interface vlan 2
Ip helper-
address 172.16.8.1
Interface vlan 3
ip helper-address 172.16.8.1
interface vlan 4
ip helper-
address 172.16.8.1
interface vlan 5
ip helper-address 172.16.8.1
interface vlan 6
ip helper-
address 172.16.8.1
interface vlan 7
ip helper-address 172.16.8.1
interface vlan 9
ip helper-
address 172.16.8.1
router
rip
//
启用路由协议
RIP
version 2
//
使用的是
RIPv2
,如果没有这句,则是使用
RIPv1
network 172.16.0.0
//
宣告直连的网段
exit
ip route 0.0.0.0 0.0.0.0
172.16.9.250
//
缺省路由,所有在路由表中没有办法匹配的数据包,
p>
都发向下一跳地址为
172.16.9.250
这个路由器
文档大全
实用标准
line con 0
line aux 0
line vty 0 15
//telnet
线路(路由器只有
5
个,是
0-4
)
password 12345678
//login
密码
login
end
copy running-config
startup-config
保存配置
cisco 3550
Switch# configure terminal
Switch(config)#vtp mode transparent
Switch(config)#vlan 10
Switch(config-vlan)# name vlan10
Switch(config)#exit
Switch(config)#vlan 11
Switch(config-vlan)name vlan11
Switch(config-vlan)end
Switch#configure terminal
Switch(config)#interface
fastethernet0/9
Switch(config-
if)#switchport mode access
Switch(config-if)#switchport access
vlan 10
Switch(config-if)#exit
Switch(config)#interface
fastethernet0/10
Switch(config-
if)#switchport mode access
Switch(config-if)#switchport access
vlan 10
Switch(config-if)#exit
Switch(config)#interface
fastethernet0/11
Switch(config-
if)#switchport mode access
Switch(config-if)#switchport access
vlan 11
Switch(config-if)#exit
Switch(config)#interface
fastethernet0/12
Switch(config-
if)#switchport mode access
Switch(config-if)#switchport access
vlan 11
Switch(config-if)#exit
Switch(config)#interface
vlan10
Switch(config-if)#ip address
192.168.0.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#interface vlan11
文档大全
实用标准
Switch(config-if)#ip address
192.168.1.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#ip routing
Switch(config)#ip forward-protocol udp
Switch(config)#inter vlan 10
ip helper 172.16.11.255 //
这个
命令又是什么意思?是不是转发整个网段的
UDP
协议?为什么
用到了
172.16.11.255
这个地址?
Switch(config)#exit
Switch(config)#inter vlan 11
Switch(config-if)#ip helper
172.16.10.255 //
同上?
Switch(config-if)#exit
Switch(config)#ip route 0.0.0.0 0.0.0.0
Vlan10
Switch(config)#ip route 0.0.0.0
0.0.0.0 Vlan11
Switch(config)#conf t
Switch(config)#access-list 103 permit
ip 172.16.11.0 0.0.0.255 172.16.10.0 0.0.0.255
Switch(config)#access-list 103 permit
udp any any eq bootpc
Switch(config)#access-list 103 permit
udp any any eq tftp
Switch(config)#access-list 103 permit
udp any eq bootpc any
Switch(config)#access-list 103 permit
udp any eq tftp any
Switch(config)#inter vlan 10
Switch(config-if)#ip directed-broadcast
103 //
请解释一下这个的具体含义,本人不是太明白,懂一
点意思(直接广播这个列表?是不是)
Switch(config-if)#exit
Switch(config)#access-list 104 permit
ip 172.16.10.0 0.0.0.255 172.16.11.0 0.0.0.255
Switch(config)#access-list 104 permit
udp any any eq bootpc
Switch(config)#access-list 104 permit
udp any any eq tftp
Switch(config)#access-list 104 permit
udp any eq bootpc any
Switch(config)#access-list 104 permit
udp any eq tftp any
Switch(config)#inter vlan 11
Switch(config-if)#ip directed-broadcast
104 //
同上
Switch(config)#end
Switch#copy run star
华为三层交换机配置实例一例
网络技术
2008-07-25 06:08:28
阅读
243
评论
0
字号:大中小
订阅
华为三层交换机配置实例一例
文档大全
实用标准
服务器
1
双网卡,内网
IP:192.168.0.1
,其它计算机通过其代理上网
PORT1
属于
VLAN1
PORT2
属于
VLAN2
PORT3
属于
VLAN3
VLAN1
的机器可以正常上网
p>
配置
VLAN2
的计算机的网关为:
192.168.1.254
配置
VLAN
3
的计算机的网关为:
192.168.2.254
即可实现
VLAN
间互联
如果
VLAN2
和
VLAN3
的计算机要通过服务器
1
< br>上网
则需在三层交换机上配置默认路由
系统视图下:
ip route-static
0.0.0.0 0.0.0.0 192.168.0.1
然后再在服务器
1
上配置回程路由
进入命令提示符
route add
192.168.1.0 255.255.255.0 192.168.0.254
route add 192.168.2.0 255.255.255.0
192.168.0.254
这个时候
vlan2
和
vlan3
中的计算机就可以通过服务器
1
访问
internet
了
~~
华为路由器与
CISCO
路由器在配置上的差别
"
华为路由器与同档次的
CISCO
路由器在功能特性与配置界面上完全一致
,
有些方面还根据国内用
户的需求作了很好的改进。例如中英
文可切换的配置与调试界面,
使中文用户再也不用面对着一
大堆
的英文专业单词而无从下手了。另外它的软件升级,远程配置,备份中心,
PPP
回拨,路由
器热备份等,对用户来说均是极有用的功能特性。
在配置方面,华为路由器以前的软件版本
(VRP1.0
< br>-相当于
CISCO
的
IOS)
与
CISCO
有细微的
差别,但目前的版本
(VRP1.1)
已和
CISCO
兼容,下面首先介绍
VRP
软件的升级方法,然后给出配
置上的说明。
一、
VRP
软件升级操作
升级前
用户应了解自己路由器的硬件配置以及相应的引导软件
bootrom
< br>的版本
,
因为这关系
到是否可以
升级以及升级的方法,否则升级失败会导致路由器不能运行。在此我们以从
VRP1.0
升级到
VRP1.1
为例说明升级的方
法。
1.
路由器配置电缆一端与
PC
机的串口一端与路由器的
console
口连
接
2.
在
win95/98
下建立使用直连线的超级终端,参数如下:
波特率
9
600
,数据位
8
,停止位
1
,无效验,无流控
,
VT100
终端类型
3.<
/p>
超级终端连机后打开路由器电源,屏幕上会出现引导信息,在出现:
文档大全
实用标准
Press
Ctrl
-
B to enter Boot Menu.
时三秒
内按下
Ctrl
+
b,
会提示输入密码
Please input Bootrom
password:
默认密码为空
,
直接回车进入引导菜单
Boot
Menu,
在该菜单下选
1
,
即
Downloa
d
application
program
升级
VRP
软件,之后屏幕提示选择下载波特率,我们
一般选择
38400
bps
,随即出现提
示信息:
Download
speed
is
38400
change
the
terminal's
speed
to
38400
bps,
and
select XMODEM ENTER key when ready.
此时进
入超级终端“属性”,修改波特率为
38400
,修改后应断开
超级终端的连接,再进入
连接状态,以使新属性起效,之后屏幕提示:
< br>
Downloading
…
CCC
这表示
路由器已进入等待接收文件的状态,我们可以选择超级终端的文件“发送”功能,
选
p>
定相应的
VRP
软件文件名,通讯协议选<
/p>
Xmodem
,之后超级终端自动发送文件到路由器中,整个
p>
传送过程大约耗时
8
分半钟
。
完成后有提示信息出现
,
系
统会将收到的
VRP
软件写入
Flas
h
Memory
覆盖原来的系统,此时整个升级过程完成,系
统提示改回超级终端的波特率:
Restore the terminal's
speed to 9600 bps.
Press ENTER key when ready.
修改完
后记住进行超级终端的断开和连接操作使新属性起效,
之后路由器软件开始启动,用
p>
show
ver
命令将看见相应的版本信息。
下面是
与
CISCO
互通时应注意的地方:
二、
在默认链路层封装上的区别
p>
(
主要用于
DDN
的配置
)
1.
华为
VRP1.0
及其以前的版本,在配置时,由于
CISCO
的默认链路层封装格式为
HDLC
,而
华为路由器的默认链路层封装格式为
PPP
,因此为了能互通,需要将
CISCO
路由器的封装格式改
为
PPP
格式,即
使用命令:
encapsulation PPP
2.<
/p>
华为
VRP1.1
及其以后的版本,增加
了
HDLC
封装格式。这样,不需要改动
CISCO
的封装格
式,而将华为路由器的封装格式改为
p>
HDLC
封装格式即可,即使用命令:
文档大全
-
-
-
-
-
-
-
-
-
上一篇:酒店客房英语大全讲课教案
下一篇:VPX技术介绍