0

hi few days back i have asked a question here

choosing network interface based on network purpose

on my Centos server there are 4 NICs

i bonded first two NICs and created bond0 with an MTU of 8600 and bonded second two interfaces and created bond1

with an intention to use bond0 for storage and bond1 for network traffic.

bond1 is connected to a Linux Bridge - br0

NFS server is at 10.10.10.5 and bond0 has an ip address of 10.10.10.2

bond1 has an ip of 10.10.10.3

two subnets and VLAN are not possible so what i did was i manually added a route

route add -host 10.10.10.5 dev bond0 

and is visible in

route -n

But for some reason Rx Tx of br0(bond1) is in Gb and that of bond0 is Kb even with lots of data transferred to NFS

Why bond0 is not used for data transfer to NFS even with this route

Destination   Gateway       Genmask       Flags Metric Ref    Use Iface
10.10.10.5    0.0.0.0         255.255.255.255 UH    0      0        0 bond0

Update:

tcpdump shows Host to NFS server is communicated over IP on bond0 ie 10.10.10.2 but Rx Tx is in KB,and if i bring down IP on bond0 then it uses 10.10.10.3 for NFS communication.

Why is Tx of bond0 not increasing even if uses IP assigned on it to access NFS!!!

  • I think you're hitting the problem that - because both bond0 and bond1 are on the same subnet, they're both equally valid for outbound traffic _to_ that subnet. The 'route' command you're asking about, allows you to route to remote subnets via differing gateways. – Sobrique Jun 27 '14 at 16:05
  • yes you are correct,but the route rule says if the destination is 10.10.10.5 use bond0,why isn't that working. – user227321 Jun 27 '14 at 16:09

1 Answers1

3

You can do this by using policy-based routing to hint to Linux to prefer particular interfaces for specific traffic.

However, the setup you're using here looks very unstable and you're going to HAVE LOTS OF PAIN in the future.

MikeyB
  • 39,291
  • 10
  • 105
  • 189
  • thanks,thats what i am trying to achieve by specifying bond0 for all traffic to NFS server as you can see,i already have a rule for that – user227321 Jun 27 '14 at 16:15
  • I'd be suggesting - use a different address range (and if possible a vlan) for your NFS traffic, if the segregation is important to you. – Sobrique Jun 27 '14 at 16:17
  • You're already using PBR? I don't think you [looked it up](http://blog.scottlowe.org/2013/05/29/a-quick-introduction-to-linux-policy-routing/) before saying that you're already using it. – MikeyB Jun 27 '14 at 21:13