What's new

Add Additional LAN IPs to Router?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

HarryMuscle

Senior Member
Is it possible via a script to add additional IPs to the router on the LAN side? In other words, I'd like to have the router respond to the the following IP addresses in addition to its main IP of 192.168.1.1:

192.168.1.2
192.168.1.3
192.168.1.4

This is related to running ctrld (https://github.com/Control-D-Inc/ctrld) on the router to get around the limitation of DNSFilter/Director not supporting encrypted DNS.

Thanks,
Harry
 
Is it possible via a script to add additional IPs to the router on the LAN side? In other words, I'd like to have the router respond to the the following IP addresses in addition to its main IP of 192.168.1.1:

192.168.1.2
192.168.1.3
192.168.1.4

This is related to running ctrld (https://github.com/Control-D-Inc/ctrld) on the router to get around the limitation of DNSFilter/Director not supporting encrypted DNS.

Thanks,
Harry

Haven't tried it but you can look at ifconfig br0 (or whatever interface your LAN IP is on, varies by router) and the ADD command to see if it lets you add more IPs.
 
Is it possible via a script to add additional IPs to the router on the LAN side? In other words, I'd like to have the router respond to the the following IP addresses in addition to its main IP of 192.168.1.1:

192.168.1.2
192.168.1.3
192.168.1.4

This is related to running ctrld (https://github.com/Control-D-Inc/ctrld) on the router to get around the limitation of DNSFilter/Director not supporting encrypted DNS.

Thanks,
Harry
Absolutely. I define multiple subnets/vlans on mine for various purposes. You should be able to use ifconfig or ip commands to add separate IPs to separate physical interfaces. If that doesn't work you can use brctl to add additional interface bridges, add the IPs to each bridge and then add a physical port or wireless SSID to that bridge to make the IP accessible. You'll be limited by the number of physical interfaces including ports, wireless SSIDs, USBs slots etc but 3 addl IPs should leave you with at least one or two extra eth ports assuming you have 4 or 5. Not sure how many SSIDs can be defined per router, but you can use these for addl IPs after you run out of physical ports.

ie, the following defines defines a new bridge, adds an IP to it and adds physical port 3 and the first wireless 5ghz band as interfaces that listen on that IP subnet on one of my AP machines to keep it synced with my gateway box:

Bash:
/bin/brctl delif br0 eth3
/bin/brctl addbr br2
/sbin/ifconfig br2 192.168.102.2 netmask 255.255.255.0 broadcast 192.169.102.255 allmulti
/usr/sbin/ip link set br2 state up
/bin/brctl addif br2 eth3
/bin/brctl delif br0 wl1.1
/bin/brctl addif br2 wl1.1

In the above, the main router IP defined on br0 is on a different /24 net, but after running this code in /jffs/scripts/services-start I can connect to port 3 or my first wireless 5ghz SSID and get a 102.xxx address instead of one from the default subnet.
 
Absolutely. I define multiple subnets/vlans on mine for various purposes. You should be able to use ifconfig or ip commands to add separate IPs to separate physical interfaces. If that doesn't work you can use brctl to add additional interface bridges, add the IPs to each bridge and then add a physical port or wireless SSID to that bridge to make the IP accessible. You'll be limited by the number of physical interfaces including ports, wireless SSIDs, USBs slots etc but 3 addl IPs should leave you with at least one or two extra eth ports assuming you have 4 or 5. Not sure how many SSIDs can be defined per router, but you can use these for addl IPs after you run out of physical ports.

ie, the following defines defines a new bridge, adds an IP to it and adds physical port 3 and the first wireless 5ghz band as interfaces that listen on that IP subnet on one of my AP machines to keep it synced with my gateway box:

Bash:
/bin/brctl delif br0 eth3
/bin/brctl addbr br2
/sbin/ifconfig br2 192.168.102.2 netmask 255.255.255.0 broadcast 192.169.102.255 allmulti
/usr/sbin/ip link set br2 state up
/bin/brctl addif br2 eth3
/bin/brctl delif br0 wl1.1
/bin/brctl addif br2 wl1.1

In the above, the main router IP defined on br0 is on a different /24 net, but after running this code in /jffs/scripts/services-start I can connect to port 3 or my first wireless 5ghz SSID and get a 102.xxx address instead of one from the default subnet.
Is the broadcast address in the scripts ifconfig really 192.169.102.255?
 
Is the broadcast address in the scripts ifconfig really 192.169.102.255?
No its a typo I found a while ago as well that broke stuff. I must have copied this from an old backup. Please use 168 or bad things may happen ;)
 
Absolutely. I define multiple subnets/vlans on mine for various purposes. You should be able to use ifconfig or ip commands to add separate IPs to separate physical interfaces. If that doesn't work you can use brctl to add additional interface bridges, add the IPs to each bridge and then add a physical port or wireless SSID to that bridge to make the IP accessible. You'll be limited by the number of physical interfaces including ports, wireless SSIDs, USBs slots etc but 3 addl IPs should leave you with at least one or two extra eth ports assuming you have 4 or 5. Not sure how many SSIDs can be defined per router, but you can use these for addl IPs after you run out of physical ports.

ie, the following defines defines a new bridge, adds an IP to it and adds physical port 3 and the first wireless 5ghz band as interfaces that listen on that IP subnet on one of my AP machines to keep it synced with my gateway box:

Bash:
/bin/brctl delif br0 eth3
/bin/brctl addbr br2
/sbin/ifconfig br2 192.168.102.2 netmask 255.255.255.0 broadcast 192.169.102.255 allmulti
/usr/sbin/ip link set br2 state up
/bin/brctl addif br2 eth3
/bin/brctl delif br0 wl1.1
/bin/brctl addif br2 wl1.1

In the above, the main router IP defined on br0 is on a different /24 net, but after running this code in /jffs/scripts/services-start I can connect to port 3 or my first wireless 5ghz SSID and get a 102.xxx address instead of one from the default subnet.
That would limit the additional IPs to only those physical interfaces, correct? What if I want the extra IPs to respond to all interfaces just like the router's main IP?
 
That would limit the additional IPs to only those physical interfaces, correct? What if I want the extra IPs to respond to all interfaces just like the router's main IP?

Did you try the ifconfig add ? That should theoretically be able to add secondary subnets to the interface where your main LAN is (usually BR0 but depends on the router).
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top