Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ok! I need to get eth1 to send requests to my dhcp3-sever instead of wlan2. The first howto I found did ip routing from eth1 to wlan2 bypassing my dhcp server but that does not work. the tutoial above has this.
Lease Request: Client broadcasts request to DHCP server with a source address of 0.0.0.0 and a destination address of 255.255.255.255. The request includes the MAC address which is used to direct the reply.
but do I assign 0.0.0.0 to eth1 or do I assign a gateway ip to eth1. When I send reguests to get leases I state a gateway. That should be eth1 right?
Does any one understand this.
I'm not sure if I really understood your question...
DHCP works only within a subnet, therefore there is no gateway needed for the DHCP-protocol to work properly. The IP-adresses in the request are only to identify that there is a client broadcasting for a lease (broadcasts are blocked by the router, so they reach every computer within a subnet but only within that subnet).
Within the subnet all network-traffic goes via ethernet (which doesn't need a gateway).
The configuration for DHCP takes place on the client and for each nic. So you'll have to tell wlan0 to use DHCP and eth0 to use DHCP. Both interfaces are independend as if they were different computers.
How to configure this depends on your distro, so we'll need more information.
I'm not sure if I really understood your question...
DHCP works only within a subnet, therefore there is no gateway needed for the DHCP-protocol to work properly. The IP-adresses in the request are only to identify that there is a client broadcasting for a lease (broadcasts are blocked by the router, so they reach every computer within a subnet but only within that subnet).
Within the subnet all network-traffic goes via ethernet (which doesn't need a gateway).
The configuration for DHCP takes place on the client and for each nic. So you'll have to tell wlan0 to use DHCP and eth0 to use DHCP. Both interfaces are independend as if they were different computers.
How to configure this depends on your distro, so we'll need more information.
Markus
I am using hardy but that should not matter for my question. the command may be a little diferant but what happens is the same thing. What is happening now is all requests for leases is going from eth1 to wlan2 I need to stop that.
Heres the way I understad it. The client sets itself to 0.0.0.0 sends a request on 255.255.255.255 on port 68 to port 67 then listens to port 68 for an answer. my dhcp server should listen to port 67 then send a lease to port 68. My cleint software is doing the samething but It is sending all requests to 192.168.1.1 Since I connect to roadrunner through this gateway why don't I need something like it on my side. Both wlan2 and eth1 has dhcp turned on but when I do a discovery with my router it claims I am using static ip. How do I stop this.
A router has a static IP-adress. It makes no sense to assign an IP-adress to a router and it is not possible to do this.
Markus
That does not make any sense one of the things you have to have to use a router is a dhcp server. all the wan port does is request an ip address.
Your wan port is a dhcp cleint. the static ip is for connecting with your lan. that way you can connect two seperate networks together. the router does the network translation. a.k.a nat.
Are you telling me my isp does not have a dhcp server.
Well, your router is a dhcp-client seen from the isp. That is correct. But your router (which is your gateway to the internet) must have a static IP-configuration on the side of your own subnet. It is very common to use the same machine as a router as well as a dhcp-server. But this server has a static IP, lets say 192.168.1.1/24. This nic is connected to your subnet (192.168.1.0/24). The other nic of the server is connected to your isp and may be a dhcp-client for the isp.
If you want to configure this server as a dhcp-server you can assign IP-configurations to the clients within your 192.168.1.0/24 subnet.
But what you wrote would mean that your dhcp-server assignes a dhcp-configuration to himself, and this indeed makes no sense.
Well, your router is a dhcp-client seen from the isp. That is correct. But your router (which is your gateway to the internet) must have a static IP-configuration on the side of your own subnet. It is very common to use the same machine as a router as well as a dhcp-server. But this server has a static IP, lets say 192.168.1.1/24. This nic is connected to your subnet (192.168.1.0/24). The other nic of the server is connected to your isp and may be a dhcp-client for the isp.
If you want to configure this server as a dhcp-server you can assign IP-configurations to the clients within your 192.168.1.0/24 subnet.
But what you wrote would mean that your dhcp-server assignes a dhcp-configuration to himself, and this indeed makes no sense.
Markus
No you did not understand what I was asking. My router does not know one dhcp server from another. I am trying to get my dhcp server working. If it will not assign an ip to the router it will not assign it to anything.
I am trying to replace a old nt4 server with a linux machine. The nt4 is a frontend. It is the first server to the outside world. The router was a firewall and nat between my nt4 and lan. The nt4 handled dhcp+dns for outgoing and incoming traffic. The router handled the traffic that requested lan access. My dhcp server is not working. It should give my wan port on the router a ip address like the nt server did. I can connect to the router with my lan and my wan2 is getting a a ip from my isp but what I beleive is happening is my router is seeing wan2. i.e requesting a lease from wan2. When I check ifconfig it shows a ip being assigned to wlan2 from my isp but not one being assigned to eth1. I am thinking maybe my dhcp server should assign a ip to eth1 and then I should put that in my router as a gateway. Maybe not but in order for eth1 to work shouldn't it have a ip assigned to it from my dhcp. I know that to reach a dhcp server on the web I have to type an ip address of the comp it is located on. regardless of how the routing of the dhcp request is handled by the computor the ip is still the address of the computor. I think I have a routing problem inside the comp. But do not know how to trouble shoot it.
The DHCP client normally transmits any protocol messages it sends before acquiring an IP address
to, 255.255.255.255, the IP limited broadcast address. For debugging purposes, it may be useful
to have the server transmit these messages to some other address. This can be specified with the
-s flag, followed by the IP address or domain name of the destination.
it would be nice if you could post a drawing of you setup.
I indeed did not understand your question. Are both, the router and the dns/dhcp-server in the same subnet or do you have a DMZ?
Markus
I want it to be but will do it any way it works. heres how it was before.
looking from the outside comming in. roadrunner always assigns a address starting at 24.xx.xx.xx to the broadband router they suplied, then there router gave me a address 192.168.1.100 the nt4 comp conected to that using dhcp. I keep calling this a nt4 machine which is really a backoffice server. It handled everything. including correcting me when I made a mistake. Then it went to my router which routed over to my lan which I used. On my side I broke the backoffice servers off into diferrent comps still controlled by the management srver that came with backoffice. this router hides the network from the internet server while allowing still to connect to the internet. And the frontend computor only lets trusted hosts in. Since the firewall router does network translation it does not matter to my vpn only to my frontend. the dhp should assign the same subnet then the router will do if need be but I should be able to keep everything pretty close. I will try to post my ifconfig log.
it would be nice, if possible, to see as well the output of "ipconfig /all" from your old nt4 (if it is still online and the configuration hasn't changed).
it would be nice, if possible, to see as well the output of "ipconfig /all" from your old nt4 (if it is still online and the configuration hasn't changed).
Markus
It does not exist anymore. If it did I would have gave up all ready. I could not get linux to load on it. It was only 300 mhz. You may end up seeing it loaded on the one I got ubuntu on now but It's a pain to load and slow but it really did do most of config work itself. Tried to write it to ausb drive but can't do that. You do not permission to do stuff in xwindows. Calling this a gui system is a joke.
Or you can REDIRECT any dhcp requests from ethX to wlanX with Iptables redirect rule.
Thats what the howto I started out with had me do but why I do not know. I think thats why I am bypassing the dhcp server now. I think route2 would help but it is like knowing you need a carbuter with out knowing where it is. I found a page that told what to put but when I opened the file it gave there was a lot of info in it and adding it at top or bottam did not have any efect. It was something like Wlan2 ----> internet
eth1 ----> vpn eth1 ----> wlan2. I know thats not exactly right but it was something like that.
I have messed with ubuntu enough it is not to stable now. When I reload is there anything you can think of that might help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.