设为首页收藏本站language 语言切换
查看: 5235|回复: 6
收起左侧

工作中常用的JUNIPER配置

[复制链接]
发表于 2011-8-20 10:37:17 | 显示全部楼层 |阅读模式
工作中常用的配置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;   
            }
   }
}
 楼主| 发表于 2011-8-20 10:40:02 | 显示全部楼层
沙发 2011-8-20 10:40:02 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2011-10-9 16:57:01 | 显示全部楼层
板凳 2011-10-9 16:57:01 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2011-11-24 21:24:43 | 显示全部楼层
很好的模板,谢谢!
地板 2011-11-24 21:24:43 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2012-2-17 07:35:11 | 显示全部楼层
学习一下
5# 2012-2-17 07:35:11 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2012-9-11 11:10:07 | 显示全部楼层
再多些基础配置就更好了
6# 2012-9-11 11:10:07 回复 收起回复
回复 支持 反对

使用道具 举报

发表于 2013-9-25 22:58:52 | 显示全部楼层
7# 2013-9-25 22:58:52 回复 收起回复
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-4-27 21:20 , Processed in 0.095920 second(s), 22 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表