Решено: Не работает сеть со статическим ip

Модератор: Модераторы разделов

beowulf
Сообщения: 195
ОС: Alt Linux 2010.05 x86_64

Решено: Не работает сеть со статическим ip

Сообщение beowulf »

никак не могу поднять сеть. У меня статический ip-адрес.

ifconfig -a

Код: Выделить всё

eth0      Link encap:Ethernet  HWaddr 00:1F:D0:28:6A:7E
          inet addr:78.155.196.213  Bcast:78.155.196.255  Mask:255.255.255.192
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:29 Base address:0x8000

eth1      Link encap:Ethernet  HWaddr 00:1F:D0:28:6A:80
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:30 Base address:0xc000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:94 errors:0 dropped:0 overruns:0 frame:0
          TX packets:94 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8745 (8.5 Kb)  TX bytes:8745 (8.5 Kb)


rc.conf

Код: Выделить всё

#
# /etc/rc.conf - Main Configuration for Arch Linux
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime", any other value will result
#   in the hardware clock being left untouched (useful for virtualization)
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="en_US.UTF-8"
HARDWARECLOCK="localtime"
TIMEZONE="Europe/Moscow"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=()

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

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="localhost"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
#
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#

#Static IP example
eth0="eth0 78.155.196.213 netmask 255.255.255.192"
#eth0="dhcp"
#eth1="eth1 192.168.0.1 netmash 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(eth0)

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

# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(main)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng network netfs crond)


route -n

Код: Выделить всё

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
78.155.196.192  0.0.0.0         255.255.255.192 U     0      0        0 eth0
0.0.0.0         78.155.196.209  0.0.0.0         UG    0      0        0 eth0


в resolv.conf прописаны мои днс сервера:

Код: Выделить всё

# Generated by dhcpcd
# /etc/resolv.conf.head can replace this line
# /etc/resolv.conf.tail can replace this line

nameserver 80.93.177.182
nameserver 80.93.176.22


при попытке пинговать по ip получаю ошибку: destination host unreachable.
если пинговать по имени: unknown host

вот. Что делать? :)
Спасибо сказали:
beowulf
Сообщения: 195
ОС: Alt Linux 2010.05 x86_64

Re: Решено: Не работает сеть со статическим ip

Сообщение beowulf »

поднял через netcfg
Спасибо сказали:
Аватара пользователя
Dr.SMP
Сообщения: 233
ОС: Agilia & Frugalware

Re: Решено: Не работает сеть со статическим ip

Сообщение Dr.SMP »

wicd
Не спеши, а то успеешь, следствие - тише едешь точнее диагноз.
Блог арчевода - http://grif12.blogspot.com
Спасибо сказали: