AWS Lab 11 : EC2 Linux & RHEL 6.x multiple ENI (NIC) & different subnet

AWS Lab 11 : EC2 Linux & RHEL 6.x multiple ENI (NIC) & different subnet

Step:1 Create AMI Backup of your instance
Step:2 Created 3 x ENI’s on three different subnets with IP’s
Step:3 Attached 3 x ENI’s to your instance
Step:4 Configured network configuration file.
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1 –> vi ifcfg-eth1 and updated Device=eth1
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth2 –> vi ifcfg-eth2 and updated Device=eth2
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth3 –> vi ifcfg-eth3 and updated Device=eth3

Step:5 Configured default gateway for primary interface “eth0″
vi /etc/sysconfig/network
GATEWAYDEV=eth0 —> added this line *** (important)

Step:6 Restart network service
service network restart

Step:7 Create route tables:
cat /etc/iproute2/rt_tables
echo “# dual nic-gateway below” >> /etc/iproute2/rt_tables
echo “10 eth0table” >> /etc/iproute2/rt_tables
echo “20 eth1table” >> /etc/iproute2/rt_tables
echo “30 eth2table” >> /etc/iproute2/rt_tables
echo “40 eth3table” >> /etc/iproute2/rt_tables

Step: 8 Create static route tables entry and routing rules: (this takes care your configuration during reboot)
cd /etc/sysconfig/network-scripts

vi route-eth0 dev eth0 src table eth0table
default via dev eth0 table eth0table

vi route-eth1 dev eth1 src table eth1table
default via dev eth1 table eth1table

vi route-eth2 dev eth2 src table eth2table
default via dev eth2 table eth2table

vi route-eth3 dev eth3 src table eth3table
default via dev eth3 table eth3table

##RULE file
vi rule-eth0
from table eth0table
to table eth0table

vi rule-eth1
from table eth1table
to table eth1table

vi rule-eth2
from table eth2table
to table eth2table

vi rule-eth3
from table eth3table
to table eth3table

Step:9 Restart the network service (or) you can reboot and check
service network restart

Step:10 Verify from other system on network.


Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>