Skip to content

Example: source address translation to interface

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
hostname r1
buggy
!
logging file debug ../binTmp/zzz47r1-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
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
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
hostname r2
buggy
!
logging file debug ../binTmp/zzz47r2-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.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 source 8.8.8.8 interface ethernet1
!
ipv6 nat v1 sequence 10 source 8888::8 interface ethernet1
!
!
!
!
!
!
!
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/zzz47r3-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 64097025 | 1.1.1.2 64097025 | 1.1.1.1 64097025 | 8.8.8.8 64097025 | 00:00:05 | 00:00:05 | 00:05:00 | 0    | 0    |
 | 1     | 8.8.8.8 64097025 | 1.1.1.1 64097025 | 1.1.1.2 64097025 | 1.1.1.1 64097025 | 00:00:05 | 00:00:05 | 00:05:00 | 1    | 64   |
 | 1     | 1.1.1.1 64097026 | 1.1.1.2 64097026 | 1.1.1.1 64097026 | 8.8.8.8 64097026 | 00:00:04 | 00:00:04 | 00:05:00 | 1    | 64   |
 | 1     | 8.8.8.8 64097026 | 1.1.1.1 64097026 | 1.1.1.2 64097026 | 1.1.1.1 64097026 | 00:00:04 | 00:00:04 | 00:05:00 | 1    | 64   |
 | 1     | 1.1.1.1 64097027 | 1.1.1.2 64097027 | 1.1.1.1 64097027 | 8.8.8.8 64097027 | 00:00:04 | 00:00:04 | 00:05:00 | 1    | 64   |
 | 1     | 8.8.8.8 64097027 | 1.1.1.1 64097027 | 1.1.1.2 64097027 | 1.1.1.1 64097027 | 00:00:04 | 00:00:04 | 00:05:00 | 1    | 64   |
 | 1     | 1.1.1.1 64097028 | 1.1.1.2 64097028 | 1.1.1.1 64097028 | 8.8.8.8 64097028 | 00:00:04 | 00:00:04 | 00:05:00 | 1    | 64   |
 | 1     | 8.8.8.8 64097028 | 1.1.1.1 64097028 | 1.1.1.2 64097028 | 1.1.1.1 64097028 | 00:00:04 | 00:00:04 | 00:05:00 | 1    | 64   |
 | 1     | 1.1.1.1 64097029 | 1.1.1.2 64097029 | 1.1.1.1 64097029 | 8.8.8.8 64097029 | 00:00:03 | 00:00:03 | 00:05:00 | 1    | 64   |
 | 1     | 8.8.8.8 64097029 | 1.1.1.1 64097029 | 1.1.1.2 64097029 | 1.1.1.1 64097029 | 00:00:03 | 00:00:03 | 00:05:00 | 1    | 64   |
 | 1     | 1.1.1.1 64097030 | 1.1.1.2 64097030 | 1.1.1.1 64097030 | 8.8.8.8 64097030 | 00:00:03 | 00:00:03 | 00:05:00 | 1    | 64   |
 | 1     | 8.8.8.8 64097030 | 1.1.1.1 64097030 | 1.1.1.2 64097030 | 1.1.1.1 64097030 | 00:00:03 | 00:00:03 | 00:05:00 | 1    | 64   |
 | 1     | 1.1.1.1 64097031 | 1.1.1.2 64097031 | 1.1.1.1 64097031 | 8.8.8.8 64097031 | 00:00:03 | 00:00:03 | 00:05:00 | 1    | 64   |
 | 1     | 8.8.8.8 64097031 | 1.1.1.1 64097031 | 1.1.1.2 64097031 | 1.1.1.1 64097031 | 00:00:03 | 00:00:03 | 00:05:00 | 1    | 64   |
 | 1     | 1.1.1.1 64097032 | 1.1.1.2 64097032 | 1.1.1.1 64097032 | 8.8.8.8 64097032 | 00:00:03 | 00:00:03 | 00:05:00 | 1    | 64   |
 | 1     | 8.8.8.8 64097032 | 1.1.1.1 64097032 | 1.1.1.2 64097032 | 1.1.1.1 64097032 | 00:00:03 | 00:00:03 | 00:05:00 | 1    | 64   |
 | 1     | 1.1.1.1 64097033 | 1.1.1.2 64097033 | 1.1.1.1 64097033 | 8.8.8.8 64097033 | 00:00:03 | 00:00:03 | 00:05:00 | 1    | 64   |
 | 1     | 8.8.8.8 64097033 | 1.1.1.1 64097033 | 1.1.1.2 64097033 | 1.1.1.1 64097033 | 00:00:03 | 00:00:03 | 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
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 82457197 | 1234:1::2 82457197 | 1234:1::1 82457197 | 8888::8 82457197   | 00:00:02 | 00:00:02 | 00:05:00 | 0    | 0    |
 | 58    | 8888::8 82457197   | 1234:1::1 82457197 | 1234:1::2 82457197 | 1234:1::1 82457197 | 00:00:02 | 00:00:02 | 00:05:00 | 1    | 64   |
 | 58    | 1234:1::1 82457198 | 1234:1::2 82457198 | 1234:1::1 82457198 | 8888::8 82457198   | 00:00:01 | 00:00:01 | 00:05:00 | 1    | 64   |
 | 58    | 8888::8 82457198   | 1234:1::1 82457198 | 1234:1::2 82457198 | 1234:1::1 82457198 | 00:00:01 | 00:00:01 | 00:05:00 | 1    | 64   |
 | 58    | 1234:1::1 82457199 | 1234:1::2 82457199 | 1234:1::1 82457199 | 8888::8 82457199   | 00:00:01 | 00:00:01 | 00:05:00 | 1    | 64   |
 | 58    | 8888::8 82457199   | 1234:1::1 82457199 | 1234:1::2 82457199 | 1234:1::1 82457199 | 00:00:01 | 00:00:01 | 00:05:00 | 1    | 64   |
 | 58    | 1234:1::1 82457200 | 1234:1::2 82457200 | 1234:1::1 82457200 | 8888::8 82457200   | 00:00:01 | 00:00:01 | 00:05:00 | 1    | 64   |
 | 58    | 8888::8 82457200   | 1234:1::1 82457200 | 1234:1::2 82457200 | 1234:1::1 82457200 | 00:00:01 | 00:00:01 | 00:05:00 | 1    | 64   |
 | 58    | 1234:1::1 82457201 | 1234:1::2 82457201 | 1234:1::1 82457201 | 8888::8 82457201   | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 | 58    | 8888::8 82457201   | 1234:1::1 82457201 | 1234:1::2 82457201 | 1234:1::1 82457201 | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 | 58    | 1234:1::1 82457202 | 1234:1::2 82457202 | 1234:1::1 82457202 | 8888::8 82457202   | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 | 58    | 8888::8 82457202   | 1234:1::1 82457202 | 1234:1::2 82457202 | 1234:1::1 82457202 | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 | 58    | 1234:1::1 82457203 | 1234:1::2 82457203 | 1234:1::1 82457203 | 8888::8 82457203   | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 | 58    | 8888::8 82457203   | 1234:1::1 82457203 | 1234:1::2 82457203 | 1234:1::1 82457203 | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 | 58    | 1234:1::1 82457204 | 1234:1::2 82457204 | 1234:1::1 82457204 | 8888::8 82457204   | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 | 58    | 8888::8 82457204   | 1234:1::1 82457204 | 1234:1::2 82457204 | 1234:1::1 82457204 | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 | 58    | 1234:1::1 82457205 | 1234:1::2 82457205 | 1234:1::1 82457205 | 8888::8 82457205   | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 | 58    | 8888::8 82457205   | 1234:1::1 82457205 | 1234:1::2 82457205 | 1234:1::1 82457205 | 00:00:00 | 00:00:00 | 00:05:00 | 1    | 64   |
 |_______|____________________|____________________|____________________|____________________|__________|__________|__________|______|______|
r2#
r2#