版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、一、标识交换机二、设置口令及用户三、配置VTP(Vian中继协议)四、配置中继线(Trunk)五、创建、描述Vian及设置VianIP六、划分、描述及设置Vian端口七、配置STP(生成树协议)八、启用Vian间Router九、配置ACL十、配置DHCP中继代理十一、配置DHCP服务器十二、配置HSRP(热备路由协议)十三、保存配置附1:命令行编辑键附2:SHOW命令附7:ACL例子一、标识交换机Switch#configureterminal进入配置状态Switch(config)#hostname“hostname”设置Switch名称Switch(config)#nohostname取消
2、Switch名称Switch(config)#end结束本次配置二、设置口令及用户Switch#configureterminal进入配置状态Switch(config)#enabiesecret“password”设置特权模式口令Switch(config)#noenablesecret取消特权模式口令Switch(config)#enabiepassword“password”设置EXEC模式口令Switch(config)#noenablepassword取消EXEC模式口令witch(config)#username“username”privilege“num”secret“pass
3、word”建立本地用户及口令Switch(config)#nousername“username”删除本地用户Switch(config)#servicepassword-encryption加密所有明文口令Switch(config)#noservicepassword-encryption拒绝加密所有明文口令Switch(config)#end结束本次配置1、配置console用户用口令Switch#configureterminal进入配置状态Switch(config)#lineconsole0进入console口配置状态Switch(config-line)#loginlocal设置
4、登录模式为本地用户验证模式Switch(config-line)#nologinlocal取消本地用户验证模式Switch(config-line)#end结束本次配置或Switch#configureterminal进入配置状态Switch(config)#lineconsole0进入console口配置状态Switch(config-line)#login设置登录模式为线性登录模式Switch(config-line)#password“password”设置线性登录模式口令Switch(config-line)#nologin取消线性登录模式Switch(config-line)#end
5、结束本次配置2、配置tenlnet(vty)用户及口令Switch#configureterminal进入配置状态Switch(config)#linevty015进入vty配置状态Switch(config-line)#loginlocal设置登录模式为本地用户验证模式Switch(config-line)#nologinlocal取消本地用户验证模式Switch(config-line)#end结束本次配置或Switch#configureterminal进入配置状态Switch(config)#linevty015进入vty配置状态Switch(config-line)#login设置登
6、录模式为线性登录模式Switch(config-line)#password“password”设置线性登录模式口令Switch(config-line)#nologin取消线性登录模式Switch(config-line)#end结束本次配置三、配置VTP(Vlan中继协议)Switch#vlandatabase进入vlan数据库配置状态Switch(vlan)#vtpdomain“domainname”设置vtp域名称Switch(vlan)#vtpserver|client|transparent设置vtp模式Switch(vlan)#vtppassword“password”设置vtp
7、口令Switch(vlan)#novtppassword取消vtp口令Switch(vlan)#exit退出vlan数据库配置状态四、配置trunk(中继线)Switch#configureterminal进入配置状态Switch(config)#interface“interfacemod/port”进入端口配置状态Switch(config-if)#switchporttrunkencapsulationdot1q|isl|negotiate设置干道封装模式Switch(config-if)#switchportmodetrunk设置端口为干道模式Switch(config-if)#nos
8、hutdown启用端口Switch(config-if)#end结束本次配置或Switch#configureterminal进入配置状态Switch(config)#interfacerange“interfacemod/port-port”进入端口组配置状态Switch(config-if-range)#switchporttrunkencapsulationdot1q|isl|negotiate设置干道封装模式Switch(config-if-range)#switchportmodetrunk设置端口为干道模式Switch(config-if-range)#noshutdown启用端口
9、Switch(config-if-range)#end结束本次配置五、创建、描述Vlan及设置VlanIPSwitch#vlandatabase进入vlan数据库配置状态Switch(vlan)#vlan“vlan-num”name“vlan-name”建立vlan及名称Switch(vlan)#novlan“vlan-num”删除vlanSwitch(vlan)#exit退出vlan数据库配置状态Switch#configureterminal进入配置状态Switch(config)#interfacevlan“vlan-num”进入vlan配置状态Switch(config-if)#des
10、cription“description”描述vlanSwitch(config-if)#nodescription取消描述Switch(config-if)#ipaddress“ip-addresssubnet-mask”设置vlan网关的ip地址Switch(config-if)#noshutdown启用vlanSwitch(config-if)#end结束本次配置六、划分、描述及设置Vlan端口Switch#configureterminal进入配置状态Switch(config)#interface“interfacemod/port”进入端口配置状态Switch(config-if)
11、#description“description”描述端口Switch(config-if)#speedauto|100|10设置端口速率模式Switch(config-if)#duplexauto|full|half设置端口双工模式Switch(config-if)#switchportmodeaccess设置端口为访问模式Switch(config-if)#switchportaccessvlan“vlan-num”设置端口所属VlanSwitch(config-if)#noshutdown启用端口Switch(config-if)#end结束本次配置或Switch#configurete
12、rminal进入配置状态Switch(config)#interfacerange“interfacemod/port-port”进入端口组配置状态Switch(config-if-range)#description“description”描述端口Switch(config-if-range)#speedauto|100|10设置端口速率模式Switch(config-if-range)#duplexauto|full|half设置端口双工模式Switch(config-if-range)#switchportmodeaccess设置端口为访问模式Switch(config-if-rang
13、e)#switchportaccessvlan“vlan-num”设置端口所属VlanSwitch(config-if-range)#noshutdown启用端口Switch(config-if-range)#end结束本次配置七、配置STP(生成树协议)Switch#configureterminal进入配置状态Switch(config)#spanning-treeportfastdefault设置所有访问端口为快速模式Switch(config)#nospanning-treeportfastdefault取消所有访问端口为快速模式Switch(config)#spanning-tree
14、uplinkfast设置上行端口为快速模式Switch(config)#nospanning-treeuplinkfast取消上行端口为快速模式Switch(config)#end结束本次配置或Switch#configureterminal进入配置状态Switch(config)#interface“interfacemod/port”进入端口配置状态Switch(config-if)#spanning-treeportfast设置端口为快速模式Switch(config-if)#noshutdown启用端口Switch(config-if)#end结束本次配置或Switch#configu
15、reterminal进入配置状态Switch(config)#interfacerange“interfacemod/port-port”进入端口组配置状态Switch(config-if-range)#spanning-treeportfast设置端口为快速模式Switch(config-if-range)#noshutdown启用端口Switch(config-if-range)#end结束本次配置八、启用Vlan间RouterSwitch#configureterminal进入配置状态Switch(config)#iprouting启用ip路由Switch(config)#iproute
16、“Destination-prefixDestination-prefix-maskForwarding-routers-address”Switch(config)#end结束本次配置九、配置ACLSwitch#configureterminal进入配置状态Switch(config)#access-list“standard-acl-num”permit|deny“source-addresssource-wildcard”设置标准aclSwitch(config)#access-list“extend-acl-num”permit|denyip“source-addsource-wild
17、cardDestination-addDestination-wildcard”设置扩展aclSwitch(config)#end结束本次配置Switch#configureterminal进入配置状态Switch(config)#interfacevlan“vlan-num”进入vlan配置状态Switch(config-if)#ipaccess-group“acl-num”in|out应用acl至UvlanSwitch(config-if)#end结束本次配置Switch#configureterminal进入配置状态Switch(config)#linevty015进入vty配置状态Sw
18、itch(config-line)#access-class“acl-num”in|out应用acl至UvtySwitch(config-if)#end结束本次配置例:Switch(config)#access-list101denyiphost192.168.2.11host192.168.10.21Switch(config)#access-list102denyiphost192.168.2.13192.168.10.00.0.0.255Switch(config)#access-list103denyip192.168.2.00.0.0.255192.168.10.00.0.0.255
19、Switch(config)#access-list104denyip192.168.2.00.0.0.255host192.168.10.25十、配置DHCP中继代理Switch#configureterminal进入配置状态Switch(config)#servicedhcp启用dhcp月服务Switch(config)#ipdhcprelayinformationoption启用dhcp代理服务Switch(config)#interfacevlan“vlan-num”进入vlan配置状态Switch(config-if)#iphelper-address“ip-address”启用dh
20、cp代理服务器ip地址Switch(config-if)#end结束本次配置十一、配置DHCP服务器Switch#configureterminal进入配置状态Switch(config)#ipdhcppool“Pool-name”设置dhcp地址池名称Switch(dhcp-config)#network“Network-numNetwork-mask”设置dhcp地址池ip范围Switch(dhcp-config)#dns-server“ip-address”为客户机分配DNS服务器ip地址Switch(dhcp-config)#netbios-name-server“ip-address
21、”为客户机分配WINS服务器ip地址Switch(dhcp-config)#default-router“ip-address”为客户机分配默认网关ip地址Switch(config-if)#end结束本次配置Switch#configureterminal进入配置状态Switch(config)#servicedhcp启用dhcp月艮务wyz(config)#ipdhcpexcluded-address“Low-ip-addressHigh-ip-address”设置保留ip地址Switch(config-if)#end结束本次配置十二、配置HSRP(热备路由协议)Switch#config
22、ureterminal进入配置状态Switch(config)#interfacevlan“vlan-num”进入vlan配置状态Switch(config-if)#ipaddress“ip-addresssubnet-mask”设置vlan物理ip地址Switch(config-if)#standby“group-num”ip“virtual-ip-address”设置vlan虚拟ip地址Switch(config-if)#standbypriority“Priority-value”设置路由器优先等级Switch(config-if)#standbypreempt设置hsrp抢占功能Swi
23、tch(config-if)#standbytimers“Hello-interval-in-secondsHold-time-in-seconds”设置hello信息Switch(config-if)#end结束本次配置十三、保存配置Switch#writememory或Switch#copyrunning-configstartup-config附1:命令行编辑键TAB补全命令查看可用命令Ctrl+P粘贴历史命令Ctrl+E将光标移至命令末尾Ctrl+F将光标向前移动Ctrl+B将光标向后移动Ctrl+Z返回#命令模式Ctrl+UClearLineandPutinBufferCtrl+WD
24、eleteWordBackwardsandPutinBufferCtrl+YPasteBufferContentsCtrl+XClearLinetotheLeftandPutinBufferCtrl+TFlipLast2CharactersCtrl+JReturnCtrl+LRefreshLineCtrl+IRefreshLineandGotoEndCtrl+KDeleteeverythingontheRightofcursorCtrl+VAllowstotypecontrolcharacterCtrl+MReturnCtrl+HBackspaceCharactertotheLeftCtrl+
25、R刷新行附2:SHOW命令Switch#showversion显示版本信息Switch#showarp|include“ip-address”显示ip地址对应的mac地址信息Switch#showmac-address-table显示mac地址信息Switch#showmac-address-table|include“mac-address”格式:xxxx.xxxx.xxxx.xxxxSwitch#showmac-address-tabledynamicaddress“mac-address”显示mac地址对应的端口信息Switch#showmac-address-tabledynamici
26、nterface“interfacemod/port”显示端口对应的mac地址信息Switch#showtech-support显示技术支持信息Switch#showinterfaces显示接口信息Switch#showvlan显示vlan信息Switch#showstartup-config显示启用配置文件Switch#showrunning-config显示运行配置文件Switch#showiproute显示ip路由状态Switch#clearcountersinterface“interfacemod/port”清除端口计数器Switch(config)#defaultinterface
27、“interfacemod/port”恢复端口出厂设置Switch#clearinterface“interfacemod/port”重置端口的硬件逻辑keyada#showcdpneighbors“interfacemod/port”detail附7:ACL例子VLAN1需实现以下效果:1、VLAN1主机192.168.1.240可以访问所有网段;2、VLAN1其余主机可以访问除VLAN2、VLAN3及VLAN4外所有网段。VLAN2需实现以下效果:1、VLAN2网段只可访问VLAN3中的192.168.3.126主机,但不能访问VLAN3中其它主机;2、VLAN2网段可以访问除VLAN1、
28、VLAN3及VLAN4外所有网段。VLAN3需实现以下效果:1、VLAN3主机192.168.3.126可以访问所有网段;2、VLAN3其余主机不能访问所有网段。VLAN4需实现以下效果:1、VLAN4网段只可访问VLAN2网段。interfaceVlan1ipaddress192.168.1.1255.255.255.0ipaccess-group101in!interfaceVlan2ipaddress192.168.2.1255.255.255.0ipaccess-group102in!interfaceVlan3ipaddress192.168.3.1255.255.255.0ipac
29、cess-group103in!interfaceVlan4ipaddress192.168.4.1255.255.255.0ipaccess-group104in!access-list101permitiphost192.168.1.240anyaccess-list101denyip192.168.1.00.0.0.255192.168.2.00.0.0.255access-list101denyip192.168.1.00.0.0.255192.168.3.00.0.0.255access-list101denyip192.168.1.00.0.0.255192.168.4.00.0.
30、0.255access-list101permitipanyanyaccess-list102permitip192.168.2.00.0.0.255host192.168.3.126access-list102denyip192.168.2.00.0.0.255192.168.3.00.0.0.255access-list102permitipanyanyaccess-list103permitiphost192.168.3.126anyaccess-list103denyipanyanyaccess-list104permitip192.168.4.00.0.0.255192.168.2.
31、00.0.0.255access-list104denyipanyanySwitch(config)#interfaceport-channel2Switch(config)#interfacerangefastEthernet0/2324Switch(config-if-range)#channel-group2modedesirableCisco3560配置DHCPRelay实例2010-08-3109:04网络环境:一台3560交换机,划分三个vlan,vlan2为服务器所在网络,命名为server,IP地址段为192.168.2.0,子网掩码:255.255.255.0,网关:192.
32、168.2.1,域服务器为windows2000advanceserver,同时兼作DHCP服务器,DNS服务器,IP地址为192.168.2.10,vlan3为客户机1所在网络,IP地址段为192.168.3.0,子网掩码:255.255.255.0,网关:192.168.3.1命名为work01,vlan4为客户机2所在网络,命名为work02,IP地址段为192.168.4.0,子网掩码:255.255.255.0,网关:192.168.4.1.3560上端口1-8划到VLAN2,端口9-16划分到VLAN3,端口17-24划分到VLAN4.配置命令及步骤如下:第一步:创建VLAN:Sw
33、itchVlanDatabaseSwitch(Vlan)Vlan2NameserverSwitch(Vlan)Vlan3Namework01Switch(vlan)Vlan4Namework02第二步:启用DHCP中继代理:/*关键一步,若缺少以下两条命令,在VLAN中使用“IPHELPER-ADDRESSDHCP服务器地址”指定DHCP服务器,客户机仍然不能获得IP地址*/SwitchEnableSwitch#ConfigtSwitch(Config)ServiceDhcpSwitch(Config)IpDhcpRelayInformationOption第三步:设置VLANIP地址:Swi
34、tch(Config)IntVlan2Switch(Config-vlan)IpAddress192.168.2.1255.255.255.0Switch(Config-vlan)NoShutSwitch(Config-vlan)IntVlan3Switch(Config-vlan)IpAddress192.168.3.1255.255.255.0Switch(Config-vlan)NoShutSwitch(Config-vlan)IntVlan4Switch(Config-vlan)IpAddress192.168.4.1255.255.255.0Switch(Config-vlan)No
35、ShutSwitch(Config-vlan)Exit/*注意:由于此时没有将端口分配置到VLAN2,3,4,所以各VLAN会DOWN掉,待将端口分配到各VLAN后,VLAN会起来*/第四步:设置端口全局参数Switch(Config)InterfaceRangeFa0/1-24Switch(Config-if-range)SwitchportModeAccessSwitch(Config-if-range)Spanning-treePortfast第五步:将端口添加到VLAN2,3,4中/*将端口1-8添加到VLAN2*/Switch(Config)InterfaceRangeFa0/1-8
36、Switch(Config-if-range)SwitchportAccessVlan2/*将端口9-16添加到VLAN3*/Switch(Config)InterfaceRangeFa0/9T6Switch(Config-if-range)SwitchportAccessVlan3/*将端口17-24添加到VLAN4*/Switch(Config)InterfaceRangeFa0/17-24Switch(Config-if-range)SwitchportAccessVlan4Switch(Config-if-range)Exit/*经过这一步后,各VLAN会起来*/第六步:在VLAN3和
37、4中设定DHCP服务器地址/*VLAN2中不须指定DHCP服务器地址*/Switch(Config)IntVlan3Switch(Config-vlan)IpHelper-address192.168.2.10Switch(Config)IntVlan4Switch(Config-vlan)IpHelper-address192.168.2.10第七步:启用路由/*路由启用后,各VLAN间主机可互相访问,若需进一步控制访问权限,则需应用到访问控制列表*/Switch(Config)IpRouting第八步:结束并保存配置Switch(Config-vlan)EndSwitch#CopyRunS
38、tart思科3560基本配置命令我这个是24口的3560三层交换机,他负责拨号,下面连接了20台二层交换机。我已经配置了密码和vlan,但是很长时间不配了,大部分都忘记了,求好心人给我一份完整的基本配置命令,最好有adsl拨号和内部地址转换。非常感谢最佳答案cisco3560三层交换机vlan间路由配置实例2008-11-1700:04下面以实例说明如何在一个典型的快速以太局域网中实现VLAN。所谓典型局域网就是指由一台具备三层交换功能的核心交换机接几台分支交换机(不一定具备三层交换能力)。我们假设核心交换机名称为:COM;分支交换机分别为:PAR1、PAR2、PAR3,分别通过Port1的光
39、线模块与核心交换机相连;并且假设VLAN名称分别为COUNTER、MARKET、MANAGING需要做的工作:1、设置VTPDOMAIN(核心、分支交换机上都设置)2、配置中继(核心、分支交换机上都设置)3、创建VLAN(在server上设置)4、将交换机端口划入VLAN5、配置三层交换1、设置VTPDOMAIN。VTPDOMAIN称为管理域。交换VTP更新信息的所有交换机必须配置为相同的管理域。如果所有的交换机都以中继线相连,那么只要在核心交换机上设置一个管理域,网络上所有的交换机都加入该域,这样管理域里所有的交换机就能够了解彼此的VLAN列表。COM#vlandatabase进入VLAN配
40、置模式COM(vlan)#vtpdomainCOM设置VTP管理域名称COMCOM(vlan)#vtpserver设置交换机为服务器模式PAR1#vlandatabase进入VLAN配置模式PAR1(vlan)#vtpdomainCOM设置VTP管理域名称COMPAR1(vlan)#vtpClient设置交换机为客户端模式PAR2#vlandatabase进入VLAN配置模式PAR2(vlan)#vtpdomainCOM设置VTP管理域名称COMPAR2(vlan)#vtpClient设置交换机为客户端模式PAR3#vlandatabase进入VLAN配置模式PAR3(vlan)#vtpdom
41、ainCOM设置VTP管理域名称COMPAR3(vlan)#vtpClient设置交换机为客户端模式注意:这里设置核心交换机为Server模式是指允许在该交换机上创建、修改、删除VLAN及其他一些对整个VTP域的配置参数,同步本VTP域中其他交换机传递来的最新的VLAN信息;Client模式是指本交换机不能创建、删除、修改VLAN配置,也不能在NVRAM中存储VLAN配置,但可同步由本VTP域中其他交换机传递来的VLAN信息。2、配置中继为了保证管理域能够覆盖所有的分支交换机,必须配置中继。Cisco交换机能够支持任何介质作为中继线,为了实现中继可使用其特有的ISL标签。ISL(Inter-S
42、witchLink)是一个在交换机之间、交换机与路由器之间及交换机与服务器之间传递多个VLAN信息及VLAN数据流的协议,通过在交换机直接相连的端口配置ISL封装,即可跨越交换机进行整个网络的VLAN分配和进行配置。在核心交换机端配置如下:COM(config)#interfacegigabitEthernet2/1COM(config-if)#switchportCOM(config-if)#switchporttrunkencapsulationisl配置中继协议COM(config-if)#switchportmodetrunkCOM(config)#interfacegigabitEt
43、hernet2/2COM(config-if)#switchportCOM(config-if)#switchporttrunkencapsulationisl配置中继协议COM(config-if)#switchportmodetrunkCOM(config)#interfacegigabitEthernet2/3COM(config-if)#switchportCOM(config-if)#switchporttrunkencapsulationisl配置中继协议COM(config-if)#switchportmodetrunk在分支交换机端配置如下:PAR1(config)#inter
44、facegigabitEthernet0/1PAR1(config-if)#switchportmodetrunkPAR2(config)#interfacegigabitEthernet0/1PAR2(config-if)#switchportmodetrunkPAR3(config)#interfacegigabitEthernet0/1PAR3(config-if)#switchportmodetrunk此时,管理域算是设置完毕了。3、创建VLAN一旦建立了管理域,就可以创建VLAN了。COM(vlan)#Vlan10nameCOUNTER创建了一个编号为10名字为COUNTER的VLA
45、NCOM(vlan)#Vlan11nameMARKET创建了一个编号为11名字为MARKET的VLANCOM(vlan)#Vlan12nameMANAGING创建了一个编号为12名字为MANAGING的VLAN注意,这里的VLAN是在核心交换机上建立的,其实,只要是在管理域中的任何一台VTP属性为Server的交换机上建立VLAN,它就会通过VTP通告整个管理域中的所有的交换机。但如果要将具体的交换机端口划入某个VLAN,就必须在该端口所属的交换机上进行设置。4、将交换机端口划入VLAN例如,要将PAR1、PAR2、PAR3分支交换机的端口1划入COUNTERVLAN,端口2划入MARKETV
46、LAN,端口3划入MANAGINGVLANPAR1(config)#interfacefastEthernet0/1配置端口1PAR1(config-if)#switchportaccessvlan10归属COUNTERVLANPAR1(config)#interfacefastEthernet0/2配置端口2PAR1(config-if)#switchportaccessvlan11归属MARKETVLANPAR1(config)#interfacefastEthernet0/3配置端口3PAR1(config-if)#switchportaccessvlan12归属MANAGINGVLAN
47、PAR2(config)#interfacefastEthernet0/1配置端口1PAR2(config-if)#switchportaccessvlan10归属COUNTERVLANPAR2(config)#interfacefastEthernet0/2配置端口2PAR2(config-if)#switchportaccessvlan11归属MARKETVLANPAR2(config)#interfacefastEthernet0/3配置端口3PAR2(config-if)#switchportaccessvlan12归属MANAGINGVLANPAR3(config)#interfac
48、efastEthernet0/1配置端口1PAR3(config-if)#switchportaccessvlan10归属COUNTERVLANPAR3(config)#interfacefastEthernet0/2配置端口2PAR3(config-if)#switchportaccessvlan11归属MARKETVLANPAR3(config)#interfacefastEthernet0/3配置端口3PAR3(config-if)#switchportaccessvlan12归属MANAGINGVLAN5、配置三层交换到这里,VLAN已经基本划分完毕。但是,VLAN间如何实现三层(网络
49、层)交换呢?这时就要给各VLAN分配网络(IP)地址了。给VLAN分配IP地址分两种情况,其一,给VLAN所有的节点分配静态IP地址;其二,给VLAN所有的节点分配动态IP地址。下面就这两种情况分别介绍。假设给VLANCOUNTER分配的接口Ip地址为172.16.58.1/24,网络地址为:172.16.58.0,VLANMARKET分配的接口Ip地址为172.16.59.1/24,网络地址为:172.16.59.0,VLANMANAGING分配接口Ip地址为172.16.60.1/24,网络地址为172.16.60.0如果动态分配IP地址,则设网络上的DHCP服务器IP地址为172.16.
50、1.11。给VLAN所有的节点分配静态IP地址。首先在核心交换机上分别设置各VLAN的接口IP地址。核心交换机将vlan做为一种接口对待,就象路由器上的一样,如下所示:COM(config)#interfacevlan10COM(config-if)#ipaddress172.16.58.1255.255.255.0VLAN10接口IPCOM(config)#interfacevlan11COM(config-if)#ipaddress172.16.59.1255.255.255.0VLAN11接口IPCOM(config)#interfacevlan12COM(config-if)#ipad
51、dress172.16.60.1255.255.255.0VLAN12接口IP再在各接入VLAN的计算机上设置与所属VLAN的网络地址一致的IP地址,并且把默认网关设置为该VLAN的接口地址。这样,所有的VLAN也可以互访了。给VLAN所有的节点分配动态IP地址。首先在核心交换机上分别设置各VLAN的接口IP地址和同样的DHCP服务器的IP地址,如下所示:COM(config)#interfacevlan10COM(config-if)#ipaddress172.16.58.1255.255.255.0VLAN10接口IPCOM(config-if)#iphelper-address172.1
52、6.1.11DHCPServerIPCOM(config)#interfacevlan11COM(config-if)#ipaddress172.16.59.1255.255.255.0VLAN11接口IPCOM(config-if)#iphelper-address172.16.1.11DHCPServerIPCOM(config)#interfacevlan12COM(config-if)#ipaddress172.16.60.1255.255.255.0VLAN12接口IPCOM(config-if)#iphelper-address172.16.1.11DHCPServerIP再在DH
53、CP服务器上设置网络地址分别为172.16.58.0,172.16.59.0,172.16.60.0的作用域,并将这些作用域的“路由器”选项设置为对应VLAN的接口IP地址。这样,可以保证所有的VLAN也可以互访了。最后在各接入VLAN的计算机进行网络设置,将IP地址选项设置为自动获得IP地址即可。(3)启用中继代理COM(config)#servicedhcpCOM(config)#ipdhcpreplayinfomationoption启用路由COM(config)#iprouting注意:在各个交换机上配置完后,一定要保存#copyrunstart三、总结本文是笔者在实际工作中的一些总结
54、。笔者力图用通俗易懂的文字来阐述创建VLAN的全过程。并且给出了详细的设置步骤,只要你对Cisco交换机的IOS有所了解,看懂本文并不难。按照本文所示的步骤一步一步地做,你完全可以给一个典型的快速以太网络建立多个VLAN比较全面的三层交换机配置2009-04-2816:04Enable进入私有模式Configureterminal/进入全局模式servicepassword-encryption/对密码进行加密hostnameCatalyst3550-12T1给三层交换机定义名称enablepassword123456./enable密码Enablesecret654321enable的加密密
55、码(应该是乱码而不是654321这样)Ipsubnet-zero允许使用全0子网(默认都是打开的)Ipname-server172.16.8.1172.16.8.2三层交换机名字Catalyst3550-12T1对应的IP地址是172.16.8.1Servicedhcp提供DHCP服务iprouting启用三层交换机上的路由模块ExitVtpmodeserver定义VTP工作模式为sever模式Vtpdomaincentervtp/定义VTP域的名称为centervtpVlan2namevlan2定义vlan并给vlan取名(如果不取名的话,vlan2的名字应该是vlan002)Vlan3na
56、mevlan3Vlan4namevlan4Vlan5namevlan5Vlan6namevlan6Vlan7namevlan7Vlan8namevlan8Vlan9namevlan9ExitinterfacePort-channel1进入虚拟的以太通道组1switchporttrunkencapsulationdot1q给这个接口的trunk封装为802.1Q的帧格式switchportmodetrunk定义这个接口的工作模式为trunkswitchporttrunkallowedvlanall/在这个trunk上允许所有的vlan通过Interfacegigabitethernet0/1进入
57、模块0上的吉比特以太口1switchporttrunkencapsulationdotlq给这个接口的trunk封装为802.1Q的帧格式switchportmodetrunk定义这个接口的工作模式为trunkswitchporttrunkallowedvlanall/在这个trunk上允许所有的vlan通过channel-group1modeon把这个接口放到快速以太通道组1中Interfacegigabitethernet0/2/同上switchporttrunkencapsulationdotlqswitchportmodetrunkswitchporttrunkallowedvlana
58、llchannel-group1modeonport-channelload-balancesrc-dst-ip定义快速以太通道组的负载均衡方式(依*源和目的IP的方式)interfacegigabitethernet0/3进入模块0上的吉比特以太口3switchporttrunkencapsulationdotlq/给trunk封装为802.1Qswitchportmodetrunk定义这个接口的工作模式为trunkswitchporttrunkallowedvlanall/允许所有vlan信息通过interfacegigabitethernet0/4/同上switchporttrunken
59、capsulationdotlqswitchportmodetrunkswitchporttrunkallowedvlanallinterfacegigbitethernet0/5/同上switchporttrunkencapsulationdotlqswitchportmodetrunkswitchporttrunkallowedvlanallinterfacegigbitethernet0/6/同上switchporttrunkencapsulationdotlqswitchportmodetrunkswitchprottrunkallowedvlanallinterfacegigbite
60、thernet0/7进入模块0上的吉比特以太口7Switchportmodeaccess定义这个接口的工作模式为访问模式switchportaccessvlan9/定义这个接口可以访问哪个vlan(实际就是分配这个接口到vlan)noshutdownspanning-treevlan6-9cost1000在生成树中,vlan6-9的开销定义为10000interfacerangegigabitethernet0/8-10进入模块0上的吉比特以太口8,9,10switchportmodeaccess定义这些接口的工作模式为访问模式switchportaccessvlan8把这些接口都分配到vla
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 二零二五年度出租车企业车辆租赁及管理合同范本12篇
- 二零二五版美团外卖配送员权益保障合同4篇
- 2025年粤人版选择性必修2地理上册阶段测试试卷含答案
- 2025年冀教版八年级地理下册阶段测试试卷
- 2024年度青海省公共营养师之三级营养师题库综合试卷A卷附答案
- 2024年度黑龙江省公共营养师之三级营养师综合练习试卷B卷附答案
- 2024年度青海省公共营养师之三级营养师提升训练试卷A卷附答案
- 科技助力小学生天文观测的新纪元
- 2025年牛津译林版九年级历史上册阶段测试试卷含答案
- 2025年度出台政策房地产项目后期维护合同4篇
- 发电机停电故障应急预案
- 接电的施工方案
- 常用药物作用及副作用课件
- 幼儿阿拉伯数字描红(0-100)打印版
- 社会组织等级评估报告模板
- GB/T 12173-2008矿用一般型电气设备
- 2023年1月浙江高考英语听力试题及答案(含MP3+录音原文)
- 新媒体研究方法教学ppt课件(完整版)
- 2020新版个人征信报告模板
- 东芝空调维修故障代码汇总
- 工艺管道仪表流程图(共68页).ppt
评论
0/150
提交评论