华为三层交换机配置方法命令及实例Word格式.docx
《华为三层交换机配置方法命令及实例Word格式.docx》由会员分享,可在线阅读,更多相关《华为三层交换机配置方法命令及实例Word格式.docx(15页珍藏版)》请在冰豆网上搜索。
vlan5
descriptionlink-to-baofeng
vlan6
descriptionlink-to-pingxi
vlan7
descriptionlink-to-pingnan
vlan8
descriptionUplink-to-Putian
vlan9
descriptionlink-to-pingxicentre
//第二步:
给VLAN划网关
interfaceVlan-interface2
descriptionlinktowenquan
ipaddress10.41.77.41255.255.255.192
interfaceVlan-interface3
descriptionlinktoruzhou
ipaddress10.41.77.105255.255.255.192
interfaceVlan-interface4
descriptionlinktoxiaotun
ipaddress10.41.77.169255.255.255.192
interfaceVlan-interface5
descriptionlinktobaofeng
ipaddress10.41.77.233255.255.255.192
interfaceVlan-interface6
descriptionlinktopingxi
ipaddress10.41.78.41255.255.255.192
interfaceVlan-interface7
descriptionlinktopingnan
ipaddress10.41.78.105255.255.255.192
interfaceVlan-interface8
descriptionuplinktoputian
ipaddress10.41.244.102255.255.255.252
interfaceVlan-interface9
descriptionlinktopingxicentre
ipaddress10.41.80.233255.255.255.192
//第三步:
给VLAN指定端口
interfaceEthernet1/0/2
portaccessvlan2
interfaceEthernet1/0/3
portaccessvlan3
interfaceEthernet1/0/4
portaccessvlan4
interfaceEthernet1/0/5
portaccessvlan5
interfaceEthernet1/0/6
portaccessvlan6
interfaceEthernet1/0/7
portaccessvlan7
interfaceEthernet1/0/8
portaccessvlan8
interfaceEthernet1/0/9toEthernet1/0/24
portaccessvlan9
//第四步:
配置路由协议
//
(1)用RIP配动态路由
rip
network10.41.77.41
network10.41.77.105
network10.41.77.169
network10.41.77.233
network10.41.78.41
network10.41.78.105
network10.41.80.233
network10.41.244.102
//
(2)配静态路由(只用对远
华为三层交换机配置命令
分类:
默认栏目
2007.6.207:
28作者:
weiwei2501|评论:
1|阅读:
0
Enable
//进入私有模式
Configureterminal
//进入全局模式
servicepassword-encryption
//对密码进行加密
hostnameCatalyst3550-12T1
//给三层交换机定义名称
enablepassword123456.
//enable密码
Enablesecret654321
//enable的加密密码(应该是乱码而不是654321这样)
Ipsubnet-zero
//允许使用全0子网(默认都是打开的)
Ipname-server172.16.8.1172.16.8.2
//三层交换机名字Catalyst3550-12T1对应的IP地址是172.16.8.1
Servicedhcp
//提供DHCP服务
iprouting
//启用三层交换机上的路由模块
Exit
Vtpmodeserver
//定义VTP工作模式为sever模式
Vtpdomaincentervtp
//定义VTP域的名称为centervtp
Vlan2namevlan2
//定义vlan并给vlan取名(如果不取名的话,vlan2的名字应该是vlan002)
Vlan3namevlan3
Vlan4namevlan4
Vlan5namevlan5
Vlan6namevlan6
Vlan7namevlan7
Vlan8namevlan8
Vlan9namevlan9
interfacePort-channel1
//进入虚拟的以太通道组1
Interfacegigabitethernet0/1
//进入模块0上的吉比特以太口1
channel-group1modeon
//把这个接口放到快速以太通道组1中
Interfacegigabitethernet0/2
//同上channel-group1modeon
port-channelload-balancesrc-dst-ip
//定义快速以太通道组的负载均衡方式(依靠源和目的IP的方式)
interfacegigabitethernet0/3
//进入模块0上的吉比特以太口3
interfacegigabitethernet0/4
//同上
interfacegigbitethernet0/5
interfacegigbitethernet0/6
interfacegigbitethernet0/7
//进入模块0上的吉比特以太口7
noshutdown
spanning-treevlan6-9cost1000
//在生成树中,vlan6-9的开销定义为10000
interfacerangegigabitethernet0/8–10
//进入模块0上的吉比特以太口8,9,10
spanning-treeportfast
//在这些接口上使用portfast(使用portfast以后,在生成树的时候不参加运算,直接成为转发状态)
interfacegigabitethernet0/11
//进入模块0上的吉比特以太口11
interfacegigabitethernet0/12
interfacevlan1
//进入vlan1的逻辑接口(不是物理接口,用来给vlan做路由用)
ipaddress172.16.1.7255.255.255.0
//配置IP地址和子网掩码
standby1ip172.16.1.9
//开启了冗余热备份(HSRP),冗余热备份组1,虚拟路由器的IP地址为172.16.1.9
standby1priority110preempt
//定义这个三层交换机在冗余热备份组1中的优先级为110,preempt是用来开启抢占模式
interfacevlan2
ipaddress172.16.2.252255.255.255.0
standby2ip172.16.2.254
standby2priority110preempt
ipaccess-group101in
//在入方向上使用扩展的访问控制列表101
interfacevlan3
ipaddress172.16.3.252255.255.255.0
standby3ip172.16.3.254
standby3priority110preempt
ipaccess-group101in
interfacevlan4
ipaddress172.16.4.252255.255.255.0
standby4ip172.16.4.254
standby4priority110preempt
interfacevlan5
ipaddress172.16.5.252255.255.255.0
standby5ip172.16.5.254
standby5priority110preempt
interfacevlan6
ipaddress172.16.6.252255.255.255.0
standby6ip172.16.6.254
standby6priority100preempt
interfacevlan7
ipaddress172.16.7.252255.255.255.0
standby7ip172.16.7.254
standby7priority100preempt
interfacevlan8
ipaddress172.16.8.252255.255.255.0
standby8ip172.16.8.254
standby8priority100preempt
interfacevlan9
ipaddress172.16.9.252255.255.255.0
standby9ip172.16.9.254
standby9priority100preempt
access-list101denyipany172.16.7.00.0.0.255
//扩展的访问控制列表101
access-list101permitipanyany
Interfacevlan1
//进入vlan1这个逻辑接口
Iphelper-address172.16.8.1
//可以转发广播(helper-address的作用就是把广播转化为单播,然后发向172.16.8.1)
Interfacevlan2
Iphelper-address172.16.8.1
Interfacevlan3
iphelper-address172.16.8.1
interfacevlan4
routerrip
//启用路由协议RIP
version2
//使用的是RIPv2,如果没有这句,则是使用RIPv1
network172.16.0.0
//宣告直连的网段
exit
iproute0.0.0.00.0.0.0172.16.9.250
//缺省路由,所有在路由表中没有办法匹配的数据包,都发向下一跳地址为172.16.9.250这个路由器
linecon0
lineaux0
linevty015
//telnet线路(路由器只有5个,是0-4)
password12345678
//login密码
login
end
copyrunning-configstartup-config
保存配置
cisco3550
Switch#configureterminal
Switch(config)#vtpmodetransparent
Switch(config)#vlan10
Switch(config-vlan)#namevlan10
Switch(config)#exit
Switch(config)#vlan11
Switch(config-vlan)namevlan11
Switch(config-vlan)end
Switch#configureterminal
Switch(config)#interfacefastethernet0/9
Switch(config-if)#switchportmodeaccess
Switch(config-if)#switchportaccessvlan10
Switch(config-if)#exit
Switch(config)#interfacefastethernet0/10
Switch(config)#interfacefastethernet0/11
Switch(config-if)#switchportaccessvlan11
Switch(config)#interfacefastethernet0/12
Switch(config)#interfacevlan10
Switch(config-if)#ipaddress192.168.0.1255.255.255.0
Switch(config-if)#noshutdown
Switch(config)#interfacevlan11
Switch(config-if)#ipaddress192.168.1.1255.255.255.0
Switch(config)#iprouting
Switch(config)#ipforward-protocoludp
Switch(config)#intervlan10
iphelper172.16.11.255//这个命令又是什么意思?
是不是转发整个网段的UDP协议?
为什么用到了172.16.11.255这个地址?
Switch(config)#intervlan11
Switch(config-if)#iphelper172.16.10.255//同上?
Switch(config)#iproute0.0.0.00.0.0.0Vlan10
Switch(config)#iproute0.0.0.00.0.0.0Vlan11
Switch(config)#conft
Switch(config)#access-list103permitip172.16.11.00.0.0.255172.16.10.00.0.0.255
Switch(config)#access-list103permitudpanyanyeqbootpc
Switch(config)#access-list103permitudpanyanyeqtftp
Switch(config)#access-list103permitudpanyeqbootpcany
Switch(config)#access-list103permitudpanyeqtftpany
Switch(config-if)#ipdirected-broadcast103//请解释一下这个的具体含义,本人不是太明白,懂一点意思(直接广播这个列表?
是不是)
Switch(config)#access-list104permitip172.16.10.00.0.0.255172.16.11.00.0.0.255
Switch(config)#access-list104permitudpanyanyeqbootpc
Switch(config)#access-list104permitudpanyanyeqtftp
Switch(config)#access-list104permitudpanyeqbootpcany
Switch(config)#access-list104permitudpanyeqtftpany
Switch(config-if)#ipdirected-broadcast104//同上
Switch(config)#end
Switch#copyrunstar
华为三层交换机配置实例一例
网络技术2008-07-2506:
08:
28阅读243评论0
字号:
大中小
订阅
华为三层交换机配置实例一例服务器1双网卡,内网IP:
192.168.0.1,其它计算机通过其代理上网
PORT1属于VLAN1
PORT2属于VLAN2
PORT3属于VLAN3
VLAN1的机器可以正常上网
配置VLAN2的计算机的网关为:
192.168.1.254
配置VLAN3的计算机的网关为:
192.168.2.254
即可实现VLAN间互联
如果VLAN2和VLAN3的计算机要通过服务器1上网
则需在三层交换机上配置默认路由
系统视图下:
iproute-static0.0.0.00.0.0.0192.168.0.1
然后再在服务器1上配置回程路由
进入命令提示符
routeadd192.168.1.0255.255.255.0192.168.0.254
routeadd192.168.2.0255.255.255.0192.168.0.254
这个时候vlan2和vlan3中的计算机就可以通过服务器1访问internet了~~
华为路由器与CISCO路由器在配置上的差别
"
华为路由器与同档次的CISCO路由器在功能特性与配置界面上完全一致,有些方面还根据国内用户的需求作了很好的改进。
例如中英文可切换的配置与调试界面,使中文用户再也不用面对着一大堆的英文专业单词而无从下手了。
另外它的软件升级,远程配置,备份中心,PPP回拨,路由器热备份等,对用户来说均是极有用的功能特性。
在配置方面,华为路由器以前的软件版本(VRP1.0-相当于CISCO的IOS)与CISCO有细微的差别,但目前的版本(VRP1.1)已和CISCO兼容,下面首先介绍VRP软件的升级方法,然后给出配置上的说明。
一、VRP软件升级操作
升级前用户应了解自己路由器的硬件配置以及相应的引导软件bootrom的版本,因为这关系到是否可以升级以及升级