三层交换机配置实例教程文件
- 格式:doc
- 大小:2.40 MB
- 文档页数:21
举例讲解H3C配置三层交换机4个步骤详细用法H3C是一家网络设备制造商,其三层交换机是其主要产品之一、配置H3C三层交换机可以提供强大的网络管理和控制功能。
下面将详细介绍配置H3C三层交换机的四个步骤及其用法。
第一步:基本设置在配置H3C三层交换机之前,首先需要进行基本设置,包括设置设备的管理IP地址、主机名、密码等。
以下是一个基本设置的例子:1.登录到H3C三层交换机的控制台,输入用户名和密码。
2. 进入系统视图,通过命令"system-view"进入。
3. 设置设备的主机名,使用命令"sysname [主机名]"进行设置。
例如,"sysname switch1"将设备主机名设置为switch14. 设置设备的管理IP地址,使用命令"interface vlan-interface [vlan号]"进入VLAN接口模式。
然后使用命令"ip address [IP地址] [子网掩码]"设置IP地址。
例如,"interface vlan-interface 1"进入VLAN接口1模式,"ip address 192.168.1.1 255.255.255.0"设置IP地址为192.168.1.1,子网掩码为255.255.255.0。
5. 保存配置,使用命令"save"保存配置。
第二步:VLAN配置VLAN是虚拟局域网的缩写,通过配置VLAN可以将交换机的端口分成不同的虚拟网络,从而实现更好的网络管理和控制。
以下是一个VLAN配置的例子:1. 创建VLAN,使用命令"vlan [vlan号]"进行创建。
例如,"vlan 10"将创建一个VLAN编号为10的VLAN。
2. 将端口加入VLAN,使用命令"port vlan [vlan号] [端口号]"进行配置。
H3C三层交换机配置实例H3C三层交换机配置实例1 网络拓扑图 02 配置要求 03划分VLAN并描述 (1)3.1进入系统视图 (1)3.2 创建VLAN并描述 (1)4 给VLAN设置网关 (2)4.1 VLAN1的IP地址设置 (2)4.2 VLAN100的网关设置 (2)4.3 VLAN101的网关设置 (2)4.4 VLAN102的网关设置 (3)4.5 VLAN103的网关设置 (3)5 给VLAN指定端口,设置端口类型 (3)5.1 VLAN100指定端口 (3)5.2 VLAN102指定端口 (4)5.3 VLAN1/101/103指定端口 (4)6 配置路由协议 (5)6.1 默认路由 (5)6.2配置流分类 (5)6.3 定义行为 (5)6.4 应用QOS策略 (6)6.5 接口配置QOS策略 (6)1 网络拓扑图图1-1 网络拓扑图2 配置要求用户1网络:172.16.1.0/24 至出口1网络:172.16.100.0/24 用户2网络:192.168.1.0/24 至出口2网络:192.168.100.0/24实现功能:用户1通过互联网出口1,用户2通过互联网出口2。
3划分VLAN并描述3.1进入系统视图<H3C>system-view //进入系统视图图3-1 系统视图3.2 创建VLAN并描述[H3C]vlan 1 //本交换机使用[H3C-vlan1]description Manager //描述为“Manager”[H3C-vlan1]quit[H3C]vlan 100 //划分vlan100[H3C-vlan100]description VLAN 100 //描述为“VLAN 100”[H3C-vlan100]quit[H3C]vlan 101 //划分vlan101[H3C-vlan101]description VLAN 101 //描述为“VLAN 101”[H3C-vlan101]quit[H3C]vlan 102 //划分vlan102[H3C-vlan102]description VLAN 102 //描述为“VLAN 102”[H3C-vlan102]quit[H3C]vlan 103 //划分vlan103[H3C-vlan103]description VLAN 103 //描述为“VLAN 103”[H3C-vlan103]quit[H3C]图3-2 划分VLAN及描述4 给VLAN设置网关4.1 VLAN1的IP地址设置把VLAN1的IP地址设置为192.168.0.254,子网掩码为255.255.255.0,用于本地使用。
Dell三层交换机配置实例在这个文档中,我们将提供一些关于Dell三层交换机配置的实例。
这将帮助您了解如何正确配置和管理这些交换机,使其能够满足您的网络需求。
1. 配置VLAN要配置VLAN,请按照以下步骤操作:1. 使用管理员账户登录到Dell三层交换机的管理界面。
2. 打开命令行界面,并输入以下命令以进入全局配置模式:configure3. 创建一个新的VLAN,输入以下命令并替换`vlan_id`和`vlan_name`为您想要的VLAN的ID和名称:vlan databasevlan vlan_id name vlan_name4. 将一个或多个端口分配给VLAN,输入以下命令并替换`interface_range`和`vlan_id`为您要配置的界面范围和VLAN的ID:interface range interface_rangeswitchport access vlan vlan_id5. 保存配置并退出全局配置模式,输入以下命令:wrexit2. 配置静态路由要配置静态路由,请按照以下步骤操作:1. 使用管理员账户登录到Dell三层交换机的管理界面。
2. 打开命令行界面,并输入以下命令以进入全局配置模式:configure3. 添加静态路由,输入以下命令并替换`destination_network`,`next_hop_ip`和`interface`为您要配置的目标网络、下一跳IP和接口:ip route destination_network next_hop_ip interface4. 保存配置并退出全局配置模式,输入以下命令:wrexit3. 配置端口聚合要配置端口聚合,请按照以下步骤操作:1. 使用管理员账户登录到Dell三层交换机的管理界面。
2. 打开命令行界面,并输入以下命令以进入全局配置模式:configure3. 创建一个聚合组,输入以下命令并替换`group_number`为您想要创建的聚合组的编号:interface port-channel group_number4. 将端口添加到聚合组,输入以下命令并替换`interface_range`为要添加的端口范围:interface range interface_rangechannel-group group_number mode on5. 配置聚合组的参数,例如速度和模式,输入以下命令并替换`group_number`、`speed`和`mode`为您想要配置的聚合组的编号、速度和模式:interface port-channel group_numberspeed speedmode mode6. 保存配置并退出全局配置模式,输入以下命令:wrexit希望这些配置实例可以帮助您正确地配置Dell三层交换机。
在三层交换机上面每个vlan都要设置ip做为网关。
虽然是没有多个mac 但是这个是子接口啊。
就是逻辑上的.三成交换机配置路由就需要配置vlan的ip就可以了很简单swa(config)#interface vlan 1swa(config—ig)#ip address 192.168.1.3 255。
255.255。
0swa(config)#interface vlan 2swa(config-ig)#ip address 192.168。
1。
3 255.255。
255。
0swa(config)#interface vlan 3swa(config-ig)#ip address 192。
168。
1.3 255。
255。
255。
01. 交换机支持的命令:交换机基本状态:switch:;ROM状态,路由器是rommon〉hostname> ;用户模式hostname#;特权模式hostname(config)#;全局配置模式hostname(config-if)# ;接口状态交换机口令设置:switch〉enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname ;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令switch(config)#enable password xxa ;设置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config—line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xxswitch#exit ;返回命令交换机VLAN设置:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2 switch(config—if)#switchport mode trunk ;设置为干线switch(config—if)#switchport trunk allowed vlan 1,2 ;设置允许的vlan switch(config—if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain ;设置发vtp域名switch(config)#vtp password ;设置发vtp密码switch(config)#vtp mode server ;设置发vtp模式switch(config)#vtp mode client ;设置发vtp模式交换机设置IP地址:switch(config)#interface vlan 1 ;进入vlan 1switch(config—if)#ip address ;设置IP地址switch(config)#ip default-gateway ;设置默认网关switch#dir flash: ;查看闪存交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息补充:3层交换机多出的就是路由能力,体现在vlan的互相通信功能和端口的路由能力,下面介绍:开启路由功能:ip routing进入vlan 配置网段网关与路由配置接口相同interface vlan 1ip 192。
三层交换机与路由器的配置实例(图解)目的:学会使用三层交换与路由器让处于不同网段的网络相互通信实验步骤:一:二层交换机的配置:在三个二层交换机上分别划出两VLAN,并将二层交换机上与三层交换或路由器上的接线设置为trunk接口二:三层交换机的配置:1:首先在三层交换上划出两个VLAN,并进入VLAN为其配置IP,此IP将作为与他相连PC 的网关。
2:将与二层交换机相连的线同样设置为trunk接线,并将三层交换与路由器连接的线设置为路由接口(no switchsport)3:将路由器和下面的交换机进行单臂路由的配置实验最终结果:拓扑图下各个PC均能相互通信交换机的配置命令:SW 0:Switch>Switch>enSwitch#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 2Switch(config-vlan)#exitSwitch(config)#int f0/2Switch(config-if)#switchport access vlan 2Switch(config-if)#no shutSwitch(config-if)#int f0/3Switch(config-if)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to upSwitch(config-if)#exitSwitch(config)#SW 1:Switch>enSwitch#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#int f0/2Switch(config-if)#switchport access vlan 2% Access VLAN does not exist. Creating vlan 2Switch(config-if)#no shutSwitch(config-if)#exitSwitch(config)#int f0/3Switch(config-if)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to upSwitch(config-if)#SW 2:Switch>enSwitch#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#int f0/2Switch(config-if)#switchport access vlan 2% Access VLAN does not exist. Creating vlan 2Switch(config-if)#exitSwitch(config)#int f0/3Switch(config-if)#switchport mode trunkSwitch(config-if)#三层交换的配置命令:Switch>enSwitch#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#int f0/1Switch(config-if)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to downSwitch(config-if)#exitSwitch(config)#int f0/2Switch(config-if)#switchport mode trunkSwitch(config-if)#exitSwitch(config)#vlan 2Switch(config-vlan)#exitSwitch(config)#int vlan 1Switch(config-if)#no shut%LINK-5-CHANGED: Interface Vlan1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up Switch(config-if)#ip address 192.168.1.168 255.255.255.0Switch(config-if)#exitSwitch(config)#int vlan 2%LINK-5-CHANGED: Interface Vlan2, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2, changed state to upSwitch(config-if)#ip addSwitch(config-if)#ip address 192.168.2.168 255.255.255.0Switch(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/3, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to upSwitch(config-if)#exitSwitch(config)#int f0/3Switch(config-if)#no switchport%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to upSwitch(config-if)#Switch(config-if)#ip address 192.168.10.1 255.255.255.0Switch(config-if)#no shutSwitch(config-if)#exitSwitch(config)#ip routingSwitch(config-if)#exitSwitch(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.2Switch(config)#路由器的配置:Router>enRouter#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.Router(config)#int f0/0Router(config-if)#no shut%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to upRouter(config-if)#exitRouter(config)#int f0/1Router(config-if)#no shut%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upRouter(config-if)#exitRouter(config)#int f0/0Router(config-if)#no shutRouter(config-if)#exitRouter(config)#int f0/0.1Router(config-subif)#encapsulation dot1Q 1Router(config-subif)#ip address 192.168.3.168 255.255.255.0Router(config-subif)#exitRouter(config)#int f0/0.2Router(config-subif)#encapsulation dot1Q 2Router(config-subif)#ip addRouter(config-subif)#ip address 192.168.4.168 255.255.255.0Router(config-subif)#exitRouter(config)#ip route 0.0.0.0 0.0.0.0 192.168.10.1Router(config)#exit%SYS-5-CONFIG_I: Configured from console by consoleRouter#confConfiguring from terminal, memory, or network [terminal]?Enter configuration commands, one per line. End with CNTL/Z.Router(config)#int f0/1Router(config-if)#ip addRouter(config-if)#ip address 192.168.10.2 255.255.255.0 Router(config-if)#。
华为三层交换机S5700-28C-EI配置文档华为三层交换机S5700-28C-SI配置文档温馨提示:新买的设备默认情况设备是没有任何地址。
连接方式:用超级终端连接相关属性将线和ETH口连接好之后关掉电源重新上电,等进入到to continue press ENTER,按ENTER键回车。
输入原始密码admin进入正式配置界面第一步:设置METH口管理地址system-view 进入系统调试模式[quidway]interface METH 0/0/1 进入到管理接口[quidway-METH 0/0/1]ip address 192.168.1.1 255.255.255.0 配置IP地址[quidway]quit第二步:由于设备本身支持web但是没有加载文件,需加载web 文件dir 显示当前路径和相及web等相关文件在dir下面信息找到xxxxxx.web.zipsystem-view[quidway]http server load xxxxxx.web.zip 加载系统本身自带的web文件加载成功后开启web服务[quidway]http server enable 开启http服务第三步:新建web用户登录用户名和密码及赋予权限system-view[quidway]aaa[quidway-aaa]local-user xxx password cipher|simper xxx 设置用户名和密码[quidway-aaa]local-user xxx server-type http 给xxx用户设置http登录模式[quidway-aaa]local-user xxx priviledge level 3-15 给xxx用户设置http登录等级否则只有ping和Tracert功能[quidway-aaa]quit即可第四步:保存命令以保证断电后配置不会丢失进入到模式输入save然后按Y等待一会即可设置完成之后既可以登陆电脑指定IP地址如192.168.1.100/255.255.255.0Ping 192.168.1.1是否通如果通打开浏览器输入192.168.1.1输入第三步创建或者修改的用户名和密码登陆即可附:查看相关版本命令:display cur-configuation查看接口对于的IP地址display arp将设备恢复出厂设置reset saved-configuation查看端口位置:display interface brief查看光模块display transc eiver interace 端口verbose //查看光模块光信息。
三层交换机的配置实例1、交换机配置模版〔以迈普4152E 交换机为例〕hostname HEBSJZZXCG5_WN_AS02service password-encryptno service new-encryptservice login-secureenable password maipuuser admin password 0 adminip access-list standard 110 permit 10.59.16.0 0.0.0.25520 permit 10.59.18.0 0.0.0.255exitip access-list standard telnet_acl10 permit 10.59.16.0 0.0.0.25520 permit 100.255.1.0 0.0.0.25530 permit 100.255.0.0 0.0.0.255exitaaa new-modelaaa authentication login default tacacs localaaa authentication enable default tacacs enableaaa authorization exec default tacacs localaaa authorization commands 1 default tacacs localaaa authorization commands 15 default tacacs localaaa accounting exec default start-stop tacacsaaa accounting commands 1 default start-stop tacacsaaa accounting commands 15 default start-stop tacacsip ctrl-protocol unicastip ctrl-protocol multicastip load-sharing per-destinationvlan 1exitvlan 2021description TO-HEBSJZZX3_WN_AS01 exitvlan 2051description TO-2600C-ABISexitvlan 2052description TO-2600C-OAexitvlan 2053description TO-2600C-TESTexit!slot_0_S4152E!slot 0/0port 0/0/0port-type nniport access vlan 2021exitport 0/0/1port-type nniport access vlan 2021exitport 0/0/2port-type nniport access vlan 2021exitport 0/0/3port-type nniport access vlan 2021exitport 0/0/4port-type nniport access vlan 2021exitport 0/0/5port-type nniexitport 0/0/6port-type nniport access vlan 2021 exitport 0/0/7port-type nniport access vlan 2021 exitport 0/0/8port-type nniport access vlan 2021 exitport 0/0/9port-type nniport access vlan 2021 exitport 0/0/10port-type nniport access vlan 2021 exitport 0/0/11port-type nniport access vlan 2021 exitport 0/0/12port-type nniport access vlan 2021 exitport 0/0/13port-type nniport access vlan 2021 exitport 0/0/14port-type nniport access vlan 2021 exitport 0/0/15port-type nniport access vlan 2021 exitport 0/0/16port-type nniexitport 0/0/17port-type nniport access vlan 2021 exitport 0/0/18port-type nniport access vlan 2021 exitport 0/0/19port-type nniport access vlan 2021 exitport 0/0/20port-type nniport access vlan 2021 exitport 0/0/21port-type nniport access vlan 2021 exitport 0/0/22port-type nniport access vlan 2021 exitport 0/0/23port-type nniport access vlan 2021 exitport 0/0/24port-type nniport access vlan 2021 exitport 0/0/25port-type nniport access vlan 2021 exitport 0/0/26port-type nniport access vlan 2021 exitport 0/0/27port-type nniexitport 0/0/28port-type nniport access vlan 2021 exitport 0/0/29port-type nniport access vlan 2021 exitport 0/0/30port-type nniport access vlan 2021 exitport 0/0/31port-type nniport access vlan 2021 exitport 0/0/32port-type nniport access vlan 2051 exitport 0/0/33port-type nniport access vlan 2051 exitport 0/0/34port-type nniport access vlan 2051 exitport 0/0/35port-type nniport access vlan 2051 exitport 0/0/36port-type nniport access vlan 2051 exitport 0/0/37port-type nniport access vlan 2051 exitport 0/0/38port-type nniexitport 0/0/39port-type nniport access vlan 2051exitport 0/0/40port-type nniport access vlan 2051exitport 0/0/41port-type nniport access vlan 2051exitport 0/0/42port-type nniport access vlan 2052exitport 0/0/43port-type nniport access vlan 2052exitport 0/0/44port-type nniport access vlan 2052exitport 0/0/45port-type nniport access vlan 2052exitport 0/0/46description TO-HEBSJZZX2_WN_AS03 port-type nniport mode trunkport trunk allowed vlan allport trunk pvid vlan 1traffic-shape 10240 12288exitport 0/0/47description TO-2600Cport-type nniport mode trunkport trunk allowed vlan allport trunk pvid vlan 1!end!slot_1_SM41-4GE!slot 0/1port 0/1/0port-type nniport access vlan 2053exitport 0/1/1port-type nniport access vlan 2053exitport 0/1/2port-type nniexitport 0/1/3port-type nniexitinterface vlan 1description TO-9512E-GUANLIip address 100.255.1.131 255.255.255.0exitip route 0.0.0.0 0.0.0.0 100.255.1.254logging 10.59.18.1 0 6line vty 0 15exec-timeout 0 300login localexitsnmp-server startsnmp-server view default 1.3.6.1 includesnmp-server community public view default ro 1snmp-server host 130.25.2.103 traps community public version 2 snmp-server trap-source 10.6.24.222snmp-server enable traps snmp authenticationsnmp-server enable traps snmp linkdownsnmp-server enable traps snmp linkup2、配置操作3、网点迈普4152E交换机配置模版enaconf tvlan 2051description ABISexitvlan 2052description OAexitvlan 2053description TESTexitvlan 2054description waiwangexitport 0/0/0-0/0/47port-type nniport 0/0/0-0/0/29port access vlan 2051exitport 0/0/30-0/0/39port access vlan 2052exitport 0/0/40-0/0/44port access vlan 2054exitport 0/0/45-0/0/47port access vlan 2053 exitexitwr。
三层交换机路由配置一、三层交换机VLAN间路由建立某公司有两个主要部门:技术部和销售部,分处于不同的办公室,为了安全和便于管理对两个部门的主机进行了VLAN划分,技术部和销售部分处于不同VLAN。
现由于业务需要销售部和技术部的主机能够相互访问,获得相应资源,两个部门的交换机通过一台三层交换机进行连接。
在交换机上建立2个Vlan:Vlan10分配给技术部及Vlan20分配给销售部。
为了实现两部门的主机能够相互访问,在三层交换机上开启路由功能,并在Vlan10中设置IP地址为192.168.10.1;在Vlan20中设置IP地址为192.168.20.1,查看三层交换机路由表,会发现在三层交换机路由表内有2条直连路由信息,实现在不同网络之间路由数据包,从而达到2个部门的主机可以相互访问,拓朴图如图所示。
第1步:开启三层交换机路由功能Switch#configure terminalSwitch(config)#hostname s3550S3550(conifg)#ip routing第2步:建立Vlan,并分配端口S3550(conifg)#vlan 10S3550(config-vlan)#name salesS3550(config-vlan)#exitS3550(conifg)#vlan 20S3550(config-vlan)#name technicalS3550(config-vlan)#exitS3550(conifg)#S3550(conifg)#interface fastethernet 0/10S3550(conifg-if)#switchport mode accessS3550(conifg-if)#switchport access vlan 10S3550(conifg-if)#exitS3550(conifg)# interface fastethernet 0/20S3550(conifg-if)#switchport mode accessS3550(conifg-if)#switchport access vlan 20S3550(config-vlan)#exitS3550(config)#第3步:配置三层交换机端口的路由功能S3550(config)#interface vlan 10S3550(conifg-if)#ip address 192.168.10.1 255.255.255.0 S3550(conifg-if)#no shutdownS3550(conifg-if)#exitS3550(config)#interface vlan 20S3550(conifg-if)#ip address 192.168.20.1 255.255.255.0S3550(conifg-if)#no shutdownS3550(conifg-if)#endS3550#第4步:查看路由表S3550#show ip route第5步:测试三层交换机Vlan间路由功能二、三层交换机与路由器间静态路由的建立某校园局域网由若干台交换机构成,现学校需要将校园网接入互联网,学校在出口使用一台路由器连接互联网。
全面的三层交换机配置实例(带命令解释)三层交换机比较全面的三层交换机配置实例(带命令解释哟!)Enable //进入私有模式Configure terminal //进入全局模式service password-encryption //对密码进行加密hostname Catalyst 3550-12T1 //给三层交换机定义名称enable password 123456. //enable密码Enable secret 654321 //enable的加密密码(应该是乱码而不是654321这样)Ip subnet-zero //允许使用全0子网(默认都是打开的)Ip name-server 172.16.8.1 172.16.8.2 //三层交换机名字Catalyst 3550-12T1对应的IP地址是172.16.8.1Service dhcp //提供DHCP服务ip routing //启用三层交换机上的路由模块ExitVtp mode server //定义VTP工作模式为sever模式Vtp domain centervtp //定义VTP域的名称为centervtpVlan 2 name vlan2 //定义vlan并给vlan取名(如果不取名的话,vlan2的名字应该是vlan002)Vlan 3 name vlan3Vlan 4 name vlan4Vlan 5 name vlan5Vlan 6 name vlan6Vlan 7 name vlan7Vlan 8 name vlan8Vlan 9 name vlan9Exitinterface Port-channel 1 //进入虚拟的以太通道组1switchport trunk encapsulation dot1q //给这个接口的trunk封装为802.1Q的帧格式switchport mode trunk //定义这个接口的工作模式为trunkswitchport trunk allowed vlan all //在这个trunk上允许所有的vlan通过Interface gigabitethernet 0/1 //进入模块0上的吉比特以太口1switchport trunk encapsulation dotlq //给这个接口的trunk封装为802.1Q的帧格式switchport mode trunk //定义这个接口的工作模式为trunkswitchport trunk allowed vlan all //在这个trunk上允许所有的vlan通过channel-group 1 mode on //把这个接口放到快速以太通道组1中Interface gigabitethernet 0/2 //同上switchport trunk encapsulation dotlqswitchport mode trunkswitchport trunk allowed vlan allchannel-group 1 mode onport-channel load-balance src-dst-ip //定义快速以太通道组的负载均衡方式(依*源和目的IP 的方式)interface gigabitethernet 0/3 //进入模块0上的吉比特以太口3switchport trunk encapsulation dotlq //给trunk封装为802.1Qswitchport mode trunk //定义这个接口的工作模式为trunkswitchport trunk allowed vlan all //允许所有vlan信息通过interface gigabitethernet 0/4 //同上switchport trunk encapsulation dotlqswitchport mode trunkswitchport trunk allowed vlan allinterface gigbitethernet 0/5 //同上switchport trunk encapsulation dotlqswitchport mode trunkswitchport trunk allowed vlan allinterface gigbitethernet 0/6 //同上switchport trunk encapsulation dotlqswitchport mode trunkswitchprot trunk allowed vlan allinterface gigbitethernet 0/7 //进入模块0上的吉比特以太口7Switchport mode access //定义这个接口的工作模式为访问模式switchport access vlan 9 //定义这个接口可以访问哪个vlan(实际就是分配这个接口到vlan)no shutdownspanning-tree vlan 6-9 cost 1000 //在生成树中,vlan6-9的开销定义为10000interface range gigabitethernet 0/8 – 10 //进入模块0上的吉比特以太口8,9,10 switchport mode access //定义这些接口的工作模式为访问模式switchport access vlan 8 //把这些接口都分配到vlan8中no shutdownspanning-tree portfast //在这些接口上使用portfast(使用portfast以后,在生成树的时候不参加运算,直接成为转发状态)interface gigabitethernet 0/11 //进入模块0上的吉比特以太口11switchport trunk encapsulation dotlq //给这个接口封装为802.1Qswitchport mode trunk //定义这个接口的工作模式为trunkswitchport trunk allowed vlan all //允许所有vlan信息通过interface gigabitethernet 0/12 //同上switchport trunk encapsulation dotlqswitchport mode trunkswitchport trunk allowed vlan allinterface vlan 1 //进入vlan1的逻辑接口(不是物理接口,用来给vlan做路由用)ip address 172.16.1.7 255.255.255.0 //配置IP地址和子网掩码no shutdownstandby 1 ip 172.16.1.9 //开启了冗余热备份(HSRP),冗余热备份组1,虚拟路由器的IP地址为172.16.1.9standby 1 priority 110 preempt //定义这个三层交换机在冗余热备份组1中的优先级为110,preempt是用来开启抢占模式interface vlan 2 //同上ip address 172.16.2.252 255.255.255.0no shutdownstandby 2 ip 172.16.2.254standby 2 priority 110 preemptip access-group 101 in //在入方向上使用扩展的访问控制列表101interface vlan 3 //同上ip address 172.16.3.252 255.255.255.0no shutdownstandby 3 ip 172.16.3.254standby 3 priority 110 preemptip access-group 101 ininterface vlan 4 //同上ip address 172.16.4.252 255.255.255.0no shutdownstandby 4 ip 172.16.4.254standby 4 priority 110 preemptip access-group 101 ininterface vlan 5ip address 172.16.5.252 255.255.255.0no shutdownstandby 5 ip 172.16.5.254standby 5 priority 110 preemptip access-group 101 ininterface vlan 6ip address 172.16.6.252 255.255.255.0no shutdownstandby 6 ip 172.16.6.254standby 6 priority 100 preemptinterface vlan 7ip address 172.16.7.252 255.255.255.0no shutdownstandby 7 ip 172.16.7.254standby 7 priority 100 preemptinterface vlan 8ip address 172.16.8.252 255.255.255.0no shutdownstandby 8 ip 172.16.8.254standby 8 priority 100 preemptinterface vlan 9ip address 172.16.9.252 255.255.255.0no shutdownstandby 9 ip 172.16.9.254standby 9 priority 100 preemptaccess-list 101 deny ip any 172.16.7.0 0.0.0.255 //扩展的访问控制列表101 access-list 101 permit ip any anyInterface vlan 1 //进入vlan1这个逻辑接口Ip helper-address 172.16.8.1 //可以转发广播(helper-address的作用就是把广播转化为单播,然后发向172.16.8.1)Interface vlan 2Ip helper-address 172.16.8.1Interface vlan 3ip helper-address 172.16.8.1interface vlan 4ip helper-address 172.16.8.1interface vlan 5ip helper-address 172.16.8.1interface vlan 6ip helper-address 172.16.8.1interface vlan 7ip helper-address 172.16.8.1interface vlan 9ip helper-address 172.16.8.1router rip //启用路由协议RIPversion 2 //使用的是RIPv2,如果没有这句,则是使用RIPv1network 172.16.0.0 //宣告直连的网段exitip route 0.0.0.0 0.0.0.0 172.16.9.250 //缺省路由,所有在路由表中没有办法匹配的数据包,都发向下一跳地址为172.16.9.250这个路由器line con 0line aux 0line vty 0 15 //telnet线路(路由器只有5个,是0-4)password 12345678 //login密码loginendcopy running-config startup-config 保存配置来源: 中国系统集成论坛原文链接:/thread-3598-1-8.html。
三层交换机与路由器的配置实例(图解)本文档旨在提供关于如何配置三层交换机与路由器的详细指南,并附有具体实例和图解。
下面将按照章节细化介绍。
1.交换机与路由器的基本概念及作用
1.1 交换机的作用与工作原理
1.2 路由器的作用与工作原理
2.三层交换机与路由器的区别与联系
2.1 三层交换机的特点和应用场景
2.2 路由器的特点和应用场景
3.三层交换机与路由器的配置前准备
3.1 设备检查与准备
3.2 网络规划与拓扑设计
4.三层交换机的配置步骤
4.1 连接与登录交换机
4.2 设置管理IP地质
4.3 配置VLAN
4.4 配置三层交换机的IP路由功能
5.路由器的配置步骤
5.1 连接与登录路由器
5.2 设置管理IP地质
5.3 配置静态路由
5.4 配置动态路由协议
6.三层交换机与路由器的互通配置
6.1 网络互通的基本原理
6.2 配置路由器与交换机之间的互联
6.3 配置路由器与其他网络设备的互联
7.实际案例分析与图解
7.1 案例一:简单局域网互通配置
7.2 案例二:跨网段通信配置
7.3 案例三:路由器的互联配置
附件:
本文档不涉及附件内容。
法律名词及注释:
1.三层交换机:三层交换机(Layer 3 Switch)是一种将交换机和路由器两者功能集成在一起的网络设备。
它具备交换机的高速交换与路由器的一些路由功能。
2.路由器:路由器(Router)是用于将数据包在互联网络中转发的网络设备。
它根据目的地IP地质来决定下一跳的路径,实现网络间的通信。
华为三层交换机配置方法(1)时间:2021.03.05 创作:欧阳理(2008-07-21 11:27:34)分类:工作汇报标签:杂谈本文以河南平临高速所使用的华为华三通信的H3CS3600-28P-SI为例,配置前首先要确定型号后缀是SI还是EI,EI的支持所有协议,SI的不支持OSPS动态协议,因此SI配置路由时可以使用静态协议和RIP协议,具体配置如下:<H3C>system-view //进入系统视图[H3C]display current-configuration //显示当前配置//以下开始配置//第一步:划分VLAN,并描述vlan 1description local-S3600vlan 2description link-to-wenquanvlan 3description link-to-ruzhouvlan 4description link-to-xiaotunvlan 5description link-to-baofengvlan 6description link-to-pingxivlan 7description link-to-pingnanvlan 8description Uplink-to-Putianvlan 9description link-to-pingxicentre//第二步:给VLAN 划网关interface Vlan-interface2description link to wenquanip address 10.41.77.41 255.255.255.192 interface Vlan-interface3description link to ruzhouip address 10.41.77.105 255.255.255.192interface Vlan-interface4description link to xiaotunip address 10.41.77.169 255.255.255.192 interface Vlan-interface5description link to baofengip address 10.41.77.233 255.255.255.192 interface Vlan-interface6description link to pingxiip address 10.41.78.41 255.255.255.192 interface Vlan-interface7description link to pingnanip address 10.41.78.105 255.255.255.192 interface Vlan-interface8description uplink to putianip address 10.41.244.102 255.255.255.252 interface Vlan-interface9description link to pingxicentreip address 10.41.80.233 255.255.255.192 //第三步:给VLAN 指定端口interface Ethernet1/0/2description link to wenquanport access vlan 2interface Ethernet1/0/3description link to ruzhouport access vlan 3interface Ethernet1/0/4description link to xiaotunport access vlan 4interface Ethernet1/0/5description link to baofengport access vlan 5interface Ethernet1/0/6description link to pingxiport access vlan 6interface Ethernet1/0/7description link to pingnanport access vlan 7interface Ethernet1/0/8description uplink to putianport access vlan 8interface Ethernet1/0/9 to Ethernet1/0/24 description link to pingxicentreport access vlan 9//第四步:配置路由协议//(1)用RIP配动态路由ripnetwork 10.41.77.41network 10.41.77.105network 10.41.77.169network 10.41.77.233network 10.41.78.41network 10.41.78.105network 10.41.80.233network 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 //允许使用全0子网(默认都是打开的)Ip name-server 172.16.8.1 172.16.8.2 //三层交换机名字Catalyst 3550-12T1对应的IP地址是172.16.8.1Service dhcp //提供DHCP服务ip routing //启用三层交换机上的路由模块ExitVtp mode server //定义VTP工作模式为sever模式Vtp domain centervtp //定义VTP域的名称为centervtpVlan 2 name vlan2 //定义vlan并给vlan取名(如果不取名的话,vlan2的名字应该是vlan002)Vlan 3 name vlan3Vlan 4 name vlan4Vlan 5 name vlan5Vlan 6 name vlan6Vlan 7 name vlan7Vlan 8 name vlan8Vlan 9 name vlan9Exitinterface Port-channel 1 //进入虚拟的以太通道组1Interface gigabitethernet 0/1 //进入模块0上的吉比特以太口1channel-group 1 mode on //把这个接口放到快速以太通道组1中Interface gigabitethernet 0/2 //同上channel-group 1 mode onport-channel load-balance src-dst-ip //定义快速以太通道组的负载均衡方式(依靠源和目的IP的方式)interface gigabitethernet 0/3 //进入模块0上的吉比特以太口3interface gigabitethernet 0/4 //同上interface gigbitethernet 0/5 //同上interface gigbitethernet 0/6 //同上interface gigbitethernet 0/7 //进入模块0上的吉比特以太口7no shutdownspanning-tree vlan 6-9 cost 1000 //在生成树中,vlan6-9的开销定义为10000interface range gigabitethernet 0/8 – 10 //进入模块0上的吉比特以太口8,9,10no shutdownspanning-tree portfast //在这些接口上使用portfast(使用portfast以后,在生成树的时候不参加运算,直接成为转发状态)interface gigabitethernet 0/11 //进入模块0上的吉比特以太口11interface gigabitethernet 0/12 //同上interface vlan 1 //进入vlan1的逻辑接口(不是物理接口,用来给vlan 做路由用)ip address 172.16.1.7 255.255.255.0 //配置IP地址和子网掩码no shutdownstandby 1 ip 172.16.1.9 //开启了冗余热备份(HSRP),冗余热备份组1,虚拟路由器的IP地址为172.16.1.9standby 1 priority 110 preempt //定义这个三层交换机在冗余热备份组1中的优先级为110,preempt是用来开启抢占模式interface vlan 2 //同上ip address 172.16.2.252 255.255.255.0no shutdownstandby 2 ip 172.16.2.254standby 2 priority 110 preemptip access-group 101 in //在入方向上使用扩展的访问控制列表101interface vlan 3 //同上ip address 172.16.3.252 255.255.255.0no shutdownstandby 3 ip 172.16.3.254standby 3 priority 110 preemptip access-group 101 ininterface vlan 4 //同上ip address 172.16.4.252 255.255.255.0no shutdownstandby 4 ip 172.16.4.254standby 4 priority 110 preemptip access-group 101 ininterface vlan 5ip address 172.16.5.252 255.255.255.0no shutdownstandby 5 ip 172.16.5.254standby 5 priority 110 preemptip access-group 101 ininterface vlan 6ip address 172.16.6.252 255.255.255.0no shutdownstandby 6 ip 172.16.6.254standby 6 priority 100 preemptinterface vlan 7ip address 172.16.7.252 255.255.255.0no shutdownstandby 7 ip 172.16.7.254standby 7 priority 100 preemptinterface vlan 8ip address 172.16.8.252 255.255.255.0no shutdownstandby 8 ip 172.16.8.254standby 8 priority 100 preemptinterface vlan 9ip address 172.16.9.252 255.255.255.0no shutdownstandby 9 ip 172.16.9.254standby 9 priority 100 preemptaccess-list 101 deny ip any 172.16.7.0 0.0.0.255 //扩展的访问控制列表101 access-list 101 permit ip any anyInterface vlan 1 //进入vlan1这个逻辑接口Ip helper-address 172.16.8.1 //可以转发广播(helper-address的作用就是把广播转化为单播,然后发向172.16.8.1)Interface vlan 2Ip helper-address 172.16.8.1Interface vlan 3ip helper-address 172.16.8.1interface vlan 4ip helper-address 172.16.8.1interface vlan 5ip helper-address 172.16.8.1interface vlan 6ip helper-address 172.16.8.1interface vlan 7ip helper-address 172.16.8.1interface vlan 9ip helper-address 172.16.8.1router rip //启用路由协议RIPversion 2 //使用的是RIPv2,如果没有这句,则是使用RIPv1network 172.16.0.0 //宣告直连的网段exitip route 0.0.0.0 0.0.0.0 172.16.9.250 //缺省路由,所有在路由表中没有办法匹配的数据包,都发向下一跳地址为172.16.9.250这个路由器line con 0line aux 0line vty 0 15 //telnet线路(路由器只有5个,是0-4)password 12345678 //login密码loginendcopy running-config startup-config 保存配置cisco 3550Switch# configure terminalSwitch(config)#vtp mode transparentSwitch(config)#vlan 10Switch(config-vlan)# name vlan10Switch(config)#exitSwitch(config)#vlan 11Switch(config-vlan)name vlan11Switch(config-vlan)endSwitch#configure terminalSwitch(config)#interface fastethernet0/9Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 10Switch(config-if)#exitSwitch(config)#interface fastethernet0/10Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 10Switch(config-if)#exitSwitch(config)#interface fastethernet0/11Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 11Switch(config-if)#exitSwitch(config)#interface fastethernet0/12Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 11Switch(config-if)#exitSwitch(config)#interface vlan10Switch(config-if)#ip address 192.168.0.1 255.255.255.0Switch(config-if)#no shutdownSwitch(config-if)#exitSwitch(config)#interface vlan11Switch(config-if)#ip address 192.168.1.1 255.255.255.0Switch(config-if)#no shutdownSwitch(config-if)#exitSwitch(config)#ip routingSwitch(config)#ip forward-protocol udpSwitch(config)#inter vlan 10ip helper 172.16.11.255 //这个命令又是什么意思?是不是转发整个网段的UDP协议?为什么用到了172.16.11.255这个地址?Switch(config)#exitSwitch(config)#inter vlan 11Switch(config-if)#ip helper 172.16.10.255 //同上?Switch(config-if)#exitSwitch(config)#ip route 0.0.0.0 0.0.0.0 Vlan10Switch(config)#ip route 0.0.0.0 0.0.0.0 Vlan11Switch(config)#conf tSwitch(config)#access-list 103 permit ip 172.16.11.0 0.0.0.255 172.16.10.00.0.0.255Switch(config)#access-list 103 permit udp any any eq bootpcSwitch(config)#access-list 103 permit udp any any eq tftpSwitch(config)#access-list 103 permit udp any eq bootpc anySwitch(config)#access-list 103 permit udp any eq tftp anySwitch(config)#inter vlan 10Switch(config-if)#ip directed-broadcast 103 //请解释一下这个的具体含义,本人不是太明白,懂一点意思(直接广播这个列表?是不是)Switch(config-if)#exitSwitch(config)#access-list 104 permit ip 172.16.10.0 0.0.0.255 172.16.11.00.0.0.255Switch(config)#access-list 104 permit udp any any eq bootpcSwitch(config)#access-list 104 permit udp any any eq tftpSwitch(config)#access-list 104 permit udp any eq bootpc anySwitch(config)#access-list 104 permit udp any eq tftp anySwitch(config)#inter vlan 11Switch(config-if)#ip directed-broadcast 104 //同上Switch(config)#endSwitch#copy run star华为三层交换机配置实例一例网络技术 2008-07-25 06:08:28 阅读243 评论0 字号:大中小订阅华为三层交换机配置实例一例服务器1双网卡,内网IP:192.168.0.1,其它计算机通过其代理上网PORT1属于VLAN1PORT2属于VLAN2PORT3属于VLAN3VLAN1的机器可以正常上网配置VLAN2的计算机的网关为:192.168.1.254配置VLAN3的计算机的网关为:192.168.2.254即可实现VLAN间互联如果VLAN2和VLAN3的计算机要通过服务器1上网则需在三层交换机上配置默认路由系统视图下: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.254route add 192.168.2.0 255.255.255.0 192.168.0.254这个时候vlan2和vlan3中的计算机就可以通过服务器1访问internet了~~华为路由器与CISCO路由器在配置上的差别"华为路由器与同档次的CISCO路由器在功能特性与配置界面上完全一致,有些方面还根据国内用户的需求作了很好的改进。
【最新整理,下载后即可编辑】H3C三层交换机配置实例1 网络拓扑图 (1)2 配置要求 (1)3划分VLAN并描述 (2)3.1进入系统视图 (2)3.2 创建VLAN并描述 (2)4 给VLAN设置网关 (3)4.1 VLAN1的IP地址设置 (3)4.2 VLAN100的网关设置 (3)4.3 VLAN101的网关设置 (4)4.4 VLAN102的网关设置 (4)4.5 VLAN103的网关设置 (4)5 给VLAN指定端口,设置端口类型 (5)5.1 VLAN100指定端口 (5)5.2 VLAN102指定端口 (5)5.3 VLAN1/101/103指定端口 (6)6 配置路由协议 (7)6.1 默认路由 (7)6.2配置流分类 (7)6.3 定义行为 (7)6.4 应用QOS策略 (8)6.5 接口配置QOS策略 (8)1 网络拓扑图图1-1 网络拓扑图2 配置要求用户1网络:172.16.1.0/24 至出口1网络:172.16.100.0/24用户2网络:192.168.1.0/24 至出口2网络:192.168.100.0/24实现功能:用户1通过互联网出口1,用户2通过互联网出口2。
3划分VLAN并描述3.1进入系统视图<H3C>system-view //进入系统视图图3-1 系统视图3.2 创建VLAN并描述[H3C]vlan 1 //本交换机使用[H3C-vlan1]description Manager //描述为“Manager”[H3C-vlan1]quit[H3C]vlan 100 //划分vlan100[H3C-vlan100]description VLAN 100 //描述为“VLAN 100”[H3C-vlan100]quit[H3C]vlan 101 //划分vlan101[H3C-vlan101]description VLAN 101 //描述为“VLAN 101”[H3C-vlan101]quit[H3C]vlan 102 //划分vlan102[H3C-vlan102]description VLAN 102 //描述为“VLAN 102”[H3C-vlan102]quit[H3C]vlan 103 //划分vlan103[H3C-vlan103]description VLAN 103 //描述为“VLAN 103”[H3C-vlan103]quit[H3C]图3-2 划分VLAN及描述4 给VLAN设置网关4.1 VLAN1的IP地址设置把VLAN1的IP地址设置为192.168.0.254,子网掩码为255.255.255.0,用于本地使用。
举例讲解H3C配置三层交换机4个步骤详细用法配置三层交换机的四个步骤:第一步:划分VLAN,并描述;第二步:给VLAN划网关;第三步:给VLAN指定端口;第四步:配置路由协议。
举例讲解H3C配置三层交换机4个步骤详细用法,配置三层交换机通用的四个步骤就是:划分VLAN,并描述;给VLAN划网关;给VLAN指定端口;配置路由协议;学会这几个步骤之后就能解决所有的配置三层交换机的问题。
<H3C>language-modechinese//切换到中文模式<H3C>system-view//进入系统视图[H3C]displaycurrent-configuration//显示当前配置三层交换机//以下开始配置三层交换机配置三层交换机第一步:划分VLAN,并描述vlan1description local-s3600//本交换机使用#vlan2description link-to-shanxicentre//陕西省中心#vlan3description link-to-shangjiecentre//商界分中心内部使用#vlan4description link-to-shangdongsuo//商东所#vlan5description link-to-shangnansuo//商南所配置三层交换机第二步:给VLAN划网关#interfaceVlan-interface2description linktoshanxicentreipaddress 10.61.242.110 255.255.255.252//省中心指定广域网关、子网掩码#interfaceVlan-interface3description linktoshangjiecentreipaddress 10.161.134.65255.255.255.192//商界分中心局域网关、子网掩码#interfaceVlan-interface4description linktoshangdongsuoipaddress 10.61.242.113255.255.255.252//商东所广域网关、子网掩码#interfaceVlan-interface5description linktoshangnansuoipaddress 10.61.242.117255.255.255.252//商南所广域网关、子网掩码配置三层交换机第三步:给VLAN指定端口#interfaceEthernet1/0/2//将交换机的端口2指定给省中心使用description linktoshanxicentreport access vlan2#interfaceEthernet1/0/15-24//将交换机的端口15-24指定给分中心内部使用description linktoshangjiecentreport access vlan3#interfaceEthernet1/0/3//将交换机的端口3指定给商东所使用description linktoshangdongsuoport access vlan4#interfaceEthernet1/0/4//将交换机的端口4指定给商南所使用description linktoshangnansuoportaccessvlan5配置三层交换机第四步:配置路由协议//配静态路由(只用对远端设备配一条路由即可,本地自通)iproute 0.0.0.0 0.0.0.0 10.61.242.109//指定所有网段到商东所的路由//配置三层交换机商东所的反向路由iproute 10.161.134.0 255.255.255.0 10.61.242.114iproute 10.161.135.0 255.255.255.0 10.61.242.114//配置三层交换机商南所的反向路由iproute 10.161.135.0 255.255.255.0 10.61.242.118iproute 10.161.136.0 255.255.255.0 10.61.242.118//省中心配置三层交换机:iproute 10.61.242.0 255.255.255.0 10.61.242.110//商东所242.114和商南所242.118共属的242.0指向分中心网关iproute 10.161.134.0 255.255.255.0 10.61.242.110//分中心内部网段指向分中心网关//iproute 10.161.134.0 255.255.255.0 10.61.242.110//iproute 10.161.135.0 255.255.255.0 10.61.242.110//iproute 10.161.136.0 255.255.255.0 10.61.242.110。
【最新整理,下载后即可编辑】华为三层交换机配置实例一例网络技术2008-07-25 06:08:28 阅读243 评论0 字号:大中小订阅华为三层交换机配置实例一例服务器1双网卡,内网IP:192.168.0.1,其它计算机通过其代理上网PORT1属于VLAN1PORT2属于VLAN2PORT3属于VLAN3VLAN1的机器可以正常上网配置VLAN2的计算机的网关为:192.168.1.254配置VLAN3的计算机的网关为:192.168.2.254即可实现VLAN间互联如果VLAN2和VLAN3的计算机要通过服务器1上网则需在三层交换机上配置默认路由系统视图下: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.254route add 192.168.2.0 255.255.255.0 192.168.0.254这个时候vlan2和vlan3中的计算机就可以通过服务器1访问internet了~~华为路由器与CISCO路由器在配置上的差别"华为路由器与同档次的CISCO路由器在功能特性与配置界面上完全一致,有些方面还根据国内用户的需求作了很好的改进。
例如中英文可切换的配置与调试界面,使中文用户再也不用面对着一大堆的英文专业单词而无从下手了。
另外它的软件升级,远程配置,备份中心,PPP回拨,路由器热备份等,对用户来说均是极有用的功能特性。
在配置方面,华为路由器以前的软件版本(VRP1.0-相当于CISCO的IOS)与CISCO有细微的差别,但目前的版本(VRP1.1)已和CISCO兼容,下面首先介绍VRP软件的升级方法,然后给出配置上的说明。
一、VRP软件升级操作升级前用户应了解自己路由器的硬件配置以及相应的引导软件bootrom的版本,因为这关系到是否可以升级以及升级的方法,否则升级失败会导致路由器不能运行。
三层交换机配置实例三层交换综合实验一般来讲,设计方案中主要包括以下内容:◆∙∙∙∙∙ 用户需求◆∙∙∙∙∙ 需求分析◆∙∙∙∙∙ 使用什么技术来实现用户需求◆∙∙∙∙∙ 设计原则◆∙∙∙∙∙ 拓扑图◆∙∙∙∙∙ 设备清单一、模拟设计方案【用户需求】1.应用背景描述某公司新建办公大楼,布线工程已经与大楼内装修同步完成。
现公司需要建设大楼内部的办公网络系统。
大楼的设备间位于大楼一层,可用于放置核心交换机、路由器、服务器、网管工作站、电话交换机等设备。
在每层办公楼中有楼层配线间,用来放置接入层交换机与配线架。
目前公司工程部25人、销售部25人、发展部25人、人事部10人、财务部加经理共15人。
2.用户需求为公司提供办公自动化、计算机管理、资源共享及信息交流等全方位的服务,目前的信息点数大约100个,今后有扩充到200个的可能。
公司的很多业务依托于网络,要求网络的性能满足高效的办公要求。
同时对网络的可靠性要求也很高,要求在办公时间内,网络不能宕掉。
因此,在网络设计过程中,要充分考虑到网络设备的可靠性。
同时,无论是网络设备还是网络线路,都应该考虑冗余备份。
不能因为单点故障,而导致整个网络的瘫痪,影响公司业务的正常进行。
公司需要通过专线连接外部网络。
【需求分析】为了实现网络的高速、高性能、高可靠性还有冗余备份功能,主要用于双核心拓扑结构的网络中。
本实验采用双核心拓扑结构,将三层交换技术和VTP、STP、EthernetChannel综合运用。
【设计方案】1、在交换机上配置VLAN,控制广播流量2、配置2台三层交换机之间的EthernetChannel,实现三层交换机之间的高速互通3、配置VTP,实现单一平台管理VLAN,同时启用修剪,减少中继端口上不必要的广播信息量4、配置STP,实现冗余备份、负载分担、避免环路5、在三层交换机上配置VLAN间路由,实现不同VLAN之间互通6、通过路由连入外网,可以通过静态路由或RIP路由协议【网络拓扑】根据用户对可靠性的要求,我们将网络设计为双核心结构,为了保证高性能,采用双核心进行负载分担。
当其中的一台核心交换机出现故障的时候,数据能自动转换到另一台交换机上,起到冗余备份作用。
注意:本实验为了测试与外网的连通性,使用一个简单网络【设备清单】序号设备型号描述数量1 Cisco 3640 三层交换机,4模块,每模块16端口 22 Cisco 3640 快速以太网交换机,4模块,每模块16端口 53 Cisco 3620 模块化路由器,2模块,每模块1端口 14 PC 装有win XP 9注意:由于没有真实条件,所以本实验是采用小凡Dynamips模拟器做的。
实施方案中主要包括以下内容:◆∙∙∙∙∙ IP地址规划◆∙∙∙∙∙ VLAN划分◆∙∙∙∙∙ 设备端口的连接◆∙∙∙∙∙ 实施中的技术细节◆∙∙∙∙∙ 测试方法模拟实施方案1.VLAN划分和IP地址规划VLAN的IP地址规划路由器IP地址规划注意:路由器f0/0接口与三层交换机连接,f1/0与外部网络连接。
为了进行测试,将路由器连接的Internet换成了一台交换机(默认配置只做测试用)和一台连接到交换机上的测试PC(IP:192.168.100.1/24 网关:192.168.100.2)。
2.端口规划(1)核心三层交换机的端口分配【略】(2)接入层二层交换机的端口分配【略】(由于是做虚拟实验这两部分略)(3)端口与VLAN的关系端口与VLAN的对应关系注意:由于以上每台二层交换机的F0/0、F1/0端口均分配用作连接核心交换机。
因此当交换机利用上表计算端口号时应排除F0/0、F1/0这两个端口。
列表中的每台交换机有4模块,每模块16端口,这里为了简便,假设为2模块,每模块32端口。
3. VTP配置VTP配置参数如下:◆VTP域名为51cto◆密码123◆启用VTP版本2◆启用修剪◆配置2台三层交换机为VTP的server模式,同时配置中继端口◆配置全部的二层交换机为VTP的client模式,同时配置中继端口◆在三层交换机上配置VLAN◆配置SW1的管理IP地址(一是为了管理,二是为了标示vtp服务器。
)◆在工作组交换机上将端口添加到各VLAN中◆分别查看SW1和SW3的VLAN信息、VTP状态信息◆之后将各测试PC的IP地址及网关设置好4. STP配置STP配置参数如下:◆设置SW1是VLAN 20、30的生成树根网桥◆设置SW2是VLAN 40、50、60的生成树根网桥◆在二层交换机上配置速端口与上行链路◆查看生成树配置结果5. 三层交换的配置三层交换的配置参数如下:◆在三层交换机上配置各VLAN的IP地址◆配置2台三层交换机之间的EhernetCannel◆配置三层交换机的路由接口◆在三层交换机上配置静态路由或RIP路由协议◆在三层交换机上查看路由信息6. 路由器的配置路由器的配置参数如下:◆配置路由器接口的IP地址◆配置路由器静态路由或启动RIP路由协议◆配置路由器上的默认路由,指向172.16.1.1(由于是做实验,这里选择配置默认路由)【测试方法】配置完成后,需要进行测试,验证配置是否正确,以及能否满足用户的需求,以下为测试的方法与验证内容:◆主机之间互ping,验证各主机之间是否连通◆查看各交换机上的VLAN信息,验证VLAN学习是否正确◆查看交换机上的STP信息,验证STP根网桥是否正确◆主机之间长ping时,断开上行链路,验证数据是否负载分担二、具体配置过程【网络拓扑】注意:本实验采用小凡dynamips模拟软件,小凡的拓扑连线如下图。
【实施方案】一、VTP配置①配置三层交换机SW1的VTP域名为51cto、模式server、密码123、版本2、修剪。
SW2同样配置。
②配置三层交换机SW1的中继端口。
SW2同样配置。
③在工作组交换机SW3上配置VTP。
SW4、SW5、SW6同样配置。
④在工作组交换机SW3上配置中继端口。
SW4、SW5、SW6同样配置。
⑤在三层交换机SW1、SW2上配置VLAN信息。
SW1SW2⑥配置SW1的管理IP地址(一是为了管理,二是为了标示vtp服务器。
)。
⑦在工作组交换机上将端口添加到各VLAN中。
SW3SW4SW5SW6⑧分别查看SW1和SW3的VLAN信息、VTP状态信息。
SW1SW3⑨之后将各测试PC的IP地址及网关设置好。
二、STP配置①设置SW1是VLAN 20、30的生成树根网桥。
②设置SW2是VLAN 40、50、60的生成树根网桥。
③在二层交换机SW3上配置速端口与上行链路。
SW4、SW5、SW6同样配置。
④查看生成树配置结果。
SW3show spanning-tree注意:配置完上行速链路后,交换机的优先级会变成49152,并且交换机的端口路径成本也都增大了3000。
此目的是为了尽量减少配置上行速链路的交换机成为根网桥的机会。
三、三层交换机配置①在三层交换机SW1上配置各VLAN的IP地址。
SW2同样配置。
②配置2台三层交换机之间的EhernetCannel。
SW2同样配置。
③配置三层交换机SW1的路由接口。
④在三层交换机上配置静态路由或RIP路由协议⑤在三层交换机上查看路由信息四、路由器的配置①配置路由器接口的IP地址②配置路由器静态路由或启动RIP路由协议③你也可以选择配置路由器上的默认路由,指向172.16.1.1【测试方法】为什么会出现网关不能到达呢?而我在porkettracer模拟器上同样配置却没有出现这种状况。
是哪个细节没有配置好?还请配置过三层交换实验的各位前辈指点一二。
这个实验还有一种思路,就是把与路由器连接的第一台三层交换机不启用路由功能,也把它作为二层交换,然后在路由器上配置单臂.....最后来总结一下这次的实验吧。
首先,做实验的时候要特别注意细节问题,我在porkettracer上做这个实验的时候就把一条交换机的连接线给连错了,直到最后做测试验证的时候才发现。
其次,做错了,要调整好心态,耐心地验证、测试并找出错误。
这个实验最后我还是没有成功做好(当然本人也已经敲了好几遍了),感觉有点可惜。
应该是我还有一些知识点没有掌握,还请前辈们指点一二,帮我解开疑惑。
从这次实验中获得的最大收获,应该是我学会了做三层交换实验的思路。
从模拟设计方案到模拟实施方案再到具体配置,整个过程只要理解了思路,就有了一个方向。
再来这是本人第一次写技术文章,也体会到了写技术文章可以让自己的思维变得更加严谨、同时也巩固了所学。
这真是一个非常好的学习方式。
精品文档收集于网络,如有侵权请联系管理员删除。