当前位置:网站首页>实验8(vlan实验)
实验8(vlan实验)
2022-07-30 23:13:00 【懒大王吃狼】
实验要求
1,PC1和pc3所在接口为access;属于vlan2;
PC2/4/5/6处于同一网段;其中PC2可以访问PC4/5/6;但PC4可以访问Pc5,不能访问PC6
2,PC5不能访问PC6
3,PC1/3与PC2/4/5/6不在同一个网段
4,所有PC通过DHCP获取IP地址,且PC1/3可以正常访问PC2/4/5/6
实验操作
一,配置交换机
SW1
vlan batch 2 to 5
int g 0/0/1
port link-type access
port default vlan 2
int g 0/0/2
port hybrid pvid vlan 3
port hybrid untagged vlan 3 to 5
int g 0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 5
int g 0/0/4
port hybrid tagged vlan 2
port hybrid untagged vlan 3 to 5
SW2
vlan batch 2 to 5
int g 0/0/1
port link-type access
port default vlan 2
int g 0/0/2
port hybrid pvid vlan 4
port hybrid untagged vlan 3 to 4
int g 0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 5
int g 0/0/4
port link-type trunk
port trunk allow-pass vlan 2 to 5
SW3
vlan batch 2 to 5
int g 0/0/1
port hybrid pvid vlan 4
port hybrid untagged vlan 3 to 4
int g 0/0/2
port hybrid pvid vlan 5
port hybrid untagged vlan 3 5
int g 0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 5
二,配置路由器
[r1]dhcp enable
[r1]ip pool 2
[r1-ip-pool-2]network 34.1.1.0 mask 24
[r1-ip-pool-2]gateway-list 34.1.1.1
[r1-ip-pool-2]dns-list 8.8.8.8
[r1-ip-pool-2]q
[r1]ip
[r1]ip poo
[r1]ip pool 345
Info: It’s successful to create an IP address pool.
[r1-ip-pool-345]network 12.1.1.0 mask 24
[r1-ip-pool-345]gateway-list 12.1.1.1
[r1-ip-pool-345]dns-list 8.8.8.8
[r1-ip-pool-345]q
配置接口IP地址
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 12.1.1.1 24
[r1-GigabitEthernet0/0/0]q
[r1]interface g0/0/0.1
[r1-GigabitEthernet0/0/0.1]ip address 34.1.1.1 24
[r1-GigabitEthernet0/0/0.1]dot1q termination vid 2
[r1-GigabitEthernet0/0/0.1]arp broadcast enable
[r1-GigabitEthernet0/0/0.1]q
开启DHCP服务
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]dhcp select global
[r1-GigabitEthernet0/0/0]int g0/0/0.1
[r1-GigabitEthernet0/0/0.1]dhcp select global
[r1-GigabitEthernet0/0/0.1]q
三,检验
边栏推荐
- 智能创意中的尺寸拓展模块
- [0x800706D9] solution appears in Microsoft Store
- 【LeetCode】64. 最小路径和 - Go 语言题解
- 2022.7.28
- $\text{ARC 145}$
- 雪佛兰开拓者,安全保障温暖你的家庭出行的第一选择
- IJCAI2022 Tutorial | Spoken Language Comprehension: Recent Advances and New Fields
- 详解操作符
- CPM:A large-scale generative chinese pre-trained lanuage model
- # # yyds dry goods inventory interview will brush TOP101: to determine whether there is a part of the list
猜你喜欢
Reverse linked list - head insertion inversion method
Go1.18升级功能 - 模糊测试Fuzz 从零开始Go语言
Go语学习笔记 - gorm使用 - 事务操作 Web框架Gin(十一)
StoneDB 为何敢称业界唯一开源的 MySQL 原生 HTAP 数据库?
mysql跨库关联查询(dblink)
2021GDCPC广东省大学生程序设计竞赛 H.History
Excel basic study notes
PhpMetrics usage
Golang go-redis cluster模式下不断创建新连接,效率下降问题解决
2022中国物流产业大会暨企业家高峰论坛在杭州举办!
随机推荐
正则表达式语法及使用
VS2017编译Tars测试工程
BFS题单总结
反转链表-就地逆置法
牛逼的公司都在用的绩效管理法OKR
Apache Doris series: detailed steps for installation and deployment
Apache Doris系列之:深入认识实时分析型数据库Apache Doris
"NIO Cup" 2022 Nioke Summer Multi-School Training Camp 4 DHKLN
【无标题】
CPM:A large-scale generative chinese pre-trained lanuage model
vscode上利用screen命令跑代码
ML之shap:基于FIFA 2018 Statistics(2018年俄罗斯世界杯足球赛)球队比赛之星分类预测数据集利用RF随机森林+计算SHAP值单样本力图/依赖关系贡献图可视化实现可解释性之攻略
如何在 AWS 中应用 DevOps 方法?
ML's shap: Based on FIFA 2018 Statistics (2018 Russia World Cup) team match star classification prediction data set using RF random forest + calculating SHAP value single-sample force map/dependency c
Successfully solved ImportError: always import the name '_validate_lengths'
2022牛客暑期多校训练营1 J Serval and Essay
EasyExcel comprehensive course combat
Gxlcms audio novel system/novel listening system source code
leetcode(刷题篇13)
智能创意中的尺寸拓展模块