this is obsolete doc -- see http://doc.nethence.com/ instead
Redhat Networking
Settting up NetworkManager
If you prefer to keep NetworkManager up and running, either use the TUI,
nmtui
or manually,
vi /etc/hostname
cd /etc/sysconfig/network-scripts/
cp ifcfg-eno16780032 DIST.ifcfg-eno16780032
vi ifcfg-eno16780032
BOOTPROTO=static
DNS1=10.0.0.X
DNS2=10.0.0.X
DNS3=10.0.0.X
DOMAIN=example.local
IPADDR=10.0.0.X
PREFIX=22
GATEWAY=10.0.0.X
Static routes
the device dependent way
ifconfig
on RHEL6,
vi /etc/sysconfig/network-scripts/route-eth0
on RHEL7 VM,
vi /etc/sysconfig/network-scripts/route-ens192
network.0.0/16 via local_network_ip_address
#network.0.0/16 via local_network_ip_address via eth0
#network.0.0/16 via local_network_ip_address via ens192
the right way
cd /etc/sysconfig/
vi static-routes
any net network.0.0 netmask 255.255.0.0 gw local_network_ip_address
apply
(also works if using NetworkManager),
on RHEL6,
service network restart
on RHEL7,
systemctl restart network
Setting up VLAN tagging
If you really want to use VLAN tagging on the OS level (eeeeeeeeeeek),
netif=eth1
tag=9
cd /etc/sysconfig/network-scripts/
cat > ifcfg-$netif <<EOF
DEVICE=$netif
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
EOF
cat > ifcfg-$netif.$tag <<EOF
DEVICE=$netif.$tag
BOOTPROTO=none
ONBOOT=yes
IPADDR=10.9.9.1
NETMASK=255.255.255.0
VLAN=yes
EOF
unset netif tag
service network restart
Refs.
7.4. CONFIGURE 802.1Q VLAN TAGGING USING THE COMMAND LINE: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Configure_802_1Q_VLAN_Tagging_Using_the_Command_Line.html
Enabling VLAN tagging on Redhat Linux: http://technodrone.blogspot.com/2011/10/enabling-vlan-tagging-on-redhat-linux.html