2009年4月6日 星期一

network interface configuration

FreeBSD (1 public NIC 1 private NIC example)
/etc/rc.conf
ifconfig_le0="inet X.X.X.X netmask 255.255.255.192"
ifconfig_le1="inet 192.168.102.254 netmask 255.255.255.0"
defaultrouter="Y.Y.Y.Y"

Ubuntu Linux (1 public NIC, 2 private NICs)
/etc/network/interfaces
auto eth2
iface eth2 inet static
address X.X.X.X
netmask 255.255.255.224
gateway X'.X'.X'.X'

auto eth3
iface eth3 inet static
address 192.168.102.254
netmask 255.255.255.0

auto eth4
iface eth4 inet static
address 172.17.11.251
netmask 255.255.0.0

How to restart the Ubuntu Linux network interface setting
# /etc/init.d/networking restart
# sudo ifconfig down; sudo ifconfig up

沒有留言: