banner

[Rule] Rules  [Home] Main Forum  [Portal] Portal  
[Members] Member Listing  [Statistics] Statistics  [Search] Search  [Reading Room] Reading Room 
[Register] Register  
[Login] Loginhttp  | https  ]
 
Forum Index Thảo luận hệ điều hành *nix chọn card mạng cấp địa chỉ ip  XML
  [Question]   chọn card mạng cấp địa chỉ ip 30/01/2010 00:40:14 (+0700) | #1 | 204181
duongtulang
Member

[Minus]    0    [Plus]
Joined: 30/12/2009 04:08:16
Messages: 30
Offline
[Profile] [PM]
Em có 1 máy lam DHCP có 3 cảd mạng:
eth0: ra internet (192.168.1.150)
eth1: kết nối với mạng local (10.0.0.1)
eth2: kết nối tới phân vùng DMZ (172.16.0.1)
Nếu em làm như vậy thì trong file cấu hình dhcpd.conf em phải thêm gì để có thể chọn card mạng nào cấp dãy ip nào?
Nhờ các anh chị giúp đỡ dùm em. em xin cám ơn.
[Up] [Print Copy]
  [Question]   chọn card mạng cấp địa chỉ ip 30/01/2010 08:36:06 (+0700) | #2 | 204186
[Avatar]
quanta
Moderator

Joined: 28/07/2006 14:44:21
Messages: 7265
Location: $ locate `whoami`
Offline
[Profile] [PM]
Bạn có thể khai báo với 'subnet'.
Let's build on a great foundation!
[Up] [Print Copy]
  [Question]   chọn card mạng cấp địa chỉ ip 11/06/2010 23:39:38 (+0700) | #3 | 213110
duongtulang
Member

[Minus]    0    [Plus]
Joined: 30/12/2009 04:08:16
Messages: 30
Offline
[Profile] [PM]
em khai báo như thế này, mấy anh kiểm tra giúp em với, restart dhcpd thì failed. Xin cám ơn các anh.




ddns-update-style interim;
ignore client-updates;

# --- default gateway

option nis-domain "duongtulang.com";
option domain-name "duongtulang.com";
option domain-name-servers 10.0.0.1;
option subnet-mask 255.255.255.0;


default-lease-time 21600;
max-lease-time 43200;

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;

subnet 10.0.0.0 netmask 255.255.255.0
{
range dynamic-bootp 10.0.0.50 10.0.0.200;
option routers 10.0.0.1;
default-lease-time 21600;
max-lease-time 43200;
}
############################################################

