Skip to content

Example: target prefix translation

r1:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
hostname r1
buggy
!
logging file debug ../binTmp/zzz39r1-log.run
!
vrf definition tester
 exit
!
vrf definition v1
 rd 1:1
 exit
!
interface ethernet1
 no description
 vrf forwarding v1
 ipv4 address 1.1.1.1 255.255.255.252
 ipv6 address 1234:1::1 ffff:ffff::
 no shutdown
 no log-link-change
 exit
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ipv4 route v1 7.7.7.0 255.255.255.0 1.1.1.2
!
ipv6 route v1 7777:: ffff:ffff:: 1234:1::2
!
!
!
!
!
!
!
!
!
!
!
server telnet tester
 security protocol telnet
 no exec authorization
 no login authentication
 vrf tester
 exit
!
!
end

r2:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
hostname r2
buggy
!
logging file debug ../binTmp/zzz39r2-log.run
!
access-list test4
 sequence 10 permit all 1.1.1.4 255.255.255.252 all 1.1.1.0 255.255.255.252 all
 exit
!
access-list test6
 sequence 10 permit all 1234:2:: ffff:ffff:: all 1234:1:: ffff:ffff:: all
 exit
!
vrf definition tester
 exit
!
vrf definition v1
 rd 1:1
 exit
!
interface ethernet1
 no description
 vrf forwarding v1
 ipv4 address 1.1.1.2 255.255.255.252
 ipv6 address 1234:1::2 ffff:ffff::
 no shutdown
 no log-link-change
 exit
!
interface ethernet2
 no description
 vrf forwarding v1
 ipv4 address 1.1.1.5 255.255.255.252
 ipv6 address 1234:2::1 ffff:ffff::
 no shutdown
 no log-link-change
 exit
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ipv4 route v1 8.8.8.8 255.255.255.255 1.1.1.6
!
ipv6 route v1 8888::8 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234:2::2
!
!
!
ipv4 nat v1 sequence 10 trgpref 7.7.7.0 8.8.8.0 255.255.255.0
!
ipv6 nat v1 sequence 10 trgpref 7777:: 8888:: ffff:ffff::
!
!
!
!
!
!
!
server telnet tester
 security protocol telnet
 no exec authorization
 no login authentication
 vrf tester
 exit
!
!
end

r3:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
hostname r3
buggy
!
logging file debug ../binTmp/zzz39r3-log.run
!
vrf definition tester
 exit
!
vrf definition v1
 rd 1:1
 exit
!
interface loopback1
 no description
 vrf forwarding v1
 ipv4 address 8.8.8.8 255.255.255.255
 ipv6 address 8888::8 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff
 no shutdown
 no log-link-change
 exit
!
interface ethernet1
 no description
 vrf forwarding v1
 ipv4 address 1.1.1.6 255.255.255.252
 ipv6 address 1234:2::2 ffff:ffff::
 no shutdown
 no log-link-change
 exit
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ipv4 route v1 0.0.0.0 0.0.0.0 1.1.1.5
!
ipv6 route v1 :: :: 1234:2::1
!
!
!
!
!
!
!
!
!
!
!
server telnet tester
 security protocol telnet
 no exec authorization
 no login authentication
 vrf tester
 exit
!
!
end

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
r2#
r2#
r2#show ipv4 nat v1 tran
r2#show ipv4 nat v1 tran
 |~~~~~~~|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~|~~~~~~|
 |       | original                              | translated                            |                                              |
 | proto | source            | target            | source            | target            | age      | last     | timeout  | pack | byte |
 |-------|-------------------|-------------------|-------------------|-------------------|----------|----------|----------|------|------|
 | 1     | 1.1.1.1 234353105 | 7.7.7.8 234353105 | 1.1.1.1 234353105 | 8.8.8.8 234353105 | 00:00:04 | 00:00:04 | 00:05:00 | 1    | 64   |
 | 1     | 8.8.8.8 234353105 | 1.1.1.1 234353105 | 7.7.7.8 234353105 | 1.1.1.1 234353105 | 00:00:04 | 00:00:04 | 00:05:00 | 0    | 0    |
 | 1     | 1.1.1.1 234353106 | 7.7.7.8 234353106 | 1.1.1.1 234353106 | 8.8.8.8 234353106 | 00:00:03 | 00:00:03 | 00:05:00 | 1    | 64   |
 | 1     | 8.8.8.8 234353106 | 1.1.1.1 234353106 | 7.7.7.8 234353106 | 1.1.1.1 234353106 | 00:00:03 | 00:00:03 | 00:05:00 | 1    | 64   |
 | 1     | 1.1.1.1 234353107 | 7.7.7.8 234353107 | 1.1.1.1 234353107 | 8.8.8.8 234353107 | 00:00:03 | 00:00:03 | 00:05:00 | 1    | 64   |
 | 1     | 8.8.8.8 234353107 | 1.1.1.1 234353107 | 7.7.7.8 234353107 | 1.1.1.1 234353107 | 00:00:03 | 00:00:03 | 00:05:00 | 1    | 64   |
 | 1     | 1.1.1.1 234353108 | 7.7.7.8 234353108 | 1.1.1.1 234353108 | 8.8.8.8 234353108 | 00:00:03 | 00:00:03 | 00:05:00 | 1    | 64   |
 | 1     | 8.8.8.8 234353108 | 1.1.1.1 234353108 | 7.7.7.8 234353108 | 1.1.1.1 234353108 | 00:00:03 | 00:00:03 | 00:05:00 | 1    | 64   |
 | 1     | 1.1.1.1 234353109 | 7.7.7.8 234353109 | 1.1.1.1 234353109 | 8.8.8.8 234353109 | 00:00:02 | 00:00:02 | 00:05:00 | 1    | 64   |
 | 1     | 8.8.8.8 234353109 | 1.1.1.1 234353109 | 7.7.7.8 234353109 | 1.1.1.1 234353109 | 00:00:02 | 00:00:02 | 00:05:00 | 1    | 64   |
 | 1     | 1.1.1.1 234353110 | 7.7.7.8 234353110 | 1.1.1.1 234353110 | 8.8.8.8 234353110 | 00:00:02 | 00:00:02 | 00:05:00 | 1    | 64   |
 | 1     | 8.8.8.8 234353110 | 1.1.1.1 234353110 | 7.7.7.8 234353110 | 1.1.1.1 234353110 | 00:00:02 | 00:00:02 | 00:05:00 | 1    | 64   |
 | 1     | 1.1.1.1 234353111 | 7.7.7.8 234353111 | 1.1.1.1 234353111 | 8.8.8.8 234353111 | 00:00:02 | 00:00:02 | 00:05:00 | 1    | 64   |
 | 1     | 8.8.8.8 234353111 | 1.1.1.1 234353111 | 7.7.7.8 234353111 | 1.1.1.1 234353111 | 00:00:02 | 00:00:02 | 00:05:00 | 1    | 64   |
 | 1     | 1.1.1.1 234353112 | 7.7.7.8 234353112 | 1.1.1.1 234353112 | 8.8.8.8 234353112 | 00:00:02 | 00:00:02 | 00:05:00 | 1    | 64   |
 | 1     | 8.8.8.8 234353112 | 1.1.1.1 234353112 | 7.7.7.8 234353112 | 1.1.1.1 234353112 | 00:00:02 | 00:00:02 | 00:05:00 | 1    | 64   |
 | 1     | 1.1.1.1 234353113 | 7.7.7.8 234353113 | 1.1.1.1 234353113 | 8.8.8.8 234353113 | 00:00:02 | 00:00:02 | 00:05:00 | 1    | 64   |
 | 1     | 8.8.8.8 234353113 | 1.1.1.1 234353113 | 7.7.7.8 234353113 | 1.1.1.1 234353113 | 00:00:02 | 00:00:02 | 00:05:00 | 1    | 64   |
 |_______|___________________|___________________|___________________|___________________|__________|__________|__________|______|______|
