Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Feb 08, 2018 11:48 am 
Offline
Newbie

Joined: Mon Jun 12, 2017 2:40 pm
Posts: 4
Hello.

I have some Linodes running GlusterFS for high availability file services, and I have some Linodes running a web server platform, and the web servers connect to the Gluster servers as clients. Running Ubuntu 16.04 LTS.

My question is regarding my routing table -- I'm a little confused about the interface being used not showing the alias. I just want to make sure that on my side, the traffic is going out through the private network and not being counted towards the public network traffic, even though the interface is the same as the one listed for the public IP route. Below, eth0:1 is the alias for the private IP on the Linode. For example purposes, Linode 1/Private IP 1 is 192.168.1.1, Linode 2/Private IP 1 is 192.168.2.1.

----- added to rc.local ------------------------------------------------
ip route add 192.168.1.1 dev eth0:1
-------------------------------------------------------------------------
The resulting routing table looks like (pivoting it for readability):
Destination: 192.168.1.1
Gateway: 0.0.0.0
Genmask: 255.255.255.255
Flags: UGH
Metric: 0
Ref: 0
Use: 0
Iface: eth0

Alternatively, should I be using a "via" option when adding the route? (ip route add 192.168.1.1 dev eth0:1 via 192.168.2.1)

While it makes sense to me that traffic destined for the private network isn't going to route out through the public network, I just want to make sure that bandwidth is not being calculated based on eth0 if my eth0:1 alias is routing out through eth0, if that makes sense.

Thanks for any pointers.


Top
   
PostPosted: Fri Feb 09, 2018 3:40 am 
Offline
Senior Member

Joined: Thu Nov 16, 2017 6:59 am
Posts: 108
You test this by
Code:
ip route get xxx
Since the interface is an alias, you should specify source IP when adding a route, as in
Code:
ip route add 192.168.1.1 src 192.168.1.2 dev eth0
The via option is for gateways.

_________________
- emestee,
Lord System Administrator


Top
   
PostPosted: Fri Feb 09, 2018 10:34 am 
Offline
Newbie

Joined: Mon Jun 12, 2017 2:40 pm
Posts: 4
Ah, of course! Thank you -- that was exactly what I needed.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
RSS

Powered by phpBB® Forum Software © phpBB Group