VLAN-enabled ports are generally categorized in one of two ways: tagged or untagged. These may also be referred to as "trunk" or "access" respectively. The purpose of a tagged or "trunked" port is to pass traffic for multiple VLANs, whereas an untagged or "access" port accepts traffic for only a single VLAN
A port that is only untagged in HP is an Cisco access port. A port that is untagged in some VLAN, with other VLANs tagged, is a Cisco trunk port with the native VLAN (native VLAN is the untagged VLAN).
Frames that are placed on a trunk include a VLAN tag. Switches know to which VLAN to forward a frame that is received on a trunk interface by this tag. If however for some reason, there is no tag on a frame that is received, the switch must know what to do with it. The Native VLAN configuration essentially tells the switch on which VLAN any untagged frames should be placed.
https://www.reddit.com/r/ccna/comments/4qbnir/taggeduntagged_vs_accesstrunk/
https://blog.g3rt.nl/systemd-networkd-vlans-howto.html
ens5 192.168.16.0/24 DHCP ens6 192.168.17.0/24 DHCP ``` routes: 192.168.22.0/24 via 192.168.17.1 192.168.27.0/24 via 192.168.17.1 172.31.45.114/32 via 192.168.17.1 ``` ens7 192.168.18.0/24 DHCP ``` routes: 192.168.23.0/24 via 192.168.18.1 192.168.28.0/24 via 192.168.18.1 ```
ens5 192.168.21.0/24 DHCP ens6 192.168.22.0/24 DHCP ``` routes: 192.168.17.0/24 via 192.168.22.1 192.168.27.0/24 via 192.168.22.1 172.31.45.114/32 via 192.168.22.1 ``` ens7 192.168.23.0/24 DHCP ``` routes: 192.168.18.0/24 via 192.168.23.1 192.168.28.0/24 via 192.168.23.1 ```
ens5 192.168.26.0/24 DHCP ens6 192.168.27.0/24 DHCP ``` routes: 192.168.17.0/24 via 192.168.27.1 192.168.22.0/24 via 192.168.27.1 172.31.45.114/32 via 192.168.27.1 ``` ens7 192.168.28.0/24 DHCP ``` routes: 192.168.18.0/24 via 192.168.28.1 192.168.23.0/24 via 192.168.28.1 ```
network:
```
version: 2
ethernets:
ens5:
dhcp4: true
match:
macaddress: 06:e4:52:74:da:80
set-name: ens5
ens6:
dhcp4: true
dhcp4-overrides:
use-dns: false
use-routes: false
match:
macaddress: 06:a7:66:35:ca:68
set-name: ens6
routes:
- to: 192.168.22.0/24
via: 192.168.17.1
on-link: true
- to: 192.168.27.0/24
via: 192.168.17.1
on-link: true
- to: 172.31.45.114/32
via: 192.168.17.1
on-link: true
ens7:
dhcp4: true
dhcp4-overrides:
use-dns: false
use-routes: false
match:
macaddress: 06:52:95:26:ba:02
set-name: ens7
routes:
- to: 192.168.23.0/24
via: 192.168.18.1
on-link: true
- to: 192.168.28.0/24
via: 192.168.18.1
on-link: true
```
Reference: mne-net.txt](mne-net.txt]([https://wiki.jeremyrossi.it/images/7/7e/Mne-net.txt))
netcup 10.66.66.0/24 GCF 10.200.200.0/24 JMC 10.201.201.0/24 Mnemonica 10.202.202.0/24 XAOS 10.203.203.0/24 DLT 10.204.204.0/24 PtQ 10.205.205.0/24
==tcpdump show HTTP headers==
sudo tcpdump -A -s 10240 'tcp port 80 and (((ip[- ((ip[0](2:2](0](2:2))&0xf)<<2)) - ((tcp[!= 0)' | egrep --line-buffered "^........(GET |HTTP\/|POST |HEAD )|^[A-Za-z0-9-](12](A-Za-z0-9-](12)&0xf0)>>2)))+: " | sed -r 's/^........(GET |HTTP\/|POST |HEAD )/\n\1/g'
This limits cuts the packet off at 10Kb and only knows GET, POST and HEAD commands, but that should be enough in the majority of cases.
==find oldest file in dir==
find -type f -printf '%T+ %p\n' | sort | head -n 1
== find files between dates==
find -type f -newermt '1 jan 2019 12:00:00' -not -newermt '15 sep 2019 00:00:00' -ls
==ssh port forwarding==
[File:local-port-forwarding.png|300px]
If the HTTP server is accessible on the remote side and the HTTP client resides on host of the SSH client, then one can use local port forwarding to access the HTTP server from the local side.
[File:remote-port-forwarding.png|300px]
On the other hand, if the HTTP server is accessible on the local side and the HTTP client resides on host of the SSH server, then one can use remote port forwarding to access the HTTP server from the remote side.
-f -> send to background
-N -> keep in foregound do not execute any command
Repeat -L or -R multiple times to forward multiple ports.
Reference:
https://rufflewind.com/2014-03-02/ssh-port-forwarding
https://blog.sleeplessbeastie.eu/2012/09/21/how-to-set-up-ssh-port-forwarding/