首页 > 其他分享 >配置MUX VLAN配置案例

配置MUX VLAN配置案例

时间:2023-11-09 14:39:43浏览次数:31  
标签:vlan 配置 VLAN MUX DeviceD 10GE1 port DeviceC

组网需求

如图4-25所示,用户希望网络内主机均可以访问Internet,并且VLAN3内的主机可以互相访问,VLAN4内的主机不能互访。


微思 2002年成立,专业IT认证培训21年!

公众号【厦门微思网络】


本例中interface1、interface2、interface3分别代表10GE1/0/1、10GE1/0/2、10GE1/0/3。


配置MUX VLAN配置案例_组网


图4-25 配置MUX VLAN组网图


操作步骤



  1. 配置MUX VLAN。

  # 在DeviceB上创建VLAN 2~VLAN 4,配置VLAN 2为主VLAN,VLAN 3为互通型从VLAN,VLAN4为隔离型从VLAN。

<HUAWEI> system-view

[HUAWEI] sysname DeviceB

[DeviceB] vlan batch 2 3 4

[DeviceB] vlan 2

[DeviceB-vlan2] mux-vlan

[DeviceB-vlan2] subordinate group 3

[DeviceB-vlan2] subordinate separate 4

[DeviceB-vlan2] quit

# 在DeviceC上创建VLAN 2~VLAN 4,配置VLAN 2为主VLAN,VLAN 3为互通型从VLAN,VLAN 4为隔离型从VLAN。

<HUAWEI> system-view

[HUAWEI] sysname DeviceC

[DeviceC] vlan batch 2 3 4

[DeviceC] vlan 2

[DeviceC-vlan2] mux-vlan

[DeviceC-vlan2] subordinate group 3

[DeviceC-vlan2] subordinate separate 4

[DeviceC-vlan2] quit

# 在DeviceD上创建VLAN 2~VLAN 4,配置VLAN 2为主VLAN,VLAN 3为互通型从VLAN,VLAN 4为隔离型从VLAN。

<HUAWEI> system-view

[HUAWEI] sysname DeviceD

[DeviceD] vlan batch 2 3 4

[DeviceD] vlan 2

[DeviceD-vlan2] mux-vlan

[DeviceD-vlan2] subordinate group 3

[DeviceD-vlan2] subordinate separate 4

[DeviceD-vlan2] quit

  1. 配置DeviceB的上行口interface1加入VLAN 2,并使能MUX VLAN功能,配置下行口interface2和interface3允许VLAN 2~VLAN 4通过。

[DeviceB] interface 10ge 1/0/1

[DeviceB-10GE1/0/1] portswitch

[DeviceB-10GE1/0/1] port link-type trunk

[DeviceB-10GE1/0/1] port trunk allow-pass vlan 2

[DeviceB-10GE1/0/1] port mux-vlan enable vlan 2

[DeviceB-10GE1/0/1] quit

[DeviceB] interface 10ge 1/0/2

[DeviceB-10GE1/0/2] portswitch

[DeviceB-10GE1/0/2] port link-type trunk

[DeviceB-10GE1/0/2] port trunk allow-pass vlan 2 to 4

[DeviceB-10GE1/0/2] quit

[DeviceB] interface 10ge 1/0/3

[DeviceB-10GE1/0/3] portswitch

[DeviceB-10GE1/0/3] port link-type trunk

[DeviceB-10GE1/0/3] port trunk allow-pass vlan 2 to 4

[DeviceB-10GE1/0/3] quit

  1. 配置DeviceC的上行口interface1允许VLAN 2~VLAN 4通过,配置下行口interface2和interface3加入VLAN 3并在接口下使能MUX VLAN功能。

[DeviceC] interface 10ge 1/0/1

[DeviceC-10GE1/0/1] portswitch

[DeviceC-10GE1/0/1] port link-type trunk

[DeviceC-10GE1/0/1] port trunk allow-pass vlan 2 to 4

[DeviceC-10GE1/0/1] quit

[DeviceC] interface 10ge 1/0/2

[DeviceC-10GE1/0/2] portswitch

[DeviceC-10GE1/0/2] port link-type access

[DeviceC-10GE1/0/2] port default vlan 3

