實驗四 Routing and Routing
Protocol within the Internet
{ Part 3 }
Linux指令列表
ifconfig
可以看到目前網路卡的設定
ifconfig eth0 inet 140.112.1.1
netmask 255.255.255.0 broadcast 140.112.1.255
設定第一張網路卡的ip,及netmask,及broadcast的位址
route –n
看到目前的routing
table
route -n >>
test.txt
看routing
table的內容存到test.txt
route add default gw 140.112.1.254
將default
gateway設成140.112.1.254
route add default
dev eth0
將routing table 的default從eth0送出
和設了gw作用有點不同,在第三個子實驗中,pc2回應ping的封包要怎麼送回去呢?提示:要設好gateway
route
將routing table中destination 140.112.18.0 netmask 255.255.255.0 dev eth0那一行去掉
route add -net
140.112.18.0 netmask 255.255.255.0 dev eth0
在routing table中加入新的值
arp -s 140.112.1.1 000000000001
在arp裡加入140.112.1.1對應到hardware address
000000000001
routed
啟動rip的功能
ps aux | grep
routed
找到routed的process id,再kill。才能將routed的程序關掉
tcpdump -i eth0
可看到eth0經過的封包
cd /etc/rc.d/init.d
./network restart
在重新接線後,讓network的線路重新initialize,再下ifconfig等指令
reboot
讓Linux重新開機
lilo的登入:
可按tab看目前有什麼選項
Linux登入Linux,win2000登入win2000。預設是登入win2000