home | list info | list archive | date index | thread index

[OCLUG-Tech] %route 666?

I should hold off this help request until June 6th, in keeping with the 
subject line, but here goes; I think this is a one-liner for all the 
networking gurus out there:

I'm trying to use my laptop as a dhcp server, but I don't think I have the 
routing table sorted out.

I can connect to the net (wireless router, address 192.168.0.1) with my 
laptop's wireless:
	root@kappa:~# dhclient eth1
	"bound to 192.168.0.101"

and I can use my laptop as a dhcp host:
	root@kappa:~# ifconfig eth0 192.168.1.1
	root@kappa:~# dhcpd3 -cf my_dhcpd.conf eth0
where
	root@kappa:~# cat my_dhcpd.conf
	option domain-name-servers 192.168.0.1;
	option routers 192.168.0.1;
	# This is a very basic subnet declaration.

	subnet 192.168.1.0 netmask 255.255.255.0 {
	    range 192.168.1.150  192.168.1.151;
	}

I then connect my desktop's ethernet port to my laptop's ethernet port (eth0) 
with a crossover cable,and run dhcp on the desktop, getting 192.168.1.151
That works; I can ssh from my desktop into my laptop.

But now my routing table is
	root@kappa:~# route
	Kernel IP routing table
	Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
	192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
	192.168.0.0     *               255.255.255.0   U     0      0        0 eth1
	default         192.168.0.1     0.0.0.0         UG    0      0        0 eth1

when it used to be
	root@kappa:~# route
	Kernel IP routing table
	Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
	192.168.0.0     *               255.255.255.0   U     0      0        0 eth1
	default         192.168.0.1     0.0.0.0         UG    0      0        0 eth1

which means I can't surf the web on my desktop or ping 192.168.0.1, which 
means I'm doing something wrong.  

What should I do to fix this?  I think I need to fix the routing table, but 
I'm not sure what to do.  Also, what will my desktop use as a dns server?

I'd greatly appreciate any help.  (Or even a recommendation for a decent 
802.11g pci card for the desktop. Is the madwifi-ng stuff any good?)
-Sebastien Bailard
pinkmeatprime [ at ] supermeta [ dot ] com

replies

message navigation