本次模拟:采用Cisco Packet Tracer 软件,进行cisco网络设备的模拟。可以实现CLI界面命令配置,同实际交换机一样。

1、同一VLAN 可以互相访问,不同VLAN 不能访问

PC0 :192.168.1.10    PC1:192.168.1.11        PC2:192.168.1.12

PC3 :192.168.1.13    PC4:192.168.1.14        PC5:192.168.1.15

掩码:255.255.255.0  网关:192.168.1.1

Switch0 :

Switch>enable
Switch#configure terminal
Switch(config)#vlan
Switch(config-vlan)#exit
Switch(config)#vlan
Switch(config-vlan)#exit
Switch(config)#vlan
Switch(config-vlan)#exit
Switch(config)#interface f /
Switch(config-if)#switchport access vlan
Switch(config-if)#exit
Switch(config)#interface f /
Switch(config-if)#switchport access vlan
Switch(config-if)#exit
Switch(config)#interface f /
Switch(config-if)#switchport access vlan
Switch(config-if)#exit
Switch(config)#interface f /
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit
Switch#show vlan

Switch 1:

同 Switch0 一样的配置。

完成后,相同VLAN间可以访问,不同VLAN不能访问。

PC0  ping PC 1 : timeout

PC0 ping PC 3 : reply

2、三层交换机实现路由,不同VLAN间可以互相访问

PC9: 192.168.2.9   PC11 192.168.2.11    掩码:255.255.255.0  网关:192.168.2.1

PC10: 192.168.3.10   PC12 192.168.3.12    掩码:255.255.255.0  网关:192.168.3.1

Switch 5:

Switch>enable
Switch#configure terminal
Switch(config)#vlan
Switch(config-vlan)#exit
Switch(config)#vlan
Switch(config-vlan)#exit
Switch(config)#interface f /
Switch(config-if)#switchport access vlan
Switch(config-if)#exit
Switch(config)#interface f /
Switch(config-if)#switchport access vlan
Switch(config-if)#exit
Switch(config)#interface f /
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit

Switch 6:

同switch5 配置一样。

S3560:

Switch>enable
Switch#configure terminal
Switch(config)#ip routing #开启路由功能
Switch(config)#vlan
Switch(config-vlan)#exit
Switch(config)#vlan
Switch(config-vlan)#exit Switch(config)#interface f /
Switch(config-if)#switchport trunk encapsulation dot1q #给这个接口的trunk封装为802..Q的帧格式
Switch(config)#switchport mode trunk
Switch(config-if)#exit
Switch(config)#interface f /
Switch(config-if)#switchport trunk encapsulation dot1q #给这个接口的trunk封装为802..Q的帧格式
Switch(config)#switchport mode trunk
Switch(config-if)#exit Switch(config)#interface vlan
Switch(config-if)# ip address 192.168.2.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config)#exit
Switch(config)#interface vlan
Switch(config-if)# ip address 192.168.3.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config)#exit Switch# show ip route

完成后,不相同VLAN间可以访问

PC9  ping PC 10 : reply

PC9  ping PC 12 : reply

 3、快速生成树

是网络在冗余链路的情况下,避免环路,形成广播风暴。

配置的时候需要先配置交换机,然后在连接线路,不然会形成广播风暴

PC13 :192.168.1.13  PC14 :192.168.1.14

Switch7:

Switch>enable
Switch#configure terminal
Switch(config)#vlan
Switch(config-vlan)#exit Switch(config)#interface f /
Switch(config-if)#switchport access vlan
Switch(config-if)#exit
Switch(config)#interface range f /-
Switch(config-if-range)#switchport mode trunk
Switch(config-if-range)#exit
Switch(config)#spanning-tree mode rapid-pvst
Switch(config-if)#switchport mode trunk
Switch(config-if)#exit Switch#show spanning-tree
Switch#show spanning-tree interface f0/

Switch8:

同Switch7一样

配置完成后,当2/3端口任意一个出现问题,可以快速的切换到备用端口,保证数据的传输

