Minor problems with debian network settings

Source: Internet
Author: User
Debian network settings: Linux Release Technology-Debian information. For more information, see the following. Some time ago it was a bit boring. We installed debian etch and freebsd through the virtual machine, because the company's computer standard system was win2k, I secretly installed an xp package for customers' business trips. (another reason is that xp can be installed at any time when there is a problem. Unlike a company's customized system, if it breaks down, it would be too troublesome to run it back for installation .) So it can be messed up on xp. Has been addicted to linux and bsd.

Some time ago, we upgraded the debian kernel and found that the Network was abnormal. The content modified by/etc/network/interfaces is invalid. I checked it carefully for a long time. The file was automatically modified by the new kernel. The line auto eth0 is missing.
Available:

# This file describes the network interfaces available on your system
# And how to activate them. For more information, see interfaces (5 ).

# The loopback network interface
Auto lo
Iface lo inet loopback

# The primary network interface
# Added support for hot swapping
Allow-hotplug eth0
# Automatically activate the NIC and guess it. Wait for further data verification.
Auto eth0
Iface eth0 inet dhcp

# Office ip
# Iface eth1 inet static
# Address 10.88.9.171
# Netmask 255.255.255.0
# Broadcast 10.88.9.255
# Network 10.88.9.0
# Gateway 10.88.9.254

The command to manually modify the ip address and route is as follows:
Ifconfig and route commands can be used to temporarily set IP addresses and gateways:

Ifconfig-a displays network settings
Ifconfig eth0 inet down first disable eth0
Ifconfig eth0 inet up 192.168.1.2 \
Netmask 255.255.255.0 broadcast 192.168.1.255 is a row. Set IP addresses
Route add default gw 192.168.1.1 eth0 set Gateway
If the route del default gw 192.168.1.1 gateway is incorrect, you can delete it. After setting it, you can use route to check

Set the DNS and directly write/etc/resolv. conf. It is okay to write a few more files, but I don't know if it will be used. The following two are Opendns, which is good, especially for users of China Telecom and China Telecom.

Domain
Nameserver 208.67.222.222
Nameserver 208.67.220.220

There are also host names:

Hostname display Host Name
Set Host Name

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.