工作中常用的配置JUNIPER配置
###############################################
1.灵活QinQ(SVLAN)配置模板
interfaces {
ge-x/y/z{
flexible-vlan-tagging; #接口支持灵活QinQ功能
gigether-options {
ethernet-switch-profile {
tag-protocol-id 0x8100; #缺省type为0x8100 不需要配置
}
}
unit 1 {
vlan-tags outer 0x8100.100 inner 0x8100.1; #QinQ配置
}
unit 2 {
vlan-id 200; #Dot1Q配置
}
}
}
#########################################################
2.QinQ接口二层Local-Switch配置模板(CCC)
interfaces {
ge-x/y/z {
flexible-vlan-tagging;
encapsulation extended-vlan-ccc; #封装成为extended-vlan-ccc
gigether-options {
ethernet-switch-profile {
tag-protocol-id 0x8100;
}
}
unit 1 {
vlan-tags outer 0x8100.100 inner 0x8100.1;
family ccc; #二层逻辑接口需要开启family ccc协议簇
}
unit 2 {
vlan-tags outer 0x8100.100 inner 0x8100.2;
family ccc;
}
protocols {
mpls {
interface all; #需要开启MPLS功能,否则不通
}
connections {
interface-switch CCC1-1 { #CCC connection配置
interface ge-2/2/0.1;
interface ge-2/2/1.1;
}
interface-switch CCC1-2 {
interface ge-2/2/0.2;
interface ge-2/2/1.2;
}
}
}
#####################################################################################
3.QinQ接口二层Local-Switch配置模板(Bridge方式)只有MX系列设备支持
interfaces {
ge-x/y/z{
flexible-vlan-tagging;
encapsulation flexible-ethernet-services;
gigether-options {
ethernet-switch-profile {
tag-protocol-id 0x8100;
}
}
unit 1 {
encapsulation vlan-bridge;
vlan-tags outer 0x8100.100 inner 0x8100.1;
}
unit 2 {
encapsulation vlan-bridge;
vlan-tags outer 0x8100.100 inner 0x8100.2;
}
}
}
routing-instances {
test1 {
instance-type virtual-switch;
bridge-domains {
domain1 {
domain-type bridge;
vlan-id all;
bridge-options {
mac-table-size {
200000;
}
no-mac-learning;
interface-mac-limit {
100000;
packet-action drop;
}
}
interface ge-3/0/0.1; #bridge接口
interface ge-3/1/0.1;
interface ge-3/0/0.2;
}
}
#####################################################################################
4.ip unnumbered方式实现网关地址复用配置模板
interfaces {
ge-x/y/z {
flexible-vlan-tagging;
gigether-options {
ethernet-switch-profile {
tag-protocol-id 0x8100;
}
}
unit 1 {
proxy-arp;
vlan-tags outer 0x8100.1 inner 0x8100.2001;
family inet {
unnumbered-address lo0.0 preferred-source-address 193.0.0.1; #复用Loopback地址,当loopback地址多个可选用prefer地址
}
}
unit 2 {
proxy-arp;
vlan-tags outer 0x8100.1 inner 0x8100.2002;
family inet {
unnumbered-address lo0.0 preferred-source-address 193.0.0.1;
}
}
}
}
#####################################################################################
5. 跨板多链路捆绑(LAG)配置模板
chassis {
aggregated-devices {
ethernet {
device-count 1; #配置设备 aggregate logcial device数量
}
}
}
interfaces {
ge-x/y/z {
gigether-options {
no-auto-negotiation;
802.3ad ae0; #汇聚ae0接口,二三层配置都在ae0接口配置
}
}
ge-x/y/z {
gigether-options {
no-auto-negotiation;
802.3ad ae0; #汇聚ae0接口,二三层配置都在ae0接口配置
}
}
ae0 {
flexible-vlan-tagging;
unit 0 {
vlan-tags outer 100 inner 10;
family inet {
rpf-check;
filter {
input flJflow;
}
address 192.168.11.1/24;
}
}
}
}
#####################################################################################
6. VPLS配置(M-BGP方式)配置模板
interfaces{
ge-2/2/0{
flexible-vlan-tagging;
encapsulation flexible-ethernet-services;
unit 1 {
encapsulation vlan-vpls;
vlan-id 1;
family vpls;
}
unit 2 {
encapsulation vlan-vpls; #封装成vlan-vpls
vlan-id 2;
family vpls; #开启vpls协议簇
}
}
}
bgp {
group ibgp {
type internal;
local-address 10.2.2.1;
family l2vpn { #开启M-BGP 二层VPLS业务信令传递功能
signaling;
}
neighbor 10.3.3.1;
}
}
routing-instances VPLS-1 { #建立VPLS routing-instance
instance-type vpls; #实例类型vpls
interface ge-2/2/0.1;
route-distinguisher 100:1; #MP-BGP传递需要RD和RT值
vrf-target target:100:1;
protocols vpls {
site 1 { #标识SITE ID,全局唯一,跟分配标签有关。
site-identifier 1;
interface ge-2/2/0.1;
}
}
}
No comments:
Post a Comment