Tema: Re: Q: CentOS LAN tinklas
Autorius: ssh
Data: 2008-06-12 11:16:30
na klientas kaip ir pasigavo ip, tik i serva visai pingas neina.. :/ tiesa
gaude ilgokai, nors pajungtas tiesiai be jokiu switchu.

o tos komandos outputas toks:
2144    ?        Ss    0:00    /usr/sbin/dhcpd eth0
2730    pts/1    R+ 0:00    grep dhcpd

restartinus gaunu ta pati tik aisku pid kitas..



"Robertas" <robertas@tabakas.lt> wrote in message 
news:g2oova$kvv$1@trimpas.omnitel.net...
> konsolei parasyk komanda ps ax | grep dhcpd idek cia outputa, restartink 
> dhcpd ir outputa pakopink cia.
>
> "ssh" <s@s.h> wrote in message news:g2ombu$hr7$1@trimpas.omnitel.net...
>> Taigi, situacija tokia: dhcpd paleistas bet pajungus kompa tiesiai i eth0 
>> jis negauna IP ir sako "limited conectivity". Konfigus pridegu... gal 
>> paaiskes is ju kas.
>> Aciu
>>
>>
>> "Robertas" <robertas@tabakas.lt> wrote in message 
>> news:g2oa05$rvk$1@trimpas.omnitel.net...
>>> Pirmiausia, tai dhcp tau net nepasileidzia kaip itariu, nes
>>>
>>> # we want the nameserver to appear at a fixed address
>>> # host name_server {
>>> next-server ns1.telecom.lt;
>>> hardware ethernet 12:34:56:78:AB:CD;
>>> fixed-address 212.59.0.1;
>>> }
>>> uzkomentuota viena eilute perdaug ir cia tikrai telekomo dns servas ne
>>> prie ko.
>>>
>>> dabar darai pagal shema internetas <-wan interfeisas-> routeris
>>> <-routerio vidinis interfeisas-> tavo servo eth1 su ip is to pacio
>>> potinklio kaip pas routeri lan, i eth0 jungi switcha prie kurio
>>> sujungtas visas tinklas, ant eth0 dedi ip koki nori tik ne ta pati
>>> potinkli kuris uzdetas ant routerio, tada jungi forwardinima ir
>>> masqueradinga, viskas turi veikti. Serve nurodomas, kad default gw yra
>>> tavo routeris, o tavo kompams tinkle nurodomas default gw tavo servas.
>>>
>>> ssh wrote:
>>>> del modemo tu teisus ;) paskubejau parasyt.
>>>> na o is principo... imu eth1(int) nustatau kazkoki sugalvota ip(pvz
>>>> 10.1.1.1), gateway - routerio adresas(192.168.2.250 siuo atveju). tada 
>>>> eth0:
>>>> nustatau ip (192.169.10.1). tada gateway dedu 10.1.1.1?
>>>> turiu toki steb-by-step bet net ir taip nesigauna :)
>>>> http://www.howtoforge.com/home-gateway-firewall-with-dhcp-server-for-connection-sharing-centos5
>>>>
>>>>
>>>>
>>>>
>>>> "Robertas" <robertas@tabakas.lt> wrote in message
>>>> news:g2o8jk$pmu$1@trimpas.omnitel.net...
>>>>> ssh wrote:
>>>>>> Is karto atsiprasau kad mazai info daviau. Ateityje pasistengsiu 
>>>>>> placiau
>>>>>> ;)
>>>>>> Siaip galiu nupasakot ka padariau:
>>>>>> Numatyta kad ETH0 - lan'as su IP 192.168.10.1,
>>>>> gerai
>>>>> O toliau negerai, nes pagal tai kaip bandai sukonfigint, panasu, kad
>>>>> prie eth1 pajungtas ne modemas, o routeris. Bandysiu vel burti, jei 
>>>>> prie
>>>>> eth1 visdelto prijungtas modemas ir tu is IPT turi statinius ip tai
>>>>> sudedi statinius ip ant eth1 nurodai default gw IPT tau duota gw,
>>>>> taviskiam serve netas turi buti po siu veiksmu. Jei statiniu ip 
>>>>> neturi,
>>>>> tada turi instalint pppoe ir ji sukonfigint, kad prisijunginetu per
>>>>> modema prie neto, tada jis susides isorinius ip ant pvz. ppp0
>>>>> interfeiso. Toliau reikia ijungti forvardinima
>>>>> (/proc/sys/net/ipv4/ip_forward faile 0 pakeisti i 1). Tada ijungi
>>>>> masqueradinga (apie tai pasiskaitysi google).
>>>>> Jei ka praleidau manau kasnors papildys.
>>>>>
>>>>>> ETH1 eina i telekomo modema
>>>>>> kurio IP 192.168.2.250. Reikia DHCP bei interneto lan'e. Pradziai :)
>>>>>>
>>>>>> ifcfg-eth0
>>>>>> GATEWAY=192.168.2.1
>>>>>> BOOTPROTO=none
>>>>>> PEERDNS=yes
>>>>>> IPV6INIT=no
>>>>>> TYPE=Ethernet
>>>>>> HWADDR=00:10:22:FE:00:C8
>>>>>> DEVICE=eth0
>>>>>> NETMASK=255.255.255.0
>>>>>> BROADCAST=192.168.10.255
>>>>>> IPADDR=192.168.10.1
>>>>>> NETWORK=192.168.10.0
>>>>>> ONBOOT=yes
>>>>>> USERCTL=no
>>>>>>
>>>>>> ifcfg-eth1
>>>>>> GATEWAY=192.168.2.250
>>>>>> PEERDNS=yes
>>>>>> IPV6INIT=no
>>>>>> HWADDR=00:E0:4C:C9:B7:BD
>>>>>> BROADCAST=192.168.2.255
>>>>>> USERCTL=no
>>>>>> BOOTPROTO=none
>>>>>> TYPE=Ethernet
>>>>>> DEVICE=eth1
>>>>>> NETMASK=255.255.255.0
>>>>>> IPADDR=192.168.2.1
>>>>>> NETWORK=192.168.2.0
>>>>>> ONBOOT=yes
>>>>>>
>>>>>> DHCP.conf:
>>>>>> ddns-update-style none;
>>>>>> ignore client-updates;
>>>>>> DHCPARGS=eth0
>>>>>>
>>>>>> subnet 192.168.10.0 netmask 255.255.255.0 {
>>>>>>
>>>>>> # --- default gateway
>>>>>>  option routers   192.168.10.1;
>>>>>>  option subnet-mask  255.255.255.0;
>>>>>>
>>>>>> # option nis-domain  "domain.org";
>>>>>>  option domain-name  "namas.lt";
>>>>>>  option domain-name-servers 212.59.0.1;
>>>>>>
>>>>>>  option time-offset  -18000; # Eastern Standard Time
>>>>>> # option ntp-servers  192.168.1.1;
>>>>>> # option netbios-name-servers 192.168.1.1;
>>>>>> # --- Selects point-to-point node (default is hybrid). Don't change 
>>>>>> this
>>>>>> unless
>>>>>> # -- you understand Netbios very well
>>>>>> # option netbios-node-type 2;
>>>>>>
>>>>>>  range 192.168.10.100 192.168.10.254;
>>>>>>  default-lease-time 21600;
>>>>>>  max-lease-time 43200;
>>>>>>
>>>>>>  # we want the nameserver to appear at a fixed address
>>>>>> # host name_server {
>>>>>> next-server ns1.telecom.lt;
>>>>>> hardware ethernet 12:34:56:78:AB:CD;
>>>>>> fixed-address 212.59.0.1;
>>>>>> }
>>>>>> }
>>>>>>
>>>>> cia veikiandis konfigas
>>>>> ddns-update-style none;
>>>>> option netbios-name-servers 192.168.1.1;
>>>>> option netbios-node-type 8;
>>>>> option domain-name "be.eu";
>>>>> default-lease-time 43200;
>>>>> max-lease-time 43200;
>>>>> option domain-name-servers srv.be.eu;
>>>>> authoritative;
>>>>> log-facility local7;
>>>>> subnet 192.168.1.0 netmask 255.255.255.0{
>>>>> range dynamic-bootp 192.168.1.10 192.168.1.250;
>>>>> option routers 192.168.1.254;
>>>>> }
>>>>>
>>>>> host PRINTER {
>>>>> hardware ethernet 00:15:99:1F:41:1A;
>>>>> fixed-address 192.168.1.9;
>>>>> }
>>>>>
>>>>>> Na ir niekaip neina. Serve internetas eina. Pingas is klientu neina 
>>>>>> iki
>>>>>> servo eina, bet iki modemo ne....
>>>>> todel, kad forwardinimas neijungtas.
>>>>>
>>>>>> Aciu
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> "Robertas" <robertas@tabakas.lt> wrote in message
>>>>>> news:g2l9hr$gnm$1@trimpas.omnitel.net...
>>>>>>> ssh wrote:
>>>>>>>> Sveiki,
>>>>>>>> Reikia pagalbos paleidziant LAN'a ant Centos 5. Visa beda tame kad
>>>>>>>> niekaip
>>>>>>>> nepavyksta paleisti DHCP serviso ant Eth0 taip kad vietiniai kompai
>>>>>>> /etc/sysconfig paziurek ar yra failas dhcpd, jame turetu nusirodyti 
>>>>>>> ant
>>>>>>> kokio interfeiso startuoja dhcpd
>>>>>>>> pasijungtu ir pasigautu adresus... Tarkime Eth0 IP 192.168.1.1, 
>>>>>>>> subnet
>>>>>>>> 255.255.255.0. Koks turi buti gateway? Tas pats 1.1?
>>>>>>> Kadangi tu nenurodei savo gateway tai neesu telepatas ir negaliu 
>>>>>>> pilnai
>>>>>>> i sita klausima atsakyti, nurodau tik dhcpd optiona kuris isduoda
>>>>>>> klientams tavo gateway "option routers 192.168.1.254;" (ip turi buti
>>>>>>> tavo gw)
>>>>>>>> Ka ir kur dar butinai
>>>>>>>> reiktu nustatyti kad veiktu?
>>>>>>>> Pingas is servo i serva(192.168.1.1) eina. Duotu adresu Webminas
>>>>>>>> atsidaro.
>>>>>>>> Pajungus kita kompa i tinkla pingas iki jo neina. Taip pat ir is jo 
>>>>>>>> i
>>>>>>>> serva
>>>>>>>> nenueina :/
>>>>>>> dhcpd startavo ? ps ax | grep dhcpd, kompas gavo ip is tavo dhcpd 
>>>>>>> servo
>>>>>>> ? gal statinis ip ant kompo uzdetas is kito potinklio ? Gal 
>>>>>>> managinami
>>>>>>> switchai ?
>>>>>>>> PS kodel instalinus defaultiskai Webminas jungiasi ne per SSL?
>>>>>>>>
>>>>>>>>
>>>>>>> p.s. klausimus galetum formuluoti aiskiau ir pateikti daugiau info.
>>>>>>
>>>>
>>>>
>>
>>
>>
>
>