Jump to content
Sign in to follow this  
game-game

Dhcp Server Dalam Freebsd

Recommended Posts

actually aku nak tanye psl pc router, kalau aku setup dhcp server ikut guide len, pastu aku buat firewall bleh ke?

ataupon aku terus ikut satu tutorial yang siap untuk pc router ni?

berbalik kepada tajuk thread aku,

camner cara korang setup dhcp server dalam freebsd? mmg aku dah jmpe bnyak gler link untuk ni, tapi aku tak berjaya..

masalh aku skrang ni,client pc still request ip dari external card(yang connect ngan tenet) aku, bukan internal card(untuk lan)..

thanks..

Share this post


Link to post
Share on other sites

Ko dah set btol2 ke dhcp server tu? Dah restart network untuk pc client tu? Emm.. En Trunasuci boleh tolong pasal bsd ni tapi rasenya tak banyak beza sangat dengan distro len kalo dhcp server ni. Maybe ada silap kat conf dia. Cuba tengok balik. Tunjuk ko punya dhcpd.conf.

Edited by Firestarter

Share this post


Link to post
Share on other sites

Sepatutnya ko post dulu error tu. Lain kalo kalo kuar error yang sama ko dah tau ape sebab dia. Takpe la kalo nak buat semula.

Share this post


Link to post
Share on other sites

hello,

aku dah try

still same gak prob aku, kali ni aku refer sebijik dalam ni

http://www.bsdguides.org/guides/freebsd/ne...o_router_pf.php

camne ek?

untuk makluman tambahan, xlO aku ialah outside, and fxpO adalah internal, xlO..aku buat dalam lab.. so, xlO akan

dapat ip dari server lab ni.. tapi ble aku try connect client ngan pc router aku, aku client tu still gne gateway server

yang dah ade ni, bukan dalam pc router..

ni aku punyer dhcpd.conf

p/s: aku terpksa buat nombor zero kepada huruf besar O.. nombor aku kat laptop dah tak berfungsi :lol:

### dhcpd.conf

# option definitions common to all supported networks...

# name server is running on this host

option domain-name-servers 192.168.10.1;

default-lease-time 600;

max-lease-time 7200;

# If this DHCP server is the official DHCP server for the local

# network, the authoritative directive should be uncommented.

authoritative;

# ad-hoc DNS update scheme - set to "none" to disable dynamic DNS updates.

ddns-update-style none;

# Use this to send dhcp log messages to a different log file (you also

# have to godam syslog.conf to complete the redirection).

log-facility local7;

# for small internal network, 100 IPs

subnet 192.168.10.0 netmask 255.255.255.0 {

range 192.168.10.100 192.168.10.200;

option routers 192.168.10.1;

option subnet-mask 255.255.255.0;

}

### end dhcpd.conf

ni ade lagi mklumat tmbahan,

ble client aku restart kan network die, untuk dapatkan ip, lame gler, pastu kuar error kat server part,camni

freebsd router dhcp:send_packet:network is unreachable

freebsd router dhcp:send_packet:please consult README file regarding broadcast address

tapi ble aku buat manual bleh ping antara satu same len,tapi still client takbleh ping www.google.com

hopefully, aku dah terangkan sejelas yang mungkin..

Edited by gamekiller

Share this post


Link to post
Share on other sites

options domain-name-servers tu ko letak no ip dns isp ko, Cam kalo tmnet 202.188.0.133, 202.188.1.5. Pastu ko restart dhcp tu..

Share this post


Link to post
Share on other sites

options domain-name-servers tu ko letak no ip dns isp ko, Cam kalo tmnet 202.188.0.133, 202.188.1.5. Pastu ko restart dhcp tu..

erm.. firestarter, ac, pc router ni mini project aku, so, aku takde static ip.. aku cme nak try connect ngan dhcp server lab aku ni.. possible ke? ke kene gne gak tmnet?

so, kalau xl0 aku dapat ip dari dhcp server 10.100.100.227, aku kene letak ip tu kat options domain-name-servers ke?

Share this post


Link to post
Share on other sites

so, kalau xl0 aku dapat ip dari dhcp server 10.100.100.227, aku kene letak ip tu kat options domain-name-servers ke?

Yes..

Sebab dhcp lab ko tu akan jadi gateway..Tapi aku xtau ade konflik ke x..Rasenya xde kot..

Edited by Firestarter

Share this post


Link to post
Share on other sites

ok, petang ni aku test lagi, so kalau aku ade msalah aku post balik..

isyh... takbleh lagi r firestater.. aku try connect laptop aku ngan dhcp router yg aku buat ni, tapi die still request dari dhcp lab ni.. ip die bukan 192.168.10.xxx tapi 10.100.100.52..

ape masalah die ek?

Edited by gamekiller

Share this post


Link to post
Share on other sites

hello,

aku dah try

still same gak prob aku, kali ni aku refer sebijik dalam ni

http://www.bsdguides.org/guides/freebsd/ne...o_router_pf.php

camne ek?

untuk makluman tambahan, xlO aku ialah outside, and fxpO adalah internal, xlO..aku buat dalam lab.. so, xlO akan

dapat ip dari server lab ni.. tapi ble aku try connect client ngan pc router aku, aku client tu still gne gateway server

yang dah ade ni, bukan dalam pc router..

ni aku punyer dhcpd.conf

p/s: aku terpksa buat nombor zero kepada huruf besar O.. nombor aku kat laptop dah tak berfungsi :lol:

ni ade lagi mklumat tmbahan,

ble client aku restart kan network die, untuk dapatkan ip, lame gler, pastu kuar error kat server part,camni

tapi ble aku buat manual bleh ping antara satu same len,tapi still client takbleh ping www.google.com

hopefully, aku dah terangkan sejelas yang mungkin..

well rasa aku ada beberapa kesilapan.. sekadar teguran.. tapi apa yg dah dibuat tu, bagusla.. kene fix cikit je lagi..

ni dhcpd.conf aku..

# dhcpd.conf

#

# Sample configuration file for ISC dhcpd

#

ddns-update-style ad-hoc;

log-facility local7;

subnet 10.0.0.0 netmask 255.255.255.0 {

range 10.0.0.101 10.0.0.120;

default-lease-time 86400;

max-lease-time 86400;

option routers 10.0.0.1 ;

option broadcast-address 10.0.0.255 ;

option domain-name "****.***.my" ;

option domain-name-servers 10.0.0.1, 208.67.222.222, 208.67.220.220, 202.188.1.23, 161.142.20

}

actually lepas save file nih, kena run dhcpd point ke nic tu.. kalau cara manual:

dhcpd rl0

kalau nak set permanent, save dalam /etc/rc.conf:

dhcpd_enable="YES"

dhcpd_ifaces="rl0"

dalam kes ni nic adalah realtek..

untuk rujukan + pengetahuan anda2 sekalian.. dalam satu network, takleh ada 2 atau 3 DHCP server, nanti client pening tatau nak listen mana.. kene isolatekan network dulu baru set..

so dalam kes ko nih, pc client yg nak listen, kene sambung direct ke dhcp atau isolate dr network asal lab.. ataupun disablekan dhcp server lama..

Share this post


Link to post
Share on other sites

aku rase aku dah isolatekan, camni draft network aku

drawing1hl4.png

kalau bleh, aku taknak kacau dhcp server lab yang ade sebab aku takde kuase.. heheh..

tapi kalau bleh aku nak connect kan client aku through internet melalu pc router yang aku buat ni..

ni ade beberapa soalan,

1. ape function forwarders? tak perlu ke?

2. option domain-name-servers tu camne?

3. ape beza option routers ngan option domain-name-servers?

sori, aku dah bace kat tenet.. tapi aku still tak xdapat tangkap lagi..

p/s: ni project dalam lab aku.. kira salah satu practical subject r.. group aku kene buat psl pc routing ni, so budak budak len akan connect kat aku sebelum pergi internet..

Share this post


Link to post
Share on other sites

aku rs takleh lebih dari 1 dhcp server dlm 1 network , cuba separate kan dari network yg ada, atau setkn respons time cpat sket dari dhcp server lab tu ,tak sure la ni jd ke

Share this post


Link to post
Share on other sites

hmm...so, kalau lecturer aku tanye psl ni, alasan untuk satu network takbleh 2 or lebih dhcp konkrit tak? so, aku cakap die boleh buat local je.. amacam? ko rase die terima tak? nnti aku korek korek sket kat google psl mende ni...

Share this post


Link to post
Share on other sites

Kalau berdasarkan gambar yg diberi, patutnye boleh buat. Aku pernah buat setup yg sama pada zaman dulu kala (time aku guna FreeBSD). Aku dah lama tak setup network, jadi tak ingat sangat. Kita start dari basic dulu. Apa nama interface yg sambung ke dhcp lab router? dan apa nama interface yg sambung ke local LAN?

Share this post


Link to post
Share on other sites

p/s: ni project dalam lab aku.. kira salah satu practical subject r.. group aku kene buat psl pc routing ni, so budak budak len akan connect kat aku sebelum pergi internet..

Aku rasa yg penting kena setup routing tu betul-betul dulu, lepas tu baru setup dhcp. Kalau routing tak betul, dhcp yg disetup tu tak ada guna pasal client still tak boleh sambung ke internet.

Gateways and Routes: http://www.freebsd.org/doc/en_US.ISO8859-1...rk-routing.html

DHCP: http://www.freebsd.org/doc/en_US.ISO8859-1...twork-dhcp.html

Edited by mchammer

Share this post


Link to post
Share on other sites

wah.. betol tu.. aku mmg rase kene start dari awal gak...

