中兴交换机三层配置

devtools/2024/9/24 14:21:13/

中兴交换机三层配置

目的:将1-10端口划分到3001vlan,11-20端口划分到3002vlan中去

客户端客户端IPvlan网关
主机A88.88.1.1203001192.168.1.254
主机B192.168.100.1303002192.168.100.254
1、通过Console线登录设备
      *************************************************************************Welcome to ZXR10 Carrier-Class High-end Routing Switch of ZTE Corporation*************************************************************************ZXR10>enable		#输入enable进入特权模式,密码为:zxr10
Password:
ZXR10#configure terminal 		#进入配置模式
Enter configuration commands, one per line.  End with CTRL/Z.
ZXR10(config)#
2、创建vlan
ZXR10(config)#switchvlan-configuration     #进入vlan配置模式
ZXR10(config-swvlan)#vlan 3001				#创建3001vlan
ZXR10(config-swvlan-sub-3001)#switchport pvid gei-0/1/1/1-10    #将1-10端口划分到vlan3001ZXR10(config)#switchvlan-configuration     #进入vlan配置模式
ZXR10(config-swvlan)#vlan 3002				#创建3002vlan
ZXR10(config-swvlan-sub-3002)#switchport pvid gei-0/1/1/11-20    #将1-10端口划分到vlan3001
3、为VLAN接口配置IPV4地址(配置vlan if)
ZXR10(config)#interface vlan3001          #进入配置 VLAN 接口                                                                       
ZXR10(config-if-vlan3001)#ip address 88.88.1.254 255.255.255.0    #配置IP地址网关
ZXR10(config-if-vlan3001)#endZXR10(config)#interface vlan3002                                                                                
ZXR10(config-if-vlan3002)#ip address 192.168.100.254 255.255.255.0
ZXR10(config-if-vlan3002)#end
4、保存配置
ZXR10#write  #配置完成保存设备配置
.....[OK].
5、验证测试

​ 主机B去ping主机A

在这里插入图片描述
在这里插入图片描述

6、常用命令
#查看某一个vlan信息	“show vlan id vlan-id”
ZXR10#show vlan id 3001
VLAN     Name     PvidPorts           UntagPorts          TagPorts          
--------------------------------------------------------------------------------
3001     vlan3001 gei-0/1/1/1-2 #查看当前所有vlan信息  “show vlan”
ZXR10#show vlan 
VLAN     Name     PvidPorts           UntagPorts          TagPorts          
--------------------------------------------------------------------------------
1        vlan0001                                         
3001     vlan3001 gei-0/1/1/1-2                           
3002     vlan3002 gei-0/1/1/7-12                          xgei-0/1/1/25-28                        
3004     vlan3004 gei-0/1/1/13-15                         
3006     vlan3006 gei-0/1/1/16-18                         
3007     vlan3007 gei-0/1/1/19-22                         
3008     vlan3008 gei-0/1/1/23-24                         
3101     vlan3101 gei-0/1/1/3-6#删除vlan		“no vlan vlan-id”
ZXR10#configure terminal 
ZXR10(config)#switchvlan-configuration 
ZXR10(config-swvlan)#no vlan 100#查看VLAN接口IP地址配置 	"show ip interface vlan-id"
ZXR10#show ip interface vlan3001
vlan3001 AdminStatus is up, PhyStatus is up, line protocol is up, IPv4 protocol 
is upInternet address is 88.88.1.254/24 Broadcast address is 255.255.255.255Address determined by setup command Load-sharing bandwidth 1000000 KbpsIP MTU 1500 bytes#删除vlan的IP地址	“no ip address IP/24”ZXR10#configure terminal 
ZXR10(config)#interface  vlan100
ZXR10(config-if-vlan100)#no ip address 192.168.100.254/24#修改端口模式为将端口xgei-1/1/1/1设置为trunk模式,允许vlan 11-19和vlan 30通过
ZXR10#configure terminal 
ZXR10(config)#switchvlan-configuration 
ZXR10(config-swvlan)#interface xgei-1/1/1/1 
ZXR10(config-swvlan-if-xgei-1/1/1/1)#switchport mode trunk
ZXR10(config-swvlan-if-xgei-1/1/1/1)#switchport trunk vlan 11-19,30
ZXR10(config-swvlan-if-xgei-1/1/1/1)#exit

http://www.ppmy.cn/devtools/116540.html

相关文章

9.23每日作业

仿照string类&#xff0c;自己手动实现 My_string list.h #ifndef LIST_H #define LIST_H #include <iostream>using namespace std;class My_string { private:char *ptr;int size;int len;public://无参构造My_string();//有参构造My_string(const char * src);My_st…

EfficientFormer实战:使用EfficientFormerV2实现图像分类任务(一)

摘要 EfficientFormerV2是一种通过重新思考ViT设计选择和引入细粒度联合搜索策略而开发出的新型移动视觉骨干网络。它结合了卷积和变换器的优势&#xff0c;通过一系列高效的设计改进和搜索方法&#xff0c;实现了在移动设备上既轻又快且保持高性能的目标。这一成果为在资源受…

5.MySQL表的约束

目录 表的约束空属性&#xff08;非空约束&#xff09;默认值&#xff08;default约束&#xff09;列描述&#xff08;comment&#xff09;zerofill主键&#xff08;primary key约束&#xff09;自增长&#xff08;auto_increment&#xff09;唯一键&#xff08;unique约束&…

Java项目实战II基于Java+Spring Boot+MySQL的读书笔记共享平台(开发文档+数据库+源码)

目录 一、前言 二、技术介绍 三、系统实现 四、论文参考 五、核心代码 六、源码获取 全栈码农以及毕业设计实战开发&#xff0c;CSDN平台Java领域新星创作者&#xff0c;专注于大学生项目实战开发、讲解和毕业答疑辅导。获取源码联系方式请查看文末 一、前言 在信息爆炸…

Idea 开发工具安装

在进入正式的编程学习之前&#xff0c;还是需要先安装一个好用的编程工具的。 个人推荐两款&#xff1a;JetBrains IntelliJ IDEA 和 Visual Studio Code (VS Code) 。 我这边使用的是 JetBrains IntelliJ IDEA 2023.3 版本的&#xff0c;因为后续会同时涉及到前端代码和后端…

双向链表

目录 区别 创建结构体 初始化 判断链表结束 区别 无头单向非循环链表&#xff1a; 结构简单&#xff0c;一般不会单独用来存数据。实际中更多是作为其他数据结构的子结构&#xff0c;如哈希桶、图的邻接表等等。另外这种结构在笔试面试中出现很多 带头双向循环链表&#xf…

【机器学习(九)】分类和回归任务-多层感知机 (MLP) -Sentosa_DSML社区版

文章目录 一、算法概念二、算法原理&#xff08;一&#xff09;感知机&#xff08;二&#xff09;多层感知机1、隐藏层2、激活函数sigma函数tanh函数ReLU函数 3、反向传播算法 三、算法优缺点&#xff08;一&#xff09;优点&#xff08;二&#xff09;缺点 四、MLP分类任务实现…

简单接口自动化框架实现(Python+requests+pytest)

1、接口自动化流程 1.需求分析2.挑选需要做自动化测试的功能3.设计测试用例4.搭建自动化测试环境[可选]5.设计自动化测试项目的架构[可选]6.编写代码7.执行测试用例8.生成测试报告并分析结果 2、框架结构 --api -->封装请求 --scripts -->编写测试脚本…