Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a vpnc client that will connect to Cisco and I put any information to /etc/vpnc/default then I run vpnc-connect status connected. All routes will be replaced to tun0.

The targeted 10.10.0.9 can be ping'd from this host. This host has the private IP 10.10.2.15/24 and others host 10.10.2.x/24, I made route in other host with iproute ipr a a 10.10.0.9 via 10.10.2.15. But can't ping 10.10.0.9.

Edit : ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
   valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:06:5b:3c:2b:3a brd ff:ff:ff:ff:ff:ff
inet 10.10.2.15/24 brd 10.10.8.255 scope global eth3
inet6 fe80::206:5bff:fe3c:2b3a/64 scope link
   valid_lft forever preferred_lft forever
14: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1412 qdisc
pfifo_fast state UNKNOWN qlen 500
link/[65534]
inet 10.103.56.242/32 scope global tun0

edit : ip r

180.214.x.x via 10.10.2.1 dev eth1  src 10.10.2.15  mtu 1500 advmss 1460
10.10.2.0/24 dev eth1  proto kernel  scope link  src 10.10.2.15
169.254.0.0/16 dev eth1  scope link  metric 1003
default dev tun0  scope link

enter image description here

edit : mtr 10.10.0.9

Keys:  Help   Display mode   Restart statistics   Order of fields   quit
                                          Packets               Pings
Host                                       Loss%  Last   Avg  Best  Wrst StDev
1. 10.10.2.15                               0.0%   0.3   0.4   0.3   0.5   0.1
2. ???
share|improve this question
    
I offered an edit which edits the formatting a bit to make things more readable, and I attempted to make things clearer; but I do not know there are several sentences which I still cannot interpret. Can you try to elaborate any more? –  HalosGhost Jun 14 at 0:52
    
Is there any connection between the two paragraphs? Is 10.10.2.15 a VPN IP? Can 10.10.2.x reach 10.10.0.9? If you have such a network question then always provide the outputs of ip addr and ip route. –  Hauke Laging Jun 14 at 1:47
    
@HalosGhost sorry i write on mobile, i do not know how to formatting yet. –  Pathic Jun 14 at 5:29
    
@HaukeLaging yes. Vpn ip is 10.10.2.15 and other in same network. 10.10.2.x can't reach 10.10.0.9 even i have routed to vpn ip as gateway. vpn ip reached. –  Pathic Jun 14 at 5:33
1  
Could you please post the output of ip addr show and of ip route show? Thank you. –  MariusMatutiae Jun 14 at 12:20

2 Answers 2

The via address in an ip route command is obviously the gateway address i.e. the system on the same link which the packet is sent to. There is a src option to ip route which can define the source address but that is usually not needed.

share|improve this answer
    
routing in 10.10.2.x have 2 route default route (0.0.0.0/0 via 10.10.2.1) and specific route (10.10.0.9 via 10.10.2.15) –  Pathic Jun 14 at 5:35

Thanks for all your response, I'm very appreciated it.

After I test several route with ip route, then I found the route for each server. At 10.10.2.20 just add,

ip r a 10.10.0.90 via 10.10.2.15 dev eth1

and 10.10.2.15 just add,

ip r a 10.10.0.9 dev tun0

result :

Keys:  Help   Display mode   Restart statistics   Order of fields   quit
                                            Packets                  Pings
 Host                                       Loss%  Last   Avg  Best  Wrst StDev
 1. 10.10.2.15                               0.0%   0.4   0.5   0.4   0.6   0.1
 2. 10.1.4.165                               0.0%   2.8   3.2   2.6   4.3   0.8
 3. 10.1.4.129                               0.0%  39.5  30.3   2.8  48.7  24.3
 4. ???
 5. 10.10.0.126                              0.0%   4.1   4.4   4.1   5.1   0.6
 6. 10.10.0.9                                0.0%   3.5   4.2   3.5   5.5   1.1
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.