Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Oct 2014 10:51:37 -0500
From:      "William A. Mahaffey III" <wam@hiwaay.net>
Cc:        "FreeBSD Questions !!!!" <freebsd-questions@freebsd.org>
Subject:   Re: How to power down/up NIC interfaces ....
Message-ID:  <54492409.4040208@hiwaay.net>
In-Reply-To: <CAAdA2WPoPjpJJ1TAwzS_9PYfw3fy5-TxULHqQYuxSbPVPxLfVA@mail.gmail.com>
References:  <54491D94.5030907@hiwaay.net> <CAAdA2WPoPjpJJ1TAwzS_9PYfw3fy5-TxULHqQYuxSbPVPxLfVA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10/23/14 10:23, Odhiambo Washington wrote:
> On 23 October 2014 18:24, William A. Mahaffey III <wam@hiwaay.net> wrote:
>
>>
>> .... I am running FBSD 9.3p2:
>>
>> [root@kabini1, /etc, 10:16:05am] 459 % uname -a
>> FreeBSD kabini1.local 9.3-RELEASE-p2 FreeBSD 9.3-RELEASE-p2 #0: Mon Sep 15
>> 16:44:27 UTC 2014 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
>> amd64
>> [root@kabini1, /etc, 10:21:05am] 460 %
>>
>> I am trying to reset the (my) default netmask for my default network
>> interface from 255.255.255 to 255.255 . I changed the settings in rc.conf &
>> networks & did an 'infonfig re0 down/up' & nothing has changed :-/ ....
>>
>> [root@kabini1, /etc, 10:15:41am] 455 % ifconfig re0 down
>> [root@kabini1, /etc, 10:15:45am] 456 % ifconfig
>> re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
>>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You see UP is
> missing? It's DOWN :)
>
>
>> options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_
>> HWCSUM,WOL_MAGIC,LINKSTATE>
>>          ether d0:50:99:13:e3:85
>>          inet 192.168.0.27 netmask 0xffffff00 broadcast 192.168.0.255
>>          inet6 fe80::d250:99ff:fe13:e385%re0 prefixlen 64 scopeid 0x1
>>          nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>>          media: Ethernet autoselect (100baseTX <full-duplex>)
>>          status: active
>> plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
>>          nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
>>          options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
>>          inet6 ::1 prefixlen 128
>>          inet6 fe80::1%lo0 prefixlen 64 scopeid 0x9
>>          inet 127.0.0.1 netmask 0xff000000
>>          nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
>> ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
>>          nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
>> [root@kabini1, /etc, 10:15:51am] 457 % ifconfig re0 up
>> [root@kabini1, /etc, 10:16:03am] 458 %
>> [root@kabini1, /etc, 10:16:04am] 458 %
>> [root@kabini1, /etc, 10:16:04am] 458 % ifconfig
>> re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> You see the UP??
>
>
>
>
>> options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_
>> HWCSUM,WOL_MAGIC,LINKSTATE>
>>          ether d0:50:99:13:e3:85
>>          inet 192.168.0.27 netmask 0xffffff00 broadcast 192.168.0.255
>>          inet6 fe80::d250:99ff:fe13:e385%re0 prefixlen 64 scopeid 0x1
>>          nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>>          media: Ethernet autoselect (none)
>>          status: no carrier
>>
>             ^^^^^^^^^^^^^^^^^^ This is odd. I suppose you need ifconfig INT
> ip netmask up
>
>
>
>> plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
>>          nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
>>          options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
>>          inet6 ::1 prefixlen 128
>>          inet6 fe80::1%lo0 prefixlen 64 scopeid 0x9
>>          inet 127.0.0.1 netmask 0xff000000
>>          nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
>> ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
>>          nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
>> [root@kabini1, /etc, 10:16:05am] 459 %
>>
>>
>> Do I have to do a full reboot to get this to take effect ? Please advise &
>> TIA ....
>>
>
> Try ifconfig re0 a.b.c.d x.x.x.x up
> Then of course route change default w.x.y.z, or maybe route add default...
>
>
>

Thx for your reply, I missed the UP flag :-/. I tried (w/ interface down 
to start with):


[root@kabini1, /etc, 10:45:26am] 478 % ifconfig
re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
         ether d0:50:99:13:e3:85
         inet 192.168.0.27 netmask 0xffff0000 broadcast 192.168.255.255
         inet6 fe80::d250:99ff:fe13:e385%re0 prefixlen 64 scopeid 0x1
         nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
         media: Ethernet autoselect (100baseTX <full-duplex>)
         status: active
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
         nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
         options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
         inet6 ::1 prefixlen 128
         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x9
         inet 127.0.0.1 netmask 0xff000000
         nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
         nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
[root@kabini1, /etc, 10:45:32am] 479 % ifconfig re0 inet address 
192.168.111.27 255.255.0.0  up
ifconfig: address: bad value
[root@kabini1, /etc, 10:45:49am] 480 % ifconfig
re0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
         ether d0:50:99:13:e3:85
         inet 192.168.0.27 netmask 0xffff0000 broadcast 192.168.255.255
         inet6 fe80::d250:99ff:fe13:e385%re0 prefixlen 64 scopeid 0x1
         nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
         media: Ethernet autoselect (100baseTX <full-duplex>)
         status: active
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
         nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
         options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
         inet6 ::1 prefixlen 128
         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x9
         inet 127.0.0.1 netmask 0xff000000
         nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
         nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
[root@kabini1, /etc, 10:45:52am] 481 % ifconfig re0 up
[root@kabini1, /etc, 10:45:59am] 482 % ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
         ether d0:50:99:13:e3:85
         inet 192.168.0.27 netmask 0xffff0000 broadcast 192.168.255.255
         inet6 fe80::d250:99ff:fe13:e385%re0 prefixlen 64 scopeid 0x1
         nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
         media: Ethernet autoselect (100baseTX <full-duplex>)
         status: active
plip0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> metric 0 mtu 1500
         nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
         options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
         inet6 ::1 prefixlen 128
         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x9
         inet 127.0.0.1 netmask 0xff000000
         nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
         nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
[root@kabini1, /etc, 10:46:01am] 483 %


I got the mask reset earlier, & can ping more stuff now, just can't get 
this address reset. I need to do this to configure a newly acquired 
WatchGuard FireBox Edge firewall appliance (to be later possibly 
reprovisioned w/ NetBSD/FreeBSD/OpenBSD, as per earlier post on another 
topic). TIA for any further help :-) ....

-- 

	William A. Mahaffey III

  ----------------------------------------------------------------------

	"The M1 Garand is without doubt the finest implement of war
	 ever devised by man."
                            -- Gen. George S. Patton Jr.




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