11dcf
![]() |
|
|
|
|
|||||||
| Networking Network related discussions (including general TCP/IP stuff, routing, etc). |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
My experience is similar to another user's post : I installed FreeBSD 9.0 using DHCP, then tried to switch to a static IP address witout success.
In rc.conf I commented out the Code:
ifconfig_dc0="DHCP" Code:
ifconfig_dc0="inet a.b.c.d netmask 255,255,255,0" Code:
defaultrouter="e.f.g.h" After the changes, pinging the default gateway reults in "Host is down". Using the same cable and a windows machine and the static address and gateway, one can successfully ping the gateway and access the internet. Using the dynamically assigned address in freeBSD, the gateway does respond to pings. I also used # sysinstallto change to the static address and got no better results.One additional, possibly irrelevant fact: When I first tried the change to static IP, the gateway was actually down, couldn't be pinged from any machine. I have used FreeBSD since verion 3.something, and this is the first time I have had such a perplexing problem. I'm hoping for enlightenment. Thanks. |
|
#2
|
|||
|
|||
|
The netmask should be written with dots,
Code:
ifconfig_dc0="inet a.b.c.d netmask 255.255.255.0" Code:
ifconfig_dc0="inet a.b.c.d/24" |
|
#3
|
|||
|
|||
|
kpa said: "The netmask should be written with dots".
It was. The code I posted was just typed in, not pasted, too hastily. In not using CIDR notation, I was just mimicking what sysinstall does when setting up the dc0 interface. Here's what $ netstat -rn has to say:Code:
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire default 10.10.5.1 UGS 0 84 dc0 127.0.0.1 link#4 UH 0 55 lo0 10.10.5.0/24 link#2 U 0 2 dc0 10.10.5.232 link#2 UHS 0 5 lo0 Code:
hostname="x.y.z" ifconfig_dc0="inet 10.10.5.232 netmask 255.255.255.0" defaultrouter="10.10.5.1" #ifconfig_dc0="DHCP" sshd_enable="YES" moused_enable="YES" ntpd_enable="NO" powerd_enable="NO" Thanks. |
|
#4
|
||||
|
||||
|
Ping the IP address of the gateway. Not the hostname.
I'm guessing internet isn't "working" because /etc/resolv.conf doesn't contain any DNS servers.
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
|
#5
|
|||
|
|||
|
SirDice said: "Ping the IP address of the gateway. Not the hostname.
I'm guessing internet isn't "working" because /etc/resolv.conf doesn't contain any DNS servers." Pinging the IP address (I don't even know its hostname) of the gateway produces "Host is down". It's not down; using DHCP or another computer shows that it is responding to pings properly. Here is /etc/resolv.conf: Code:
# Generated by resolvconf search xxx.yyy nameserver 10.1.1.60 nameserver 10.1.1.61 Just as a matter of curiosity: I gathered that the gateway should be pingable even without nameservers, since it is on the same subnet as defined by the netmask 255.255.255.0. Was I incorrect? Thanks |
|
#6
|
||||
|
||||
|
Quote:
(Or IOW, what mask do you get when you use DHCP?)
__________________
Practical latin Amicule, deliciae, num is sum qui mentiar tibi? But dear, could I ever lie to you? |
|
#7
|
|||
|
|||
|
When I use DHCP, I get a private IP address for the gateway, 10.1.10.1, and my compter's private address is 10.1.10.14, and all is well. When I try to use my public address x.y.z.232, my netmask is 255.255.255.0 and the gateway is x.y.z.1 (x, y, and z being in the range 1-254). I don't know what the netmask of x.y.z.1 is, nor do I know that 10.1.10.1 maps to x.y.x.1. I do know that 10.1.10.1 doesn't work as a gateway for x.y.z.232 (nor, I guess, should it.)
|
|
#8
|
||||
|
||||
|
There's a router in front of your network that's already doing NAT. This means you can't use the external IP address internally.
__________________
Senior UNIX Engineer at Unix Support Nederland Experience is something you don't get until just after you need it. |
|
#9
|
|||
|
|||
|
The systems guy was just in and a quick reconfiguration of the port made all well. Not a FreeBSD problem at all, though it took a lot of trying to get to the point where they listened to me seriously.
The base problem was that I was away for two months, during which time a) the motherboard on the computer in question failed, and b) they made some changes to port configuations in my office suite. If the mobo hadn't failed, it would have been clear that that their reconfiguration was at fault. With the two happenning in tandem, it was unclear where the problem was. My most profound thanks to SirDice, jalla, and kpa for taking teh time and having the patience to help out. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Solved] Losing Static IP | erohal | Networking | 5 | February 17th, 2012 18:54 |
| FreeBSD as a DHCP Server or DHCP Relay | swavijay | Installing & Upgrading | 5 | February 15th, 2012 17:41 |
| [Solved] ppp nat static/dynamic | Junaid | Networking | 11 | May 11th, 2011 09:59 |
| How to configure DHCP server, Static NAT with 5 IPs (not just one) and gateway? | jbarton | Networking | 3 | February 23rd, 2010 18:45 |
| Freebsd dhcp client from a Windows dhcp server | Dillweed | Networking | 12 | September 10th, 2009 01:15 |