qq_58807009 2021-05-31 09:21 采纳率: 100%
浏览 468
已结题

思科一个三层交换机三台二层交换机 六台电脑自动获取ip实现互联

思科一个三层交换机三台二层交换机 六台电脑自动获取ip并实现互联

  • 写回答

1条回答 默认 最新

  • 小P聊技术 2021-05-31 09:25
    关注

    实验内容:通过一台三层交换机及两台二层交换机和6台电脑划分3个VLAN,并建立三个网关让电脑之间互通

    实验工具:Cisco Packet Tracer 6.0

    使用设备:

    电脑六台(电脑1、电脑2、电脑3、电脑4、电脑5、电脑6、):

     

    2950-24二层交换机两台(二层交换机1、二层交换机2):

     

    3650-24PS三层交换机一台(三层交换机):

     

    连接图:通过直连线将电脑于与交换机连接,通过交叉线将二层交换机与三层交换机连接

    注:

    电脑1的FastEthernet0接口连二层交换机1的FastEthernet0/1接口

    电脑2的FastEthernet0接口连二层交换机1的FastEthernet0/2接口

    电脑3的FastEthernet0接口连二层交换机2的FastEthernet0/1接口

    电脑4的FastEthernet0接口连二层交换机2的FastEthernet0/2接口

    电脑5的FastEthernet0接口连三层交换机的FastEthernet0/3接口

    电脑6的FastEthernet0接口连三层交换机的FastEthernet0/4接口

    二层交换机1的FastEthernet0/24接口连三层交换机的FastEthernet0/1接口

    二层交换机2的FastEthernet0/24接口连三层交换机的FastEthernet0/2接口

     

    实验步骤:

    1.点击电脑1,切换到【桌面】界面,进行如图所以的IP配置

     

    2.点击电脑2,切换到【桌面】界面,进行如图所以的IP配置

     

    同样的操作,点击剩下的电脑,进行如下配置

    电脑3:

     

    电脑4:

     

    电脑5:

     

    电脑6:

     

    3.点击二层交换机1,切换到【命令行】界面,按回车开始输入命令行,完整代码如下:

    Switch>en

    Switch#conf t

    Enter configuration commands, one per line.  End with CNTL/Z.

    Switch(config)#vlan 10

    Switch(config-vlan)#int fa0/1

    Switch(config-if)#sw ac vl 10

    Switch(config-if)#vlan 20

    Switch(config-vlan)#int fa0/2

    Switch(config-if)#sw ac vl 20

    Switch(config-if)#int fa0/24

    Switch(config-if)#sw mo tr

     

    4.点击二层交换机2,切换到【命令行】界面,同二层交换机1相同命令:

    Switch>en

    Switch#conf t

    Enter configuration commands, one per line.  End with CNTL/Z.

    Switch(config)#vlan 10

    Switch(config-vlan)#int fa0/1

    Switch(config-if)#sw ac vl 10

    Switch(config-if)#vlan 20

    Switch(config-vlan)#int fa0/2

    Switch(config-if)#sw ac vl 20

    Switch(config-if)#int fa0/24

    Switch(config-if)#sw mo tr

     

    5.点击三层交换机,切换到【命令行】界面,输入以下命令:

    Switch>en

    Switch#conf t

    Enter configuration commands, one per line.  End with CNTL/Z.

    Switch(config)#int vlan 20

    Switch(config-if)#no sh

    Switch(config-if)#ip add 192.168.20.254 255.255.255.0

    Switch(config-if)#int vlan 10

    Switch(config-if)#ip add 192.168.10.254 255.255.255.0

    Switch(config-if)#int vlan 30

    Switch(config-if)#ip add 192.168.30.254 255.255.255.0

    Switch(config-if)#exit

    Switch(config)#ip routing

    Switch(config)#vlan 10

    Switch(config-vlan)#

    %LINK-5-CHANGED: Interface Vlan10, changed state to up

     

    %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

     

    Switch(config-vlan)#vlan 20

    Switch(config-vlan)#

    %LINK-5-CHANGED: Interface Vlan20, changed state to up

     

    %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan20, changed state to up

     

    Switch(config-vlan)#vlan 30

    Switch(config-vlan)#

    %LINK-5-CHANGED: Interface Vlan30, changed state to up

     

    %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan30, changed state to up

     

    Switch(config)#int fa0/3

    Switch(config-if)#sw ac vl 20

    Switch(config-if)#no sh

    Switch(config-if)#int fa0/4

    Switch(config-if)#sw ac vl 30

    Switch(config-if)#no sh

     

     

     

    7.此时,我们打开任意一台电脑的【命令行】界面,ping任意一台电脑的IP地址,均应该成功:(我们以电脑3来ping电脑6的IP地址为例)

     

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 10月17日
  • 已采纳回答 10月9日

悬赏问题

  • ¥150 如图所示配置eNSP
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改
  • ¥20 wireshark抓不到vlan
  • ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
  • ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
  • ¥15 stata安慰剂检验作图但是真实值不出现在图上
  • ¥15 c程序不知道为什么得不到结果
  • ¥15 键盘指令混乱情况下的启动盘系统重装