当前位置:网站首页>vlan间路由(讲解+验证)
vlan间路由(讲解+验证)
2022-07-27 06:16:00 【孤城286】
目录
一、底层原理分析:
涉及知识: arp协议、arp应答出现的原因、arp应答过程、豁免ARP详细解答附图(建议电脑观看)_孤城286的博客-CSDN博客_arp响应
(39条消息) vlan 间路由+单臂路由(实验思路讲解+配置)_孤城286的博客-CSDN博客_配置单臂路由器vlan间路由


—————————————————————————————————————————————————————————
二、实验
模拟器:Cisco Packet Tracer
(1)网络拓扑:

(2)主要思路:
- ①配置两台PC和一台服务器的IP和网关
- ②在三台交换机创建相同的VLAN,互联的链路封装trunk链路
- ③对应的接口分别划进对应的VLAN,在核心交换机上(vlan里面)配置ip地址, 作为VLAN 里终端(PC和服务器)的网关
- ④ 核心交换机开启路由功能
(3)实验底层原理解析

(3)主要配置命令:
- ——1. 三台交换机配置相同vlan
sw2(config)#vlan 10 ---------创建vlan 10
sw2(config-vlan)#name pc1 ---------为vlan命名
- ——2.交换机对应的接口划进对应vlan中:
sw2(config)#interface f0/1 ----------进入到f0/1接口
sw2(config-if)#switchport mode access -------将接口变为接入模式
sw2(config-if)#switchport accesss vlan 10 ------将接口划进vlan 10
sw2(config-if)#no shutdown-----------将接口打开
sw2#show vlan brief -------查看接口划进vlan的情况
- ——3.交换机之间封装trunk链路
接入交换机:
sw2(config)#interface f0/1 ----------进入到f0/1接口
sw2(config-if)#switchport mode trunk -------将接口封装trunk
核心交换机 接口封装trunk需要先将接口trunk类型 改为dot1q类型也就是说802.1q
sw1(config)#interface range f0/2 , f0/3
sw1(config-if-range)#switchport trunk encapsulation dot1q
sw1(config-if-range)#switchport mode trunk
sw1#show interfaces trunk-------查看trunk链路的状态
- ——核心交换机配置网关:
sw1(config)#interface vlan 10
sw1(config-if)#ip add 192.168.10.1 255.255.255.0
sw1(config-if)#no sh
sw1(config)#ip routing -----------开启路由功能(三层交换机,需开启路由转发功能)
注:
- 查看ARP表:arp -a
- 查看MAC地址表:show mac address-table
- 查看路由表:show ip route
边栏推荐
- 用oracle来演示外键的使用
- MySQL2
- Please ask the big guys a question. The pgsqlcdc task can't monitor changes after running for a period of time. Just restart it. What should I do
- UiAutomator常用类之UI手势动作
- Binary tree -- natural search semantics (1) Basics
- Want to sink into redis hash and write in the attributes and values of the object. Do the bosses have a demo?
- The qualities that a technical manager should have (guess)
- 整体二分?
- 【QT】capture.obj:-1: error: LNK2019: 无法解析的外部符号 __imp_htons(解决方法)
- C4D动画如何提交云渲染农场快速渲染?
猜你喜欢
随机推荐
oracle的触发器的使用举例
How MySQL executes query statements
Vscode creates golang development environment and debug unit test of golang
C程序代码的内存结构分析
No.0 training platform course-2. SSRF Foundation
A Competitive Swarm Optimizer for Large Scale Optimization
Codeforces Round #804 (Div. 2)(5/5)
MySQL optimization SQL related (continuous supplement)
SQLite 常用功能整合
如何取得对象的DDL信息
海康h9摄像头用xshell无法连接(没有启用ssh)
“蔚来杯“2022牛客暑期多校训练营1
Golang controls the number of goroutines and obtains processing results
Synchronized锁
The qualities that a technical manager should have (guess)
word-wrap:break-word 换行在各浏览器兼容的问题
Automatically generate UML sequence diagram according to text (draw.io format)
Pytorch notes: td3
oracle清理含有引用分区的表的数据库磁盘空间
VLAN trunk实验









