Skip to content

Example: interface inspection with selective egress drop

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
59
60
61
62
63
64
65
66
67
68
69
70
hostname r1
buggy
!
logging file debug ../binTmp/zzz81r1-log.run
!
vrf definition tester
 exit
!
vrf definition v1
 rd 1:1
 exit
!
interface loopback0
 no description
 vrf forwarding v1
 ipv4 address 2.2.2.1 255.255.255.255
 ipv6 address 4321::1 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.1 255.255.255.0
 ipv6 address 1234:1::1 ffff:ffff::
 ipv6 host-static 1234:1::2 0000.0000.2222
 no shutdown
 no log-link-change
 exit
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ipv4 route v1 2.2.2.2 255.255.255.255 1.1.1.2
ipv4 route v1 2.2.2.3 255.255.255.255 1.1.1.2
!
ipv6 route v1 4321::2 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234:1::2
ipv6 route v1 4321::3 ffff:ffff:ffff:ffff:ffff:ffff: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
78
79
80
81
82
83
84
85
86
87
88
89
hostname r2
buggy
!
logging file debug ../binTmp/zzz81r2-log.run
!
access-list test4
 sequence 10 permit all 2.2.2.3 255.255.255.255 all any all
 exit
!
access-list test6
 sequence 10 permit all 4321::3 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff all any all
 exit
!
vrf definition tester
 exit
!
vrf definition v1
 rd 1:1
 exit
!
interface loopback0
 no description
 vrf forwarding v1
 ipv4 address 2.2.2.2 255.255.255.255
 ipv6 address 4321::2 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.2 255.255.255.0
 ipv4 inspect mac drop-tx allow-list test4
 ipv6 address 1234:1::2 ffff:ffff::
 ipv6 inspect mac drop-tx allow-list test6
 ipv6 host-static 1234:1::1 0000.0000.1111
 no shutdown
 no log-link-change
 exit
!
interface ethernet2
 no description
 vrf forwarding v1
 ipv4 address 1.1.2.2 255.255.255.0
 ipv6 address 1234:2::2 ffff:ffff::
 no shutdown
 no log-link-change
 exit
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ipv4 route v1 2.2.2.1 255.255.255.255 1.1.1.1
ipv4 route v1 2.2.2.3 255.255.255.255 1.1.2.3
!
ipv6 route v1 4321::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234:1::1
ipv6 route v1 4321::3 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234:2::3
!
!
!
!
!
!
!
!
!
!
!
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
68
69
hostname r3
buggy
!
logging file debug ../binTmp/zzz81r3-log.run
!
vrf definition tester
 exit
!
vrf definition v1
 rd 1:1
 exit
!
interface loopback0
 no description
 vrf forwarding v1
 ipv4 address 2.2.2.3 255.255.255.255
 ipv6 address 4321::3 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.2.3 255.255.255.0
 ipv6 address 1234:2::3 ffff:ffff::
 no shutdown
 no log-link-change
 exit
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ipv4 route v1 2.2.2.1 255.255.255.255 1.1.2.2
ipv4 route v1 2.2.2.2 255.255.255.255 1.1.2.2
!
ipv6 route v1 4321::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234:2::2
ipv6 route v1 4321::2 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234:2::2
!
!
!
!
!
!
!
!
!
!
!
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
30
31
32
33
34
35
r2#
r2#
r2#show ipv4 insp eth1
r2#show ipv4 insp eth1
 |~~~~~|~~~~~|~~~~~|~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~|~~~~~~~~~~|~~~~~~|~~~~|~~~~|~~~~|~~~~|~~~~~~~~~~|~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~|
 |                 | source             | target             |      | packet  | byte    |          | mac                             |
 | dir | prt | tos | addr    | port     | addr    | port     | url  | rx | tx | rx | tx | time     | src            | trg            |
 |-----|-----|-----|---------|----------|---------|----------|------|----|----|----|----|----------|----------------|----------------|
 | rx  | 1   | 0   | 2.2.2.1 | 40564419 | 2.2.2.2 | 40564419 | null | 1  | 1  | 64 | 64 | 00:00:06 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 1   | 0   | 2.2.2.1 | 40564420 | 2.2.2.2 | 40564420 | null | 1  | 1  | 64 | 64 | 00:00:06 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 1   | 0   | 2.2.2.1 | 40564421 | 2.2.2.2 | 40564421 | null | 1  | 1  | 64 | 64 | 00:00:06 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 1   | 0   | 2.2.2.1 | 40564422 | 2.2.2.2 | 40564422 | null | 1  | 1  | 64 | 64 | 00:00:06 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 1   | 0   | 2.2.2.1 | 40564423 | 2.2.2.2 | 40564423 | null | 1  | 1  | 64 | 64 | 00:00:05 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 1   | 0   | 2.2.2.1 | 40564424 | 2.2.2.2 | 40564424 | null | 1  | 1  | 64 | 64 | 00:00:05 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 1   | 0   | 2.2.2.1 | 40564425 | 2.2.2.2 | 40564425 | null | 1  | 1  | 64 | 64 | 00:00:05 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 1   | 0   | 2.2.2.1 | 40564426 | 2.2.2.2 | 40564426 | null | 1  | 1  | 64 | 64 | 00:00:05 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 1   | 0   | 2.2.2.1 | 40564427 | 2.2.2.2 | 40564427 | null | 1  | 1  | 64 | 64 | 00:00:05 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 1   | 0   | 2.2.2.1 | 40564428 | 2.2.2.3 | 40564428 | null | 1  | 0  | 64 | 0  | 00:00:05 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 1   | 0   | 2.2.2.1 | 40564429 | 2.2.2.3 | 40564429 | null | 1  | 1  | 64 | 64 | 00:00:04 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 1   | 0   | 2.2.2.1 | 40564430 | 2.2.2.3 | 40564430 | null | 1  | 1  | 64 | 64 | 00:00:04 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 1   | 0   | 2.2.2.1 | 40564431 | 2.2.2.3 | 40564431 | null | 1  | 1  | 64 | 64 | 00:00:04 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 1   | 0   | 2.2.2.1 | 40564432 | 2.2.2.3 | 40564432 | null | 1  | 1  | 64 | 64 | 00:00:04 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 1   | 0   | 2.2.2.1 | 40564433 | 2.2.2.3 | 40564433 | null | 1  | 1  | 64 | 64 | 00:00:03 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 1   | 0   | 2.2.2.1 | 40564434 | 2.2.2.3 | 40564434 | null | 1  | 1  | 64 | 64 | 00:00:03 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 1   | 0   | 2.2.2.1 | 40564435 | 2.2.2.3 | 40564435 | null | 1  | 1  | 64 | 64 | 00:00:03 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 1   | 0   | 2.2.2.1 | 40564436 | 2.2.2.3 | 40564436 | null | 1  | 1  | 64 | 64 | 00:00:03 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 1   | 0   | 2.2.2.1 | 40564437 | 2.2.2.3 | 40564437 | null | 1  | 1  | 64 | 64 | 00:00:03 | 0000.0000.2222 | 0000.0000.1111 |
 | tx  | 1   | 0   | 2.2.2.3 | 45599321 | 2.2.2.1 | 45599321 | null | 1  | 1  | 64 | 64 | 00:00:00 | 0000.0000.2222 | 0000.0000.3333 |
 | tx  | 1   | 0   | 2.2.2.3 | 45599322 | 2.2.2.1 | 45599322 | null | 1  | 1  | 64 | 64 | 00:00:00 | 0000.0000.2222 | 0000.0000.3333 |
 | tx  | 1   | 0   | 2.2.2.3 | 45599323 | 2.2.2.1 | 45599323 | null | 1  | 1  | 64 | 64 | 00:00:00 | 0000.0000.2222 | 0000.0000.3333 |
 | tx  | 1   | 0   | 2.2.2.3 | 45599324 | 2.2.2.1 | 45599324 | null | 1  | 1  | 64 | 64 | 00:00:00 | 0000.0000.2222 | 0000.0000.3333 |
 | tx  | 1   | 0   | 2.2.2.3 | 45599325 | 2.2.2.1 | 45599325 | null | 1  | 1  | 64 | 64 | 00:00:00 | 0000.0000.2222 | 0000.0000.3333 |
 |_____|_____|_____|_________|__________|_________|__________|______|____|____|____|____|__________|________________|________________|
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 insp eth1
r2#show ipv6 insp eth1
 |~~~~~|~~~~~|~~~~~|~~~~~~~~~|~~~~~~~~~~~|~~~~~~~~~|~~~~~~~~~~~|~~~~~~|~~~~|~~~~|~~~~|~~~~|~~~~~~~~~~|~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~|
 |                 | source              | target              |      | packet  | byte    |          | mac                             |
 | dir | prt | tos | addr    | port      | addr    | port      | url  | rx | tx | rx | tx | time     | src            | trg            |
 |-----|-----|-----|---------|-----------|---------|-----------|------|----|----|----|----|----------|----------------|----------------|
 | rx  | 58  | 0   | 4321::1 | 229775880 | 4321::2 | 229775880 | null | 1  | 1  | 64 | 64 | 00:00:05 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 58  | 0   | 4321::1 | 229775881 | 4321::2 | 229775881 | null | 1  | 1  | 64 | 64 | 00:00:05 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 58  | 0   | 4321::1 | 229775882 | 4321::2 | 229775882 | null | 1  | 1  | 64 | 64 | 00:00:05 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 58  | 0   | 4321::1 | 229775883 | 4321::2 | 229775883 | null | 1  | 1  | 64 | 64 | 00:00:05 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 58  | 0   | 4321::1 | 229775884 | 4321::2 | 229775884 | null | 1  | 1  | 64 | 64 | 00:00:05 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 58  | 0   | 4321::1 | 229775885 | 4321::3 | 229775885 | null | 1  | 0  | 64 | 0  | 00:00:03 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 58  | 0   | 4321::1 | 229775886 | 4321::3 | 229775886 | null | 1  | 1  | 64 | 64 | 00:00:02 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 58  | 0   | 4321::1 | 229775887 | 4321::3 | 229775887 | null | 1  | 1  | 64 | 64 | 00:00:02 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 58  | 0   | 4321::1 | 229775888 | 4321::3 | 229775888 | null | 1  | 1  | 64 | 64 | 00:00:02 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 58  | 0   | 4321::1 | 229775889 | 4321::3 | 229775889 | null | 1  | 1  | 64 | 64 | 00:00:02 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 58  | 0   | 4321::1 | 229775890 | 4321::3 | 229775890 | null | 1  | 1  | 64 | 64 | 00:00:01 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 58  | 0   | 4321::1 | 229775891 | 4321::3 | 229775891 | null | 1  | 1  | 64 | 64 | 00:00:01 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 58  | 0   | 4321::1 | 229775892 | 4321::3 | 229775892 | null | 1  | 1  | 64 | 64 | 00:00:01 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 58  | 0   | 4321::1 | 229775893 | 4321::3 | 229775893 | null | 1  | 1  | 64 | 64 | 00:00:01 | 0000.0000.2222 | 0000.0000.1111 |
 | rx  | 58  | 0   | 4321::1 | 229775894 | 4321::3 | 229775894 | null | 1  | 1  | 64 | 64 | 00:00:01 | 0000.0000.2222 | 0000.0000.1111 |
 | tx  | 58  | 0   | 4321::3 | 698670133 | 4321::1 | 698670133 | null | 1  | 1  | 64 | 64 | 00:00:00 | 0000.0000.2222 | 0000.0000.3333 |
 | tx  | 58  | 0   | 4321::3 | 698670134 | 4321::1 | 698670134 | null | 1  | 1  | 64 | 64 | 00:00:00 | 0000.0000.2222 | 0000.0000.3333 |
 | tx  | 58  | 0   | 4321::3 | 698670135 | 4321::1 | 698670135 | null | 1  | 1  | 64 | 64 | 00:00:00 | 0000.0000.2222 | 0000.0000.3333 |
 | tx  | 58  | 0   | 4321::3 | 698670136 | 4321::1 | 698670136 | null | 1  | 1  | 64 | 64 | 00:00:00 | 0000.0000.2222 | 0000.0000.3333 |
 | tx  | 58  | 0   | 4321::3 | 698670137 | 4321::1 | 698670137 | null | 1  | 1  | 64 | 64 | 00:00:00 | 0000.0000.2222 | 0000.0000.3333 |
 |_____|_____|_____|_________|___________|_________|___________|______|____|____|____|____|__________|________________|________________|
