LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-04-2008, 12:21 PM   #1
sarajevo
Member
 
Registered: Apr 2005
Distribution: Debian, OpenBSD,Fedora,RedHat
Posts: 228
Blog Entries: 1

Rep: Reputation: 31
Send DHCP offers on only one NIC out of two,


Hi people,

one small question if someone know hint. OS is debian, two NICs inside, dhcp server installed how push dhcp server to send offers to just one NIC.

Thank you in advance for any suggestion.
 
Old 08-04-2008, 02:19 PM   #2
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
Is just disabling one NIC on the server an option? Or are you after some crazy form of redundancy here?
 
Old 08-04-2008, 02:38 PM   #3
sarajevo
Member
 
Registered: Apr 2005
Distribution: Debian, OpenBSD,Fedora,RedHat
Posts: 228
Blog Entries: 1

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by r3sistance View Post
Is just disabling one NIC on the server an option? Or are you after some crazy form of redundancy here?
...This is router,firewall, dhcp server, my plan is to on one interface send all dhcp traffic. Second network interface receive address by isp provider....and it is not good idea my dhcp server starts to deliver ip addresses to users in isp network.....maybe they same protective mechanism but I do not want to make troubles...for my home/office I would like to get ip address automatically when switch on my laptop or someone came to visit me...

Last edited by sarajevo; 08-04-2008 at 02:42 PM.
 
Old 08-04-2008, 03:04 PM   #4
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
I think I get you now. I did not understand from the first post, your machine has two ports and you want it to act as a DHCP server on one port but not the other. In other words you got 1 Internal and 1 External port. My suggestion would be to set-up the internal port as a static IP of 192.168.1.1 and by firewall only allow incoming DHCP requests for that IP, this should mean whatever IP you get assigned for your external port it should not act as a DHCP server as any DHCP traffic that comes in either was your request to your ISP and thus an established connection or will be firewalled off as it'll be an initial request...

However I am not that hot on DHCP as most the stuff I deal with is in a Datacenter and dealing with static IPs, so maybe someone could come with a better method or implementation then me.
 
Old 08-04-2008, 03:30 PM   #5
sarajevo
Member
 
Registered: Apr 2005
Distribution: Debian, OpenBSD,Fedora,RedHat
Posts: 228
Blog Entries: 1

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by r3sistance View Post
I think I get you now. I did not understand from the first post, your machine has two ports and you want it to act as a DHCP server on one port but not the other. In other words you got 1 Internal and 1 External port. My suggestion would be to set-up the internal port as a static IP of 192.168.1.1 and by firewall only allow incoming DHCP requests for that IP, this should mean whatever IP you get assigned for your external port it should not act as a DHCP server as any DHCP traffic that comes in either was your request to your ISP and thus an established connection or will be firewalled off as it'll be an initial request...

However I am not that hot on DHCP as most the stuff I deal with is in a Datacenter and dealing with static IPs, so maybe someone could come with a better method or implementation then me.
it is not problem for me to block particular traffic, but I think there is some way to on dhcp server "say " on which interface to send offers of new ip addresses.
In Win. that option exist and I am sure 1000 % the same is possibe to set up under linux.

With regards,
 
Old 08-04-2008, 03:31 PM   #6
lsteacke
Member
 
Registered: Jul 2007
Distribution: Ubuntu
Posts: 99

Rep: Reputation: 16
Could you post the output of your etc/network/interfaces file? I believe you can set an option in there for each interface to receive DHCP addresses or not.
 
Old 08-04-2008, 03:33 PM   #7
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,240
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
Quote:
If you have more than one NIC, usually you want to limit DHCP service for only one NIC (the one that connects the private network). Suppose that NIC is eth1, then you can add the following line to file /etc/sysconfig/dhcpd:

DHCPDARGS=eth1

http://cs.sru.edu/~zhou/linux/howto/dhcpd.html


note: his how-to was done on a redhat based system
 
Old 08-05-2008, 04:52 AM   #8
sarajevo
Member
 
Registered: Apr 2005
Distribution: Debian, OpenBSD,Fedora,RedHat
Posts: 228
Blog Entries: 1

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by farslayer View Post
http://cs.sru.edu/~zhou/linux/howto/dhcpd.html


note: his how-to was done on a redhat based system
Thank you, this saves situation. Exactly what I need, but I did not know how to setup it.

Thank you all,

Regards,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu, no DHCP offers recieved. The_Neon_Knight Linux - Wireless Networking 0 10-25-2007 05:34 AM
No DHCP Offers With Madwifi wkuballa Linux - Wireless Networking 5 08-15-2007 01:17 PM
No DHCP offers when VMware is running wkuballa Debian 0 06-25-2007 10:34 AM
Disable DHCP to send DNS update nsvora Linux - Networking 4 11-22-2006 05:30 PM
how to send DHCP request without using ifup nor ifdown exabrial Linux - Networking 1 08-23-2004 11:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration