exclude_virtual_interfaces_in_ip_command
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| exclude_virtual_interfaces_in_ip_command [2023/04/03 13:51] – created walkeradmin | exclude_virtual_interfaces_in_ip_command [2023/04/07 16:01] (current) – walkeradmin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | Exclude Virtual Interfaces in IP Command | + | ====== |
| + | <color # | ||
| + | \\ | ||
| + | \\ | ||
| + | |||
| + | ---- | ||
| + | In Kubernetes deployments, | ||
| + | \\ | ||
| + | \\ | ||
| + | Lets say I use an IP command to list the interfaces on a Linux instance. | ||
| + | ip -br -c a | ||
| + | \\ | ||
| + | I will see something similar to the following output. | ||
| + | < | ||
| + | lo | ||
| + | eth2 | ||
| + | eth3 | ||
| + | eth4 | ||
| + | eth5 | ||
| + | eth0 | ||
| + | eth1 | ||
| + | internalk3s0 | ||
| + | kube-ipvs0 | ||
| + | flannel.1 | ||
| + | cni0 | ||
| + | veth5b959f30@if2 UP | ||
| + | veth1b36bc0e@if2 UP | ||
| + | vetheafccb8b@if2 UP | ||
| + | veth6cab92f8@if2 UP | ||
| + | vetha6ca6c5c@if2 UP | ||
| + | vetha47d76c5@if2 UP | ||
| + | veth78d7ae7b@if2 UP | ||
| + | vethbfbdce9e@if2 UP | ||
| + | veth12caaf80@if2 UP | ||
| + | vethecaec700@if2 UP | ||
| + | vethf759469f@if2 UP | ||
| + | veth5b8833a6@if2 UP | ||
| + | veth18c2a62d@if2 UP | ||
| + | veth8e69b358@if2 UP | ||
| + | veth62243482@if2 UP | ||
| + | veth4def4cbc@if2 UP | ||
| + | veth6583da97@if2 UP | ||
| + | veth30a60131@if2 UP | ||
| + | veth17bbb9b4@if2 UP | ||
| + | vetha71f5d6e@if2 UP | ||
| + | veth4171ad7f@if2 UP | ||
| + | vethffca2e81@if2 UP | ||
| + | vethce83eb59@if2 UP | ||
| + | veth30897d87@if2 UP | ||
| + | vethe9389c32@if2 UP | ||
| + | vethde8e4fea@if2 UP | ||
| + | vethc3a4bead@if2 UP | ||
| + | veth4f402974@if2 UP | ||
| + | veth0cdaa299@if2 UP | ||
| + | vethb0dc4ed2@if2 UP | ||
| + | veth1c3166fa@if2 UP | ||
| + | veth2255cafe@if2 UP | ||
| + | vethb12cf176@if2 UP | ||
| + | veth931f4dd1@if2 UP | ||
| + | vetha3c59775@if2 UP | ||
| + | veth2ceb7cf6@if2 UP | ||
| + | veth2199c7d1@if2 UP | ||
| + | </ | ||
| + | Unfortunately, | ||
| + | ip -br -c a |grep -v veth | ||
| + | \\ | ||
| + | This will hide anything containing the letters veth. | ||
| + | < | ||
| + | lo | ||
| + | eth2 | ||
| + | eth3 | ||
| + | eth4 | ||
| + | eth5 | ||
| + | eth0 | ||
| + | eth1 | ||
| + | internalk3s0 | ||
| + | kube-ipvs0 | ||
| + | flannel.1 | ||
| + | cni0 | ||
| + | </ | ||
| + | No our list is much more readable. | ||
| + | \\ | ||
| + | \\ | ||
| + | We could refine this output with multiple exclusions using the -e switch: | ||
| + | ip -br -c a |grep -v -e " | ||
| + | This give the following output. | ||
| + | < | ||
| + | eth2 | ||
| + | eth3 | ||
| + | eth4 | ||
| + | eth5 | ||
| + | eth0 | ||
| + | eth1 | ||
| + | </ | ||
| + | This is a lot to type/ | ||
| + | \\ | ||
| + | \\ | ||
exclude_virtual_interfaces_in_ip_command.1680529893.txt.gz · Last modified: by walkeradmin
