Find the answer to your Linux question:
Results 1 to 2 of 2
I have a 2nd ethernet card in my system that I use to share my internet connection. eth0 is connected to the internet, and eth1 is used for my 2nd ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2010
    Posts
    16

    ip address keeps getting forgotten when no device attached


    I have a 2nd ethernet card in my system that I use to share my internet connection. eth0 is connected to the internet, and eth1 is used for my 2nd computer to connect into. Whenever the 2nd computer is turned off, eth1 forgets its ip address, then when then 2nd computer is turned on, it can't access the internet until I reset the ip address on eth1 ("ifconfig eth1 up 192.168.1.1).

    I only see this behavior under ubuntu 10.04, not the previous distro that ran on this box, slackware 12.

    How do I keep eth2 from forgetting the ip address when no computer is attached?

  2. #2
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    You can't prevent ifdown eth1 on cable disconnect. But you can configure eth1 to use always the same IP and bring the device up automatically on cable connect.

    See here: /etc/network/interfaces

Posting Permissions

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