1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

wrong gateway with dhcp and different vlan

Discussion in 'Tomato Firmware' started by michse, Jan 24, 2009.

  1. michse

    michse Addicted to LI Member

    Hello,

    I put this lines in dns-costume-configuration:

    Code:
    #ALex 
    interface=vlan2
    # Start,Stop,Mask,Lease
    dhcp-range=192.168.11.200,192.168.11.250,255.255.255.0,1440m 
    # Gateway 
    dhcp-option=3,192.168.11.1 
    # DNS 
    dhcp-option=6,10.0.0.254 
    # Domain Name 
    dhcp-option=15,alexander.lan 
    # Host-Mac, Name, IP, Lease 
    dhcp-host=00:C0:9F:7b:5e:f0,Acer-Laptop-LAN,192.168.11.100,1440m 
    
    #Carsten 
    interface=vlan3 
    # Start,Stop,Mask,Lease
    dhcp-range=192.168.12.200,192.168.12.250,255.255.255.0,1440m 
    # Gateway 
    dhcp-option=3,192.168.12.1 
    # DNS 
    dhcp-option=6,10.0.0.254 
    # Domain Name 
    dhcp-option=15,carsten.lan 
    # Host-Mac, Name, IP, Lease 
    dhcp-host=00:1d:92:80:f1:0e,PC-LAN,192.168.12.100,1440m 
    
    #Tino 
    interface=vlan4 
    # Start,Stop,Mask,Lease
    dhcp-range=192.168.13.200,192.168.13.250,255.255.255.0,1440m 
    # Gateway 
    dhcp-option=3,192.168.13.1 
    # DNS 
    dhcp-option=6,10.0.0.254 
    # Domain Name 
    dhcp-option=15,tino.lan 
    # Host-Mac, Name, IP, Lease 
    dhcp-host=00:1B:FC:8E:8E:76,PC-LAN,192.168.13.100,1440m
    Now the PCs got the wrong gateway 192.168.13.1 - the last I told with dhcp-option=3,192.168.13.1.

    Windows takes no care and maybe the router takes pakets on vlan3 and vlan2 with 192.168.13.1 as destination. linux as client don't accept the wrong gateway (diff. subnet) and the client gets no ip at all.

    what is wrong? I toke care of direction (gateway behind dhcp-range) ?

    Tomato Firmware v1.19.8850
    Copyright (C) 2006-2008 Jonathan Zarate
    http://www.polarcloud.com/tomato/

    Addons by Victek@gmail.com
    - CPU Info | WAN Info | Extended Buttons/LED Script
    - P2P Obfuscation | Additional Skins
    - Bandwidth Limiter per IP/MAC

    Built on Tue, 10 Jun 2008 02:36:05 +0200

    WRT54GL.

    Thank you

    michse
     
  2. michse

    michse Addicted to LI Member

    Ok, I wonder a little bit, becaus no one gives a try!

    The solution is to tell dnsmasq, which net is ment.

    so dhcp-option=vlan2,3,... is the correct way and it works.

    I understud it like a menu like cisco ios, but its only a conf file...

    michse
     

Share This Page