Hi,
if I execute:
Code:
[root@chips /root]# netstat -rn Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 40 0 0 eth0
80.195.244.0 0.0.0.0 255.255.255.0 U 40 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo
0.0.0.0 80.195.244.1 0.0.0.0 UG 40 0 0 eth1
0.0.0.0 192.168.0.1 0.0.0.0 UG 40 0 0 eth0
That's all correct, my cable internet is on eth1, and linux routes all internet traffic to it fine.
Than, I execute a command that should find my internet IP, which changes dynamicly and is assingned via DHCP. The correct IP is however shown in ifconfig eth1...
Code:
[root@chips /root]# netstat -rn | egrep ^0.0.0.0 | sed -e "s,.* ,,g" | xargs /sbin/ifconfig | grep "inet.addr" | sed -e "s,.*addr:,," -e "s, .*,,"
It returns nothing, and strangely, my internet stops working, so I check out the routing tables again...
Code:
[root@chips /root]# netstat -rn Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 40 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 lo
62.0.0.0 0.0.0.0 255.0.0.0 U 40 0 0 eth1
0.0.0.0 192.168.0.1 0.0.0.0 UG 40 0 0 eth0
Huh? what happned there? The IP finding code I used used to work, however, my eth1 recently changed IRQs and I had to set it up again, is there something I've forgotten to do when setting it up again, oris there an error in the IP finding code?
Thanks for your help,
- Nick