-2

i have 3 NIC with ip address 10.10.10.2-eth0, 10.10.10.3-eth1, 10.10.10.4-eth2

An NFS server with IP 10.10.10.5 and want this NFS share to be accessed only through 10.10.10.3 that is through eth1 and not through eth0 and eth2.

and for all other external communication it should use eth2 with ip 10.10.10.4

How can this be achieved,can any one please help me with this

Thanks

  • 6
    `1.` Clean up your question. You seem to be mixing the eth interfaces and ip addresses up. `2.` Why would you have 3 different interfaces connecting to the same layer 3 subnet? `3.` Can't you simply add a static route to the ip address of the NFS via the 10.10.10.3 interface? – joeqwerty Jun 25 '14 at 20:45

1 Answers1

2

As suggested by others you can add static routes

route add -host 10.10.10.5 dev eth1

and verfiy with

route -n
ananthan
  • 1,510
  • 1
  • 18
  • 28