Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  | Правила  

Компьютерный форум OSzone.net » Linux и FreeBSD » Общий по Linux » Debian/Ubuntu - Как создать сетевое подключение к ТТК в Debian

Ответить
Настройки темы
Debian/Ubuntu - Как создать сетевое подключение к ТТК в Debian

Ветеран


Сообщения: 1404
Благодарности: 135

Профиль | Отправить PM | Цитировать


Пробовал такой вариант

Цитата:
Для настройки подключения к сети в RHEL/CentOS мы будем использовать консольный вариант настройки. Вариант настройки с использованием графического интерфейса здесь не рассматривается.

1. Войдите в консоль сервера. Если Вы используете терминальный режим, то просто войдите в систему, если Вы используете графический интерфейс - откройте окно консоли.

2. Проверьте, что в Вашей системе установлен пакет rp-pppoe с помощью команды rpm -qa rp-pppoe. Если пакет не установлен, найдите его на установочном носителе, и установите, например так: rpm -ivh rp-pppoe-3.5-32.1.x86_64.el5.rpm.

3. После того, как пакет rp-pppoe установлен, можно перейти к настройке системы. Мы будем настраивать подключение, как устройство ppp0. Если по тем или иным причинам устройство ppp0 у Вас уже настроено, не забудьте во всей описанной ниже конфигурации заменить номер устройства ppp на номер свободного у Вас устройства.

4. Настраиваем параметры подключения: создаем файл /etc/sysconfig/network-scripts/ifcfg-ttknw, в него заносим следующие параметры:

NAME=ttknw
# не забудьте заменить номер с 0 на что-то другое, если у вас занят ppp0
DEVICE=ppp0
ONBOOT=yes
BOOTPROTO=dialup
PERSIST=yes
DEFROUTE=yes
RETRYTIMEOUT=5
RETRY_ON_FAILURE=yes
PEERDNS=yes
FIREWALL=NONE
PING=.
PPPOE_TIMEOUT=80
PPPOPTIONS="file /etc/ppp/peers/ttknw"
# тут тоже не забудьте заменить номер на нужный, если у вас занят ppp0
PPPD_EXTRA="unit 0"
TYPE=xDSL
PIDFILE=/var/run/pppoe-ttknw.pid
CONNECT_POLL=15
CONNECT_TIMEOUT=0
SYNCHRONOUS=no
LCP_FAILURE=3
LCP_INTERVAL=20
MTU=1472
PROVIDER=ttknw
# здесь заменяем ваш_логин на Ваш логин, выданный при подключении
USER=ваш_логин


Естественно, ttknw тоже можете поменять на удобное Вам название, только если меняете - не забудьте сделать это и в дальнейшей конфигурации.

Не забудьте указать логин в параметре USER.

5. Параметры подключения настроены, настраиваем дополнительные параметры данного подключения. Создаем файл /etc/ppp/peers/ttknw, туда помещаем следующее:

updetach
remotename ttknw
linkname ttknw
ipparam ttknw
name ваш_логин
holdoff 3
noauth
noproxyarp
refuse-eap
refuse-mschap
require-chap
unit 0
mru 1472
mtu 1472



Опять же, не забудьте указать Ваш логин в параметре name, ну и заменить номер ppp-интерфейса в параметре unit.

6. Прописываем Ваш пароль. Откройте файл /etc/ppp/chap-secrets (или создайте его, если его еще нет), туда впишите следующую строчку:

ваш_логин ttknw ваш_пароль *

ваш_логин замените на Ваш логин, ваш_пароль - на Ваш пароль для подключения.

7. Подключение настроено, поднимаем его командой ifup ttknw (при старте компьютера оно будет подниматься автоматически, при разрыве соединения по той или иной причине - тоже будет автоматически подниматься заново).

Вот и всё. Должен появиться интерфейс ppp0 (или тот, который Вы настроили), а также маршрут default на данный интерфейс. Если не появились - проверьте конфигурацию еще раз, и загляните в логи.

Отправлено: 05:46, 14-05-2015

 

Аватара для ruslandh

info man howto


Сообщения: 6958
Благодарности: 384

Профиль | Сайт | Отправить PM | Цитировать


Цитата mrcnn:
А Debian не для начинающих что ли? »
Нет, конечно, ни для новичков.

И если честно, то он отстаёт от последних версий пакетов.

-------
Поспешай не торопясь


Отправлено: 17:35, 15-05-2015 | #11



Для отключения данного рекламного блока вам необходимо зарегистрироваться или войти с учетной записью социальной сети.

Если же вы забыли свой пароль на форуме, то воспользуйтесь данной ссылкой для восстановления пароля.


Ветеран


Сообщения: 1404
Благодарности: 135

Профиль | Отправить PM | Цитировать


Мне удалрсь зайти в интернет из федоры посредством
pppoe-setup
sbin/ifup ppp0
в дебианепо всей видимости делается также

-------
Ehhh.. what's up, doc?..


Отправлено: 22:55, 15-04-2016 | #12


Ветеран


Сообщения: 1404
Благодарности: 135

Профиль | Отправить PM | Цитировать


В дебиане pppoe-setup запусьить не удалось, так как он сказал, что нет файла /etc/ppp/pppoe.conf,.
Установил из портов pppoeconf, который изменил файл /etc/ppp/peers/dsl-provider

Цитата:
# Configuration file for PPP, using PPP over Ethernet
# to connect to a DSL provider.
#
# See the manual page pppd(8) for information on all the options.

##
# Section 1
#
# Stuff to configure...

# MUST CHANGE: Uncomment the following line, replacing the user@provider.net
# by the DSL user name given to your by your DSL provider.
# (There should be a matching entry in /etc/ppp/pap-secrets with the password.)
#user myusername@myprovider.net

# Use the pppoe program to send the ppp packets over the Ethernet link
# This line should work fine if this computer is the only one accessing
# the Internet through this DSL connection. This is the right line to use
# for most people.
#pty "/usr/sbin/pppoe -I eth0 -T 80 -m 1452"

# An even more conservative version of the previous line, if things
# don't work using -m 1452...
#pty "/usr/sbin/pppoe -I eth0 -T 80 -m 1412"

# If the computer connected to the Internet using pppoe is not being used
# by other computers as a gateway to the Internet, you can try the following
# line instead, for a small gain in speed:
#pty "/usr/sbin/pppoe -I eth0 -T 80"


# The following two options should work fine for most DSL users.

# Assumes that your IP address is allocated dynamically
# by your DSL provider...
noipdefault
# Try to get the name server addresses from the ISP.
usepeerdns
# Use this connection as the default route.
# Comment out if you already have the correct default route installed.
defaultroute

##
# Section 2
#
# Uncomment if your DSL provider charges by minute connected
# and you want to use demand-dialing.
#
# Disconnect after 300 seconds (5 minutes) of idle time.

#demand
#idle 300

##
# Section 3
#
# You shouldn't need to change these options...

hide-password
lcp-echo-interval 20
lcp-echo-failure 3
# Override any connect script that may have been set in /etc/ppp/options.
connect /bin/true
noauth
persist
mtu 1492

# RFC 2516, paragraph 7 mandates that the following options MUST NOT be
# requested and MUST be rejected if requested by the peer:
# Address-and-Control-Field-Compression (ACFC)
noaccomp
# Asynchronous-Control-Character-Map (ACCM)
default-asyncmap

plugin rp-pppoe.so eth0
user "381008028"
В /etc/ppp/создаются файлы chap-secrets с указанием имени и пароля
Код: Выделить весь код
# Secrets for authentication using CHAP
# client	server	secret			IP addresses
и pap-secrets
Код: Выделить весь код
# Secrets for authentication using PAP
# client	server	secret			IP addresses
запуск pon dsl-provider
пытаюсь подключиться - не работает.

Создаю файл pppoe.conf следующего содержания
Код: Выделить весь код
#***********************************************************************
#
# pppoe.conf
#
# Configuration file for rp-pppoe.  Edit as appropriate and install in
# /etc/ppp/pppoe.conf
#
# NOTE: This file is used by the adsl-start, adsl-stop, adsl-connect and
#       adsl-status shell scripts.  It is *not* used in any way by the
#       "pppoe" executable.
#
# Copyright (C) 2000 Roaring Penguin Software Inc.
#
# This file may be distributed under the terms of the GNU General
# Public License.
#
# $Id: pppoe.conf,v 1.7 2001/09/14 19:07:39 dfs Exp $
#***********************************************************************

# When you configure a variable, DO NOT leave spaces around the "=" sign.

# Ethernet card connected to ADSL modem
ETH='eth0'

# ADSL user name.  You may have to supply "@provider.com"  Sympatico
# users in Canada do need to include "@sympatico.ca"
# Sympatico uses PAP authentication.  Make sure /etc/ppp/pap-secrets
# contains the right username/password combination.
# For Magma, use xxyyzz@magma.ca
USER='381008028'

# Bring link up on demand?  Default is to leave link up all the time.
# If you want the link to come up on demand, set DEMAND to a number indicating
# the idle time after which the link is brought down.
DEMAND=no
#DEMAND=300

# DNS type: SERVER=obtain from server; SPECIFY=use DNS1 and DNS2;
# NOCHANGE=do not adjust.
DNSTYPE=SERVER

# Obtain DNS server addresses from the peer (recent versions of pppd only)
USEPEERDNS=yes

DNS1=
DNS2=

# Make the PPPoE connection your default route.  Set to
# DEFAULTROUTE=no if you don't want this.
DEFAULTROUTE=yes

### ONLY TOUCH THE FOLLOWING SETTINGS IF YOU'RE AN EXPERT

