文章目录
前言:
两个实验,第一个实验是简单的实现vlan的互通:同vlan通,不同vlan不通,第二个实验是通过配置ospf实现全网互通。
实验1:
实验环境
![捕获.PNG](https://img-blog.csdnimg.cn/img_convert/86d997599cb02e5ff0ae8cccb6ba4bc8.png#clientId=u42331768-cdc6-4&crop=0&crop=0&crop=1&crop=1&from=ui&id=uf6314797&margin=[object Object]&name=捕获.PNG&originHeight=321&originWidth=580&originalType=binary&ratio=1&rotation=0&showTitle=false&size=20698&status=done&style=none&taskId=u599146c2-d183-418f-ba46-fdeb33c7e67&title=)
实验需求
- 同vlan互通,不同vlan不通
实验步骤
1.配置交换机1
sy
[switch1]sysname SW1
[SW1]interface e0/0/2
[SW1-Ethernet0/0/2]vlan 10
[SW1]interface e0/0/2
[SW1-Ethernet0/0/2]p l a
[SW1-Ethernet0/0/2]p d v 10
[SW1-Ethernet0/0/2]int e0/0/3
[SW1-Ethernet0/0/3]vlan 20
[SW1-vlan20]int e0/0/3
[SW1-Ethernet0/0/3]p l a
[SW1-Ethernet0/0/3]p d v 20
[SW1-Ethernet0/0/3]int e0/0/1
[SW1-Ethernet0/0/1]p l t
[SW1-Etherne