|
我的OS是Redhat9.0,skyeye0.7.0,uClinux-dist-20030522,按照大侠指点顺利安装成功,并且加入了网络功能:
Command: hostname GDB-ARMulator
Command: /bin/expand /etc/ramfs.img /dev/ram0
Command: mount -t proc proc /proc
mount: /etc/mtab: Read-only file system
Command: mount -t ext2 /dev/ram0 /var
mount: /etc/mtab: Read-only file system
Command: mkdir /var/tmp
Command: mkdir /var/log
Command: mkdir /var/run
Command: mkdir /var/lock
Command: cat /etc/motd
Welcome to
____ _ _
/ __| ||_|
_ _| | | | _ ____ _ _ _ _
| | | | | | || | _ \| | | |\ \/ /
| |_| | |__| || | | | | |_| |/ \
| ___\____|_||_|_| |_|\____|\_/\_/
| |
|_|
GDB/ARMulator support by <[email protected]>
For further information check:
http://www.uclinux.org/
Command: /bin/ifconfig eth0 up 10.0.0.2
Execution Finished, Exiting
Sash command shell (version 1.1.1)
/>
主机网络设置如下:
[tristan@Tristan embedded]$ /sbin/ifconfig
eth0 Link encap:Ethernet HWaddr 00:40:63:C5:87:74
inet addr:192.168.5.10 Bcast:192.168.5.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:556271 errors:0 dropped:617 overruns:0 frame:0
TX packets:51959 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:111952591 (106.7 Mb) TX bytes:8335684 (7.9 Mb)
Interrupt:11 Base address:0xe800
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:5000 errors:0 dropped:0 overruns:0 frame:0
TX packets:5000 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:258642 (252.5 Kb) TX bytes:258642 (252.5 Kb)
tap0 Link encap:Ethernet HWaddr 00:FF:4B:4F:9D:B9
inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:792 (792.0 b) TX bytes:898 (898.0 b)
虚拟网络设置如下:
/> ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:03:02:01:0F
inet addr:10.0.0.2 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 iB) TX bytes:0 (0.0 iB)
Interrupt:16
/>
主机ping虚拟网络如下:
[tristan@Tristan tristan]$ ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.173 ms
64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=0.068 ms
64 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=0.061 ms
--- 10.0.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2075ms
rtt min/avg/max/mdev = 0.061/0.100/0.173/0.052 ms
[tristan@Tristan tristan]$ ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=398 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=4.81 ms
64 bytes from 10.0.0.2: icmp_seq=3 ttl=64 time=4.82 ms
64 bytes from 10.0.0.2: icmp_seq=4 ttl=64 time=4.76 ms
--- 10.0.0.2 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3035ms
rtt min/avg/max/mdev = 4.768/103.133/398.123/170.312 ms
我在仿真环境中ping,有如下显示:
/> ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
64 bytes from 10.0.0.1: icmp_seq=0 ttl=64 time=0.-7 ms
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.-7 ms
/> ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2): 56 data bytes
ping: sendto: Invalid argument
ping: wrote 10.0.0.2 64 chars, ret=-1
ping: sendto: Invalid argument
ping: wrote 10.0.0.2 64 chars, ret=-1
/> ping 192.168.5.10
PING 192.168.5.10 (192.168.5.10): 56 data bytes
ping: sendto: Network is unreachable
ping: wrote 192.168.5.10 64 chars, ret=-1
这是不是表明两端不能通信?小弟是新手,请大侠,兄弟们指点一二,
这里先谢过了!!! |
|