三层交换机配置案例pdf
Dell三层交换机配置实例

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三层交换机。
华为三层交换机配置实例一例

华为三层交换机配置实例一例服务器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的版本,因为这关系到是否可以升级以及升级的方法,否则升级失败会导致路由器不能运行。
在此我们以从VRP1.0升级到VRP1.1为例说明升级的方法。
三层交换机详细配置实例(图)

三层交换机与路由器的配置实例(图解)目的:学会使用三层交换与路由器让处于不同网段的网络相互通信实验步骤:一:二层交换机的配置:在三个二层交换机上分别划出两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)#。
H3C三层交换机经典案例【含注释】分析

H3C三层交换机经典案例【含注释】分析H3C S3600系列交换机常用配置举例1.1.1 配置举例1. 组网需求当前用户通过Telnet方式登录,且用户级别为管理级(3级)。
当前登录用户需要对通过Console口(AUX用户界面)登录进行如下限定:●设置通过Console口登录交换机的用户不需要进行认证●设置从AUX用户界面登录后可以访问的命令级别为2级●设置Console口使用的波特率为19200bit/s●设置终端屏幕的一屏显示30行命令●设置历史命令缓冲区可存放20条命令●设置AUX用户界面的超时时间为6分钟2. 组网图配置交换机的PC机运行Telnet图1-1配置认证方式为None的AUX用户的组网图3. 配置步骤# 进入系统视图。
system-view# 进入AUX用户界面视图。
[H3C] user-interface aux 0# 设置通过Console口登录交换机的用户不需要进行认证。
[H3C-ui-aux0] authentication-mode none# 设置从AUX用户界面登录后可以访问的命令级别为2级。
[H3C-ui-aux0] user privilege level 2# 设置Console口使用的波特率为19200bit/s。
[H3C-ui-aux0] speed 19200# 设置终端屏幕的一屏显示30行命令。
[H3C-ui-aux0] screen-length 30# 设置历史命令缓冲区可存放20条命令。
[H3C-ui-aux0] history-command max-size 20# 设置AUX用户界面的超时时间为6分钟。
[H3C-ui-aux0] idle-timeout 61.1.2 配置举例1. 组网需求当前用户通过Telnet方式登录,且用户级别为管理级(3级)。
当前登录用户需要对通过Console口(AUX用户界面)登录进行如下限定:●设置通过Console口登录交换机的用户进行Password认证●设置用户的认证口令为明文方式,口令为123456●设置从AUX用户界面登录后可以访问的命令级别为2级●设置Console口使用的波特率为19200bit/s●设置终端屏幕的一屏显示30行命令●设置历史命令缓冲区可存放20条命令●设置AUX用户界面的超时时间为6分钟2. 组网图配置交换机的PC机运行Telnet图1-2配置认证方式为Password的AUX用户的组网图3. 配置步骤# 进入系统视图。
三层交换机的配置实例

三层交换机的配置实例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。
三层交换机配置实例教程文件

三层交换机配置实例三层交换综合实验一般来讲,设计方案中主要包括以下内容:◆∙∙∙∙∙ 用户需求◆∙∙∙∙∙ 需求分析◆∙∙∙∙∙ 使用什么技术来实现用户需求◆∙∙∙∙∙ 设计原则◆∙∙∙∙∙ 拓扑图◆∙∙∙∙∙ 设备清单一、模拟设计方案【用户需求】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路由协议【网络拓扑】根据用户对可靠性的要求,我们将网络设计为双核心结构,为了保证高性能,采用双核心进行负载分担。
(完整word版)三层交换机路由配置实例

三层交换机路由配置一、三层交换机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间路由功能二、三层交换机与路由器间静态路由的建立某校园局域网由若干台交换机构成,现学校需要将校园网接入互联网,学校在出口使用一台路由器连接互联网。
三层交换机典型配置实例

