add route table and vlan failed

General Tech Bugs & Fixes 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I'm trying to add two route tables with two virtual Nics, I did the following steps:

1, Added two lines in the file /etc/iproute2/rt_tables

   126 net_test_1
   127 net_test_2

2, Created two Ip files under /etc/sysconfig/network-scripts

File one: ifcfg-bond0.11:1    
File two: ifcfg-bond0.11:2 
the content of file ifcfg-bond0.11:1 as following: 
DEVICE=bond0.11:1 
BOOTPROTO=static 
IPADDR=180.180.126.100 
NETMASK=255.255.255.0 
ONBOOT=yes 
USERCTL=no 
VLAN=yes 
The content of file ifcfg-bond0.11:2 as following: 
DEVICE=bond0.11:2 
BOOTPROTO=static 
IPADDR=180.180.127.100 
NETMASK=255.255.255.0 
ONBOOT=yes 
USERCTL=no 
VLAN=yes

3, Added the following content into /etc/sysconfig/network-scripts/rule-bound0.11

from 180.180.126.100 table  net_test_1
from 180.180.127.100 table  net_test_2

4, Added the following content into /etc/sysconfig/network-scripts/route-bond0.11

default via 180.180.126.250 src 180.180.126.100  table net_test_1
default via 180.180.127.250 src 180.180.127.100  table net_test_2

5, Run Command: service network restart

Then all done! when I issued ifconfig, I supposed to see two new virtual Nic as:

bond0.11:1
boud0.11:2

But I didn't see them. Where did I configured wrong please.

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.