[DeviceC-10GE1/0/2] port mux-vlan enable vlan 3

[DeviceC-10GE1/0/2] quit

[DeviceC] interface 10ge 1/0/3

[DeviceC-10GE1/0/3] portswitch

[DeviceC-10GE1/0/3] port link-type access

[DeviceC-10GE1/0/3] port default vlan 3

[DeviceC-10GE1/0/3] port mux-vlan enable vlan 3

[DeviceC-10GE1/0/3] quit

  1. 配置DeviceD的上行口interface1允许VLAN 2~VLAN 4通过,配置下行口interface2和interface3加入VLAN 4并在接口下使能MUX VLAN功能。

[DeviceD] interface 10ge 1/0/1

[DeviceD-10GE1/0/1] portswitch

[DeviceD-10GE1/0/1] port link-type trunk

[DeviceD-10GE1/0/1] port trunk allow-pass vlan 2 to 4

[DeviceD-10GE1/0/1] quit

[DeviceD] interface 10ge 1/0/2

[DeviceD-10GE1/0/2] portswitch

[DeviceD-10GE1/0/2] port link-type access

[DeviceD-10GE1/0/2] port default vlan 4

[DeviceD-10GE1/0/2] port mux-vlan enable vlan 4

[DeviceD-10GE1/0/2] quit

[DeviceD] interface 10ge 1/0/3

[DeviceD-10GE1/0/3] portswitch

[DeviceD-10GE1/0/3] port link-type access

[DeviceD-10GE1/0/3] port default vlan 4

[DeviceD-10GE1/0/3] port mux-vlan enable vlan 4

[DeviceD-10GE1/0/3] quit

  1. 在DeviceA上创建VLANIF 2,配置IP地址为10.1.1.1 24,并配置接口interface1加入VLAN 2。

<HUAWEI> system-view

[HUAWEI] sysname DeviceA

[DeviceA] vlan batch 2

[DeviceA] interface 10ge 1/0/1

[DeviceA-10GE1/0/1] portswitch

[DeviceA-10GE1/0/1] port link-type trunk

[DeviceA-10GE1/0/1] port trunk allow-pass vlan 2

[DeviceA-10GE1/0/1] quit

[DeviceA] interface vlanif 2

[DeviceA-Vlanif2] ip address 10.1.1.1 24

[DeviceA-Vlanif2] quit

如果MUX VLAN中有多个Group VLAN,并且Group VLAN之间需要互通,则需要在DeviceA的VLANIF接口下执行命令arp proxy intra-vlan enable配置VLAN内ARP Proxy功能。

  1. 配置网络内主机的IP地址,使其和DeviceA上VLANIF 2接口的IP地址同网段。

检查配置结果

  • Host1、Host2、Host3、Host4可以访问Internet。
  • Host1和Host2可以互相ping通。
  • Host3和Host4互相ping不通。
  • VLAN3内主机(Host1、Host2)和VLAN4内主机(Host3、Host4)互相ping不通。

配置脚本

DeviceA

sysname DeviceA

vlan batch 2

interface Vlanif2

ip address 10.10.10.1 255.255.255.0

interface 10GE1/0/1

port link-type trunk

port trunk allow-pass vlan 2


DeviceB

sysname DeviceB

vlan batch 2 to 4

vlan 2

mux-vlan

subordinate separate 4

subordinate group 3

interface 10GE1/0/1

port link-type trunk

port trunk allow-pass vlan 2

port mux-vlan enable vlan 2

interface 10GE1/0/2

port link-type trunk

port trunk allow-pass vlan 2 to 4

interface 10GE1/0/3

port link-type trunk

port trunk allow-pass vlan 2 to 4


DeviceC

sysname DeviceC

vlan batch 2 to 4

vlan 2

mux-vlan

subordinate separate 4

subordinate group 3

interface 10GE1/0/1

port link-type trunk

port trunk allow-pass vlan 2 to 4

interface 10GE1/0/2

port default vlan 3

port mux-vlan enable vlan 3

interface 10GE1/0/3

port default vlan 3

port mux-vlan enable vlan 3


DeviceD

sysname DeviceD

vlan batch 2 to 4

vlan 2

mux-vlan

subordinate separate 4

subordinate group 3

interface 10GE1/0/1

port link-type trunk

port trunk allow-pass vlan 2 to 4

interface 10GE1/0/2

port default vlan 4

port mux-vlan enable vlan 4

interface 10GE1/0/3

port default vlan 4

port mux-vlan enable vlan 4






标签:vlan,配置,VLAN,MUX,DeviceD,10GE1,port,DeviceC
From: https://blog.51cto.com/u_16331325/8278488

相关文章

  • C3P0连接池详解及配置
    数据库连接是一个耗费大量资源且相当慢的操作,所以为了提高性能和连接速度,诞生了连接池这样的概念。在多用户并发操作过程中,连接池尤为重要。它是将那些已连接的数据库连接存放在一个容器里(连接池),这样以后别人要连接数据库的时候,将不会重新建立数据库连接(这样蜗牛的慢动作谁都受......
  • maven2 配置M2_REPO
    1、手动创建本地仓库的地址为:d:/m2/repository 2、从windows的环境变量中增加了:M2_REPO=d:/m2/repository,同时把这个变量增加到path变量中。3、修改d:/maven/conf/setting.xml文件,在<localRepository>节点下新增一行:代码:<localRepository>d:/m2/repository</lo......
  • Apache php配置
    window下配置apache+php+mysql运行环境一准备 1下载apachehttp://httpd.apache.org/download.cgi#apache24httpd-2.2.22-win32-x86-openssl-0.9.8t.msi openssl表示带有openssl模块,利用openssl可给Apache配置SSL安全链接 2下载phphttp://windows.php.net/downloads/relea......
  • 多tomcat配置
    /**多tomcat配置(举例两个更多以此类推)*/每个tomcat对应一个文件夹不能再tomcat文件夹下面建立文件夹再放一个tomcatvim/etc/profile在最后加入以下代码(前面不要留空格)##########firsttomcat##########CATALINA_BASE=/home/tomcat/hbManageCAT......
  • SpringMVC中Velocity的配置
    pom.xml所需velocity的jar<dependency> <groupId>org.apache.velocity</groupId> <artifactId>velocity</artifactId> <version>1.7</version> </dependency> <dependency> <groupId>org.apache.ve......
  • 2023码尚教育接口自动化框架的实现源码分享pytest+allure+jenkins几乎零代码少量的代
    本框架适合对Pytest有大概认识(比如看完X站3天课程的水平),职场新人没有雄厚的资本去参加专业的培训、功能测试转自动化测试、开发转测试的小伙伴们。首先介绍下这个框架的使用,看看是不是你所需要的。第一步、添加模块PY文件,编写接口代码。classTestJuhe: #upwei:fanfanzb2023......
  • Nginx安装、配置及使用总结
    Nginx的安装、配置及使用总结:Nginx是一个高性能的HTTP及反向代理服务器,也是IMAP/POP3/SMTP代理服务器。在高并发情况下,Nginx突出了它的高性能和稳定性,对比同类服务器技术而言,它是很多国内大中型网站首选的服务器环境。和往常一样,在总结一门新技术时都会先从它的环境配置及使用开始......
  • SqlServer开启远程连接配置
    第一步:打开配置管理器第二步:开启端口监听第三步:设置所有端口均使用1433(或者其他)......
  • Kali 虚拟机网络配置
    1.虚拟机三种网络配置方式1.1桥接模式虚拟机和物理机同时直接连接物理网络(均作为独立主机)1.2NAT模式物理主机作为路由器为虚拟机分配ip地址,虚拟机通过物理主机上网1.3仅主机模式虚拟机仅与物理主机通信,与外部网络隔离,构成内网2.实验2.1Kali虚拟机采用桥接模式;物理机连接校......
  • 【django开发】知识经验总结共50页md文档。今日分享:django配置和数据库操作详解
    Django的主要目的是简便、快速的开发数据库驱动的网站。它强调代码复用,多个组件可以很方便的以"插件"形式服务于整个框架,Django有许多功能强大的第三方插件,你甚至可以很方便的开发出自己的工具包。这使得Django具有很强的可扩展性。它还强调快速开发和DRY(DoNotRepeatYourself)原......