photo
Jordan Sissel
geek

Mon, 19 Mar 2007

Interesting FreeBSD rc.conf network option

In rc.conf, I can put:
ipv4_addrs_bge0="192.168.0.1-254/24 192.168.5.50-100/24"
And do /etc/rc.d/netif restart bge0

and we get:

% ifconfig bge0
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
        inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
        inet6 fe80::20a:e4ff:fe3f:92ee%bge0 prefixlen 64 scopeid 0x1 
        inet 192.168.0.2 netmask 0xffffffff broadcast 192.168.0.2
        inet 192.168.0.3 netmask 0xffffffff broadcast 192.168.0.3
...
        inet 192.168.0.253 netmask 0xffffffff broadcast 192.168.0.253
        inet 192.168.0.254 netmask 0xffffffff broadcast 192.168.0.254
        inet 192.168.5.50 netmask 0xffffff00 broadcast 192.168.5.255
        inet 192.168.5.51 netmask 0xffffffff broadcast 192.168.5.51
...
        inet 192.168.5.99 netmask 0xffffffff broadcast 192.168.5.99
        inet 192.168.5.100 netmask 0xffffffff broadcast 192.168.5.100
        ether 00:0a:e4:3f:92:ee
        media: Ethernet autoselect (none)
        status: no carrier
Neat. That's one way to take an entire subnet.

Comments: 0 (view comments)
Tags: ,
Permalink: /geekery/interesting-freebsd-network-config
posted at: 20:19


0 responses to 'Interesting FreeBSD rc.conf network option'


Leave a reply

You need javascript enabled to use this form. Anti-spam efforts ongoing. Also, if the comment doesn't show up, it's because the form expired. Go back and copy your comment, reload the form, and resubmit. Apologies if this is a hassle, I'm just playing with antispam methods right now. If this insists on not working, please email me about it.

Name (required)
E-mail (optional, if you want me to be able to email you back)
URL (also optional)
Comment:


Search this site

Navigation

Metadata

Home About Resume My Code (SVN)

Articles

ARP Security Dynamic DNS with DHCP OpenLDAP+Kerberos+SASL PPP over SSH SSH Security: /bin/false Week of Unix Tools Work Efficiency

Projects

fex firefox tabsearch firefox urledit grok keynav liboverride newpsm (FreeBSD) nis2ldap pam_captcha poor man's backup Solaris audio utility xboxproxy xdotool xmlpresenter xpathtool misc scripts

Presentations

Yahoo! Hack Day '08 Yahoo! Hack Day '06 Unix Essentials Vi/Vim Essentials SSH Tunneling (Video)

Tag Cloud

Calendar

< March 2007 >
SuMoTuWeThFrSa
     1 2 3
4 5 6 7 8 910
11121314151617
18192021222324
25262728293031

Friends

BarCamp Kent Brewster Tantek Çelik John Resig Wesley Shields Tyler Shields

Technorati