SlideShare una empresa de Scribd logo
1 de 3
详解二次封装 VLAN 技术——QINQ


QinQ 是对 802.1Q 的扩展,其核心思想是将用户私网 VLAN tag 封装到公网 VLAN tag 上,报
文带着两层 tag 穿越服务商的骨干网络,从而为用户提供一种较为简单的二层 VPN 隧道。其
特点是简单而易于管理,不需要信令的支持,仅仅通过静态配置即可实现,特别适用于小
型的,以三层交换机为骨干的企业网或小规模城域网。图 1 为基于传统的 802.1Q 协议的网
络,假设某用户的网络 1 和网络 2 位于两个不同地点,并分别通过服务提供商的 PE1、PE2
接入骨干网,如果用户需要将网络 1 的 VLAN200-300 和网络 2 的 VLAN200-300 互联起来,
  那么必须将 CE1、PE1、P 和 PE2、CE2 的相连端口都配置为 Trunk 属性,并允许通过
VLAN200-300,这种配置方法必须使用户的 VLAN 在骨干网络上可见,不仅耗费服务提供商
宝贵的 VLAN ID 资源(一共只有 4094 个 VLAN ID 资源),而且还需要服务提供商管理用户
          的 VLAN 号,用户       没有自己规划 VLAN 的权利。




                              图一

    为了解决上述问题,QinQ 协议向用户提供一个唯一的公网 VLAN ID,这个特殊的 VLAN
ID 被称作 Customer-ID,将用户私网 VLAN tag 封装在这个新的 Customer-ID 中,依靠它在
 公网中传播,用户私网 VLAN ID 在公网中被屏蔽,从而大大地节省了服务提供商紧缺的
                     VLAN ID 资源,如图 2 所示。




  在 QinQ 模式下,PE 上用于用户接入的端口被称作用户端口。       在用户端口上使能 QinQ 功
能,并为每个用户分配一个 Customer-ID,此处为 3,不同的 PE 上应该为同一网络用户分
  配相同的 Customer-ID.当报文从 CE1 到达 PE1 时,带有用户内部网络的 VLAN tag
200-300,由于使能了 QinQ 功能,PE 上的用户端口将再次为报文加上另外一层 VLAN tag,
 其 ID 就是分配给该用户的 Customer-ID.此后该报文在服务提供商网络中传播时仅在 VLAN
3 中进行且全程带有两层 VLAN tag(内层为进入 PE1 时的 tag,外层为 Customer-ID),但
用户网络的 VLAN 信息对运营商网络来说是透明的。当报文到达 PE2,从 PE2 上的客户端口
转发给 CE2 之前,外层 VLAN tag 被剥去,CE2 收到的报文内容与 CE1 发送的报文完全相同 。
PE1 到 PE2 之间的运营商网络对于用户来说,其作用就是提供了一条可靠的二层链路。可见,
                     使用 QinQ 组建 VPN 具有如下特点:
● 无需信令来维持隧道的建立,通过简单的静态配置即可实现,免去了繁杂的配置,维护
                              工作。
● 运营商只需为每个用户分配一个 Customer-ID,提升了可以同时支持的用户数目;而用
户 也 具 有 选 择 和 管 理 VLAN ID 资 源 的 最 大 自 由 度 ( 从 1-4096 中 任 意 选 择 ) 。
● 在运营商网络的内部,P 设备无需支持 QinQ 功能,即传统的三层交换机完全可以满足
需    求     ,  极    大  地   保   护     了  运   营   商    的   投   资    。
● 户网络具有较高的独立性,在服务提供商升级网络时,用户网络不必更改原有的配置。
因此,无论是对于运营商还是用户来说,采用 QinQ 方式组建 VPN 都是一种低成本,简便易
行,易于管理的理想方式。QinQ 典型组网。下面通过一个典型的组网方案来说明 QinQ 的应
用。如图 3 所示,该网有两个用户,用户 1 需要将自己在 A 点的 VLAN 1-100 和 D 点的 VLAN
1-100 连接起来,用户 2 需要将自己在 B 点的 VLAN 1-200 和 C 点的 VLAN 1-200 连接起来,
传统的 802.1Q 组网是不可能实现这一需求的,因为两个用户所使用的 VLAN ID 号有冲突,
但         是利用 QinQ 却可轻易地实现这一需求。




    在图 3 中,中间的网络为服务提供商的网络,它由四台 S3552 实现 VPN 用户的接入
