基于端口VLAN配置access接入链路

  • 实验要求:
    • 不同交换机之间的access链路,相同VLAN通讯
    • 理解access链路特点
  • 实验拓扑图:
  • 实验设备
    • 4台PC 2台S3700交换机
  • 实验配置
    • 先在4台PC上配置IP地址与子网掩码
    • 在交换机1中配置:
    • <Huawei>system-view 在用户视图下键入system-view 系统视图
    • [Huawei]sysname SW-1 更改设备名
    • [SW-1]un in en 取消弹窗
    • [SW-1]vlan 10 创建VLAN 10
    • [SW-1-vlan10]vlan 20 创建VLAN20
    • [SW-1-vlan20]quit 退出
    • [SW-1]interface e0/0/1 进入 e0/0/1接口模式
    • [SW-1-Ethernet0/0/1]port link-type access 把e0/0/1接口设为access链路
    • [SW-1-Ethernet0/0/1]port default vlan 20 把e0/0/1加入到VLAN20 中
    • [SW-1-Ethernet0/0/1]interface e0/0/20 进入e0/0/20接口
    • [SW-1-Ethernet0/0/20]port link-type access 把e0/0/20接口设为access链路
    • [SW-1-Ethernet0/0/20]port default vlan 20
    • 把e0/0/20加入到VLAN20 中
    • [SW-1-Ethernet0/0/20]int e0/0/10 进入e0/0/10接口
    • [SW-1-Ethernet0/0/10]port link-type access 把e0/0/10接口设为access链路
    • [SW-1-Ethernet0/0/10]port default vlan 10
    • 把e0/0/10加入到VLAN10 中

    • [SW-1-Ethernet0/0/1]int e0/0/3 进入e0/0/3接口
    • [SW-1-Ethernet0/0/3]port link-type access 把e0/0/3接口设为access链路
    • [SW-1-Ethernet0/0/3]port default vlan 10 把e0/0/3加入到VLAN10 中
    • 交换机2也是同样的配置
    • 创建VLAN10 、VLAN20 进入接口e0/0/2和e0/0/20 设为access链路 并加入VLAN 20
    • 进入接口e0/0/4 和e0/0/10设为access链路 并加入VLAN10中
  • 验证
  • 在PC3 上可以ping通PC4 无法ping通PC2
  • PC1不可以ping通PC2 无法ping通PC4 (未设置生成树协议 无法ping通)
  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值