need route help

Discussion in 'Linux Networking' started by Todd, Nov 2, 2013.

  1. Todd

    Todd Guest

    Hi All,

    I have a Virtual Machine on
    with an address of

    On that network is a tap device (OpenVPN) with is It resides on
    The Tap's IP is

    From, I can ping

    From the VM, I can ping
    But, I can not ping

    What is the syntax for the route command that I
    need to add to the VM? What am I doing wrong?

    Many thanks,
    Todd, Nov 2, 2013
    1. Advertisements

  2. Hello,

    Todd a écrit :
    IIUC, there is a host with two interfaces :
    - a regular ethernet interface connected to network
    with address ;
    - a TAP interface connected to network with address

    Am I correct ?
    Actually from, I guess.
    What happens exactly ?

    What happens if you ping from the VM ?
    If you get a reply, then it means that the VM has the proper route to
    reach Otherwise, you need to add one with gateway Now you should get a reply.

    Then try again to ping from the VM. If you don't get a
    reply, then either the intermediate host is not acting as a router (i.e.
    doing IP forwarding) and you need to enable ip_forward, or the remote
    host does not have a proper route to
    and you need to add one with gateway
    man route
    man 8 ip
    Pascal Hambourg, Nov 2, 2013
    1. Advertisements

  3. Todd

    Todd Guest

    Hi Pascal,

    Before I waste your time, I think there is a setting in
    my OpenVPN tunnel config file for this. Let me read it over
    really closely first.

    Todd, Nov 2, 2013
  4. Todd

    Tauno Voipio Guest

    Are you sure that there is no mix-up with level 2 (Ethernet)
    and level 3 (IP) tunneling?

    You are using the tap interface, which is a level 2 device for
    forwarding Ethernet frames, and the ends of the tunnel are
    in the same logical local network.

    If you want to have the tunnel ends to be in different local
    networks, you need IP tunneling with the tun interface and
    suitable routing for the networks.

    Please note that in a level 3 routed network, there are 4
    IP addresses for the tunnel:

    - 2 for tunnel outside, connecting the tunnel ends via
    the external network (Internet). For OpenVPN, these
    are by default for UDP port 1194.

    - 2 for the tunnel inside, transporting the tunneled traffic.
    These need to be included into the routing tables.
    Tauno Voipio, Nov 3, 2013
  5. Todd

    Todd Guest

    HI Guys,

    I got working what I need on the host, so
    I no longer need to route the VM's. Thank you
    for the help!

    Todd, Nov 4, 2013
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.