Andrei POPESCU <andreimpope...@gmail.com> writes: [...]
> Unless ifupdown is smart enough (don't know, you have to research this) > the "second" DHCP might override the default gateway of the "first"[1]. > Assuming you may want to connect other devices to the OpenWrt you > probably don't want to tinker with it's DHCP server and should handle > this on the client side. Useful reading: Andrei suggests: > man interfaces > man dhcpclient.conf Thanks. What you feared above, did seem to be happening. But aren't you supposed to be able to set gateway in /etc/network/interfaces? `man interfaces' seems to indicate that I could by adding a line like gateway xxx.xxx.xxx.xxx to an interface. But: Stealing an idea from Tom H and Bob P, I find even without setting a gateway, if I add `auto' to the stanzas it seems to come up like I want it to, and both interfaces can be start/stopped with /etc/init.d/networking start/stop /etc/network/interfaces now looks like this: # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 auto eth0 iface eth0 inet dhcp # a secondary network interface allow-hotplug eth1 auto eth1 iface eth1 inet dhcp And route -n shows what I wanted to see: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 And it all survives rebooting. Surprisingly, even when it was coming up with gateway in 192.168.2.0/24 network, it still seemed to work just fine. Probably due to having the pet router hooked up with its wan port facing the subnet 192.168.1.0 lan, and lan port facing subnet 192.168.2.0 [...] > BTW, in a similar situation as yours I decided to connect the OpenWrt > device (Asus WL 500gP v2) directly to the gateway via one of the > "lan"[2] ports and with a static IP in the same subnet. This way I can > use it as just another device on my lan and plan to use it as DNS and > web server. Interesting... I thought about trying that hookup at first, before going the lan wan route on the test router. I thought it would be more like a real setup if I had it as transfer point between 192.168.1.0 and 192.168.2.0. I expect to throw different stuff at it and watch reactions until I learn enough about openwrt and iptables to trust my self to run my own router at the main gateway with wan facing cable modem. > [2] most devices of this type actually implement the "wan" and "lan" via > vlans and it's very under OpenWrt to disable this functionality and use > the wan port as just another switch port. Thanks, and vlans is how this one defaults. Veering a little off topic here but: I'm curious when you say you are going to be using embedded openwrt on a router to run a dns server; Do you mean an honest to god real DNS server running bind/named (or similar). I did notice that bind software is available for recent builds of openwrt. I don't know about it to hazard a guess myself but I guess you don't think the small amount of available ram will be a factor in a dns server or web server of your lans' proportions eh? That would be a very nice kind of server to have... the size of a smallish book, quiet, no fans running, not much heat... nice. I wonder if you'd know if mine could do the same by these two ouputs: (TP-Link WR1043ND running very recent openwrt Using: openwrt-ar71xx-generic-tl-wr1043nd-v1-squashfs-factory.bin) ------- --------- ---=--- --------- -------- /proc/cpuinfo and `free' cpuinfo system type : Atheros AR9132 rev 2 machine : TP-LINK TL-WR1043ND processor : 0 cpu model : MIPS 24Kc V7.4 BogoMIPS : 265.42 wait instruction : yes microsecond timers : yes tlb_entries : 16 extra interrupt vector : yes hardware watchpoint : yes, count: 4, address/irw mask: [0x0000, 0x0e50, 0x0088, 0x0360] ASEs implemented : mips16 shadow register sets : 1 kscratch registers : 0 core : 0 VCED exceptions : not available VCEI exceptions : not available ------- --------- ---=--- --------- -------- free total used free shared buffers Mem: 29416 18872 10544 0 1440 -/+ buffers: 17432 11984 Swap: 0 0 0 -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/871upujyv3....@newsguy.com