(网络中可能还有其它交换机,此处为简单起见,略去),相互之间通过环状千兆链路连
接实现链路备份,使能 STP 协议。这四台设备之间通过 Trunk 端口连接,可透传任意 VLAN
报文,为了达到自动 VLAN 学习的目的,还可启动 GVRP 协议。             需要注意的是,所有这些二层
协议只能在网络侧的端口使能,而不能在用户接入端口上使能,避免用户私有网络受到服
务       提      供       商      网       络      的       干      扰       。
  用户 1 使用 Customer-ID 30 的 QinQ 端口进行接入,用户 2 使用 Customer-ID 40 的
QinQ 端 口 进 行 接 入 , 保 证 它 们 在 公 网 上 通 过 Trunk 端 口 进 行 传 输 , 互 不 影 响 。
  用户可在私网内部运行 STP 协议,实现链路备份。例如,用户 1 的 A 点使用了两条链路
连到 S3552,STP 可自动地将一条链路断开,避免形成环路。注意,此时 S3552 的两个 QinQ
接 入 端 口 均 不 能 使 能 STP 协 议 , 这 是 因 为 它 们 属 于 用 户 私 网 拓 扑 , 与 公 网 无 关 。
            QinQ 对   其    它   特    性    的   影      响
  由于在用户接入端口使能了 QinQ,导致 VPN 用户的报文在网络上传播时带有两层 VLAN
tag,此时三层交换机的三层交换功能对于这种特殊的报文失效,因为交换机无法正确地获
取报文内携带的 IP 地址等信息。但我们不必为此担心,因为 VPN 报文只在 Customer-ID 对
应的 VLAN 内作二层转发,根本无需使用三层信息进行转发。而对于运营商网络内的其它普
通 报 文 , 由 于 属 于 不 同 的 VLAN , 三 层 转 发 不 会 受 到 影 响 。
  在使能 QinQ 的用户接入端口,仍然可以使用 acl 规则对报文进行流分类,流限速,重
定向等 qos/acl*作,这无疑有利于运营商面向不同用户提供不同层次的差别服务。对于用
户来说,选择适合自己需求的服务能够节省开支;而运营商也可以借此吸引更广泛的用户
对象。