subnet 172.16.0.0 netmask 255.255.255.0 {
{
range dynamic-bootp 172.16.0.50 172.16.0.200;
option routers 172.16.0.1;
default-lease-time 21600;
max-lease-time 43200;
}
# we want the nameserver to appear at a fixed address
# host ns {
# next-server marvin.redhat.com;
# hardware ethernet 12:34:56:78:AB:CD;
# fixed-address 207.175.42.254;
# }


[Up] [Print Copy]
  [Question]   chọn card mạng cấp địa chỉ ip 12/06/2010 07:29:47 (+0700) | #4 | 213120
[Avatar]
huynhfxvn
Member

[Minus]    0    [Plus]
Joined: 21/07/2005 11:09:35
Messages: 456
Location: UET.VNU
Offline
[Profile] [PM] [Email] [Yahoo!]
Bạn post luôn file cấu hình của eth0 eth1 lên xem nào.
KHÔNG CÓ GÌ quý hơn tự do !
[Up] [Print Copy]
  [Question]   chọn card mạng cấp địa chỉ ip 13/06/2010 18:50:19 (+0700) | #5 | 213218
duongtulang
Member

[Minus]    0    [Plus]
Joined: 30/12/2009 04:08:16
Messages: 30
Offline
[Profile] [PM]
####### eth0 ######
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:0c:29:2c:10:f5
ONBOOT=yes
TYPE=Ethernet
NETMASK=255.255.255.0
IPADDR=192.168.1.200
GATEWAY=192.168.1.1

###### eth1 ######

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
HWADDR=00:0c:29:2c:10:ff
NETMASK=255.255.255.0
IPADDR=10.0.0.1
TYPE=Ethernet
GATEWAY=192.168.1.1

###### eth2 #######

# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth2
BOOTPROTO=none
ONBOOT=yes
HWADDR=00:0c:29:2c:10:09
NETMASK=255.255.255.0
IPADDR=172.16.0.1
GATEWAY=192.168.1.1
TYPE=Ethernet


Những file cấu hình eht0, eth1, eth2 của em như vậy đó, mấy anh coi giúp với. Em xin cám ơn.....!!!!!!!!!
[Up] [Print Copy]
  [Question]   chọn card mạng cấp địa chỉ ip 14/06/2010 19:29:17 (+0700) | #6 | 213287
[Avatar]
huynhfxvn
Member

[Minus]    0    [Plus]
Joined: 21/07/2005 11:09:35
Messages: 456
Location: UET.VNU
Offline
[Profile] [PM] [Email] [Yahoo!]
Như này ít thông tin quá. Bạn restart lại dhcpd. Rồi post đoạn cuối file /var/log/message mà liên quan đến dhcpd. Để xem có chuẩn đoán đựoc bệnh gì không.
KHÔNG CÓ GÌ quý hơn tự do !
[Up] [Print Copy]
  [Question]   chọn card mạng cấp địa chỉ ip 14/06/2010 22:30:06 (+0700) | #7 | 213297
duongtulang
Member

[Minus]    0    [Plus]
Joined: 30/12/2009 04:08:16
Messages: 30
Offline
[Profile] [PM]
[root@localdomain ~]# tail /var/log/messages
Jun 15 06:27:53 localdomain dhcpd: If you intend to request help from the dhcp-server@isc.org
Jun 15 06:27:53 localdomain dhcpd: mailing list, please read the section on the README about
Jun 15 06:27:53 localdomain dhcpd: submitting bug reports and requests for help.
Jun 15 06:27:53 localdomain dhcpd:
Jun 15 06:27:53 localdomain dhcpd: Please do not under any circumstances send requests for
Jun 15 06:27:53 localdomain dhcpd: help directly to the authors of this software - please
Jun 15 06:27:53 localdomain dhcpd: send them to the appropriate mailing list as described in
Jun 15 06:27:53 localdomain dhcpd: the README file.
Jun 15 06:27:53 localdomain dhcpd:
Jun 15 06:27:53 localdomain dhcpd: exiting.



Xin mấy anh giúp đỡ dùm em. Em xin cám ơn.
[Up] [Print Copy]
  [Question]   chọn card mạng cấp địa chỉ ip 15/06/2010 06:52:38 (+0700) | #8 | 213310
[Avatar]
huynhfxvn
Member

[Minus]    0    [Plus]
Joined: 21/07/2005 11:09:35
Messages: 456
Location: UET.VNU
Offline
[Profile] [PM] [Email] [Yahoo!]
ddns-update-style interim;
default-lease-time 600;
max-lease-time 7200;

subnet 10.0.0.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option routers 10.0.0.1;
range 10.0.0.5 10.0.0.15;
}

subnet 172.16.0.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option routers 172.16.0.1;
range 172.16.0.5 172.16.0.15;

}


Thử cấu hình này xem.

Nếu mà không đựoc thì bạn xem lại các card mạng đã chạy đúng chưa ?
KHÔNG CÓ GÌ quý hơn tự do !
[Up] [Print Copy]
  [Question]   chọn card mạng cấp địa chỉ ip 16/06/2010 22:12:55 (+0700) | #9 | 213476
duongtulang
Member

[Minus]    0    [Plus]
Joined: 30/12/2009 04:08:16
Messages: 30
Offline
[Profile] [PM]

huynhfxvn wrote:
ddns-update-style interim;
default-lease-time 600;
max-lease-time 7200;

subnet 10.0.0.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option routers 10.0.0.1;
range 10.0.0.5 10.0.0.15;
}

subnet 172.16.0.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option routers 172.16.0.1;
range 172.16.0.5 172.16.0.15;

}


Thử cấu hình này xem.

Nếu mà không đựoc thì bạn xem lại các card mạng đã chạy đúng chưa ? 



Chạy ok rồi! Em xin cám ơn anh huynhfxvn nha!
[Up] [Print Copy]
[digg] [delicious] [google] [yahoo] [technorati] [reddit] [stumbleupon]
Go to: 
 Users currently in here 
1 Anonymous

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|