sizing <sizing@kkcity.com.tw>
wrote in message
news:3b8eP8$Yn6@www.kkcity.com.tw...
> > > 這樣就應該都沒有錯了吧!
> > > 可是:error 如下:
> > > No subnet declaration for star (0.0.0.0)
> > > please write a subnet declaration for the network segment to
which
> > > interface star is attached.
> > > 難道架設DHCP需要在架設 router 和 gateway
嗎??!
> > >
我只想快點架起來,讓我內部的電腦也可以出去上internet。
> > > 是不是粉難呢?!
> > 不難﹐您先把下面兩個網頁看完就可以了﹕
> > http://pds.nchu.edu.tw/study_area/network/network_ipadd.htm
> > http://pds.nchu.edu.tw/study_area/network/network_dhcp.htm
>
> 我已經獨完了,
> 可是問題還是不會解啊。
辛苦您了﹐再慢慢讀吧。我知道不好理解﹐但原理不解﹐再做下去您也不知道是什麼原
因﹐和為什麼要那樣做。
>
> 我是使用 redhat 6.1 + cle9
> 第一張網路卡是設定固定ip:24.30.66.77
> 第二張網路卡也是設定成固定ip:但是,是使用虛擬ip:192.168.0.17
> (這是依照網路人上面的文章設定的)
>
> 我這台主機可以正常的出去外面,internet。
>
>
現在的問題就剩下如何讓我內部的電腦也可以透過我這台電腦上網了。
>
> 於是請過前面幾偏的討論,我選擇了 DHCP。
>
> 於是照著網路人和參考 dlcp:
> 需要建立 dhcpd.conf
> 內容如下:
> default-lease-time 259200;
> max-lease-time 777600;
> option domain-name "415.ltu";
> subnet 192.168.0.0 netmask 255.255.255.0 {
> range 192.168.0.21
192.168.0.30;
> range 192.168.0.121
192.168.0.230;
> option broadcast-address
192.168.0.255;
> option routers
192.168.0.17;
> option domain-name-servers
24.131.1.8, 24.30.66.77;
> }
>
24.30.66.77 的 mask 是多少﹖假設為 255.255.255.0 吧﹐那麼您再在
/etc/hdcpd.conf 後面加入這句﹕
subnet 24.30.66.0 netmask 255.255.255.0 {}
> 然後在 /var/state/dhcp 下作 touch dhcpd.leases
>
> 而且我也在 /etc/hosts 內加入了 255.255.255.255 all-ones all-ones
>
> 並且使用 netconf 指定 Routing And Getway:
> Set default getway 為:24.30.66.77 (我第一張網路卡的ip)
>
> 然後啟動 dhcpd:
> dhcpd start
>
> 然後就出現錯誤訊息:
> No subnet declaration for start (0.0.0.0).
> Please write a subnet declaration for the network segment to
> which interface start is attached.
> exiting.
>
> 如果是輸入 dhcpd,不要輸入 dhcpd start,則出現下面錯誤訊息:
> [root@pp /etc]# dhcpd
> Listening on LPF/eth1/00:e0:29:6e:12:21/192.168.0.0
> Sending on LPF/eth1/00:e0:29:6e:12:21/192.168.0.0
> No subnet declaration for eth0 (24.30.66.77).
> Please write a subnet declaration for the network segment to
> which interface eth0 is attached.
> exiting.
> [root@pp /etc]#
>
> 於是我又在 /etc/dhcpd.conf 再加入 24.30.66.77 的子網域:
> 可是不會加,就隨便亂加:)
> (因為我想應該不會是第一張網路卡的關係吧!)
>
> 想當然爾,一定還是有錯誤。
>
> 請問,
> 到底是那裡出錯了呢?!
> 好傷心喔:~~~~~~~~~~~~~~~<
不用傷心啊﹐我當初弄並不比您好多少~~~
您看﹕我還不是會弄了嗎﹖
祝順利﹗
網中人