1d8d3
![]() |
|
|
|
|
|||||||
| Networking Network related discussions (including general TCP/IP stuff, routing, etc). |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hello guys,
I am new to FreeBSD 9.0 and using dhcpd-4.2.3-P1 and I haven't tried making computer a router. I tried doing this by following this tutorial (http://www.freebsd.org/doc/en_US.ISO...work-dhcp.html). After trying to start dhcpd I get an error: Code:
No subnet declaration for re1 (no IPv4 addresses) P.S. re0 is main ethernet card which gets "internet" and the re1 should share it to my little network (few laptops, ps3). I would be really glad if anyone could help me. Last edited by DutchDaemon; April 12th, 2012 at 14:26. Reason: Proper formatting: http://forums.freebsd.org/showthread.php?t=8816 |
|
#2
|
||||
|
||||
|
Post your dhcpd.conf.
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
|
#3
|
|||
|
|||
|
Code:
# dhcpd.conf
#
option domain-name "inet.vub.lt";
option domain-name-servers 8.8.8.8, 8.8.4.4;
option subnet-mask 255.255.255.0;
default-lease-time 3600;
max-lease-time 86400;
ddns-update-style none;
#authoritative;
log-facility local7;
subnet 192.168.4.0 netmask 255.255.255.0 {
range 192.168.4.129 192.168.4.254;
option routers 192.168.4.1;
}
host mail {
hardware ethernet 50:e5:49:2a:e7:a4;
fixed-address mailhost.MinSys.lt ;
}
|
|
#4
|
||||
|
||||
|
fixed-address is the static IP address to hand out when a machine with that hardware address (MAC) asks for a DHCP lease.
|
|
#5
|
||||
|
||||
|
Make sure re1 gets the IP address 192.168.4.1 and it should work.
/etc/rc.conf: Code:
ifconfig_re1="inet 192.168.4.1 netmask 255.255.255.0"
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
|
#6
|
|||
|
|||
|
Still get this error:
Code:
No subnet declaration for re1 (no IPv4 addresses). ** Ignoring requests on re1. If this is not what you want, please write a subnet declaration in your dhcpd.conf files for the network segment to which interface re1 is attached. Code:
dhcpd_enable="YES" dhcpd_ifaces="re1" # -- sysinstall generated deltas -- # Thu Apr 12 22:46:47 2012 router_enable="YES" ifconfig_re0="DHCP" ipv6_activate_all_interfaces="YES" gateway_enable="YES" hostname="MinSys.lt" ifconfig_re1="inet 192.168.4.1 netmask 255.255.255.0" Last edited by DutchDaemon; April 13th, 2012 at 22:16. Reason: Use [FILE], not [COLOR] |
|
#7
|
||||
|
||||
|
There's probably a typo in your dhcpd.conf.
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
|
#8
|
|||
|
|||
|
Quote:
Code:
range 192.168.4.129 192.168.4.254; |
|
#9
|
|||
|
|||
|
I have commented:
Code:
range 192.168.4.129 192.168.4.254; Last edited by DutchDaemon; April 13th, 2012 at 22:18. Reason: Use [FILE], not [COLOR] |
|
#10
|
|||
|
|||
|
Did you ever bother to read what others write to you? As wblock said earlier - fixed-address is address, which will be offered to machine with given MAC if it will request address assignation.
Last edited by DutchDaemon; April 13th, 2012 at 22:18. |
|
#11
|
|||
|
|||
|
This message may be caused by a dhcpd startup having the interface without an IP address within the declared subnet. dhcpd.conf looks fine, but if your re1 interface has no address in 192.168.4.0/24, then you will receive that error message.
Complains about no IP address for re0 are fine. Post your runtime configuraton for re1: Code:
/sbin/ifconfig re1
__________________
My blog: http://ghid-it.blogspot.com Other guides: http://sites.google.com/site/ghidit/ Last edited by DutchDaemon; April 13th, 2012 at 22:19. |
|
#12
|
|||
|
|||
|
Code:
/sbin/ifconfig re1 Code:
re1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=389b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_UCAST,WOL_MCAST,WOL_MAGIC> ether f8:d1:11:02:98:da nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> media: Ethernet autoselect (none) status: no carrier |
|
#13
|
|||
|
|||
|
Your interface does not have the desired IP address assigned to it. Here's how it should look the command output:
Code:
> /sbin/ifconfig bge1 bge1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=8009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE> ether 00:30:05:9c:c7:6c inet 10.16.0.1 netmask 0xfffffc00 broadcast 10.16.3.255 media: Ethernet autoselect (1000baseT <full-duplex>) status: active Code:
/sbin/ifconfig re1 inet 192.168.4.1/24 /usr/local/etc/rc.d/isc-dhcpd restart
__________________
My blog: http://ghid-it.blogspot.com Other guides: http://sites.google.com/site/ghidit/ Last edited by DutchDaemon; April 15th, 2012 at 02:28. |
|
#14
|
|||
|
|||
|
Code:
Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file Wrote 0 deleted host decls to leases file Wrote 0 new dynamic host decls to leases file Wrote 1 leases to leases file Listening on BPF /re1/f8:d1:11:02:98:da/192.168.4.0/24 Sending on BPF /re1/f8:d1:11:02:98:da/192.168.4.0/24 Sending on Socket/fallback/fallback-net |
|
#15
|
|||
|
|||
|
This startup message is fine. If you add
Code:
dhcpd_flags="-q"
__________________
My blog: http://ghid-it.blogspot.com Other guides: http://sites.google.com/site/ghidit/ Last edited by DutchDaemon; April 15th, 2012 at 02:29. |
|
#16
|
|||
|
|||
|
You are right, my PC is connected to router, because when I ping IP which ISP gave me I get feedback, but when I try to ping "internet" I don't get any. I tried pinging both IP's and domains, because I thought maybe it is some kind of DNS problem. Any ideas?
P.S. DHCPD stars without any error after I added this line: Code:
dhcpd_flags="-q" Last edited by DutchDaemon; April 15th, 2012 at 02:29. |
|
#17
|
|||
|
|||
|
Check if /etc/rc.conf contains
Code:
gateway_enable="YES"
__________________
My blog: http://ghid-it.blogspot.com Other guides: http://sites.google.com/site/ghidit/ Last edited by DutchDaemon; April 16th, 2012 at 00:47. |
|
#18
|
|||
|
|||
|
Thank you for help guys, everything is working.
|
|
#19
|
|||
|
|||
|
There is still a problem with IPTV. Ports are wide open, but I can't watch IPTV, maybe I should have edited something?
P.S. How to edit my post? |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Solved] FreeBSD Router with PF | ryuusoultaker | Firewalls | 9 | January 8th, 2012 08:45 |
| [IPF] Connecting Cisco ASA VPN through FreeBSD 8.2 router vs FreeBSD 7.4 router | gilcel | Firewalls | 0 | July 12th, 2011 10:40 |
| FreeBSD router | dpetka2001 | Networking | 17 | March 23rd, 2011 21:34 |
| FreeBSD as a router | Myron | Networking | 5 | December 6th, 2009 09:51 |
| [Solved] FreeBSD as a router | gpatrick | Networking | 8 | October 23rd, 2009 19:55 |