Más contenido relacionado

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Qinq详解

  • 1. 详解二次封装 VLAN 技术——QINQ QinQ 是对 802.1Q 的扩展,其核心思想是将用户私网 VLAN tag 封装到公网 VLAN tag 上,报 文带着两层 tag 穿越服务商的骨干网络,从而为用户提供一种较为简单的二层 VPN 隧道。其 特点是简单而易于管理,不需要信令的支持,仅仅通过静态配置即可实现,特别适用于小 型的,以三层交换机为骨干的企业网或小规模城域网。图 1 为基于传统的 802.1Q 协议的网 络,假设某用户的网络 1 和网络 2 位于两个不同地点,并分别通过服务提供商的 PE1、PE2 接入骨干网,如果用户需要将网络 1 的 VLAN200-300 和网络 2 的 VLAN200-300 互联起来, 那么必须将 CE1、PE1、P 和 PE2、CE2 的相连端口都配置为 Trunk 属性,并允许通过 VLAN200-300,这种配置方法必须使用户的 VLAN 在骨干网络上可见,不仅耗费服务提供商 宝贵的 VLAN ID 资源(一共只有 4094 个 VLAN ID 资源),而且还需要服务提供商管理用户 的 VLAN 号,用户 没有自己规划 VLAN 的权利。 图一 为了解决上述问题,QinQ 协议向用户提供一个唯一的公网 VLAN ID,这个特殊的 VLAN ID 被称作 Customer-ID,将用户私网 VLAN tag 封装在这个新的 Customer-ID 中,依靠它在 公网中传播,用户私网 VLAN ID 在公网中被屏蔽,从而大大地节省了服务提供商紧缺的 VLAN ID 资源,如图 2 所示。 在 QinQ 模式下,PE 上用于用户接入的端口被称作用户端口。 在用户端口上使能 QinQ 功 能,并为每个用户分配一个 Customer-ID,此处为 3,不同的 PE 上应该为同一网络用户分 配相同的 Customer-ID.当报文从 CE1 到达 PE1 时,带有用户内部网络的 VLAN tag
  • 2. 200-300,由于使能了 QinQ 功能,PE 上的用户端口将再次为报文加上另外一层 VLAN tag, 其 ID 就是分配给该用户的 Customer-ID.此后该报文在服务提供商网络中传播时仅在 VLAN 3 中进行且全程带有两层 VLAN tag(内层为进入 PE1 时的 tag,外层为 Customer-ID),但 用户网络的 VLAN 信息对运营商网络来说是透明的。当报文到达 PE2,从 PE2 上的客户端口 转发给 CE2 之前,外层 VLAN tag 被剥去,CE2 收到的报文内容与 CE1 发送的报文完全相同 。 PE1 到 PE2 之间的运营商网络对于用户来说,其作用就是提供了一条可靠的二层链路。可见, 使用 QinQ 组建 VPN 具有如下特点: ● 无需信令来维持隧道的建立,通过简单的静态配置即可实现,免去了繁杂的配置,维护 工作。 ● 运营商只需为每个用户分配一个 Customer-ID,提升了可以同时支持的用户数目;而用 户 也 具 有 选 择 和 管 理 VLAN ID 资 源 的 最 大 自 由 度 ( 从 1-4096 中 任 意 选 择 ) 。 ● 在运营商网络的内部,P 设备无需支持 QinQ 功能,即传统的三层交换机完全可以满足 需 求 , 极 大 地 保 护 了 运 营 商 的 投 资 。 ● 户网络具有较高的独立性,在服务提供商升级网络时,用户网络不必更改原有的配置。 因此,无论是对于运营商还是用户来说,采用 QinQ 方式组建 VPN 都是一种低成本,简便易 行,易于管理的理想方式。QinQ 典型组网。下面通过一个典型的组网方案来说明 QinQ 的应 用。如图 3 所示,该网有两个用户,用户 1 需要将自己在 A 点的 VLAN 1-100 和 D 点的 VLAN 1-100 连接起来,用户 2 需要将自己在 B 点的 VLAN 1-200 和 C 点的 VLAN 1-200 连接起来, 传统的 802.1Q 组网是不可能实现这一需求的,因为两个用户所使用的 VLAN ID 号有冲突, 但 是利用 QinQ 却可轻易地实现这一需求。 在图 3 中,中间的网络为服务提供商的网络,它由四台 S3552 实现 VPN 用户的接入 (网络中可能还有其它交换机,此处为简单起见,略去),相互之间通过环状千兆链路连 接实现链路备份,使能 STP 协议。这四台设备之间通过 Trunk 端口连接,可透传任意 VLAN 报文,为了达到自动 VLAN 学习的目的,还可启动 GVRP 协议。 需要注意的是,所有这些二层 协议只能在网络侧的端口使能,而不能在用户接入端口上使能,避免用户私有网络受到服 务 提 供 商 网 络 的 干 扰 。   用户 1 使用 Customer-ID 30 的 QinQ 端口进行接入,用户 2 使用 Customer-ID 40 的 QinQ 端 口 进 行 接 入 , 保 证 它 们 在 公 网 上 通 过 Trunk 端 口 进 行 传 输 , 互 不 影 响 。   用户可在私网内部运行 STP 协议,实现链路备份。例如,用户 1 的 A 点使用了两条链路 连到 S3552,STP 可自动地将一条链路断开,避免形成环路。注意,此时 S3552 的两个 QinQ 接 入 端 口 均 不 能 使 能 STP 协 议 , 这 是 因 为 它 们 属 于 用 户 私 网 拓 扑 , 与 公 网 无 关 。
  • 3.     QinQ 对 其 它 特 性 的 影 响   由于在用户接入端口使能了 QinQ,导致 VPN 用户的报文在网络上传播时带有两层 VLAN tag,此时三层交换机的三层交换功能对于这种特殊的报文失效,因为交换机无法正确地获 取报文内携带的 IP 地址等信息。但我们不必为此担心,因为 VPN 报文只在 Customer-ID 对 应的 VLAN 内作二层转发,根本无需使用三层信息进行转发。而对于运营商网络内的其它普 通 报 文 , 由 于 属 于 不 同 的 VLAN , 三 层 转 发 不 会 受 到 影 响 。   在使能 QinQ 的用户接入端口,仍然可以使用 acl 规则对报文进行流分类,流限速,重 定向等 qos/acl*作,这无疑有利于运营商面向不同用户提供不同层次的差别服务。对于用 户来说,选择适合自己需求的服务能够节省开支;而运营商也可以借此吸引更广泛的用户 对象。