Delete Set public Set private Add tags Delete tags
  Add tag   Cancel
  Delete tag   Cancel
  • • DevOps notes •
  •  
  • AI
  • Tags
  • Login

Networking/shaare/F6ZbJQ

  • linux
  • linux

Interface configuration files:

  • /etc/nsswitch.conf → where resolve hostname to IP address

  • /etc/hosts → add new IP to resolve

  • /etc/resolv.conf → resolve hostname

  • netstat → what’s happening on the network

  • tcpdump -i networkinterface (wifi, wlp2s0)

    • network sniffing

NIC → network interface card

  • lo → loopback (local machine)
  • virbr0 → virtual bridge

ETHTOOL ENP0S3

  • Speed? / Duplex?
  • Link detected:

    • YES → network is working
    • NO → not working

NIC BONDING

  • Combine 2 NIC (ethernet port)

    • For redundancy
    • High availability
    • Link aggregation → 1G + 1G = 2G
  • modprobe bonding

  1. Create a bond interface file:

    • nano /etc/sysconfig/network-scripts/ifcfg-bond0
  2. Create first NIC file → ifcfg-enp0s3

    • Add MAC, IP, etc.
  3. Create second NIC file → ifcfg-enp0s8
  4. systemctl restart network

cat /proc/net/bonding/bond0 → show bond interface settings


Network utilities

  • nmcli → network manager command line interface
  • nmtui → network manager text user interface
  • nm-connection-editor → GUI for most of the network manager
  • nmtui → team (to create bond)

  • nmcli device → listing of interface

  • nmcli connection modify enp0s3 ipv4.addresses 192.168.0.180/24

  • nmcli connection modify enp0s3 ipv4.gateway 192.168.0.1

  • nmcli connection modify enp0s3 ipv4.method manual
    NMCLI

  • nmcli connection down enp0s3

  • nmcli connection up enp0s3

  • ip address show enp0s3


Download File

  • wget http://mydomain.com/soft.deb

Find Out Page (Website) is Up

  • curl http://website.com/
  • curl -O http://web.com/file → download a file
  • ping → get IP response
  • nslookup → info sur le site

SS

  • Check how device talk to the internet

    • Identify problem

Socket

  • Enable data transmission

    • TCP, UDP, UNIX

TCP (Transmission Control Protocol)

  • Rule: data is sent successfully (HTTP, FTP, SMTP)

UDP (User Datagram Protocol)

  • Sending data without checking if it arrives correctly
  • Video streaming

UNIX

  • Way for programs to talk to each other
  • Use a special file for message exchange
  • Database / webservers / local system

SS Options

  • ss -t → show TCP connection
  • ss -u → show UDP connection
  • ss -x → show UNIX connection
  • ss -l → listening sockets
  • ss -n → display addresses in numerical form
8 months ago Permalink
cluster icon
  • Disk usage, logging, shutdown, hostname : Disk and Memory Info df → disk partition info df -h → human-readable format du → size of file/directory free → memory info cat /proc/cpuinfo → CPU in...
  • Kickstart – Automate Linux Install : Kickstart server Make Kickstart available on the network Make installation source available Make boot media available Start Kickstart instal...
  • SSH and DNS : SSH ps -ef | grep sshd → check ssh systemctl status sshd DNS PTR record → IP to hostname A record → hostname to IP CNAME record → hostname to...
  • System information, root recovery, environment variables, shortcuts : Finding System Information cat /etc/redhat-release → Red Hat version uname -a → Linux hostname, kernel, architecture dmidecode → hardware, BIOS, syst...
  • SED: Stream Editor for Text Manipulation : Basic Replace Syntax: sed -i 's/KENNY/LENNY/g' filename Substitute all occurrences of "KENNY" with "LENNY" Delete Line Containing String: s...


(97)
Filter untagged links
Fold Fold all Expand Expand all Are you sure you want to delete this link? Are you sure you want to delete this tag? The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community