三层交换机典型配置实例路由交换机操作手册第二分册典型配置实例目录目录第1章城域网汇聚层设备组网配置实例 .................................................................. ................. 1-11.1 组网介绍 .................................................................. ........................................................ 1.1-11.1.1 组网图 .................................................................. .............................................. 1.1.1-1 1.1.2 组网需求 .................................................................. .......................................... 1.1.2-3 1.2 配置步骤 .................................................................. ........................................................ 1.2-91.2.1 S8016A配置步骤 .................................................................. ............................ 1.2.1-9 1.2.2 S8016B配置步骤 .................................................................. .......................... 1.2.2-11 1.2.3 S8016C配置 .................................................................. ................................. 1.2.3-15 1.2.4 S8016D配置步骤 .................................................................. .......................... 1.2.4-16 1.2.5 S8016E配置步骤 ............................................................................................ 1.2.5-19 1.2.6 S8016F配置步骤 .................................................................. .......................... 1.2.6-21第2章企业网骨干层设备组网配置实例 .................................................................. ............... 2-252.1 组网介绍 .................................................................. ...................................................... 2.1-252.1.1 组网图 .................................................................. ............................................ 2.1.1-25 2.1.2 组网需求 .................................................................. ........................................ 2.1.2-26 2.2 配置步骤 .................................................................. ...................................................... 2.2-302.2.1 S8016A配置步骤 .................................................................. .......................... 2.2.1-30 2.2.2 S8016B配置步骤 .................................................................. .......................... 2.2.2-32 2.2.3 S8016C配置步骤 .................................................................. .......................... 2.2.3-34第3章 IDC组网配置实例 .................................................................. ..................................... 3-373.1 组网介绍 .................................................................. ...................................................... 3.1-373.1.1 组网图 .................................................................. ............................................ 3.1.1-37 3.1.2 组网需求 .................................................................. ........................................ 3.1.2-38 3.2 配置步骤 .................................................................. ...................................................... 3.2-413.2.1 S8016A配置步骤 .................................................................. .......................... 3.2.1-41 3.2.2 S8016B配置步骤 .................................................................. .......................... 3.2.2-42第4章城域网大容量NAT应用配置实例 .................................................................. ............. 4-444.1 组网介绍 .................................................................. ...................................................... 4.1-444.1.1 组网图 .................................................................. ............................................ 4.1.1-44 4.1.2 组网需求 .................................................................. ........................................ 4.1.2-45 4.2 配置步骤 .................................................................. ...................................................... 4.2-484.2.1 S8016A配置步骤 .................................................................. .......................... 4.2.1-48 4.2.2 S8016B配置步骤 .................................................................. .......................... 4.2.2-49i路由交换机操作手册第二分册典型配置实例第1章城域网汇聚层设备组网配置实例第1章城域网汇聚层设备组网配置实例1.1 组网介绍1.1.1 组网图R3680-ARRR3680-B??è?CE??è?CE300E-BGPE-BGPR3680-D??è?PEPESS8016-ARCE200GEE-BGPCER3680-CRSS8016-BSS3026-ACEGECEPROC-12C POSInternetRNE80-AL2VPNOC-48C POSOC-48CPOSL3VPNOSPFPPL3VPNS8016-CSOC-48CPOSRNE80-BGEGEPEPES8016-DS8016-ESSGERIP?2ì??·óéCECECECEMA5200RRS8016-FSR3680-F500400R3680-E?2ì??·óé??è?PERIP??è?CE??è?CER3680-GRR3680-HR 图16-1 城域网配置示例组网图1.1.1-1路由交换机操作手册第二分册典型配置实例第1章城域网汇聚层设备组网配置实例192.168.5.1/24192.168.5.1/24R3680-ARRR3680-B192.168.2.1/24192.168.1.1 /24VLAN 20VLAN 30VLAN 10FE 1/0/0FE 1/0/1GE2/0/0S8016-B192.168.1.1/24192.1.1.1/3210.10.10.4/32VLAN 10VLAN30S8016-ASFE 1/0/1GE2/0/0192.168.10.1/24192.168.4.1/24R3680-D192.168.2.1/24R3680-CRCEVLAN 20FE 1/0/0192.168.3.1/24VLAN 50GE 2/0/1SCES3026-ARVLAN 40FE1/0/2SCE192.168.10.x/2410.1.1.0/24PInternet10.2.2.0/24POS1/0/0ROC-12C POS10.6.6.0/2410.10.10.1/32RNE80-AOC-48CPOSP10.10.10.2/32POS 2/0/010.3.3.0/24P10.10.10.3/32S8016-CSOC-48C POSVLAN 10GE 3/0/0VLAN 10GE 2/0/010.10.10.5/32192.168.5.1/24VLAN 30FE 1/0/0RVLAN 10GE 2/0/0NE80-B10.5.5.0/24S8016-D10.4.4.0/24SVLAN 20GE2/0/1VLAN 20GE 2/0/0192.168.10.2/24192.1.1.2/3210.10.10.6/32VLAN 20FE 1/0/0S8016-ES192.168.7.1/24VLAN 30FE1/0/1192.168.10.3/24S8016-F192.168.3.1/24VLAN 30FE 1/0/0VLAN 40FE1/0/1192.168.4.1/24SMA5200192.168.6.1/24RR192.168.8.1/24R3680-ER3680-F192.168.8.1/24R3680-G RR3680-HR192.168.7.1/24192.168.6.1/24图16-2 城域网配置示例组网物理图1.1.1-2路由交换机操作手册第二分册典型配置实例第1章城域网汇聚层设备组网配置实例1.1.2 组网需求1. 硬件配置S8016A包括2块MPU板、2块SFC板和2块LPU板。
实验-三层交换机基本配置

