Configuration and Printouts
root@JUNOS> show configuration routing-instances fbf
instance-type forwarding;
routing-options {
static {
route 0.0.0.0/0 next-hop 1.1.0.1;
}
}
root@JUNOS>
root@JUNOS> show configuration routing-instances nrt
instance-type vrf;
interface em0.0;
interface em1.0;
interface lo0.0;
route-distinguisher 65000:91;
vrf-import nrt-import;
vrf-export nrt-export;
routing-options {
interface-routes {
rib-group inet mixed-rib;
}
static {
route 0.0.0.0/0 next-hop 2.2.0.1;
route 58.145.0.0/16 next-hop 1.1.0.1;
}
}
forwarding-options {
family inet {
filter {
input n2f-filter;
}
}
}
root@JUNOS> show configuration routing-options
rib-groups {
mixed-rib {
import-rib [ nrt.inet.0 fbf.inet.0 ];
}
}
forwarding-table {
export pplb;
}
root@JUNOS> show configuration policy-options
policy-statement nrt-export {
from protocol [ static direct ];
then {
community add nrt;
accept;
}
}
policy-statement nrt-import {
from {
protocol bgp;
community nrt;
}
then accept;
}
policy-statement pplb {
then {
load-balance per-packet;
}
}
community nrt members target:65000:91;
root@JUNOS>
root@JUNOS> show configuration firewall
filter n2f-filter {
term A {
from {
source-address {
3.3.0.0/24;
}
}
then {
count entering_fbf_filter;
routing-instance fbf;
}
}
term B {
then {
count entering_nrt_filter;
accept;
}
}
}
root@JUNOS>
root@JUNOS>
root@JUNOS>
root@JUNOS>
root@JUNOS>
root@JUNOS>
root@JUNOS> show route table nrt /* No Default Route exists */
nrt.inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.0.1/32 *[Direct/0] 01:30:28
> via lo0.0
2.2.0.0/24 *[Direct/0] 01:30:28
> via em1.0
2.2.0.1/32 *[Local/0] 01:30:28
Local via em1.0
3.3.0.0/24 *[Direct/0] 01:30:28
> via em0.0
3.3.0.1/32 *[Local/0] 01:30:28
Local via em0.0
root@JUNOS> show route table fbf /* No Default Route exists */
fbf.inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both
1.1.0.1/32 *[Direct/0] 01:30:34
> via lo0.0
2.2.0.0/24 *[Direct/0] 01:30:34
> via em1.0
2.2.0.1/32 *[Local/0] 01:02:14
Local via em1.0
3.3.0.0/24 *[Direct/0] 01:30:34
> via em0.0
3.3.0.1/32 *[Local/0] 01:02:14
Local via em0.0
root@JUNOS>
root@JUNOS> show route forwarding-table family inet
Routing table: fbf.inet
Internet:
Destination Type RtRef Next hop Type Index NhRef Netif
default perm 0 rjct 389 1
0.0.0.0/32 perm 0 dscd 387 1
1.1.0.1/32 user 0 rtbl 401 4
2.2.0.0/24 user 0 rtbl 401 4
2.2.0.1/32 user 0 2.2.0.1 locl 432 3
3.3.0.0/24 user 0 rtbl 401 4
3.3.0.1/32 user 0 3.3.0.1 locl 428 3
224.0.0.0/4 perm 0 mdsc 388 1
224.0.0.1/32 perm 0 224.0.0.1 mcst 384 1
255.255.255.255/32 perm 0 bcst 385 1
Routing table: nrt.inet
Internet:
Destination Type RtRef Next hop Type Index NhRef Netif
default perm 0 rjct 398 1
0.0.0.0/32 perm 0 dscd 396 1
1.1.0.1/32 intf 0 1.1.0.1 locl 434 1
2.2.0.0/24 intf 0 rslv 433 1 em1.0
2.2.0.0/32 dest 0 2.2.0.0 recv 431 1 em1.0
2.2.0.1/32 intf 0 2.2.0.1 locl 432 3
2.2.0.1/32 dest 0 2.2.0.1 locl 432 3
2.2.0.255/32 dest 0 2.2.0.255 bcst 430 1 em1.0
3.3.0.0/24 intf 0 rslv 429 1 em0.0
3.3.0.0/32 dest 0 3.3.0.0 recv 427 1 em0.0
3.3.0.1/32 intf 0 3.3.0.1 locl 428 3
3.3.0.1/32 dest 0 3.3.0.1 locl 428 3
3.3.0.255/32 dest 0 3.3.0.255 bcst 426 1 em0.0
224.0.0.0/4 perm 0 mdsc 397 1
224.0.0.1/32 perm 0 224.0.0.1 mcst 393 1
255.255.255.255/32 perm 0 bcst 394 1
root@JUNOS> show firewall filter n2f-filter
Filter: n2f-filter
Counters:
Name Bytes Packets
entering_fbf_filter 0 0
entering_nrt_filter 20684 176
root@JUNOS>
root@JUNOS> ping 1.1.0.1 routing-instance nrt source 3.3.0.1
PING 1.1.0.1 (1.1.0.1): 56 data bytes
64 bytes from 1.1.0.1: icmp_seq=0 ttl=64 time=6.994 ms
64 bytes from 1.1.0.1: icmp_seq=1 ttl=64 time=0.333 ms
^C
--- 1.1.0.1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.333/3.663/6.994/3.330 ms
root@JUNOS>
root@JUNOS> show firewall filter n2f-filter
Filter: n2f-filter
Counters:
Name Bytes Packets
entering_fbf_filter 0 0
entering_nrt_filter 20684 176
root@JUNOS>
root@JUNOS> ping 1.1.0.1 routing-instance nrt source 2.2.0.1
PING 1.1.0.1 (1.1.0.1): 56 data bytes
64 bytes from 1.1.0.1: icmp_seq=0 ttl=64 time=0.468 ms
64 bytes from 1.1.0.1: icmp_seq=1 ttl=64 time=0.426 ms
^C
--- 1.1.0.1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.426/0.447/0.468/0.021 ms
root@JUNOS> show firewall filter n2f-filter
Filter: n2f-filter
Counters:
Name Bytes Packets
entering_fbf_filter 0 0
entering_nrt_filter 20684 176
root@JUNOS>