How to power down/up NIC interfaces ....

Odhiambo Washington odhiambo at gmail.com
Thu Oct 23 15:23:51 UTC 2014


On 23 October 2014 18:24, William A. Mahaffey III <wam at hiwaay.net> wrote:

>
>
> .... I am running FBSD 9.3p2:
>
> [root at 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 at amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC
> amd64
> [root at 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 at kabini1, /etc, 10:15:41am] 455 % ifconfig re0 down
> [root at 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 at kabini1, /etc, 10:15:51am] 457 % ifconfig re0 up
> [root at kabini1, /etc, 10:16:03am] 458 %
> [root at kabini1, /etc, 10:16:04am] 458 %
> [root at 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 at 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...



-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
"I can't hear you -- I'm using the scrambler."


More information about the freebsd-questions mailing list