Can not config the network

Phillip

New Member


Messages: 4

Hello folks,

I am newbie to BSD world. Just now, I install FreeBSD 8 and then follow with the BSD manual, modify /etc/rc.conf as adding
Code:
ifconfig_em0="inet 192.168.1.102 netmask=255.255.255.0"
and save/reboot. When system startup again, it seems the IP address is not set successfully. I check and retry for 3 times, still failed.

Would you please give me any hint?

Thanks,

Phillip
 

graudeejs

Son of Beastie

Reaction score: 700
Messages: 4,617

sixtydoses said:
Try:

Code:
ifconfig_em0="inet 192.168.1.102 netmask 255.255.255.0"
Ops original syntax was rrong. This ^^ is correct syntax.
If this doesn't work, check your interface name, maybe it's not em0 :D
 

Beastie

Daemon

Reaction score: 532
Messages: 2,272

And how do you know the IP address is not set successfully? Execute % ifconfig em0.
 

jalla

Well-Known Member

Reaction score: 85
Messages: 385

Beastie said:
And how do you know the IP address is not set successfully? Execute % ifconfig em0.
ifconfig won't set the address when the syntax is wrong

Code:
gnome:~# ifconfig em1
em1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
	ether 00:04:23:bd:10:89
	media: Ethernet autoselect (1000baseT <full-duplex>)
	status: active
gnome:~# ifconfig em1 192.1.1.1 netmask=255.255.255.0 
ifconfig: netmask=255.255.255.0: bad value
gnome:~# ifconfig em1
em1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
	ether 00:04:23:bd:10:89
	media: Ethernet autoselect (1000baseT <full-duplex>)
	status: active
 

Beastie

Daemon

Reaction score: 532
Messages: 2,272

Of course it won't. I didn't see the '=' sign, nor read the other posts. So, ignore my post.
 
OP
P

Phillip

New Member


Messages: 4

Hi folks,

It is my mistake(should remove "=") and I will be more careful in future.

All of your kindly help make me feel more confidence on traveling BSD world, thanks a lot.

Phillip
 
Top