Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Feb 2009 17:56:05 -0500
From:      Jerry McAllister <jerrymc@msu.edu>
To:        Nikolaj Thygesen <mailinglist@diamondbox.dk>
Cc:        Gonzalo Nemmi <gnemmi@gmail.com>, freebsd-questions@freebsd.org
Subject:   Re: Assigning static ip address
Message-ID:  <20090212225605.GA78907@gizmo.acns.msu.edu>
In-Reply-To: <499496BA.6040706@diamondbox.dk>
References:  <49947FC4.4000400@diamondbox.dk> <200902121916.54861.gnemmi@gmail.com> <499496BA.6040706@diamondbox.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Feb 12, 2009 at 10:38:02PM +0100, Nikolaj Thygesen wrote:

> Gonzalo Nemmi wrote:
> >On Thursday 12 February 2009 6:00:04 pm Nikolaj Thygesen wrote:
> >  
> >Could you plase configure your /etc/rc.conf file to something like this?
> >
> >ifconfig_ed0="inet 192.168.1.105  netmask 255.255.255.0"
> >defaultrouter="192.168.1.1"
> >
> >Where "defaultrouter" is the IP of your dhcp server and tell me what 
> >happens?
> >
> >Regards
> >  
> When I do, I get:
> 
> em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>    options=19b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4>
>    ether 00:1b:21:1b:fd:bd
>    inet6 fe80::21b:21ff:fe1b:fdbd%em0 prefixlen 64 scopeid 0x1
>    inet 192.168.1.105 netmask 0xffffff00 broadcast 192.168.1.255
>    media: Ethernet autoselect (1000baseTX <full-duplex>)
>    status: active
> 
> I still get no connectivity until i run "dhclient em0" which gives me:
> 
> em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>    options=19b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4>
>    ether 00:1b:21:1b:fd:bd
>    inet6 fe80::21b:21ff:fe1b:fdbd%em0 prefixlen 64 scopeid 0x1
>    inet 192.168.1.105 netmask 0xffffff00 broadcast 192.168.1.255
>    inet 10.0.0.2 netmask 0xffffff00 broadcast 10.0.0.255
>    media: Ethernet autoselect (1000baseTX <full-duplex>)
>    status: active
> 
> adding what I guess is called an alias 10.0.0.2 ip?!?! I'm not that much 
> of an expert in these matters, and I'm a bit puzzled why, at first 
> (before calling dhclient), it can't resolve addresses eventhough 
> "/etc/resolv.conf" contains all my dns's.

I think you need to turn off dhclient in /etc/rc.conf - or don't
turn it on.   Also, make sure your resolv.conf is correct and
the default router is correctly set in /etc/rc.conf to your
gateway address.    It looks like your ifconfig might be correct,
but either or both of resolv.conf or default router is wrong
or dhclient is running and clobbering them.

////jerry


> 
>    br - N
> 
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090212225605.GA78907>