NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Running dhcpd on bridge0



Robert Elz <kre%munnari.OZ.AU@localhost> writes:

  But aside from this, for your config, do you really need the tap interface at 
  all?
  
  Why not just put the address on bnx0 instead?
  
A very good question, whose equally good answer unfortunately I cannot
word.  :-)

  You know you heed a hardware specific config file, you need to name it
  in the bridge config file, so there's really no harm just putting the
  address config in it too, is there?    (Just only config an address on
  one interface connected to the bridge.)
  
My goal is having a public IP address (in my case on bnx0) and then
private network addresses (192.168/16) on a bunch of emulated systems.
(The emulated systems use dhcp to the host, for convenience.)

I do not wish to present any private network address on the bnx0
interface.  I suppose suppressing arp somehow there would be sufficient
for that end.  Still, it is somewhat inelegant to have a private address
there.

Now, I don't understand if my design prevents the system from replying
to arp questions about 192.168.0.1 (which is the address I set for
tap0).

datan# ifconfig -a
bnx0: flags=8b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST> mtu 
1500
      
capabilities=3f00<IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx>
      enabled=0
      address: bc:30:5b:e8:d5:dd
      media: Ethernet autoselect (1000baseT full-duplex)
      status: active
      inet 130.237.222.129 netmask 0xffffff00 broadcast 130.237.222.255
      inet6 fe80::be30:5bff:fee8:d5dd%bnx0 prefixlen 64 scopeid 0x1
bnx1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
      
capabilities=3f00<IP4CSUM_Rx,IP4CSUM_Tx,TCP4CSUM_Rx,TCP4CSUM_Tx,UDP4CSUM_Rx,UDP4CSUM_Tx>
      enabled=0
      address: bc:30:5b:e8:d5:de
      media: Ethernet autoselect (none)
      status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 33648
     inet 127.0.0.1 netmask 0xff000000
     inet6 ::1 prefixlen 128
     inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
tap0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
      address: f2:0b:a4:e4:d4:07
      media: Ethernet autoselect
      inet 192.168.0.1 netmask 0xffff0000 broadcast 192.168.255.255
      inet6 fe80::f00b:a4ff:fee4:d407%tap0 prefixlen 64 scopeid 0x4
bridge0: flags=41<UP,RUNNING> mtu 1500
pflog0: flags=141<UP,RUNNING,PROMISC> mtu 33648

datan# brconfig bridge0 | head
bridge0: flags=41<UP,RUNNING>
         Configuration:
                priority 32768 hellotime 2 fwddelay 15 maxage 20
                ipfilter disabled flags 0x0
         Interfaces:
                tap0 flags=3<LEARNING,DISCOVER>
                        port 4 priority 128
                bnx0 flags=3<LEARNING,DISCOVER>
                        port 1 priority 128
         Address cache (max cache: 100, timeout: 1200):


Er, removing bnx0 frm the bridge, keeping tap0 fpr dhcpd's pleasure, and
do good-old IP routing between bridge0 and bnx0 might be the clean way
of doing this.


Torbjörn
Please encrypt, key id 0xC8601622


Home | Main Index | Thread Index | Old Index