Code: Select all
ifconfig -aCode: Select all
ipconfig Well, does your laptop act as a DHCP-server? Even if your router acts as a DHCP-server the rpi isn't connected to it and wont be able to ask it for a lease.lipka wrote:I have tried to connect RPi to my virgin media router but it is 2floors down, it's why I want to connect RPi directly to PC or laptop, my tv is 2 floors down too . I thought RPi have dhcp on at boot, so it should be easy to find it on my arch pc, but nmap doesn't find it :-\
No, the ethernet port on the Raspberry Pi is auto-sensing.DarkSotM wrote:Sounds like like you need a "cross over" cable instead of a standard cat5 cable.
Code: Select all
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::219:dbff:fee0:6a64 prefixlen 64 scopeid 0x20<link>
ether 00:19:db:e0:6a:64 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4 bytes 600 (600.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 16436
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 0 (Local Loopback)
RX packets 4 bytes 240 (240.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4 bytes 240 (240.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.5 netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::ca3a:35ff:fec6:47a0 prefixlen 64 scopeid 0x20<link>
ether c8:3a:35:c6:47:a0 txqueuelen 1000 (Ethernet)
RX packets 8746 bytes 6231853 (5.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6563 bytes 922025 (900.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
richard@jupiter ~ $ ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:1f:d0:dd:c9:a8
inet addr:192.168.0.5 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::21f:d0ff:fedd:c9a8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2531803 errors:0 dropped:0 overruns:0 frame:0
TX packets:2059803 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2044586753 (2.0 GB) TX bytes:398352343 (398.3 MB)
Interrupt:42 Base address:0x8000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:83313 errors:0 dropped:0 overruns:0 frame:0
TX packets:83313 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7778819 (7.7 MB) TX bytes:7778819 (7.7 MB)
Code: Select all
ifconfig eth0 192.168.1.1 netmask 255.255.255.0 up
Code: Select all
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::219:dbff:fee0:6a64 prefixlen 64 scopeid 0x20<link>
ether 00:19:db:e0:6a:64 txqueuelen 1000 (Ethernet)
RX packets 5 bytes 1832 (1.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 133 bytes 44718 (43.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Code: Select all
route add default gw 192.168.1.2 eth0
route add -host 192.168.1.2 eth0
Code: Select all
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.2 0.0.0.0 UG 0 0 0 eth0
default 192.168.0.1 0.0.0.0 UG 0 0 0 wlan0
192.168.0.0 * 255.255.255.0 U 0 0 0 wlan0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.1.2 * 255.255.255.255 UH 0 0 0 eth0
Code: Select all
sudo ifconfig eth0 192.168.1.9 netmask 255.255.255.0 up Code: Select all
eth0 Link encap:Ethernet HWaddr 00:14:22:a6:ee:13
inet addr:192.168.1.5 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST 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
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:17 Code: Select all
route add default gw 192.168.1.9 eth0
route add -host 192.168.1.9 eth0
Code: Select all
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.9 0.0.0.0 UG 0 0 0 eth0
default 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
link-local * 255.255.0.0 U 1000 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 2 0 0 wlan0
192.168.1.9 * 255.255.255.255 UH 0 0 0 eth0
Code: Select all
ip=192.168.1.9:192.168.1.5:127.0.0.1:255.255.255.0:rpi:eth0:off