Article 54VJ1 Best way to setup my home server network in Slackware

Best way to setup my home server network in Slackware

by
The_Dark_Passenger
from LinuxQuestions.org on (#54VJ1)
Hello,

I have a server with one NIC on board, and a dual port PCI Express NIC added. This server will be used exclusively for virtualization. I essentially want to configure the interfaces so that the onboard NIC is forced to go through a VLAN interface so that it is properly tagged and on one VLAN. The other NIC, I want both interfaces to essentially not be accessible to the host, and only exposed through the virtual machines.

It seems that there's no way in rc.inet1.conf to setup VLANs. So, I've basically just set the IP addresses of these interfaces to 0.0.0.0 in rc.inet1.conf so that they appear up. Then, I use rc.local to setup the VLAN interface on br0 which is configured in rc.inet1.conf, but again configured with the IP of 0.0.0.0. This is so just in case I need to use this NIC for a virtual machine. Then eth1 and eth2 are also configured to use 0.0.0.0 as their IPs. This does accomplish the interfaces being up. The bit I have in rc.local is:

Code:ip link add link br0 name br0.<vlan-id> type vlan id <vlan-id>
ip addr add <ip>/29 brd <brd-address> dev br0.<vlan-id>
ip link set br0.6 up
ip route add default via <router-ip> dev br0.6Also here's my rc.inet1.conf config:

Code:# Config information for eth0:
#IPADDR[0]="<local-address>"
#NETMASK[0]="255.255.255.0"
#USE_DHCP[0]=""
#DHCP_HOSTNAME[0]=""

# Config information for br0:
IFNAME[1]="br0"
BRNICS[1]="eth0"
IPADDR[1]="0.0.0.0"
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""

# Config information for eth1:
IFNAME[2]="eth1"
IPADDR[2]="0.0.0.0"
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""

# Config information for eth2:
IFNAME[3]="eth2"
IPADDR[3]="0.0.0.0"
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""

# Default gateway IP address:
GATEWAY=""I also set the netmask to /29 as I only need one or two systems to access the actual host. Then I have setup the firewall to only allow traffic over br0.6 from the host level. I still though see a large number of martian packets that appear to be broadcast packets across all interfaces.

The PCI Express NIC is setup with SR-IOV, and it does properly work with KVM virtual machines I have running. I was able to setup the SR-IOV pool, and see that the interfaces are the proper virtual function interfaces exposed to the virtual machine.

Overall, this setup is working technically. But, I feel like this is a very hacked together configuration, and there's probably a much better way to do this. I'll certainly admit that I'm not exactly the strongest net admin. :p

Any help and guidance on the best way to configure this networking would be much appreciated!latest?d=yIl2AUoC8zA latest?i=Zj0ndB-JGbk:b-2W8uqLdes:F7zBnMy latest?i=Zj0ndB-JGbk:b-2W8uqLdes:V_sGLiP latest?d=qj6IDK7rITs latest?i=Zj0ndB-JGbk:b-2W8uqLdes:gIN9vFwZj0ndB-JGbk
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments