實驗室使用板子的ubuntu10.04虛擬機器的網路設定

來源:互聯網
上載者:User

實驗室使用板子的ubuntu10.04虛擬機器的網路設定 實驗室和寢室的網路有不同。 昨天來到實驗室,要想使用nfs,用虛擬機器裡的ubuntu10.04訪問外網,必須要設定網路。 桂工的網路很有特點。每個機子的ip地址幾乎就是固定分破的。而且有很多子網存在。 ubuntu上用drcom的用戶端可以訪問。vmware可以設定與主機共用上網。 ======================================================================= 設定都是在etc目錄下的。 昨天修改了hostname。 今天修改網路設定。主要涉及到 /etc/network下的interfaces和/etc/resolv.conf ======================================================================= 學校實驗室的網路資訊:  按照這個資訊,把虛擬機器裡的ubuntu10.04設定為   1 # The primary network interface  2 auto eth0  3 iface eth0 inet static     不是很懂是什麼意思。  4 address 202.193.89.253  自己設定的,不是網關分配的。  5 netmask 255.255.255.192  這個子網路遮罩,最後是192  6 gateway 202.193.89.254  7 #iface eth0 inet dhcp  8 auto lo  9 iface lo inet loopback 10 ~                                                           把resolv.conf修改下:  ====================================== ping下,成功了: root@ubuntu:/etc# cd network root@ubuntu:/etc/network# lsif-down.d  if-post-down.d  if-pre-up.d  if-up.d  interfaces  interfaces-502root@ubuntu:/etc/network# vi interfacesroot@ubuntu:/etc/network# ping 127.0.0.1PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.027 ms^[[A64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.026 ms^C--- 127.0.0.1 ping statistics ---2 packets transmitted, 2 received, 0% packet loss, time 999msrtt min/avg/max/mdev = 0.026/0.026/0.027/0.005 msroot@ubuntu:/etc/network# ping 202.193.80.203PING 202.193.80.203 (202.193.80.203) 56(84) bytes of data.^C--- 202.193.80.203 ping statistics ---3 packets transmitted, 0 received, 100% packet loss, time 1999ms root@ubuntu:/etc/network# ping 202.193.89.203 PING 202.193.89.203 (202.193.89.203) 56(84) bytes of data.64 bytes from 202.193.89.203: icmp_seq=1 ttl=64 time=4.82 ms64 bytes from 202.193.89.203: icmp_seq=27 ttl=64 time=0.082 ms64 bytes from 202.193.89.203: icmp_seq=28 ttl=64 time=0.193 ms64 bytes from 202.193.89.203: icmp_seq=29 ttl=64 time=0.191 ms64 bytes from 202.193.89.203: icmp_seq=30 ttl=64 time=0.114 ms64 bytes from 202.193.89.203: icmp_seq=31 ttl=64 time=0.110 ms64 bytes from 202.193.89.203: icmp_seq=32 ttl=64 time=0.116 ms64 bytes from 202.193.89.203: icmp_seq=33 ttl=64 time=0.116 ms64 bytes from 202.193.89.203: icmp_seq=34 ttl=64 time=0.121 ms64 bytes from 202.193.89.203: icmp_seq=35 ttl=64 time=0.156 ms64 bytes from 202.193.89.203: icmp_seq=36 ttl=64 time=0.118 ms64 bytes from 202.193.89.203: icmp_seq=37 ttl=64 time=0.155 ms64 bytes from 202.193.89.203: icmp_seq=38 ttl=64 time=0.194 ms64 bytes from 202.193.89.203: icmp_seq=39 ttl=64 time=0.198 ms64 bytes from 202.193.89.203: icmp_seq=40 ttl=64 time=0.093 ms^C--- 202.193.89.203 ping statistics ---40 packets transmitted, 15 received, 62% packet loss, time 39002msrtt min/avg/max/mdev = 0.082/0.452/4.823/1.168 msroot@ubuntu:/etc/network# ping 202.193.89.254PING 202.193.89.254 (202.193.89.254) 56(84) bytes of data.64 bytes from 202.193.89.254: icmp_seq=6 ttl=64 time=1.52 ms64 bytes from 202.193.89.254: icmp_seq=7 ttl=64 time=2.93 ms64 bytes from 202.193.89.254: icmp_seq=8 ttl=64 time=2.10 ms^C--- 202.193.89.254 ping statistics ---8 packets transmitted, 3 received, 62% packet loss, time 7003msrtt min/avg/max/mdev = 1.521/2.187/2.933/0.579 msroot@ubuntu:/etc/network#                           

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.