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 ...


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

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 ...


6

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 ...


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

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

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 = ...


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

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

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. ...


4

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 ...


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

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 ...


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

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 ...


4

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 ...


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 ...


4

I did this exact thing this morning. First, double check that the lease isn't allocated. Go to the Status page and then the LAN page on DD-WRT. Check the lease in the list of DHCP clients. If it's allocated, click the trash can. I also have my lease set to 5 minutes. If I left it for a whole day, which is the default, I found that if the signal got ...


3

This is how I made Debian use more than 3 nameservers at a time. Install dnsmasq package Configure my local DHCP client not to use DNS server addresses provided by DHCP server, but only local server instead. To do so I add in my /etc/dhcp/dhclient.conf file the following line supersede domain-name-servers 127.0.0.1; Configure dnsmasq not to use the ...


3

You need to look into more complex dhclient.conf files. From the man page: The DHCP client may decide after some period of time (see PROTOCOL TIMING) that it is not going to succeed in contacting a server. At that time, it consults its own database of old leases and tests each one that has not yet timed out by pinging the listed router for ...


3

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, ...


3

In English, supersede means (from OED) To take the place of (something set aside or abandoned); to succeed to the place occupied by; to serve, be adopted or accepted instead of. From man dhclient.conf The supersede statement supersede [ option declaration ] ; If for some option the client should always use a locally-configured value or ...


3

Looks like maybe you're not setting the channel and "mode". I use a simple script that does these shell commands: ifconfig wlan0 down iwconfig wlan0 mode managed ifconfig wlan0 up iwconfig wlan0 channel 3 iwconfig wlan0 key xxxxxxxxxx iwconfig wlan0 key restricted iwconfig wlan0 essid "Blah Blah Foo Bar" iwconfig wlan0 ap xx:yy:zz:aa:bb:cc sleep 5 dhcpcd ...


3

Both FreeBSD and OpenBSD ship with BIND as the preinstalled name server. There is a good introduction in the FreeBSD handbook. For OpenBSD, there is a lot of information on Kernel Panic. FreeBSD doesn't include a DHCP server in its default installation, but officially recommends the ISC DHCP server; see the handbook. OpenBSD does include a DHCP server, ...



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