camni, aku ade dua pc je untuk test bed, satu ade dua network card,xl0(connect ke dhcp yang ade,cni aku dapat 10.100.100.227) and fxp0 act as pc router la kononnye, yang kedua, pc client, ade satu jer(fxp0).. so, katner nak start? perlu aku format balik pc pc ni dulu? bagi clean?

Share this post


Link to post
Share on other sites

wah.. betol tu.. aku mmg rase kene start dari awal gak...

camni, aku ade dua pc je untuk test bed, satu ade dua network card,xl0(connect ke dhcp yang ade,cni aku dapat 10.100.100.227) and fxp0 act as pc router la kononnye, yang kedua, pc client, ade satu jer(fxp0).. so, katner nak start? perlu aku format balik pc pc ni dulu? bagi clean?

So, aku assume pc yg ada dua network card tu pc yg dah diinstall FreeBSD.

Cuba ni: http://www.freebsd.org/doc/en_US.ISO8859-1...twork-natd.html . Tengok section "29.9.3 Configuration"

Edited by mchammer

Share this post


Link to post
Share on other sites

mchammer,nak compile kernel dulu atau install isc-dhcp-server dulu?

Mana-mana pun boleh sebenarnya. Tapi aku suggest compile kernel dulu. Yang isc-dhcp-server tu, tolak ketepi dulu.

Edited by mchammer

Share this post


Link to post
Share on other sites

Dah set benda kat bawah ni dalam /etc/rc.conf?

gateway_enable="YES"

firewall_enable="YES"

firewall_type="OPEN"

ifconfig_xl0="DHCP"

ifconfig_fxp0="inet 192.168.0.1 netmask 255.255.255.0"

natd_enable="YES"

natd_interface="xl0"

natd_flags=""

Jangan lupa reboot.

Lepas tu try la sambung ke client.

Configure IP kat client secara manual dulu.

IP: 192.168.0.2

Netmask: 255.255.255.0

Gateway: 192.168.0.1

Lepas tu cuba ping/browse internet. Kalau boleh, baru try setup DHCP server.

Edited by mchammer

Share this post


Link to post
Share on other sites

oh ye, fxpO tu kita set manuall ke? ip untuk nic tu brape? same ngan gateway?

ni yang error atau output yang aku dapat kat server..

last message repeated 8 times,

kernel: arp: 192.168.0.2 is on fxp0 but got reply from <mac address network aku> on xl0

last message repeated 16 times

eh.. aku dah dapat.. dah ok dah.. rpenye salah cucuk cable.. hhuhu..

erm.. ok.. sume dah ok dah.. pc router aku bleh ping client aku, dan google.. client aku pon bleh ping pc router aku ni.. untuk makluman, fxpO ni aku letak same ngan ip gateway..

tapi...

masalahnye, client aku takdapat ping google a.k.a tak dapat masuk tenet.. camne tu? ape configuration len?

Edited by gamekiller

Share this post


Link to post
Share on other sites

Cuba paste output untuk command di bawah:

1) ifconfig -a

2) netstat -nr

3) cat /etc/rc.conf

Client tu guna OS apa? Paste kan dia punya network configuration...

Edited by mchammer

Share this post


Link to post
Share on other sites

ok.. dah settle.. ni config yang aku dah buat stakat ni..

untuk /etc/rc.conf

# -- sysinstall generated deltas -- # Wed Feb 13 01:18:03 2008

# added by xorg-libraries port

hostname="free"

ifconfig_xl0="DHCP"

keymap="us.iso"

linux_enable="YES"

local_startup="/usr/local/etc/rc.d"

moused_enable="YES"

usbd_enable="YES"

firewall_enable="YES"

gateway_enable="YES"

firewall_type="OPEN"

ifconfig_fxp0="inet 192.168.0.1 netmask 255.255.255.0"

natd_enable="YES"

natd_interface="xl0"

natd_flags=""

# -- sysinstall generated deltas -- # Thu Feb 14 12:48:50 2008

ifconfig_fxp0="inet 192.168.0.1 netmask 255.255.255.0"

defaultrouter="192.168.0.1"

hostname="pc"

# -- sysinstall generated deltas -- # Thu Feb 14 16:17:42 2008

ifconfig_fxp0="inet 192.168.0.1 netmask 255.255.255.0"

defaultrouter="192.168.0.1"

hostname="fxp0_card"

untuk netstat -nr plak

33839877ot2.png

untuk ifconfig -a

fxp0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500

options=8<VLAN_MTU>

inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255

ether 00:90:27:a6:27:69

media: Ethernet autoselect (none)

status: no carrier

xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500

options=8<VLAN_MTU>

inet 10.100.100.227 netmask 0xfffffc00 broadcast 10.100.103.255

ether 00:60:08:2d:8f:c8

media: Ethernet autoselect (100baseTX <full-duplex>)

status: active

plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500

lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384

inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4

inet6 ::1 prefixlen 128

inet 127.0.0.1 netmask 0xff000000

Edited by gamekiller

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...