交换实验三层交换机基本配置实验名称:三层交换机端口配置实验目的:配置开启三层交换机的三层功能,实现路由作用。
功能描述:为了隔离广播域而划分了VLAN,但不同的VLAN之间需要通信,本实验将实现这一功能。
即同一VLAN里的计算机能跨交换机通信,不同VLAN里的计算机系统也能互相通信。
技术原理:三层交换机是在二层交换的基础上实现了三层的路由功能。
三层交换机基于“一次路由,多次交换”的特性,在局域网环境中转发性能远远高于路由器。
而且三层交换机同时具备二层的功能,能和二层交换机进行很好的数据转发。
三层交换机的以太网接口要比一般的路由器多很多,更加适合多个局域网段之间的互联。
三层交换机本身默认开启了路由功能,可利用IP Routing命令进行控制。
实验设备:S3760一台,PC机2台。
实验拓扑:如下。
注意:先连线,在进行配置,注意连接线缆的接口编号。
S3760为三层交换机。
实验步骤:地址参考如下:s3760-1>enable 14password:s3760-1#configure terminals3760-1 (config)#hostname 3760s3760-1 (config)#ip routing !开启三层交换机的路由功能S3760PC1172.16.50.1/24PC2172.16.50.2/24步骤3. 配置三层交换机端口的路由功能。
s3760-1>enable 14password:s3760-1#configure terminals3760-1 (config)#interface fastethernet 0/12s3760-1 (config-if)#no switchport !开启端口的三层路由功能s3760-1 (config-if)#ip address 172.16.50.12 255.255.255.0s3760-1 (config-if)#no shutdowns3760-1 (config-if)#exits3760-1 (config)#interface fastethernet 0/22s3760-1 (config-if)#no switchport !开启端口的三层路由功能s3760-1 (config-if)#ip address 172.16.50.22 255.255.255.0s3760-1 (config-if)#no shutdowns3760-1 (config-if)#end步骤4. 验证与测试。
实验七 三层交换机基本配置

实验七三层交换机基本配置第一部分一、实验目的配置开启三层交换机的三层功能,实现路由作用。
二、背景描述公司现有1台三层交换机,要求你进行测试,该交换机的三层功能是否工作正常。
三、技术原理三层交换机是在二层交换的基础上实现了三层的路由功能。
三层交换机基于”一次路由,多次交换”的特性,在局域网环境中转发性能远远高于路由器。
而且三层交换机同时具备二层的功能,能够和二层的交换机进行很好的数据转发。
三层交换机的以太网接口要比一般的路由器多得多,更加适合多个局域网段之间的互联。
三层交换机的所有端口在默认情况下都属于二层端口,不具备路由功能。
不能给物理端口直接配置IP地址。
但可以开启物理端口的三层路由功能。
三层交换机默认开启了路由功能,可利用ip routing命令进行控制。
四、实现功能开启三层交换机物理端口的路由功能。
五、实验设备S3550-24或S3550-48(1台)、直连线(一条)六、实验拓扑七、实验步骤步骤1 开启三层交换机的路由功能。
Switch〉enableSwitch#configure terminalSwitch(config)#hostname S3550-24S3550-24(config)#ip routing !开启三层交换机的路由功能步骤2 配置三层交换机端口的路由功能。
S3550-24(config)#interface fastethernet 0/5S3550-24(config-if)#no switchport !开启端口的三层路由功能S3550-24(config-if)#ip address 192.168.5.1 255.255.255.0 !给端口配置IP地址S3550-24(config-if)#no shutdownS3550-24(config-if)#end步骤3 验证、测试配置。
S3550#show ip interface !查看接口状态信息………………………………S3550#show interfaces f0/5 !查看接口状态信息………………………………主机测试:将PC1的IP地址设为192.168.5.2/24,在PC1上ping 192.168.5.1。
鸿鹄论坛_全面的三层交换机配置实例(带命令解释)

