HCIA VLAN配置

目录

[一、VLAN(虚拟局域网 )](#一、VLAN(虚拟局域网 ))

二、VLAN配置思路

三、配置命令

1、创建vlan

单个创建:

批量创建:

2、交换机上的各个接口划分到对应的vlan中

单个操作:

批量操作:

3、trunk干道

命令:

4、单臂路由(路由器的子接口)


一、VLAN(虚拟局域网 )

即:路由器与交换机协同工作后,将一个广播域逻辑的切分为多个

二、VLAN配置思路

1、交换机上创建vlan

2、交换机上各个接口划分到对应的vlan中

3、TRUNK(中继)干道【灵活性(范围)、地理位置】 sw-sw sw-router

4、vlan间路由 -- 路由器子接口 多层交换机SVI

三、配置命令

1、创建vlan

编号0-4095 其中1-4094可用

默认存在vlan1,且所有接口默认属于vlan1

配置命令:

单个创建:

sw1\]vlan 2 \[sw1-vlan2\]q \[sw1\]vlan 3 \[sw1-vlan3\]q #### 批量创建: \[sw1\]vlan batch 2 to 10 15 to 20 > 删除vlan: > > \[sw1\]undo vlan 2 > > \[sw1\]undo vlan 3 ## 2、交换机上的各个接口划分到对应的vlan中 #### 单个操作: \[sw1\]interface Eth0/0/1 \[sw1-Ethernet0/0/1\]port link-type access 先将该接口修改为接入模式 \[sw1-Ethernet0/0/1\]port default vlan 2 再将其划分到对应的vlan中 #### 批量操作: 批量的将多个接口划分到同一个vlan \[sw1\]port-group group-member Ethernet 0/0/3 to Ethernet 0/0/4 Ethernet 0/0/10 to Ethernet 0/0/20 \[sw1-port-group\]port link-type access \[sw1-port-group\]port default vlan 3 ## 3、trunk干道 不属于任何一个vlan,可以承载多个vlan的流量转发,过程中需要标记和识别来区分不同vlan的流量; trunk干道的封装标准 --- 802.1q(dot1q)公用 ISL-cisco私有 #### 命令: \[sw1\]interface Eth0/0/5 \[sw1-Ethernet0/0/5\]port link-type trunk 先将接口修改为trunk模式 \[sw1-Ethernet0/0/5\]port trunk allow-pass vlan 2 to 3 再定制允许列表,默认仅允许vlan1通过 ## 4、单臂路由(路由器的子接口) \[router\]interface e0/0/0.1 创建物理接口对应的子接口 \[router-Ethernet0/0/0.1\]dot1q termination vid 2 定义其管理的vlan标记号 \[router-Ethernet0/0/0.1\]ip address 192.168.1.250 24 配置该网段网关ip地址 \[router-Ethernet0/0/0.1\]arp broadcast enable 需要手工开启子接口ARP功能

相关推荐
甄超锋15 分钟前
Java ArrayList的介绍及用法
java·windows·spring boot·python·spring·spring cloud·tomcat
秃了也弱了。40 分钟前
WireShark:非常好用的网络抓包工具
网络·测试工具·wireshark
清源妙木真菌2 小时前
应用层协议——HTTP
网络·网络协议·http
cpsvps2 小时前
美国服务器环境下Windows容器工作负载基于指标的自动扩缩
windows
网硕互联的小客服5 小时前
Apache 如何支持SHTML(SSI)的配置方法
运维·服务器·网络·windows·php
etcix6 小时前
implement copy file content to clipboard on Windows
windows·stm32·单片机
许泽宇的技术分享6 小时前
Windows MCP.Net:基于.NET的Windows桌面自动化MCP服务器深度解析
windows·自动化·.net
非凡ghost7 小时前
AMS PhotoMaster:全方位提升你的照片编辑体验
windows·学习·信息可视化·软件需求
共享家95278 小时前
linux-数据链路层
linux·网络·macos
mortimer8 小时前
一次与“顽固”外部程序的艰难交锋:subprocess 调用exe踩坑实录
windows·python·ai编程