r2#
r2#
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
r2#
r2#
r2#show ipv6 nat v1 tran
r2#show ipv6 nat v1 tran
 |~~~~~~~|~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~|~~~~~~|
 |       | original                                  | translated                                |                                              |
 | proto | source              | target              | source              | target              | age      | last     | timeout  | pack | byte |
 |-------|---------------------|---------------------|---------------------|---------------------|----------|----------|----------|------|------|
 | 58    | 1234:1::1 264318378 | 7777::8 264318378   | 1234:1::1 264318378 | 8888::8 264318378   | 00:00:02 | 00:00:02 | 00:05:00 | 1    | 64   |
 | 58    | 8888::8 264318378   | 1234:1::1 264318378 | 7777::8 264318378   | 1234:1::1 264318378 | 00:00:02 | 00:00:02 | 00:05:00 | 1    | 64   |
 | 58    | 1234:1::1 264318379 | 7777::8 264318379   | 1234:1::1 264318379 | 8888::8 264318379   | 00:00:01 | 00:00:01 | 00:05:00 | 1    | 64   |
 | 58    | 8888::8 264318379   | 1234:1::1 264318379 | 7777::8 264318379   | 1234:1::1 264318379 | 00:00:01 | 00:00:01 | 00:05:00 | 1    | 64   |
 | 58    | 1234:1::1 264318380 | 7777::8 264318380   | 1234:1::1 264318380 | 8888::8 264318380   | 00:00:01 | 00:00:01 | 00:05:00 | 1    | 64   |
 | 58    | 8888::8 264318380   | 1234:1::1 264318380 | 7777::8 264318380   | 1234:1::1 264318380 | 00:00:01 | 00:00:01 | 00:05:00 | 1    | 64   |
 | 58    | 1234:1::1 264318381 | 7777::8 264318381   | 1234:1::1 264318381 | 8888::8 264318381   | 00:00:01 | 00:00:01 | 00:05:00 | 1    | 64   |
 | 58    | 8888::8 264318381   | 1234:1::1 264318381 | 7777::8 264318381   | 1234:1::1 264318381 | 00:00:01 | 00:00:01 | 00:05:00 | 1    | 64   |
 | 58    | 1234:1::1 264318382 | 7777::8 264318382   | 1234:1::1 264318382 | 8888::8 264318382   | 00:00:01 | 00:00:01 | 00:05:00 | 1    | 64   |
 | 58    | 8888::8 264318382   | 1234:1::1 264318382 | 7777::8 264318382   | 1234:1::1 264318382 | 00:00:01 | 00:00:01 | 00:05:00 | 1    | 64   |
 | 58    | 1234:1::1 264318383 | 7777::8 264318383   | 1234:1::1 264318383 | 8888::8 264318383   | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 | 58    | 8888::8 264318383   | 1234:1::1 264318383 | 7777::8 264318383   | 1234:1::1 264318383 | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 | 58    | 1234:1::1 264318384 | 7777::8 264318384   | 1234:1::1 264318384 | 8888::8 264318384   | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 | 58    | 8888::8 264318384   | 1234:1::1 264318384 | 7777::8 264318384   | 1234:1::1 264318384 | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 | 58    | 1234:1::1 264318385 | 7777::8 264318385   | 1234:1::1 264318385 | 8888::8 264318385   | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 | 58    | 8888::8 264318385   | 1234:1::1 264318385 | 7777::8 264318385   | 1234:1::1 264318385 | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 | 58    | 1234:1::1 264318386 | 7777::8 264318386   | 1234:1::1 264318386 | 8888::8 264318386   | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 | 58    | 8888::8 264318386   | 1234:1::1 264318386 | 7777::8 264318386   | 1234:1::1 264318386 | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 | 58    | 1234:1::1 264318387 | 7777::8 264318387   | 1234:1::1 264318387 | 8888::8 264318387   | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 | 58    | 8888::8 264318387   | 1234:1::1 264318387 | 7777::8 264318387   | 1234:1::1 264318387 | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 |_______|_____________________|_____________________|_____________________|_____________________|__________|__________|__________|______|______|
r2#
r2#