Network: Difference between revisions
No edit summary |
No edit summary |
||
(20 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
'''Bond two network ports together (example for clonfarm21)''' | '''NOTE:''' when setting secondary ports in ''nmtui'', always specify jlab default 'DNS servers' and 'Search domains', just in case !!! It looks like it prevents ''/etc/resolv.conf'' from being overwritten under certain circumstances. | ||
'''Local network configuring using nmtui - example''' | |||
┌───────────────────────────┤ Edit Connection ├───────────────────────────┐ | |||
│ │ | |||
│ Profile name localport1______________________________ │ | |||
│ Device E8:EA:6A:40:2F:50 (enp0s20u6)___________ │ | |||
│ │ | |||
│ ═ ETHERNET <Show> │ | |||
│ │ | |||
│ ╤ IPv4 CONFIGURATION <Manual> <Hide> │ | |||
│ │ Addresses 192.168.0.11_____________ <Remove> │ | |||
│ │ <Add...> │ | |||
│ │ Gateway _________________________ │ | |||
│ │ DNS servers <Add...> │ | |||
│ │ Search domains <Add...> │ | |||
│ │ │ | |||
│ │ Routing (No custom routes) <Edit...> │ | |||
│ │ [X] Never use this network for default route │ | |||
│ │ [X] Ignore automatically obtained routes │ | |||
│ │ [X] Ignore automatically obtained DNS parameters │ | |||
│ │ │ | |||
│ │ [X] Require IPv4 addressing for this connection │ | |||
│ └ │ | |||
│ │ | |||
│ ═ IPv6 CONFIGURATION <Automatic> <Show> │ | |||
│ │ | |||
│ [X] Automatically connect │ | |||
│ [X] Available to all users │ | |||
│ │ | |||
│ <Cancel> <OK> │ | |||
'''Bond two network ports together, links to the switch (example for clonfarm21)''' | |||
nmcli connection add type bond con-name enp_bond ifname enp_bond bond.options mode=802.3ad | nmcli connection add type bond con-name enp_bond ifname enp_bond bond.options mode=802.3ad | ||
nmcli connection add type ethernet ifname ens7np0 master enp_bond | |||
nmcli connection add type ethernet ifname ens2np0 master enp_bond | nmcli connection add type ethernet ifname ens2np0 master enp_bond | ||
nmcli connection show | nmcli connection show | ||
Line 28: | Line 62: | ||
Now, set bond method to 'manual', and set IP address: | Now, set bond method to 'manual', and set IP address: | ||
nmcli connection modify enp_bond ipv4.method manual | nmcli connection modify enp_bond ipv4.method manual ipv4.address 129.57.69.11/24 | ||
nmcli connection modify enp_bond ipv4.address | |||
Set [[Routing]] if needed. | |||
You can use 'nmtui' as well to program all above. | |||
Finally, disactivate both ens2np0 and ens7np0, and activate enp_bond; using 'nmtui', or command 'nmcli connection down/up <connection>'. | |||
'''NOTE''': in our case, enp_bond inheritate mac from ens2np0, but IP from ens7np0; only ens7np0 was registered on jnet. | |||
To delete bond, run following command: | |||
nmcli connection delete enp_bond | |||
'''Bond two network ports together, links to Maroc electronics (example for clondaq9)''' | |||
nmcli connection add type bond con-name enp_bond ifname enp_bond bond.options mode=broadcast | |||
nmcli connection add type ethernet ifname enp0s20u5 master enp_bond | |||
nmcli connection add type ethernet ifname enp0s20u6 master enp_bond | |||
nmcli connection show | |||
nmcli connection modify enp_bond ipv4.method manual ipv4.address 192.168.0.2/24 | |||
Deactivate individual ports and activate bond: | |||
nmcli connection down localport0 | |||
nmcli connection down localport1 | |||
nmcli connection up enp_bond | |||
'''NOTE''': localport0 etc are profile names as it is shown in ''nmtui'', and NOT a device names like enp0s20u5 etc. | |||
''nmtui'' screen should looks like this: | |||
┌────────────────────────────┤ Edit Connection ├────────────────────────────┐ | |||
│ │ | |||
│ Profile name enp_bond________________________________ │ | |||
│ Device enp_bond________________________________ │ | |||
│ │ | |||
│ ╤ BOND <Hide> │ | |||
│ │ Slaves │ | |||
│ │ ┌─────────────────────────────────────────────────┐ │ | |||
│ │ │ bond-slave-enp0s20u6 ↑ │ <Add> │ | |||
│ │ │ bond-slave-enp0s20u5 ▒ │ │ | |||
│ │ │ ▮ │ <Edit...> │ | |||
│ │ │ ▒ │ │ | |||
│ │ │ ▒ │ <Delete> │ | |||
│ │ │ ↓ │ │ | |||
│ │ └─────────────────────────────────────────────────┘ │ | |||
│ │ Mode <Broadcast> │ | |||
│ │ Link monitoring <MII (recommended)> │ | |||
│ │ Monitoring frequency 100_______ ms │ | |||
│ │ Link up delay 0_________ ms │ | |||
│ │ Link down delay 0_________ ms │ | |||
│ │ Cloned MAC address ________________________________________ │ | |||
│ └ │ | |||
│ │ | |||
│ ╤ IPv4 CONFIGURATION <Manual> <Hide> │ | |||
│ │ Addresses 192.168.0.2/24___________ <Remove> │ | |||
│ │ <Add...> │ | |||
│ │ Gateway _________________________ │ | |||
│ │ DNS servers <Add...> │ | |||
│ │ Search domains <Add...> │ | |||
│ │ │ | |||
│ │ Routing (No custom routes) <Edit...> │ | |||
│ │ [X] Never use this network for default route │ | |||
│ │ [X] Ignore automatically obtained routes │ | |||
│ │ [X] Ignore automatically obtained DNS parameters │ | |||
│ │ │ | |||
│ │ [X] Require IPv4 addressing for this connection │ | |||
│ └ │ | |||
│ │ | |||
│ ═ IPv6 CONFIGURATION <Automatic> <Show> │ | |||
│ │ | |||
│ [X] Automatically connect │ | |||
│ [X] Available to all users │ | |||
│ │ | |||
│ <Cancel> <OK> │ | |||
│ │ |
Latest revision as of 10:27, 22 November 2024
Display traffic
nload -i 10000000 -o 10000000 p6p1
netstat -anp | grep <port>
NOTE: when setting secondary ports in nmtui, always specify jlab default 'DNS servers' and 'Search domains', just in case !!! It looks like it prevents /etc/resolv.conf from being overwritten under certain circumstances.
Local network configuring using nmtui - example
┌───────────────────────────┤ Edit Connection ├───────────────────────────┐ │ │ │ Profile name localport1______________________________ │ │ Device E8:EA:6A:40:2F:50 (enp0s20u6)___________ │ │ │ │ ═ ETHERNET <Show> │ │ │ │ ╤ IPv4 CONFIGURATION <Manual> <Hide> │ │ │ Addresses 192.168.0.11_____________ <Remove> │ │ │ <Add...> │ │ │ Gateway _________________________ │ │ │ DNS servers <Add...> │ │ │ Search domains <Add...> │ │ │ │ │ │ Routing (No custom routes) <Edit...> │ │ │ [X] Never use this network for default route │ │ │ [X] Ignore automatically obtained routes │ │ │ [X] Ignore automatically obtained DNS parameters │ │ │ │ │ │ [X] Require IPv4 addressing for this connection │ │ └ │ │ │ │ ═ IPv6 CONFIGURATION <Automatic> <Show> │ │ │ │ [X] Automatically connect │ │ [X] Available to all users │ │ │ │ <Cancel> <OK> │
Bond two network ports together, links to the switch (example for clonfarm21)
nmcli connection add type bond con-name enp_bond ifname enp_bond bond.options mode=802.3ad nmcli connection add type ethernet ifname ens7np0 master enp_bond nmcli connection add type ethernet ifname ens2np0 master enp_bond nmcli connection show
Last command will show follwoing:
NAME UUID TYPE DEVICE enp_bond 969dc408-bb43-49e0-8c29-62965f70f4c7 bond enp_bond ens10f0 f333ab08-b67a-41c9-9108-7658af3435d0 ethernet ens10f0 ens2np0 85e7f4bd-5daf-3095-b207-bdcaf14d903c ethernet ens2np0 ens7np0 5abd79b1-22e9-4210-9262-fc2dbbda51f7 ethernet ens7np0 lo bcf93a26-5114-45c5-b586-9288dfefbb33 loopback lo bond-slave-ens2np0 7961787a-f51f-459d-9bf8-0add8a528679 ethernet -- bond-slave-ens7np0 aa376ad3-fd9f-44a2-8154-04685ce2da72 ethernet -- ens10f1 0c14d2dd-c3bc-4d3d-8c7d-04cded521498 ethernet -- usb0 4fef7067-fb03-4115-ac62-c95a91979384 ethernet --
Now, set bond method to 'manual', and set IP address:
nmcli connection modify enp_bond ipv4.method manual ipv4.address 129.57.69.11/24
Set Routing if needed.
You can use 'nmtui' as well to program all above.
Finally, disactivate both ens2np0 and ens7np0, and activate enp_bond; using 'nmtui', or command 'nmcli connection down/up <connection>'.
NOTE: in our case, enp_bond inheritate mac from ens2np0, but IP from ens7np0; only ens7np0 was registered on jnet.
To delete bond, run following command:
nmcli connection delete enp_bond
Bond two network ports together, links to Maroc electronics (example for clondaq9)
nmcli connection add type bond con-name enp_bond ifname enp_bond bond.options mode=broadcast nmcli connection add type ethernet ifname enp0s20u5 master enp_bond nmcli connection add type ethernet ifname enp0s20u6 master enp_bond nmcli connection show nmcli connection modify enp_bond ipv4.method manual ipv4.address 192.168.0.2/24
Deactivate individual ports and activate bond:
nmcli connection down localport0 nmcli connection down localport1 nmcli connection up enp_bond
NOTE: localport0 etc are profile names as it is shown in nmtui, and NOT a device names like enp0s20u5 etc.
nmtui screen should looks like this:
┌────────────────────────────┤ Edit Connection ├────────────────────────────┐ │ │ │ Profile name enp_bond________________________________ │ │ Device enp_bond________________________________ │ │ │ │ ╤ BOND <Hide> │ │ │ Slaves │ │ │ ┌─────────────────────────────────────────────────┐ │ │ │ │ bond-slave-enp0s20u6 ↑ │ <Add> │ │ │ │ bond-slave-enp0s20u5 ▒ │ │ │ │ │ ▮ │ <Edit...> │ │ │ │ ▒ │ │ │ │ │ ▒ │ <Delete> │ │ │ │ ↓ │ │ │ │ └─────────────────────────────────────────────────┘ │ │ │ Mode <Broadcast> │ │ │ Link monitoring <MII (recommended)> │ │ │ Monitoring frequency 100_______ ms │ │ │ Link up delay 0_________ ms │ │ │ Link down delay 0_________ ms │ │ │ Cloned MAC address ________________________________________ │ │ └ │ │ │ │ ╤ IPv4 CONFIGURATION <Manual> <Hide> │ │ │ Addresses 192.168.0.2/24___________ <Remove> │ │ │ <Add...> │ │ │ Gateway _________________________ │ │ │ DNS servers <Add...> │ │ │ Search domains <Add...> │ │ │ │ │ │ Routing (No custom routes) <Edit...> │ │ │ [X] Never use this network for default route │ │ │ [X] Ignore automatically obtained routes │ │ │ [X] Ignore automatically obtained DNS parameters │ │ │ │ │ │ [X] Require IPv4 addressing for this connection │ │ └ │ │ │ │ ═ IPv6 CONFIGURATION <Automatic> <Show> │ │ │ │ [X] Automatically connect │ │ [X] Available to all users │ │ │ │ <Cancel> <OK> │ │ │