เราสามารถกำหนด Network Configuration ได้อย่างไร
ให้ติดต่อกับ SNAP ผ่านทาง Console หรือ Network จากนั้น ล็อกอินเข้าสู่ root mode ให้ใช้คำสั่ง ipconfig สำหรับเปลี่ยน IP Address ตามที่ต้องการ โดยมีขั้นตอนการทำงาน ดังต่อไปนี้
| /root> ipconfig -a 192.168.100.105 /root> ipconfig -c |
จากรูปด้านบนเป็นการเปลี่ยน IP Address ด้วย Parameter -a ในบรรทัดแรก และ Save IP Address ที่เราต้องการด้วย Parameter -c ในบรรทัดที่สอง เพื่อให้เมื่อเราปิด SNAP หรือ Reset SNAP IP address ที่เรากำหนดเอาไว้จะได้ไม่หายไป
เราสามารถแสดงค่า Configuration ของ Network บน SNAP board ได้ ด้วยคำสั่ง?ipconfig
| /root> ipconfig Interface "enet0": Ip address 192.168.100.105 Netmask 255.255.255.0 Gateway 192.168.100.30 MAC: 00:0b:b9:8c:86:ed Primary DNS N/A |
เรายังสามารถแสดง Parameter ต่างของคำสั่ง ipconfig โดยใช้ Parameter /? ซึ่งจะมีหน้าจอปรากฏดังนี้
/root> ipconfig /? Show/alter network information. Syntax: ipconfig [OPTIONS] Without arguments the current network settings are shown. The following arguments will alter the configuration: -a aaa.bbb.ccc.ddd Set ipaddress (for enet0). -g aaa.bbb.ccc.ddd Set gateway (for enet0). -h aaa.bbb.ccc.ddd Set mailhost. -m aaa.bbb.ccc.ddd Set subnetmask (for enet0). -p aaa.bbb.ccc.ddd Set primary DNS address. -q aaa.bbb.ccc.ddd Set secondary DNS address. -t timeout Set DNS timeout. -d Use DHCP (for enet0). -c Commit changes to flash. -r Release DHCP address (for enet0). If the execution of this command is slow, the reason might be that there is no DNS server available. Set the DNS server to 0.0.0.0, which will disable DNS lookups. Several options can be given at the same time, but the order of the arguments is important. The order should be address, netmask, gateway (and the the rest) |
