Problem with ifconfig duplicate broadcasts

When I type in code: ifconfig

( I only want one of the ip address not both)
(I want to assign it **and not from rc.conf** , I do not want DHCP)

Results:
Code:
ne0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8210b<RXCSUM,TXCSUM,VLAN_MTU,TSO4,WOL_MAGIC,LINKSTATE>
    ether 00:26:18:a1:45:6d
    inet 192.168.0.120 netmask 0xffffff00 broadcast 192.168.0.255
    inet 192.168.0.168 netmask 0xffffff00 broadcast 192.168.0.255
    media: Ethernet autoselect (1000baseT <full-duplex,master>)
    status: active
How to get rid of the one ending in 168


Thank You
 
Last edited by a moderator:
The question should be: why do you have an inet alias in the first place?
It would be cool if we can see the whole output of ifconfig and the content of rc.conf. Do you have any jail in this system?

Normaly to remove an inet: ifconfig ne0 inet 192.168.0.168 -alias.
See ifconfig(8).

You can use rc.conf to define a static ip. I don't know if it is what you want or not.
 
The question should be: why do you have an inet alias in the first place?
It would be cool if we can see the whole output of ifconfig and the content of rc.conf. Do you have any jail in this system?

Normaly to remove an inet: ifconfig ne0 inet 192.168.0.168 -alias.
See ifconfig(8).

You can use rc.conf to define a static ip. I don't know if it is what you want or not.

This had happen to be because i notice i had an ip addres i don not not like to use normally so i decided o ad the new ip
with that command You show and that is how i got the both showing
 
This had happen to be because i notice i had an ip addres i don not not like to use normally so i decided o ad the new ip
with that command You show and that is how i got the both showing
The command I gave you remove the alias. Notice the '-' before alias. Without '-', it actually adds an alias.
This command is equivalent to: ifconfig ne0 inet 192.168.0.168 remove.
Once again, take the time to read ifconfig(8).
 
The command I gave you remove the alias. Notice the '-' before alias. Without '-', it actually adds an alias.
This command is equivalent to: ifconfig ne0 inet 192.168.0.168 remove.
Once again, take the time to read ifconfig(8).

Thank you again for your very kind and helpful reply.
 
The question should be: why do you have an inet alias in the first place?
It would be cool if we can see the whole output of ifconfig and the content of rc.conf. Do you have any jail in this system?

Normaly to remove an inet: ifconfig ne0 inet 192.168.0.168 -alias.
See ifconfig(8).

You can use rc.conf to define a static ip. I don't know if it is what you want or not.
I usually do that but weather it be in the command terminal or in rc.conf it just won't connect unless I leave it as DHCP.
I know I have it correct.
But not sure what is wrong so for now I leave it as DHCP.
 
It's because, without DHCP, you don't set a default router.

/etc/rc.conf
Code:
ifconfig_ne0="inet 192.168.0.120 netmask 255.255.255.0"                             
defaultrouter="192.168.0.1"
The IP address of your default router may be different than 192.168.0.1. It must be the IP address of your internet box.

You can also have a problem with the name server. It should be again the IP address of your internet box.

/etc/resolv.conf
Code:
nameserver 192.168.0.1

During the DHCP protocol, you get not only your IP address but also the default router and a name server. If one of these three things lacks, you can't access to the internet.
 
It's because, without DHCP, you don't set a default router.

/etc/rc.conf
Code:
ifconfig_ne0="inet 192.168.0.120 netmask 255.255.255.0"                            
defaultrouter="192.168.0.1"
The IP address of your default router may be different than 192.168.0.1. It must be the IP address of your internet box.

You can also have a problem with the name server. It should be again the IP address of your internet box.

/etc/resolv.conf
Code:
nameserver 192.168.0.1

During the DHCP protocol, you get not only your IP address but also the default router and a name server. If one of these three things lacks, you can't access to the internet.

This is very useful information and makes sense

Thank You so much
 
It's because, without DHCP, you don't set a default router.

/etc/rc.conf
Code:
ifconfig_ne0="inet 192.168.0.120 netmask 255.255.255.0"                            
defaultrouter="192.168.0.1"
The IP address of your default router may be different than 192.168.0.1. It must be the IP address of your internet box.

You can also have a problem with the name server. It should be again the IP address of your internet box.

/etc/resolv.conf
Code:
nameserver 192.168.0.1

During the DHCP protocol, you get not only your IP address but also the default router and a name server. If one of these three things lacks, you can't access to the internet.

Finally for me this working in rc.conf
Biggest problems I'm having was using ' instead of double quote ", most of the time or it would not boot up at all and I have to get into the rc.conf, so thereI was missing only that one line for the default router and I turned off DHCP
and all is good now
funny how most simple thing can make all to seem broken

Thank You
 
Back
Top