You are not logged in.

#1 2005-06-10 06:04:05

nkw
Member
Registered: 2004-03-26
Posts: 80

Which network configuration file?

I have a PC installed previous version of Arch. The PC is not used for while and the monitor has gone. I tried to ssh it a while ago but I messed up the networking setting by using "route add", etc. And since then I cannot connect to the PC anymore.

Now I boot the PC using Knoppix live CD and I can ssh the PC (Knoppix) and mount the hard disks. Which configuration files I need to check/modify in order to fix the network of the ArchLinux on the harddisk?

On a windows PC which can connect network, the ipconfig shows:

Connection-specific DNS Suffix  . :
IP Address. . . . . . . . . . . . : 192.168.1.3
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

And my rc.conf:

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

#
# Networking
#
HOSTNAME="myarch"

#
# Module to load at boot-up (in this order)
#   (prefix a module with a ! to disable it)
#
MODULES=(!usbserial !ide-scsi !snd-pcm-oss bttv !ip_conntrack_ftp)

#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   (prefix an interface in INTERFACES with a ! to disable it)
#
# Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")
#
lo="lo 127.0.0.1"
eth0="eth0 192.168.1.111 netmask 255.255.255.0 broadcast 192.168.1.255"
#eth0="dhcp"
eth1="eth1 192.168.2.1 netmask 255.255.255.0 broadcast 192.168.2.255"
INTERFACES=(lo eth0 eth1)

#
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   (prefix a route in ROUTES with a ! to disable it)
#
gateway="default gw 192.168.1.1"
ROUTES=(!gateway)

#
# Daemons to start at boot-up (in this order)
#   (prefix a daemon with a ! to disable it)
#
DAEMONS=(syslog-ng hotplug !pcmcia network netfs crond sshd ntpd !firewall !dnsm
asq httpd !mysqld !cups)

The network cable is connected to eth0. And I tried both dhcp and static IP. Both doesn't work.

Any other files I need to look?

thanks.

Offline

#2 2005-06-10 08:49:46

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,838

Re: Which network configuration file?

Do you actually need two network interfaces on the machine? Whether you do or not, it would simplify your recovery here if you temporarily remove the one you're not using.

Your MODULES array does not include any network modules, so I'm assuming hotplug is taking care of this for you. In the Interfaces section, comment out the eth1 line, and put ! before eth1 in the INTERFACES array. In the routes section, remove the ! before gateway in the ROUTES array. When you reboot, eth0 should come up with static address 192.168.1.111, gateway 192.168.1.1.

Once you're connected, you can reinstall and reconfigure the second NIC.

Offline

#3 2005-06-10 14:07:03

nkw
Member
Registered: 2004-03-26
Posts: 80

Re: Which network configuration file?

Thanks, the !gateway should be the reason because the machine is used to connect Internet directly. And now it's moved behind router.

Offline

Board footer

Powered by FluxBB