相关理论与知识---具体实施哪些技术?第一应该是VLAN技术第二是链路聚合技术:第三实行路由技术(三层交换就是路由)静态路由和动态路由。动态路由中,又有RIPEIGRP、OSPF等路由协议。WM大庆职业学院计算机网络实训基地
6 相关理论与知识-具体实施哪些技术? • 第一应该是VLAN技术; • 第二是链路聚合技术; • 第三实行路由技术(三层交换就是路由 ) 。 静态路由和动态路由。动态路由中,又有RIP、 EIGRP、OSPF等路由协议
第一步:创建VLAN创建VLAN100,将它命名为test的例PortVLAN,即将-Switch#configureterminal连接主机的端口设- Switch(config)#vlan 100成access模式。- Switch(config-vlan)# name test- Switch(config-vlan)#end100把ethernet0/10作为access口加入了VLASwitch#cont=Switch(config)#interfacefastethernet0/19- Switch(config-if)# switchport mode access- Switch(config-if)# switchport access vlan 100- Switch(config-if)# endWM删除VLan- Switch(config)#no vlan 100删除VLan之前要将端口划分为VLan1,VLan1不可删除大庆职业学院计算机网络实训基地
7 第一步:创建VLAN • 创建VLAN100,将它命名为test的例子 – Switch# configure terminal – Switch(config)# vlan 100 – Switch(config-vlan)# name test – Switch(config-vlan)# end • 把ethernet 0/10作为access口加入了VLAN100 – Switch# con t – Switch(config)# interface fastethernet0/10 – Switch(config-if)# switchport mode access – Switch(config-if)# switchport access vlan 100 – Switch(config-if)# end • 删除VLan – Switch(config)# no vlan 100 – 删除VLan之前要将端口划分为VLan1,VLan1不可删除 Port VLAN,即将 连接主机的端口设 成access模式
给VLAN分配IPSwitch#contSwitch(config)#interface vlan 100Switch(config-if)#ip address 192.168.2.1255.255.255.0Switch(config-if)#no shutdownSwitch(config-if)#endSwitch#wrSwitch#exitWW大庆职业学院计算机网络实训基地
8 给VLAN分配IP Switch#con t Switch(config)#interface vlan 100 Switch(config-if)#ip address 192.168.2.1 255.255.255.0 Switch(config-if)#no shutdown Switch(config-if)#end Switch#wr Switch#exit
提问:如何把端口从vlan单删除?conf tint f 0/10 no switchport access vlan 100WM大庆职业学院计算机网络实训基地
9 提问:如何把端口从vlan里删除? • conf t • int f 0/10 • no switchport access vlan 100
第二步:开启三层交换的路由功能配置三层交换机端口的路由功能S3550-24#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开启三层交换机的路由功能Switch>enbleNSwitch#configure terminalSwitch(config)#hostname s3550-24S3550-24(config)#ip routing开启三层交换机的路由功能C大庆职业学院计算机网络实训基地
10 第二步:开启三层交换的路由功能 一、配置三层交换机端口的路由功能 • S3550-24#interface fastethernet 0/5 • S3550-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 shutdown • S3550-24(config-if)#end 二、开启三层交换机的路由功能 • Switch>enble • Switch#configure terminal • Switch(config)#hostname s3550-24 • S3550-24(config)#ip routing 开启三层交换机的路由功能