IPv4 example

 neighbor 192.168.127.128 {
    description "a quagga test peer";
    router-id 192.168.127.1;
    local-address 192.168.127.1;
    local-as 65000;
    peer-as 65000;
    graceful-restart;
 
    static {
       route 10.0.1.0/24 {
          next-hop 10.0.255.254;
       }
       route 10.0.2.0/24 {
          next-hop 10.0.255.254;
          community 30740:30740;
       }
       route 10.0.3.0/24 {
          next-hop 10.0.255.254;
          community [ 30740:30740 30740:0 ];
       }
       route 10.0.4.0/24 {
          next-hop 10.0.255.254;
          local-preference 200;
       }
       route 10.0.5.0/24 next-hop 10.0.255.254 local-preference 200;
       route 10.0.6.0/24 next-hop 10.0.255.254 community 30740:30740;
       route 10.0.7.0/24 next-hop 10.0.255.254 local-preference 200 community 30740:30740;
       route 10.0.8.0/24 next-hop 10.0.255.254 community 30740:30740 local-preference 200;
       route 10.0.7.0/24 next-hop 10.0.255.254 local-preference 200 community [30740:0 30740:30740];
       route 10.0.8.0/24 next-hop 10.0.255.254 community [30740:0 30740:30740] local-preference 200;
       route 10.0.5.0/24 next-hop 192.0.2.92 local-preference 10 community [ 0x87654321 ];
    }
 }

IPv6 example

 neighbor 2a02:b80::2 {
    description "a quagga test peer";
    router-id 192.168.127.1;
    local-address 2a02:b80::1;
    local-as 65000;
    peer-as 65534;
    hold-time 180;
    graceful-restart 1200;
 
    static {
       route 1.2.3.4/32 next-hop 5.6.7.8 med 200;
       route 2A02:B80:0:1::1/64 next-hop 2A02:B80:0:2::1 community [30740:0 30740:30740];
    }
 }

FlowSpec (RFC 5575) Example

All the protocols, icmp-types, icmp-codes and tcp-flags implemented in JunOS are understood (ripped from Junos 8.5). However no name to number translation is done for the ports.

 neighbor 192.168.127.128 {
    description "a juniper router";
    router-id 192.168.127.1;
    local-address 192.168.127.1;
    local-as 65000;
    peer-as 65534;
 
    flow {
       route optional-name-of-the-route {
          match {
             source 10.0.0.1/32;
             destination 192.168.0.1/32;
             port =80 =8080;
             destination-port >8080&<8088 =3128;
 #           destination-port [ 8080 3128 ];
             source-port >1024;
             protocol [ udp tcp ];
 #           protocol [ 4 6 ];
 #           protocol tcp;
 #           packet-length >200&<300 >400&<500;
 #           fragment not-a-fragment;
 #           fragment [ first-fragment last-fragment ];
 #           icmp-type [ unreachable echo-request echo-reply ];
 #           icmp-code [ host-unreachable network-unreachable ];
 #           tcp-flags [ urgent rst ];
 #           dscp [ 10 20 ];
 #           dscp >10&<20;
          }
          then {
 #           bytes/seconds
             rate-limit 9600;
 #           discard;
 #           redirect 65500:12345;
 #           redirect 1.2.3.4:5678;
          }
       }
    }
 }
 
Back to top
bgp/examples.txt · Last modified: 2010/02/15 11:25 by thomas_mangin
 
 
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0