全面的三层交换机配置实例(带命令解释)三层交换机比较全面的三层交换机配置实例(带命令解释哟!)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)二、IP规划 (1)三、VLAN划分 (2)四、二层交换机VLAN配置内容 (2)五、三层交换机STP配置内容 (3)六、三层交换机HSRP配置内容 (10)一、拓扑图二、IP规划三、vlan的划分四、二层交换机VLAN配置内容S3vlan划分情况:30 VLAN0030 active Fa0/0, Fa0/1 40 VLAN0040 active Fa0/4, Fa0/5 50 VLAN0050 active Fa0/6, Fa0/7 60 VLAN0060 active Fa0/8, Fa0/9S4vlan划分情况:30 VLAN0030 active Fa0/0, Fa0/1 40 VLAN0040 active Fa0/2, Fa0/3 50 VLAN0050 active Fa0/5, Fa0/6 60 VLAN0060 active Fa0/7, Fa0/8S5vlan划分情况:30 VLAN0030 active Fa0/0, Fa0/1 40 VLAN0040 active Fa0/2, Fa0/3 50 VLAN0050 active Fa0/6, Fa0/7 60 VLAN0060 active Fa0/8, Fa0/9S6vlan划分情况:30 VLAN0030 active Fa0/0, Fa0/1 40 VLAN0040 active Fa0/2, Fa0/3 50 VLAN0050 active Fa0/4, Fa0/5 60 VLAN0060 active Fa0/7, Fa0/8五、三层交换机STP配置内容1-1>三层交换机1配置内容:S1#sh runspanning-tree vlan 30 priority 8192 //修改优先级,使其在vlan30和vlan40中成为spanning-tree vlan 40 priority 8192 跟桥,在vlan50和vlan60中成为从属。
Cisco3560三层交换机VLAN的配置案例文档资料

段的服务器。
2、各机房IP地址分配
机房一、二: IP:192.168.7.X/24,网关:192.168.7.254 机房三、四: IP:192.168.8.X/24,网关:192.168.8.254 机房五、六: IP:192.168.10.X/24,网关:192.168.10.254 机房七: IP:192.168.11.X/24,网关:192.168.11.254 服务器: IP:192.168.12.X/24 网关:192.168.12.254
3560(config)#access-list 102 deny ip 192.168.8.0 0.0.0.255 192.168.7.0 0.0.0.255 3560(config)#access-list 102 deny ip 192.168.8.0 0.0.0.255 192.168.10.0 0.0.0.255 3560(config)#access-list 102 deny ip 192.168.8.0 0.0.0.255 192.168.11.0 0.0.0.255 3560(config)#access-list 102 permit ip any any 3560(config)#access-list 103 deny ip 192.168.10.0 0.0.0.255 192.168.7.0 0.0.0.255 3560(config)#access-list 103 deny ip 192.168.10.0 0.0.0.255 192.168.8.0 0.0.0.255 3560(config)#access-list 103 deny ip 192.168.10.0 0.0.0.255 192.168.11.0 0.0.0.255 3560(config)#access-list 103 permit ip any any 3560(config)#access-list 104 deny ip 192.168.11.0 0.0.0.255 192.168.7.0 0.0.0.255 3560(config)#access-list 104 deny ip 192.168.11.0 0.0.0.255 192.168.8.0 0.0.0.255 3560(config)#access-list 104 deny ip 192.168.11.0 0.0.0.255 192.168.10.0 0.0.0.255 3560(config)#access-list 104 permit ip any any
华为三层交换机配置方法、命令及实例

