Find the answer to your Linux question:
Results 1 to 7 of 7
Hi everyone, I have two network cards, and named eth0 and eth1 in Red Hat Enterprise Linux system. The eth0 is connected to the internet, and eth1 works on LAN ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2007
    Posts
    14

    Default network device


    Hi everyone,

    I have two network cards, and named eth0 and eth1 in Red Hat Enterprise Linux system. The eth0 is connected to the internet, and eth1 works on LAN network.

    However, the default network always goes through eth1 after reboot

    Code:
    #] ip route show
    ...
    default via 172.16.0.5 dev eth1
    despite of configurations in /etc/sysconfig/network-scripts/route-eth0.
    Is there anyway to make the default network goes through dev eth0 ?

    Thank you.

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2006
    Location
    Portsmouth, UK
    Posts
    539
    Hi AloneAttack,

    Have you tried setting the default gateway in /etc/sysconfig/network ?
    RHCE #100-015-395
    Please don't PM me with questions as no reply may offend, that's what the forums are for.

  3. #3
    Just Joined!
    Join Date
    Apr 2007
    Posts
    14
    Hi matonb, thank you for your reply.

    I also set the gateway (of course the gateway to internet) in /etc/sysconfig/network . However it still going through eth1 (on LAN) after reboot.
    And if I set the GATEWAY ip (which is on different network than the eth1's network) in this file:
    /etc/sysconfig/network-scripts/ifcfg-eth1
    then I always have the default network assigned to eth0 after reboot and could to go to the internet easily.
    But I think this's not really right.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Enthusiast
    Join Date
    Aug 2006
    Location
    Portsmouth, UK
    Posts
    539
    Which flavour of Linux are you using?
    RHCE #100-015-395
    Please don't PM me with questions as no reply may offend, that's what the forums are for.

  6. #5
    Just Joined!
    Join Date
    Apr 2007
    Posts
    14
    Quote Originally Posted by matonb View Post
    Which flavour of Linux are you using?
    I may not understand your question fully. I'm using Red Hat Enterprise Linux and familiar with this distro than other distros.

  7. #6
    Linux Enthusiast
    Join Date
    Aug 2006
    Location
    Portsmouth, UK
    Posts
    539
    Hi Aloneattack,

    I've been really busy and not had a chance to look into this.

    Which version of RHEL? 5?
    RHCE #100-015-395
    Please don't PM me with questions as no reply may offend, that's what the forums are for.

  8. #7
    Just Joined!
    Join Date
    Apr 2007
    Posts
    14
    hi matonb,
    No, I'm using RHEL4

Posting Permissions

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