Host Configuration
1.
1 | vim /etc/sysconfig/network-scripts/ifcfg-br0 |
1 | TYPE=Bridge |
2.
1 | vim /etc/sysconfig/network-scripts/ifcfg-enp4s0 |
1 | HWADDR=04:D9:F5:D3:59:DB |
3. Restart Network
1 | systemctl list-units |
4. Verify
1 | brctl show |
KVM
1 | virsh list --all |
1 | virsh edit centos7.0 |
1 | <interface type='bridge'> |
1 | virsh reboot centos7.0 |
Virsh
1 | virsh help |
Bring up a wireless network
1 | ip addr show |
Route table configuration
1 | # show route |
1 | route add -net 192.168.2.0 netmask 255.255.255.0 dev enp6s0 |
1 | systemctl list-units |
Restart eth0
1.
1 | systemctl restart network.service |
2.
1 | ifdown eth0;ifup eth0 |
Centos 8
1 | nmcli conn add type bridge con-name br0 ifname br0 |
Centos 8 host should enable masquerade forwarding, to prevent dns problem, as you may able to ping ip, but cannot ping url.
1 | firewall-cmd --permanent --zone=public --add-masquerade |
Centos 7 NAT Gateway
1 | [root@Firewall network-scripts]# ip a |