Tag Info

Hot answers tagged

10

Put only 127.0.0.1 as a name server in /etc/resolv.conf, and run a DNS cache locally. I recommend Dnsmasq, it's lightweight and easy to setup. On distributions such as Debian and Ubuntu, I also recommend installing the resolvconf package, which takes care of maintaining /etc/resolv.conf when you aren't running a local DNS cache, or of maintaining the DNS ...


10

The best way to guarantee the same IP at all times for a given host is to set up a MAC Address IP reservation in the DHCP server. Get the MAC address if your laptop, then go to your DHCP server, and assign a specific IP address to be issued to a host requesting from that MAC address.


9

Right click on the Network Manager icon on Ubuntu top panel and select edit. Go to Wired Network or Wireless Network tab and select the network name. Click on the edit button and go to IPv4 settings tab on the new window. If the method is Automatic (DHCP) you are using dhcp. Other method is cat /var/log/syslog and check for some thing like below ...


9

The dhclient that NetworkManager calls should be the same irregardless. On my Fedora 19 system I'm getting the following command run via NetworkManager when I allow it to connect: /sbin/dhclient -d -sf /usr/libexec/nm-dhcp-client.action \ -pf /var/run/dhclient-wlp3s0.pid \ -lf ...


7

You can provide static IP by editing the file /etc/sysconfig/network-scripts/ifcfg-eth0 as root user in Redhat. It should look like this: DEVICE=eth0 BOOTPROTO=STATIC IPADDR=192.168.0.5 NETMASK=255.255.255.0 GATEWAY=192.168.0.1 ONBOOT=yes After saving this file. You need to restart the network daemon using following command. $ sudo /etc/init.d/network ...


6

VirtualBox DHCP is working properly. There is nothing wrong with having all of your machines getting the same address in NAT configuration. All VMs are isolated from each other so there is no risk of conflict. They are also not on the same adapter. Each VM has its own virtualized hardware including NICs. The default gateway also need not to be 10.0.2.1. ...


6

dnsmasq is simpler and because of that has less features. But if you don't need anything fancy and since you were already able to set it up, you probably don't need them. Dnsmasq is designed for small, local networks. You can read on its site that by small networks, they mean up to 1000 computers so it's not that bad. So my answer is: there is absolutely ...


6

isc-dhcp-server is the new name for the dhcp3-server package, so this is behaving as expected. Debian sarge is fairly old, so you can expect that tutorial to be outdated.


6

The subnet mask that you have specify in dhcpd.conf must match your interface subnet mask. Run: /sbin/ifconfig eth0 You specified the subnet mask as 255.255.255.0, this is most likely wrong. Change your dhcpd.conf to match your interface. The interface where the DHCP server is listening must have an Static IP of the same subnet you are using in your ...


5

As noted by Warren and Shawn, your question seems to imply that preventing address assignment to unregistered machines is intended to keep them off the net. You cannot increase security this way as an machine can either: find a "trusted" MAC address and pretend to have that MAC to get an IP address from the DHCP server, or Just pick its own IP address ...


5

Seems my question is answered in the libvirt manual. One needs to specifically ensure that the same IP is handed out via DHCP each time. Here's how this can be specified: <network> … <ip address="192.0.2.1" netmask="255.255.255.0"> <dhcp> <range start="192.0.2.128" end="192.0.2.254"> <host ...


5

In (I believe) /etc/default/dhcp3-server, add the line INTERFACES="eth0 eth1" Now in the dhcpd.conf configuration file, you define two different subnet and the respective options. subnet 192.168.1.0 netmask 255.255.255.0 { option subnet-mask 255.255.255.0; option routers 192.168.1.1; range 192.168.1.100 192.168.1.200; } subnet 192.168.2.0 ...


5

If you are using isc-dhcp-client, provisions are made for "hook scripts" which will run at various stages of the DHCP process, including when an address is acquired. /etc/dhcp/dhclient-enter-hooks.d or similar.


5

Install and use sudo. It's the one and most sane way of doing these things. dhclient really needs root privileges, there's no way around it. Allow specific users to execute a single command with root privileges. This can be configured in a /etc/sudoers file like this (edit using visudo): Cmnd_Alias DHCP = /usr/sbin/dhclient User_Alias DCHPUSERS = ...


5

No, you can only get this information server side from the DHCP server. This information is contained in the DHCP server's .lease file: /var/lib/dhcpd/dhcpd.leases, if you're using ISC's DHCP server. Example $ more /var/lib/dhcpd/dhcpd.leases # All times in this file are in UTC (GMT), not your local timezone. This is # not a bug, so please don't ask ...


5

An option for you is counting number of lease declaration in dhcpd.leases: dhcpd.leases(5) - Linux man page Name dhcpd.leases - DHCP client lease database .... the Lease Declaration lease ip-address { statements... } Each lease declaration includes the single IP address that has been leased to the client. The statements within the braces define the ...


5

This is not a direct solution but it would seem you could make use of the on commit facility within your DHCP configuration file. Here's an example from this articled titled: Execute a script when ISC DHCP hands out a new lease. In the dhcpd.conf file you can create actions on various events such as when a lease is given out. subnet 192.168.1.0 netmask ...


4

The answer to this depends on how you previously configured the DHCP server. Normal DHCP behaviour is this: Lease is given a lease time perhaps 7days. Client machine starts requesting a new lease half way through the current lease period. Client machine only stops using the IP address when it either gets a new lease from the same DHCP server or the lease ...


4

It depends on what is doing the DHCP? Most home routers use dnsmasq and you can use that as your local DNS server. You just need to set dnsmasq to return itself as the DNS server. Next, you need to make sure that your PCs broadcast a hostname during the DHCP request. Then, voila, you should be able to resolve all your local machines through the DNS/DHCP ...


4

If the host sends its name you can retrieve it from DNS. If you know its IP address you just do a reverse lookup on the IP address. One of these commands should work (use the host's IP address in place of 192.0.32.10): host 192.0.32.10 nslookup 192.0.32.10 You can retrieve a list of all leases including the name provided if any from your dhcp.leases ...


4

Yes, you can do that. You should look into dnsmasq. It is designed to serve this very need. The default DHCP server on Linux is usually ISC dhcpd. It's possible to make it work in this role, too, but it's a bit more difficult to configure, and it has to be manually configured to get the DNS server integration you get for free with dnsmasq.


4

What is the question here? Yes, it sounds like you have two addresses assigned. Yes you can talk to the box using either one of them. If you talk from that box to other machines, it will use the most relevant address, meaning if there is an IP address in the same subnet, it will use that one to talk. One of the addresses, probably the one assigned first, ...


4

For a small network I would use dnsmasq. It performs well for both DNS and DHCP. It does self registration internally, so the client does not need to register. This is more secure. There are configuration options to specify another server should be consulted for a domain. It will serve static address via DHCP either via configuration or /etc/ethers. ...


4

That's not the way ifconfig works. Your ifconfig invocation is understood as ‘configure device eth1, setting its address to be that of host start’. There's no host named ‘start’, so ifconfig fails. If you configured the device correctly in /etc/sysconfig/network-scripts/ifcfg-eth1, all you need to do to run DHCP is to bring it up with ifup eth1.


4

On Ubuntu there is the file /var/lib/dhcp/dhcpd.leases, but it is rather verbose and you probably need a little script if you want more high level statistics. I am unaware of existing tools to do this. There is a separate man page for this file man dhcpd.leases describing the database format.


4

Bonsi Scott mentioned wireshark, which will allow you to observe ethernet packets, and all the protocol headers going up. It has a nice GUI interface too (the console version is 'tshark'). Wireshark is build on libpcap, which is fairly well documented and easy to use if you are into programming. Libpcap is also the basis of tcpdump which is similiar in ...


4

The best way to do this is to configure your WLAN router correctly, so that is is giving out proper fully qualified domain names (FQDN) to your hosts. If the WLAN router serves hosts in the myhome.org domain then configure it as wlan-router.myhome.org. It likely uses it's own domain name as the value to hand out to clients. A full DHCP has an option for ...


4

resolvconf is a program to manage the resolv.conf file so that multiple sources can add and remove entries without tripping over each other. The manager of each network interface feeds it a resolv.conf file for that interface, and it merges them all together. resolvconf is meant to be run by network scripts or DHCP clients, but you can also run it ...


4

Beaglebone seems to have a very small network 192.168.7.0/30. (note: 192.168.7.2 Bcast:192.168.7.3) which means it will only see .1 and .2 on the "local network" (.0 is the network address and .3 is the broadcast). It also has no default route so will not route anything outside of those two addresses. The win7 host I assume will be on the 192.168.0.0/24 ...


4

Preferred DHCP addresses are usually configured on the DHCP server side. You will need to add an entry in your DHCP server's address table for your device's MAC address and assign it to an IP address. DHCP servers can vary. If this is a small network your DHCP server may be your router or gateway. The address can fall in the range of DHCP addresses but it ...



Only top voted, non community-wiki answers of a minimum length are eligible