LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-23-2011, 06:38 AM   #1
sd||
Member
 
Registered: Oct 2009
Distribution: Arch Linux
Posts: 89

Rep: Reputation: 18
DHCP: Problem creating Private Network using 3G modem, fedora(DHCP) and wifi router


Hi,

I am configuring my home network. I have a USB 3g modem and a wifi router which has a ethernet port for DSL/Cable Connection.

I was planning to have my laptop connect to 3g via USB modem and route the traffic to ethernet port of the Laptop so it can be used as cable internet connection for the wifi router when i connect my laptop to the router.

I am still stuck configuring DHCP.

this is the content of /etc/dhcp/dhcpd.conf
Quote:
# Sample /etc/dhcpd.conf
# (add your comments here)
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "mydomain.org";

subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
range 192.168.1.150 192.168.1.200;
}
Routing: for time being i did
Quote:
# route add -host 255.255.255.255 dev eth0
then I executed
Quote:
# dhcpd eth0
the error which I am getting is
Quote:
[root@spark dhcp]# sudo dhcpd eth0
Internet Systems Consortium DHCP Server 4.2.1-P1
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Wrote 0 leases to leases file.

No subnet declaration for eth0 (no IPv4 addresses).
** Ignoring requests on eth0. If this is not what
you want, please write a subnet declaration
in your dhcpd.conf file for the network segment
to which interface eth0 is attached. **


Not configured to listen on any interfaces!

This version of ISC DHCP is based on the release available
on ftp.isc.org. Features have been added and other changes
have been made to the base software release in order to make
it work better with this distribution.

Please report for this software via the Red Hat Bugzilla site:
http://bugzilla.redhat.com

exiting.
[root@spark dhcp]#
ifconfig output

Quote:
[root@spark dhcp]# ifconfig
em2 Link encap:Ethernet HWaddr 98:4B:E1:EF:7B:36
inet6 addr: fe80::9a4b:e1ff:feef:7b36/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10588 errors:0 dropped:0 overruns:0 frame:0
TX packets:9506 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1902468 (1.8 MiB) TX bytes:962611 (940.0 KiB)
Interrupt:45 Base address:0xe000

eth0 Link encap:Ethernet HWaddr CC:52:AF:54:19:BD
inet6 addr: fe80::ce52:afff:fe54:19bd/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:109 errors:0 dropped:0 overruns:0 frame:192354
TX packets:33 errors:20 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15181 (14.8 KiB) TX bytes:6798 (6.6 KiB)
Interrupt:16

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:109435 errors:0 dropped:0 overruns:0 frame:0
TX packets:109435 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:8260005 (7.8 MiB) TX bytes:8260005 (7.8 MiB)

ppp0 Link encap:Point-to-Point Protocol
inet addr:115.184.XXX.XXX P-t-P:220.224.XXX.XXX Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:31 errors:0 dropped:0 overruns:0 frame:0
TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:7768 (7.5 KiB) TX bytes:5950 (5.8 KiB)

[root@spark dhcp]#
It says I am missing subnet declaration, which i am not. What else could be the reason I am getting this error. thanks.
 
Old 07-23-2011, 07:12 AM   #2
sd||
Member
 
Registered: Oct 2009
Distribution: Arch Linux
Posts: 89

Original Poster
Rep: Reputation: 18
ahh I figured out, I forget to assign IP address to my eth0 interface,

Quote:
# ifconfig eth0 192.168.1.100
what a gotcha :|
 
  


Reply

Tags
dhcp


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
Linux DHCP client unsuccessful on a windows DHCP served network tom1080 Linux - Newbie 1 12-16-2009 12:37 PM
Got DHCP from cable modem once, but not anymore. Works with Router. MaxistXXL Linux - Networking 2 04-20-2009 01:28 PM
Separate router and modem: 2 DHCP servers and wierdness jago25_98 Linux - Networking 1 09-30-2006 06:24 AM
iptables, nat, dhcp with adsl modem/router and wireless AP gjhicks Linux - Wireless Networking 8 05-16-2005 07:15 AM
Cable modem with Netgear router using DHCP yamar Linux - Networking 1 05-26-2003 08:33 PM

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

All times are GMT -5. The time now is 02:22 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
Open Source Consulting | Domain Registration