华为三层交换机配置方法(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路由器在功能特性与配置界面上完全一致,有些方面还根据国内用户的需求作了很好的改进。
比较全面的三层交换机配置实例(带命令解释哟!)

Enable //进入私有模式Configure terminal //进入全局模式service password-encryption //对密码进行加密hostname Cata lyst 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 //三层交换机名字Catalyst3550-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,10switchport 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 //扩展的访问控制列表101access-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密码logine ndcopy running-config startup-config 保存配置。
H3C三层交换机配置实例(完整资料).doc

【最新整理,下载后即可编辑】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三层交换机配置实例

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,用于本地使用。
3层交换机配置实验报告

页眉内容实验名称:3层交换机配置一.实验目的和要求了解DES-3326SR的虚端口的设置了解单台DES 3326SR直接路由的设置了解多台DES 3326SR静态路由的设置二.实验原理和内容1.网络硬件环境的准备2.对等网络的建立3.通过交换机实现VLAN的划分与通信4.通过路由器实现不同VLAN之间的通信5.无线局域网的组建三、实验步骤步骤1:交换机1,2VLAN配置分别配置交换机1,交换机2的VLAN,保证每个交换机至少各有2个VLAN 可以正常工作,假设:交换机1(VLAN2和VLAN3)交换机2(VLAN6和VLAN7)注:配置指令参见实验1,这里不再详细说明步骤2:交换机1,2虚接口配置分别为交换机1,交换机2的每个VLAN配置虚接口,1:配置指令为:Create ipif <虚接口名称><虚接口IP地址>/<子网掩码长度><虚接口对应的vlan名称>例如:create ipif 192.168.2.1/24 vlan22:查看指令为:Show ipif步骤3:交换机1,2级联端口配置分别为交换机1,交换机2创建VLAN5,VLAN5成员为两台交换机的级联端口(即两交换机的连线端口号),同时创建VLAN的虚接口配置1:配置指令为:a.两台交换机均执行如下指令,创建vlan5,并增加级联端口Create vlan vlan5 tag 5Congfig vlan vlan5 add untag 2b.两台交换机均执行如下指令,创建vlan5虚接口Create ipif if5 192.168.5.1/24 vlan5 state enableCreate ipif if5 192.168.5.2/24 vlan5 state enable注:此处两个虚接口属于同一网段,不允许使用相同的IP地址步骤4:交换机路由配置分别为交换机1,交换机2创建静态路由a.交换机1Create iproute 192.168.2.0/24 192.168.5.1Create iproute 192.168.3.0/24 192.168.5.1b.交换机2Create iproute 192.168.6.0/24 192.168.5.2Create iproute 192.168.7.0/24 192.168.5.2步骤5:测试配置结束后,VLAN2,VLAN3,VLAN6,VLAN7能够全部互通实验名称:3层交换机配置一.实验目的和要求了解DES-3326SR的虚端口的设置了解单台DES 3326SR直接路由的设置了解多台DES 3326SR静态路由的设置二.实验原理和内容1.网络硬件环境的准备2.对等网络的建立3.通过交换机实现VLAN的划分与通信4.通过路由器实现不同VLAN之间的通信5.无线局域网的组建三.主要仪器设备Dlink-3624SR交换机*2四.实验步骤步骤1:交换机1,2VLAN配置分别配置交换机1,交换机2的VLAN,保证每个交换机至少各有2个VLAN 可以正常工作,假设:交换机1(VLAN2和VLAN3)交换机2(VLAN6和VLAN7)注:配置指令参见实验1,这里不再详细说明步骤2:交换机1,2虚接口配置分别为交换机1,交换机2的每个VLAN配置虚接口,1:配置指令为:Create ipif <虚接口名称><虚接口IP地址>/<子网掩码长度><虚接口对应的vlan名称>例如:create ipif 192.168.2.1/24 vlan22:查看指令为:Show ipif步骤3:交换机1,2级联端口配置分别为交换机1,交换机2创建VLAN5,VLAN5成员为两台交换机的级联端口(即两交换机的连线端口号),同时创建VLAN的虚接口配置1:配置指令为:a.两台交换机均执行如下指令,创建vlan5,并增加级联端口Create vlan vlan5 tag 5Congfig vlan vlan5 add untag 2b.两台交换机均执行如下指令,创建vlan5虚接口Create ipif if5 192.168.5.1/24 vlan5 state enableCreate ipif if5 192.168.5.2/24 vlan5 state enable注:此处两个虚接口属于同一网段,不允许使用相同的IP地址步骤4:交换机路由配置分别为交换机1,交换机2创建静态路由a.交换机1Create iproute 192.168.2.0/24 192.168.5.1Create iproute 192.168.3.0/24 192.168.5.1b.交换机2Create iproute 192.168.6.0/24 192.168.5.2Create iproute 192.168.7.0/24 192.168.5.2步骤5:测试配置结束后,VLAN2,VLAN3,VLAN6,VLAN7能够全部互通五.实验记录和处理VLAN及端口配置:交换机1:交换机2:网关配置:交换机1:交换机2:交换机1:2实验结果截图:口配置正确,交换机路由配置正确,不同VLAN间能够通过它们互相连通。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
实验二网络拓扑:交换机1和2配置:Switch>enableSwitch#vlan database% Warning: It is recommended to configure VLAN from config mode,as VLAN database mode is being deprecated. Please consult userdocumentation for configuring VTP/VLAN in config mode.Switch(vlan)#vlan 10VLAN 10 added:Name: VLAN0010Switch(vlan)#vlan 20VLAN 20 added:Name: VLAN0020Switch(vlan)#exitAPPLY completed.Exiting....Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface fastEthernet 0/1Switch(config-if)#switchport mode trunkSwitch(config-if)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up Switch(config-if)#switchport trunk allowed vlan allSwitch(config-if)#exitSwitch(config)#interface fastEthernet 0/2Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 10Switch(config-if)#exitSwitch(config)#interface fastEthernet 0/3Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 20Switch(config-if)#exit交换机3配置:Switch>enableSwitch#vlan database% Warning: It is recommended to configure VLAN from config mode,as VLAN database mode is being deprecated. Please consult userdocumentation for configuring VTP/VLAN in config mode.Switch(vlan)#vlan 30VLAN 30 added:Name: VLAN0030Switch(vlan)#exitAPPLY completed.Exiting....Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface fastEthernet 0/1Switch(config-if)#switchport mode trunkSwitch(config-if)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up Switch(config-if)#switchport trunk allowed vlan allSwitch(config-if)#exitSwitch(config)#interface fastEthernet 0/2Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 30Switch(config-if)#exitSwitch(config)#交换机4配置Switch>enableSwitch#vlan database% Warning: It is recommended to configure VLAN from config mode,as VLAN database mode is being deprecated. Please consult userdocumentation for configuring VTP/VLAN in config mode.Switch(vlan)#vlan 40VLAN 40 added:Name: VLAN0040Switch(vlan)#exitAPPLY completed.Exiting....Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface fastEthernet 0/1Switch(config-if)#switchport mode trunkSwitch(config-if)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up Switch(config-if)#switchport trunk allowed vlan allSwitch(config-if)#exitSwitch(config)#interface fastEthernet 0/2Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 40Switch(config-if)#exitSwitch(config)#三层交换机1配置:Switch>enableSwitch#vlan database% Warning: It is recommended to configure VLAN from config mode,as VLAN database mode is being deprecated. Please consult userdocumentation for configuring VTP/VLAN in config mode.Switch(vlan)#vlan 10VLAN 10 added:Name: VLAN0010Switch(vlan)#vlan 20VLAN 20 added:Name: VLAN0020Switch(vlan)#vlan 70VLAN 70 added:Name: VLAN0070Switch(vlan)#exitAPPLY completed.Exiting....Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface fastEthernet 0/1Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 70Switch(config-if)#no shutdownSwitch(config-if)#exitSwitch(config)#interface fastEthernet 0/2Switch(config-if)#switchport trunk encapsulation dot1qSwitch(config-if)#switchport mode trunkSwitch(config-if)#switchport trunk allowed vlan allSwitch(config-if)#exitSwitch(config)#interface fastEthernet 0/3Switch(config-if)#switchport trunk encapsulation dot1qSwitch(config-if)#switchport mode trunkSwitch(config-if)#switchport trunk allowed vlan allSwitch(config-if)#exitSwitch(config)#int vlan 10Switch(config-if)#%LINK-5-CHANGED: Interface Vlan10, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up Switch(config-if)#ip address 192.168.1.254 255.255.255.0Switch(config-if)#exitSwitch(config)#int vlan 20Switch(config-if)#%LINK-5-CHANGED: Interface Vlan20, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up Switch(config-if)#ip address 192.168.2.254 255.255.255.0Switch(config-if)#exitSwitch(config)#int vlan 70Switch(config-if)#%LINK-5-CHANGED: Interface Vlan70, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan70, changed state to up Switch(config-if)#ip address 192.168.7.2 255.255.255.0Switch(config-if)#exitSwitch(config)#ip routingSwitch(config)#ip route 0.0.0.0 0.0.0.0 192.168.7.1Switch(config)#endSwitch#%SYS-5-CONFIG_I: Configured from console by consoleSwitch#write memoryBuilding configuration...[OK]Switch#三层交换机2配置:Switch>enableSwitch#vlan database% Warning: It is recommended to configure VLAN from config mode,as VLAN database mode is being deprecated. Please consult userdocumentation for configuring VTP/VLAN in config mode.Switch(vlan)#vlan 30VLAN 30 added:Name: VLAN0030Switch(vlan)#vlan 40VLAN 40 added:Name: VLAN0040Switch(vlan)#vlan 80VLAN 80 added:Name: VLAN0080Switch(vlan)#Switch(vlan)#exitAPPLY completed.Exiting....Switch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface fastEthernet 0/1Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 80Switch(config-if)#no shutdownSwitch(config-if)#exitSwitch(config)#interface fastEthernet 0/2Switch(config-if)#switchport trunk encapsulation dot1qSwitch(config-if)#switchport mode trunkSwitch(config-if)#switchport trunk allowed vlan allSwitch(config-if)#exitSwitch(config)#interface fastEthernet 0/3Switch(config-if)#switchport trunk encapsulation dot1qSwitch(config-if)#switchport mode trunkSwitch(config-if)#switchport trunk allowed vlan allSwitch(config-if)#exitSwitch(config)#int vlan 30Switch(config-if)#%LINK-5-CHANGED: Interface Vlan30, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up Switch(config-if)#ip address 192.168.3.254 255.255.255.0Switch(config-if)#exitSwitch(config)#int vlan 40Switch(config-if)#%LINK-5-CHANGED: Interface Vlan40, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan40, changed state to up Switch(config-if)#ip address 192.168.4.254 255.255.255.0Switch(config-if)#exitSwitch(config)#int vlan 80Switch(config-if)#%LINK-5-CHANGED: Interface Vlan80, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan80, changed state to up Switch(config-if)#ip address 192.168.8.2 255.255.255.0Switch(config-if)#exitSwitch(config)#ip routingSwitch(config)#ip route 0.0.0.0 0.0.0.0 192.168.8.1Switch(config)#endSwitch#%SYS-5-CONFIG_I: Configured from console by consoleSwitch#write memoryBuilding configuration...[OK]Switch#路由器配置:Router>enableRouter#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface fastEthernet 0/0Router(config-if)#ip address 192.168.7.1 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up Router(config-if)#exitRouter(config)#interface fastEthernet 0/1Router(config-if)#ip address 192.168.8.1 255.255.255.0Router(config-if)#no shutdownRouter(config-if)#%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up Router(config-if)#exitRouter(config)#ip route 192.168.1.0 255.255.255.0 192.168.7.2Router(config)#ip route 192.168.2.0 255.255.255.0 192.168.7.2Router(config)#ip route 192.168.3.0 255.255.255.0 192.168.8.2Router(config)#ip route 192.168.4.0 255.255.255.0 192.168.8.2Router(config)#endRouter#%SYS-5-CONFIG_I: Configured from console by consoleRouter#write memoryBuilding configuration...[OK]Router#测试:。