From 8af2b5ae04f5fd386d4a782cc0ecf11c420dd9c8 Mon Sep 17 00:00:00 2001 From: medusa Date: Tue, 16 Apr 2024 15:13:57 +0000 Subject: [PATCH] Update docs/tech_docs/linux/KVM-virtualization-setup.md --- .../linux/KVM-virtualization-setup.md | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/docs/tech_docs/linux/KVM-virtualization-setup.md b/docs/tech_docs/linux/KVM-virtualization-setup.md index 04b6a6d..2a3e7b7 100644 --- a/docs/tech_docs/linux/KVM-virtualization-setup.md +++ b/docs/tech_docs/linux/KVM-virtualization-setup.md @@ -1,3 +1,79 @@ +Sure, here's a condensed version with two sections: a step-by-step guide and a list of helpful commands. + +**Step-by-Step Guide** + +1. **Create the first bridge network (br-my-lan0) for Kubernetes DEV** +``` +sudo ip link add name br-my-lan0 type bridge +sudo ip addr add 10.154.2.1/24 dev br-my-lan0 +sudo ip link set dev br-my-lan0 up +``` + +2. **Create the second bridge network (br-my-lan1) for Docker DEV** +``` +sudo ip link add name br-my-lan1 type bridge +sudo ip addr add 172.50.50.1/24 dev br-my-lan1 +sudo ip link set dev br-my-lan1 up +``` + +3. **Persist the connections** +``` +sudo vi /etc/sysconfig/network-scripts/ifcfg-br-my-lan0 +``` +Add the following: +``` +DEVICE=br-my-lan0 +TYPE=Bridge +BOOTPROTO=static +IPADDR=10.154.2.1 +NETMASK=255.255.255.0 +ONBOOT=yes +``` + +``` +sudo vi /etc/sysconfig/network-scripts/ifcfg-br-my-lan1 +``` +Add the following: +``` +DEVICE=br-my-lan1 +TYPE=Bridge +BOOTPROTO=static +IPADDR=172.50.50.1 +NETMASK=255.255.255.0 +ONBOOT=yes +``` + +4. **Restart NetworkManager** +``` +sudo systemctl restart NetworkManager +``` + +**Helpful Commands** + +**Network Verification Commands** +- `ip a` - Show IP addresses and network interfaces +- `ping ` - Test connectivity to a specific IP address +- `traceroute ` - Trace the route to a specific IP address +- `mtr ` - Combine traceroute and ping functionalities + +**Common Network Commands** +- `ifconfig` - View and configure network interfaces +- `netstat` - Display network connections, routing tables, and more +- `route` - Manage routing tables +- `iptables` - Configure firewall rules +- `nmap` - Network exploration and security auditing + +**Advanced Network Commands** +- `tcpdump` - Network packet capture and analysis +- `wireshark` - Graphical network protocol analyzer +- `ncat` - Versatile network debugging and data transfer tool +- `iperf` - Network performance measurement tool +- `lsof` - List open files, including network connections + +These commands can help you verify network configurations, troubleshoot issues, and perform advanced network analysis and debugging tasks. + +--- + ### 1. Folder Structure Best Practices For a well-organized virtualization environment, consider the following directory structure: