Friday, December 4, 2009

How to create a Permanent or Static ip in Freebsd

You can add an ip to an interface after boot using ifconfig.
example: ifconfig rl0 192.168.1.1
But this ip wont last for the next boot.

So if you want to make an permanent ip for an interface just follow these steps.

1. Open up the file rc.conf
# vi /etc/rc.conf
2. Now add the following line
ifconfig_interface="inet 192.168.1.1 netmask 255.255.255.0"  
substitute interface with your interface(eg:rl0,rl1,fxp0,em0..)
substitute 192.168.1.1 with your desired lan ip.
Now type <ESC>:wq to save and exit
3. Now Restart your network.
# /etc/rc.d/netif restart && /etc/rc.d/routing restart

 

1 comments:

midn said...

replika rolex ure, der kombinerer elegant stil og avanceret teknologi, en række forskellige stilarter af replika rolex air king ure, går markøren mellem din eksklusive smagstil.

Post a Comment

 

Labels

Labels