2010年7月29日 星期四

TCP/IP設定

ifconfig -a 可列出所有網路資訊
sudo nano  /etc/network/interfaces 此檔是網路裝置的設定檔
檔案內容
auto  lo (這是本機lookback位置 就是127.0.0.1) 
iface  lo  inet  loopback

auto  eth0 (第一個網卡設定)
iface  eth0  inet  dhcp
auto  eth1 (第二個網卡設定)
iface  eth1  inet  static
      address  192.168.200.11
      netmask  255.255.255.0
      gateway  192.168.200.2
      dns-nameservers  168.95.1.1

設定的方法有
1.dhcp   自動取得IP(如eth0)
2.static 手動設定IP(如eth1)

沒有留言:

張貼留言