Altera_Forum
Honored Contributor
14 years agouclinux network configuration
Hi all,
I use the cyclone 3 starter bord + NIOS II when i start nios2-terminal... it detects the ethernet interface --- Quote Start --- eth0: atse.c: v1.1, June 3, 2008 by Joseph (Camel) Chen <joe4camel@gmail.com> eth0: atse.c: modified version by Eintisy Chuang <eintisy.chuang@gfec.com.tw> eth0: Altera Tripple Speed, ether hw addr 00:07:ed:0d:09:19, National DP83848C PHY Sash command shell (version 1.1.1) --- Quote End --- after i configure eth0 : --- Quote Start --- /> ifconfig eth0 up ATSE: Waiting on PHY link ...... eth0 up, link speed 100, full duplex, eth hw addr 00:07:ed:0d:09:19 /> ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:07:ED:0D:09:19 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:1000 /> ifconfig eth0 192.168.0.1 netmask 255.255.255.0 /> ifconfig eth0 Link encap:Ethernet HWaddr 00:07:ED:0D:09:19 inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.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:1000 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:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 --- Quote End --- now to check the network : --- Quote Start --- starter board : 192.168.0.1 PC address IP : 192.168.0.4 PC netmask : 255.255.255.0 PC gateway : 192.168.0.254 --- Quote End --- ping fails ( from starter board to PC) --- Quote Start --- /> ping -c 6 192.168.0.4 PING 192.168.0.4 (192.168.0.4): 56 data bytes --- 192.168.0.4 ping statistics --- 6 packets transmitted, 0 packets received, 100% packet loss --- Quote End --- local ping successful !! --- Quote Start --- /> ping -c 2 192.168.0.1 PING 192.168.0.1 (192.168.0.1): 56 data bytes 64 bytes from 192.168.0.1: seq=0 ttl=64 time=2.104 ms 64 bytes from 192.168.0.1: seq=1 ttl=64 time=1.324 ms --- 192.168.0.1 ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max = 1.324/1.714/2.104 ms --- Quote End --- So i suspected route configuration --- Quote Start --- /> route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo --- Quote End --- I add gateway --- Quote Start --- /> route add default gw 192.168.0.254 /> route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 192.168.0.254 0.0.0.0 UG 0 0 0 eth0 --- Quote End --- but even with that it does not work --- Quote Start --- > ping -c 6 192.168.0.4 PING 192.168.0.4 (192.168.0.4): 56 data bytes --- 192.168.0.4 ping statistics --- 6 packets transmitted, 0 packets received, 100% packet loss --- Quote End --- someone has an idea please thanks