Version 2 (modified by stappers, 10 years ago) (diff)

There is allready a netconsole page

Networking is about understanding both ends of the line.

Most likely you came here from SmallSteps. So you have debwrt started with

qemu-system-mipsel -M malta -nographic \
  -kernel /usr/src/debwrt/build/openwrt-malta-le_Default-trunk-default/build_dir/linux-malta_le/vmlinux.elf \
  -hda /usr/src/debwrt/tile -parallel none -m 256 \
  -net user -net nic,model=pcnet \
  -append "root=/dev/sda1 probe_mask=0x3f init=/sbin/init root_delay=10"

That implies this network configuration (qemu defaults):

  • Address: 10.0.2.15
  • Netmask: 255.0.0.0
  • Router: 10.0.2.2
  • Name server: 10.0.2.3

Transforming that to your debwrt system is manual done with these commands

ifconfig eth0 10.0.2.15 netmask 255.0.0.0
route add default gw 10.0.2.2
echo nameserver 10.0.2.3 > /etc/resolv.conf

Making that configuration visible is done with

ifconfig eth0
netstat -r
cat /etc/resolv.conf

which looks like

root@debwrt:~# ifconfig eth0 10.0.2.15 netmask 255.0.0.0
root@debwrt:~# route add default gw 10.0.2.2
root@debwrt:~# echo nameserver 10.0.2.3 > /etc/resolv.conf
root@debwrt:~# 
root@debwrt:~# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 52:54:00:12:34:56  
          inet addr:10.0.2.15  Bcast:10.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:30 errors:0 dropped:0 overruns:0 frame:0
          TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4212 (4.1 KiB)  TX bytes:2568 (2.5 KiB)
          Interrupt:10 Base address:0x1020 

root@debwrt:~# netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.0.0.0        *               255.0.0.0       U         0 0          0 eth0
default         10.0.2.2        0.0.0.0         UG        0 0          0 eth0
root@debwrt:~# cat /etc/resolv.conf
nameserver 10.0.2.3
root@debwrt:~# 

Actual network traffic

wget -O NetworkingSteps.txt http://www.debwrt.net/trac/wiki/NetworkingSteps?format=txt

Will show

Resolving www.debwrt.net... 81.171.37.245
Connecting to www.debwrt.net|81.171.37.245|:80... connected.
HTTP request sent, awaiting response... 200 Ok
Length: 1965 [text/plain]
Saving to: `NetworkingSteps.txt'

Now you known that eth0 works.

host network reconfigure

Work in progress

See Also

NetConsole