Set Ethernet ports to 5 port hub at 192.168.0.2
(I want to add a webcam and a WiFi access point to the Sweex)
Versions
of the file structure on my USB memory stick before 13 July
used ethernet port 3 only.
I have now made all 5 ethernet ports work as a hub with a single IP address
of 192.168.0.2
First off - delete this file that forces the use of ethernet port 3 only
etc/init.d/S47ifconfig
----------------------
#!/bin/sh
for i in `ifconfig -a|grep 'eth[0-9] '|cut -c4`; do
ifconfig eth${i} down
done
ifconfig eth3 address 192.168.0.2
ifconfig
======================================================
Now we have classic
Midge - so -
In
this file make mods shown
etc/network/interfaces
-----------------------
# Configure Loopback
#
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 192.168.0.2 <---
this is my Sweex IP on the LAN
netmask 255.255.255.0
gateway 192.168.0.230 <--
this is my ADSL modem IP on the LAN
auto eth1 below here
seems to be ignored
iface eth1 inet static
address 192.168.1.1
netmask 255.255.255.0
auto eth2
iface eth2 inet static
address 192.168.2.1
netmask 255.255.255.0
auto eth3
iface eth3 inet static
address 192.168.3.1
netmask 255.255.255.0
auto eth4
iface eth4 inet static
address 192.168.4.1
netmask 255.255.255.0
======================================================
BUT ALSO change this
file as below
VLAN_MX="0x5F,0,0,0,0,0" # 1 ethernet iface (5LAN)
is the active line now
# the other VLAN_MX lines to make them inactive
etc/midge.config
----------------
#!/bin/sh
MIDGE_VERSION_MAJOR=
MIDGE_VERSION_MINOR=
MIDGE_TYPE=usb
MIDGE_BUILD_DATE="20000430"
MIDGE_BUILD_TIME="20:01:24"
# MTD Partitions
KERNEL_PARTITION=/dev/mtdblock/1
KERNEL_PARTITION_SIZE=655360
INITFS_PARTITION=/dev/mtdblock/2
INITFS_PARTITION_SIZE=1048576
DATAFS_PARTITION=/dev/mtdblock/3 # jffs2 or raw partition depending on MIDGE_TYPE
DATAFS_PARTITION_SIZE=262144
# VLAN_MX is interface to port definition (port bitmask)
# 0x41=1000001b; 0x42=1000010b; 0x44=1000100b; 0x48=1001000b; 0x50=1010000b;
0x60=1100000b;
#VLAN_MX="0x41,0x42,0x44,0x48,0x50,0x60" # 6 ethernet ifaces
#VLAN_MX="0x41,0x5E,0,0,0,0" # 2 ethernet ifaces (like edimax 1WAN,
4LAN)
VLAN_MX="0x5F,0,0,0,0,0" # 1 ethernet iface
(5LAN)
#USB_MOUNT=yes
USB_FSTYPE=ext2
USB_DIR=/mnt/usb
USB_DEV=/dev/scsi/host0/bus0/target0/lun0/part1
SAVE_LIST=/etc/midge.save
DATAFS_DECOMPRESSOR=zcat
DATAFS_COMMPRESSOR=gzip
MAC_ADDRESS_BASE='A0:43:62:24:12:0'
======================================================