Results 1 to 5 of 5

Thread: Dual subnet

  1. #1
    Join Date
    Aug 2011
    Beans
    2

    Angry Dual subnet

    i have two ethernet cards connected on two separated network.

    device eth0
    ip 192.168.0.14
    network 192.168.0.0/255.255.255.0
    gw 192.168.0.1

    device eth2
    ip 192.168.68.14
    network 192.168.68.0/255.255.255.0
    gw 192.168.68.254

    here is my /etc/network/interface :

    auto eth0
    iface eth0 inet static
    address 192.168.0.14
    netmask 255.255.255.0
    gateway 192.168.0.1

    auto eth2
    iface eth2 inet static
    address 192.168.68.14

    after network restart, i can only access network through eth0.
    what should i do so that i can also access 192.168.14.0 network ?

  2. #2
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,790
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Dual subnet

    Hi maxicool. Welcome to the forums

    Try setting both netmask and gateway for the other interface too:
    Code:
    auto eth0 
    iface eth0 inet static
        address 192.168.0.14
        netmask 255.255.255.0
        gateway 192.168.0.1
    
    auto eth2
    iface eth2 inet static
        address 192.168.68.14
        netmask 255.255.255.0
        gateway 192.168.68.254
    Let us know how it goes.
    Regards.

  3. #3
    Join Date
    Sep 2012
    Location
    ab.ca
    Beans
    149
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Dual subnet

    How are you specifying what application accesses from which adapter?

  4. #4
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Dual subnet

    Post results of ifconfig -a.
    If I understand correctly, the gateway should be where the system sends traffic not otherwise specified. Traffic going to the subnets should be directed there... traffic to eg. 8.8.8.8 would be directed through the gateway interface.

    You might also check route -n to see the routing table.
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

  5. #5
    Join Date
    Aug 2011
    Beans
    2

    Re: Dual subnet

    Tanks a Lot, everyone! I found Out that i made a silly mistake. The local network is on eth1 instead of eth2. Sorry for troubling you guys.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •