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

create second ip on router 192.168.1.2

Discussion in 'Tomato Firmware' started by waeking, Aug 15, 2012.

  1. waeking

    waeking Networkin' Nut Member

    I would like the router to have a second ip that it will listen to ie: 192.168.1.2. I just don't understand why 192.168.1.1 is attached to the br0 instead of to eth0 or eth1.... So the standard ifconfig eth0:0 192.168.1.2 will not work afaik. and I cannot add br0.0. What can I do?
     
  2. koitsu

    koitsu Network Guru Member

    The problem seems to be your syntax

    Code:
    root@gw:/tmp/home/root# ifconfig br0:1 192.168.1.22
    root@gw:/tmp/home/root# ifconfig -a
    br0        Link encap:Ethernet  HWaddr E0:CB:4E:C0:00:C4
              inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: 2601:9:4600:4f:e2cb:4eff:fec0:c4/64 Scope:Global
              inet6 addr: fe80::e2cb:4eff:fec0:c4/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:24161375 errors:0 dropped:0 overruns:0 frame:0
              TX packets:33092883 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:2075040545 (1.9 GiB)  TX bytes:635071232 (605.6 MiB)
     
    br0:1      Link encap:Ethernet  HWaddr E0:CB:4E:C0:00:C4
              inet addr:192.168.1.22  Bcast:192.168.1.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
    ...
    
    Code:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
     
    C:\Documents and Settings\jdc>ping 192.168.1.22
     
    Pinging 192.168.1.22 with 32 bytes of data:
     
    Reply from 192.168.1.22: bytes=32 time<1ms TTL=64
    Reply from 192.168.1.22: bytes=32 time<1ms TTL=64
    Reply from 192.168.1.22: bytes=32 time<1ms TTL=64
     
    Ping statistics for 192.168.1.22:
        Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 0ms, Maximum = 0ms, Average = 0ms
    
    Works fine for me.

    As for the interface/device names, you need to familiarise yourself with how these consumer routers work, and why the interface is called br0 (hint: it's a bridge of multiple physical interfaces). Scroll down to "Device List" here:

    http://en.wikibooks.org/wiki/Tomato_Firmware/Menu_Reference#Status

    You simply need to get familiar with the device naming scheme; complaining about it will be ignored. If it bothers you that much (to the point of you being unable to adapt + learn why it is the way it is), you can run OpenWRT where things are done differently.
     

Share This Page