Cisco 模拟配置的更多相关文章

  1. cisco 路由配置

    Cisco路由配置基础 刚刚接触cisco路由配置,下面是学习的笔记,感觉命令还是多敲才能熟悉 一. 所处状态各类 router> 用户处于用户命令状态,可以查看网络和主机 router# 用户 ...

  2. cisco路由器配置教程

    配置cisco路由器 经过几十年的发展,从最初的只有四个节点的ARPANET发展到现今无处不在的Internet,计算机网络已经深入到了我们生活当中.随着计算机网络规模的爆炸性增长,作为连接设备的路由 ...

  3. cisco基本配置命令

    实验命令 router> enable 从用户模式进入特权模式 router# disable or exit 从特权模式退出到用户模式 router# show sessions 查看本机上的 ...

  4. [CISCO] 简单配置 Telnet 服务

    [CISCO] 简单配置 Telnet 服务 一.Introduction Telnet 协议是一种应用层协议,使用于网际网路及区域网中,使用虚拟终端机的形式,提供双向.以文字字串为主的互动功能.属于 ...

  5. CiSCO 交换机配置 SSH 登陆

    CiSCO 交换机配置 SSH 登陆 题目:在三层交换机上仅运行 SSH 服务,且用户名和密码的方式登录交换机. (一)了解主机名与域名 ​ 1."主机名" 为该设备的名称 ​ 2 ...

  6. Cisco 交换机配置的基本命令

    1.不同的vlan 不同vlan需要路由 在路由的端口设置多个IP段 交换机模拟器实验六 2.查看端口名字 SWA#sh vlan    default  Active  F0/1, F0/2, F0 ...

  7. CISCO ACL配置(目前)

    什么是ACL? 访问控制列表简称为ACL,访问控制列表使用包过滤技术,在路由器上读取第三层及第四层包头中的信息如源地址,目的地址,源端口,目的端口等,根据预先定义好的规则对包进行过滤,从而达到访问控制 ...

  8. Cisco常用配置和命令

    1.ASA常用管理management-access inside      #开启远程连接inside口 show snmp-server oidlist          #查看ASA snmp的 ...

  9. Cisco DHCP 配置方法

    首先假设两台思科路由器,R1(服务端)连接R2(客户端),组成一个简单的链式局域网,下面就来实现DHCP,配置的命令及其解释如下: 1.R1 dhcp服务的配置 dhcp#configure term ...

随机推荐

  1. Oracle与Mysql的高级查询与难点sql

    一.连接查询  1.内连接      内连接用于返回满足连接条件的所有记录.默认情况下,在执行连接查询时如果没有指定任何连接操作符,那么这些连接查询都属于内连接. Sql代码   1.   SELEC ...

  2. ubuntu16.04安装mysql5.6

    apt-get install software-properties-commonsudo add-apt-repository 'deb http://archive.ubuntu.com/ubu ...

  3. ubuntu 18.04用apt安装mysql-server

    mysql5.7安装完成后普通用户不能进mysql 原因:root的plugin被修改成了auth_socket,用密码登陆的plugin应该是mysql_native_password,直接用roo ...

  4. GCD学习 —— 三

    ​ 学习学习dispatch_block,在向队列中添加任务时,可以直接在对应的函数中添加 block.但是如果想对任务进行操作,比如监听任务.取消任务,就需要获取对应的 block. 1 创建Blo ...

  5. 【NOIP14 D2T2】寻找道路

    Source and Judge NOIP2014 提高组 D2T2Luogu2296Caioj1567 Problem [Description] 在有向图 G 中,每条边的长度均为 1,现给定起点 ...

  6. Mac上各种实用命令

    下载Github资源:git clone 显示隐藏文件:defaults write com.apple.finder AppleShowAllFiles -bool true 隐藏隐藏文件:defa ...

  7. 从租人APP沦为性工作发布平台 看共享经济监管边界

    看共享经济监管边界" title="从租人APP沦为性工作发布平台 看共享经济监管边界"> 继直播类软件部分涉黄之后,最近火爆的各类"租人"软件 ...

  8. STL迭代器的使用、正向、逆向输出双向链表中的所有元素

    */ * Copyright (c) 2016,烟台大学计算机与控制工程学院 * All rights reserved. * 文件名:text.cpp * 作者:常轩 * 微信公众号:Worldhe ...

  9. 8——PHP循环结构&&条件结构

    */ * Copyright (c) 2016,烟台大学计算机与控制工程学院 * All rights reserved. * 文件名:text.cpp * 作者:常轩 * 微信公众号:Worldhe ...

  10. IP 转发分组的流程

    IP 转发分组的流程 数据路由:路由器在不同网段转发数据包: 网络畅通的条件:数据包能去能回: 从源网络发出时,沿途的每一个路由器必须知道到目标网络下一跳给哪个接口: 从目标网络返回时,沿途的每一个路 ...