r2#
r2#
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
r2#
r2#
r2#show ipv4 top eth1
r2#show ipv4 top eth1
 |~~~~~~~~~|~~~~|~~~~|~~~~~~|~~~~~~|~~~~~~~~~~|
 |         | packet  | byte        |          |
 | addr    | rx | tx | rx   | tx   | time     |
 |---------|----|----|------|------|----------|
 | 2.2.2.1 | 24 | 23 | 1536 | 1472 | 00:00:07 |
 | 2.2.2.2 | 9  | 9  | 576  | 576  | 00:00:07 |
 | 2.2.2.3 | 15 | 14 | 960  | 896  | 00:00:05 |
 |_________|____|____|______|______|__________|
r2#
r2#
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
r2#
r2#
r2#show ipv6 top eth1
r2#show ipv6 top eth1
 |~~~~~~~~~|~~~~|~~~~|~~~~~~|~~~~~~|~~~~~~~~~~|
 |         | packet  | byte        |          |
 | addr    | rx | tx | rx   | tx   | time     |
 |---------|----|----|------|------|----------|
 | 4321::1 | 20 | 19 | 1280 | 1216 | 00:00:06 |
 | 4321::2 | 5  | 5  | 320  | 320  | 00:00:06 |
 | 4321::3 | 15 | 14 | 960  | 896  | 00:00:03 |
 |_________|____|____|______|______|__________|
r2#
r2#