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 192.168.255.0/24
    with an address of 192.168.255.101

    On that network is a tap device (OpenVPN) with is
    192.168.210.0/24. It resides on 192.168.255.10
    The Tap's IP is 192.168.210.50

    From 192.168.255.10, I can ping 192.168.210.100

    From the VM, I can ping 192.168.255.10.
    But, I can not ping 192.168.210.100.

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

    Many thanks,
    -T
     
    Todd, Nov 2, 2013
    #1
    1. Advertisements

  2. Hello,

    Todd a écrit :
    IIUC, there is a host with two interfaces :
    - a regular ethernet interface connected to network 192.168.255.0/24
    with address 192.168.255.10 ;
    - a TAP interface connected to network 192.168.210.0/24 with address
    192.168.210.50.

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

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

    Then try again to ping 192.168.210.100 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 192.168.210.100 does not have a proper route to 192.168.255.0/24
    and you need to add one with gateway 192.168.210.50.
    man route
    man 8 ip
     
    Pascal Hambourg, Nov 2, 2013
    #2
    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.

    -T
     
    Todd, Nov 2, 2013
    #3
  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
    #4
  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!

    -T
     
    Todd, Nov 4, 2013
    #5
    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.