2
I have a linux server with three interfaces - one for net, two internal, below are shown the internal ones:
eth1
inet addr:192.168.10.253
Bcast:192.168.255.255
Mask:255.255.0.0eth2
inet addr:10.10.10.253
Bcast:10.10.10.255
Mask:255.255.255.0
Have one internal work machine with gate 192.168.10.253 and ip from that subnet and other with gate 10.10.10.253 and ip from its subnet. I need to be able to have access between those machines.
On the linux box I have the following routing table:
default via * dev eth0
10.10.10.0/24 dev eth2 proto kernel scope link src 10.10.10.253
* dev eth0 proto kernel scope link src *
192.168.10.0/16 dev eth1 proto kernel scope link src 192.168.10.253
I added a static route:
route add -net 10.10.10.0 netmask 255.255.255.0 gw 192.168.10.253
and the result
10.10.10.0/24 via 192.168.10.253 dev eth1 scope link
but when I try to ping from eth1 an up and running interface 10.10.10.2 it always gives destination host unreachable. What am I missing as configuration?
The basic setup is shown here:
When I ping from eth1
ping 10.10.10.2 -I eth1
PING 10.10.10.2 (10.10.10.2) from 192.168.10.253 eth1: 56(84) bytes of data.
From 192.168.10.253 icmp_seq=1 Destination Host Unreachable
and when I ping from eth2:
ping 10.10.10.2 -I eth2
PING 10.10.10.2 (10.10.10.2) from 10.10.10.253 eth2: 56(84) bytes of data.
64 bytes from 10.10.10.2: icmp_seq=1 ttl=64 time=0.547 ms
1So you want traffic to 10.10.10.0/24 to got out of eth1 via gateway 192.168.10.253. Is that correct? That's what you've said and what your routing table implies. What then, is the point of the eth2 connection? – Darren – 2017-09-04T10:43:38.077
licensing demand unfortunately..it needs primary address from that range, for evaluation purposes – modzozo – 2017-09-04T11:00:35.840
So is there a route from 192.168.10.253 to the 10.10.10.0/24 subnet? From the OP: "...other with gate 10.10.10.253 and ip from its subnet." so it sounds like there isn't. – Darren – 2017-09-04T11:02:35.803
I need to add that with ip rule? – modzozo – 2017-09-04T11:17:00.327
Depends on what device that gateway is. Is there even a physical connection from that gateway device to the 10.10.10.0/24 subnet. Might help if you can post a network diagram. – Darren – 2017-09-04T11:21:41.617
(1) I’m having some trouble visualizing your setup. Could you add an ASCII-art diagram of your network? Or at least list, all in one place, all the machine that you are mentioning in your question? (2) Also, show more of the commands you used, and not just their output. (3) Is the 192.168.0.0/16 generally working OK? That’s an unusual configuration. – Scott – 2017-09-04T11:22:49.713
thank you, both. I updated the description and added asciiflow diagram. – modzozo – 2017-09-04T12:07:03.480
(4) You indicate that your Linux box already had a route
10.10.10.0/24 via 192.168.0.253
before you added the10.10.10.0/24 via 192.168.10.253
route. Can you explain that? (5) Can you explain whyping
thinks10.10.10.2
is1.1.1.1
? (6) Your diagram indicates that machine #1 has address 192.168.10.253. I presume that this is just a typo. (7) When I suggested ASCII art, my thought was that you would just post the ASCII in your question, rather than converting it into a PNG and uploading it. Oh well, do whatever is more convenient for you. – Scott – 2017-09-04T13:27:47.337sorry Scott, stupid clipboard, cause I have couple of environments which I am trying to configure. I edited the post correctly. – modzozo – 2017-09-04T13:37:57.137
Thanks for responding. It’s good that the above comment wasn’t important, because I almost never saw it. When you write a comment to a specific person, you should put ‘@’ followed by their name into the comment; for example, “@Scott”, or see Darren’s comment to you below his answer. You are being notified about this comment because it’s under your question. – Scott – 2017-09-04T22:57:41.177
Pls take a look at my answer too, since it solves your problem. – MariusMatutiae – 2017-09-05T20:51:23.577