Beruflich Dokumente
Kultur Dokumente
Example 1:
1. clear all state and specify jtree instance
SBR(bengal uart)# jsim reset full 0
1. set the ifl
SBR(bengal uart)# show interfaces
SBR(bengal uart)# set jsim iif 7
1. set the other packet fields in the key buffer
SBR(bengal uart)# set jsim ipdst 11.0.0.2
SBR(bengal uart)# set jsim ipsrc 5.0.0.2
1. perform the lookup
SBR(bengal uart)# jsim lookup verbose
Example 2 (mpls):
SBR(bengal uart)# set jsim iif 7
SBR(bengal uart)# set jsim protocol tag
SBR(bengal uart)# set jsim mpls-tag 0x000100ff
SBR(bengal uart)# jsim lookup verbose
Example 3 (ipv6):
SBR(bengal uart)# set jsim iif 7
SBR(bengal uart)# set jsim protocol inet6
SBR(bengal uart)# set jsim ip6dst 8000::ee46
SBR(bengal uart)# jsim lookup verbose
Example 4 (Gibson, packet crossing the fabric):
1. PFE0: wan->fabric
GFPC7(chicago uart)# jsim reset full 0
GFPC7(chicago uart)# set jsim iif 7
GFPC7(chicago uart)# set jsim ipdst 17.2.0.2
GFPC7(chicago uart)# jsim lookup verbose
Lookup terminated normally:
forward to fabric qid 15 (vqid=271)
lout_key=0x00002e (token=0x0000b8) plp=0 qos=0x00
1. PFE1: fabric->wan based on token from above lookup
GFPC7(chicago uart)# jsim reset full 1
GFPC7(chicago uart)# set jsim iif 7
GFPC7(chicago uart)# set jsim fabric-token 0xb8
NOTE: in JUNOS 5.x the fabric-token keyword does not exist so
do something like the following instead:
GFPC7(chicago uart)# set jsim key-buffer 11 byte 0xb8
Some math..
Outgoing FPC = (VQID - 256) / 2
= (269 - 256) / 2
= FPC 6
If the destination is out of the same PFE, Lout_key is the hardware L2 descriptor, VQID is the stream id
If the destination is out of a different PFE (as in this case), Lout_key is the software nh index, VQID is the
destination PFE
FFPC6(Nemesis-re0 vty)# set jsim fabric-token 0x000834 <--- From the lout_key above
FFPC6(Nemesis-re0 vty)# set jsim input-port fabric
<<<<<
<<<<<
<<<<<
src_port: 0
dst_port: 0
tos: 0x00
fragment: 0x0000
tcp_flags: 0x00
color: green
<---
Encap
-----------Ethernet
MTU
---1516
Nexthop Status:
Index: 16423 (0x4027), Slot: 6
^^^^^^
So the L2 descriptor provided by JSIM points to the correct output interface, indicating that the
route lookup happened correctly.
JSIM when ingress is I-chip based FPC and egress is R-chip based FPC
After performing JSIM on the ingress PFE, left shift the token obtained by 2.
==============================================================================
Lookup terminated normally:
forward to sid 71,
lout_key=0x00013680 (Fabric) proto 0
dp=0 qn=7
= 0x4DA00
| 193.193.1.0/30
|-------|
With the setup as above, we perform jsim on nemesis for an mpls packet received from panthers on interface ge6/2/0
Key Buffer:
rewrite0: 0x00
rewrite1: 0x00
rewrite2: 0x00
rewrite3: 0x00
pktlen: 0
sample mask: 0x00
l3rw: 0x00, l3n: 0
Qn: 0x07, dp: 0x0
PolRes: 0x00
flags:
iif: 0x000000
token: 0x000000
label0: 0x64fcf
exp0: 0x0
S0: 0
label1: 0x00000
exp1: 0x0
S1: 0
label2: 0x00000
exp2: 0x0
S2: 0
exp0: 0x0
src_addr: 0.0.0.0
dst_addr: 0.0.0.0
src_port: 0
dst_port: 0
ip_proto: 0
lookup verbose
Description
----------nh: TID itable tid=12 offset=-7
itable address (seg 0)
itable descriptor addr=0x008784 size=32768 idx_bits=15 bit_offset=1
lookup index=0
nh: TID itable tid=22 offset=8
itable address (seg 0)
itable descriptor addr=0x008204 size=256 idx_bits=8 bit_offset=4
lookup index=207
nh: jtree attached offset=-1 addr=0x008660
jtree_ptr attached btt=20 addr=0x2b4e38
jtree_ptr child plen=24 addr=0x12df54
comparing key 0x64fcf000/24 against prefix 0x64fcf000: match
nh: extended buff-modify intermediate-nh addr=0x352ad0
Buffer Translate: write kb(8), off 44, bits 3, data 0x7fff8
nh: final sid=32 lout_key=0x000104
So the final lout key is 0x104 since in this case the output interface is on the same PFE.
Encap
-----------Ethernet
<<<<<<
MTU
---1516
Nexthop Status:
Index: 260 (0x104), Slot: 6
^^^
*
*
*
0
1
2
3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
|
L2Token
| L2-Token|
Info Byte
|
|
| extn
|
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
BridgeDomain-id (bd-id)
| reserved
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Destination MAC
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Destination MAC
|
Source MAC
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
Source MAC
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Control Byte |
Unused
|
Ethernet Type
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
IP Destination Address
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
IP Source Address
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 12-bit service vlan |1p bits|
Customer Vlan ID
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
IP TOS
| IP Protocol |
TCP Flags
|
Unused
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
TCP Source Port
|
TCP Destination Port
|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
16 - 19
20 - 23
24 - 27
28 - 31
32 - 35
36 - 39
40 - 43
44 - 47
48 - 51
Setup
+----------+
ge-3/1/1.1|
---------|
Obelix |
|
+----------+
ae11
|-------------|
|-------------|
ae12
+-----------+
|
| Automatix |-----|
+-----------+
We perform JSIM lookup for a packet recieved on the CE interface (ge-3/1/1.1) on Obelix destined for a MAC
learned from the remote PE.
L2token = 0x0F09
BD
= 0x0773
Adjusting the 1st 4 bytes of the keybuffer so that the l2token takes 19 bits
------------------------------------------------------------------------------00000001 11100001 00100000 00000000
01
E1
20
00
<--- Vlan ID 1
keyb
e0db0005
00000000
00000000
SID
FPC0
SID
FPC1
64
66
65
67
I-Chip0
I-Chip2
I-Chip1
I-Chip3
ge-0/0/0..9
ge-0/1/0..9
ge-0/2/0..9
ge-0/3/0..9
68
70
69
71
I-Chip0
I-Chip2
I-Chip1
I-Chip3
ge-1/0/0..9
ge-1/1/0..9
ge-1/2/0..9
ge-1/3/0..9
SID
72
74
73
75
FPC2
I-Chip0
I-Chip2
I-Chip1
I-Chip3
ge-2/0/0..9
ge-2/1/0..9
ge-2/2/0..9
ge-2/3/0..9
SID
76
78
77
79
FPC3
I-Chip0
I-Chip2
I-Chip1
I-Chip3
ge-3/0/0..9
ge-3/1/0..9
ge-3/2/0..9
ge-3/3/0..9
SID
80
82
81
83
FPC4
I-Chip0
I-Chip2
I-Chip1
I-Chip3
ge-4/0/0..9
ge-4/1/0..9
ge-4/2/0..9
ge-4/3/0..9
SID
84
86
85
87
FPC5
I-Chip0
I-Chip2
I-Chip1
I-Chip3
ge-5/0/0..9
ge-5/1/0..9
ge-5/2/0..9
ge-5/3/0..9
SID
88
90
89
91
FPC6
I-Chip0
I-Chip2
I-Chip1
I-Chip3
ge-6/0/0..9
ge-6/1/0..9
ge-6/2/0..9
ge-6/3/0..9
SID
92
94
93
95
FPC7
I-Chip0
I-Chip2
I-Chip1
I-Chip3
ge-7/0/0..9
ge-7/1/0..9
ge-7/2/0..9
ge-7/3/0..9
SID
96
98
97
99
FPC8
I-Chip0
I-Chip2
I-Chip1
I-Chip3
ge-8/0/0..9
ge-8/1/0..9
ge-8/2/0..9
ge-8/3/0..9
SID
100
102
101
103
SID
104
106
105
107
FPC10
I-Chip0
I-Chip2
I-Chip1
I-Chip3
ge-10/0/0..9
ge-11/1/0..9
ge-12/2/0..9
ge-13/3/0..9
SID
108
110
109
111
FPC9
I-Chip0
I-Chip2
I-Chip1
I-Chip3
FPC11
I-Chip0
I-Chip2
I-Chip1
I-Chip3
ge-9/0/0..9
ge-9/1/0..9
ge-9/2/0..9
ge-9/3/0..9
ge-11/0/0..9
ge-11/1/0..9
ge-11/2/0..9
ge-11/3/0..9
<-----
Protocol
Encap
MTU
---------- ------------ ---VPLS->MPLS
Ethernet 9186
Encap
------------
MTU
----
117836
Unicast
xe-7/1/0.0
VPLS->MPLS
Ethernet
9186
Nexthop Status:
Index: 5005 (0x138d), Slot: 7
^^^^^
So the L2 descriptor provided by JSIM is the same as that for the actual output interface which indicates
the VPLS lookup happened correctly