Find the answer to your Linux question:
Results 1 to 3 of 3
I have 3 network cards. one is static, other 2 are dhcp. The problem is that I end up with 2 default gateways in routes. How can I define which ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2005
    Posts
    1

    setting default gateway with two dhcp network cards


    I have 3 network cards. one is static, other 2 are dhcp. The problem is that I end up with 2 default gateways in routes. How can I define which to use, or have it only use the first 1 ?

    Of course, my eth2 is the first one listed in routes and I want to use the gateway from eth0.

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    Code:
    route add default gw 123.123.123.123

  3. #3
    Linux Enthusiast puntmuts's Avatar
    Join Date
    Dec 2004
    Location
    Republic Banana
    Posts
    562
    dhcpcd has an option -G which prevents setting the default route. man dhcpcd for more info.

  4. $spacer_open
    $spacer_close

Posting Permissions

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