# How long adsl-start waits for a new PPP interface to appear before
# concluding something went wrong.  If you use 0, then adsl-start
# exits immediately with a successful status and does not wait for the
# link to come up.  Time is in seconds.
#
# WARNING WARNING WARNING:
#
# If you are using rp-pppoe on a physically-inaccessible host, set
# CONNECT_TIMEOUT to 0.  This makes SURE that the machine keeps trying
# to connect forever after adsl-start is called.  Otherwise, it will
# give out after CONNECT_TIMEOUT seconds and will not attempt to
# connect again, making it impossible to reach.
CONNECT_TIMEOUT=30

# How often in seconds adsl-start polls to check if link is up
CONNECT_POLL=2

# Specific desired AC Name
ACNAME=

# Specific desired service name
SERVICENAME=

# Character to echo at each poll.  Use PING="" if you don't want
# anything echoed
PING="."

# File where the adsl-connect script writes its process-ID.
# Three files are actually used:
#   $PIDFILE       contains PID of adsl-connect script
#   $PIDFILE.pppoe contains PID of pppoe process
#   $PIDFILE.pppd  contains PID of pppd process
CF_BASE=`basename $CONFIG`
PIDFILE="/var/run/$CF_BASE-pppoe.pid"

# Do you want to use synchronous PPP?  "yes" or "no".  "yes" is much
# easier on CPU usage, but may not work for you.  It is safer to use
# "no", but you may want to experiment with "yes".  "yes" is generally
# safe on Linux machines with the n_hdlc line discipline; unsafe on others.
SYNCHRONOUS=no

# Do you want to clamp the MSS?  Here's how to decide:
# - If you have only a SINGLE computer connected to the ADSL modem, choose
#   "no".
# - If you have a computer acting as a gateway for a LAN, choose "1412".
#   The setting of 1412 is safe for either setup, but uses slightly more
#   CPU power.
CLAMPMSS=1412
#CLAMPMSS=no

# LCP echo interval and failure count.
LCP_INTERVAL=20
LCP_FAILURE=3

# PPPOE_TIMEOUT should be about 4*LCP_INTERVAL
PPPOE_TIMEOUT=80

# Firewalling: One of NONE, STANDALONE or MASQUERADE
FIREWALL=NONE

# Linux kernel-mode plugin for pppd.  If you want to try the kernel-mode
# plugin, use LINUX_PLUGIN=/etc/ppp/plugins/rp-pppoe.so
LINUX_PLUGIN=

# Any extra arguments to pass to pppoe.  Normally, use a blank string
# like this:
PPPOE_EXTRA=""

# Rumour has it that "Citizen's Communications" with a 3Com
# HomeConnect ADSL Modem DualLink requires these extra options:
# PPPOE_EXTRA="-f 3c12:3c13 -S ISP"

# Any extra arguments to pass to pppd.  Normally, use a blank string
# like this:
PPPD_EXTRA=""
запускаю pppoe-setup

sbin/ifup ppp0 не сработал

при запуске системы поднимается коннект. правда, что точно сработало, не понял

-------
Ehhh.. what's up, doc?..


Отправлено: 22:41, 29-04-2016 | #13


Аватара для yurfed

Ветеран


Сообщения: 20133
Благодарности: 3145

Профиль | Отправить PM | Цитировать


mrcnn, а чем вас не устраивает GDI вариант RPM resource perl(network::vpn::vpnpptp)
pppoe тоже имеется.
ЗЫ Желательно при установке иметь подключение к ин-ту для получения возможных зависимостей.

-------
Хочу ли я - Могу ли я - Говно ли я - Магнолия


Последний раз редактировалось yurfed, 29-04-2016 в 23:09.


Отправлено: 23:00, 29-04-2016 | #14



Компьютерный форум OSzone.net » Linux и FreeBSD » Общий по Linux » Debian/Ubuntu - Как создать сетевое подключение к ТТК в Debian

Участник сейчас на форуме Участник сейчас на форуме Участник вне форума Участник вне форума Автор темы Автор темы Шапка темы Сообщение прикреплено

Похожие темы
Название темы Автор Информация о форуме Ответов Последнее сообщение
Прочее - Как удалить сетевое подключение ? a715 Сетевые технологии 9 06-04-2010 00:28
CMD/BAT - помогите создать сетевое подключение с помощью cmd-файла Oleg48 Скриптовые языки администрирования Windows 4 18-10-2009 11:24
Прочее - Как удалить сетевое подключение ? a715 Сетевое оборудование 3 25-03-2009 11:26
Интернет - Как настроить сетевое подключение в Vista? DeepWaters Microsoft Windows Vista 8 11-01-2008 00:47
Проблема при попытке создать новое сетевое подключение. storm3 Мобильные ОС, смартфоны и планшеты 2 06-02-2007 20:02




 
Переход