Jump to content

Recommended Posts

Posted

I would like to add 2 IP addresses on 2 different subnets to the pineapple's single ethernet. I assumed I simply needed to add a virtual interface such as eth0.1 in /etc/config/network. However, I cannot seem to get it to work. Here is my /etc/config/ network...

root@OpenWrt:~# cat /etc/config/network

config 'interface' 'loopback'

option 'ifname' 'lo'

option 'proto' 'static'

option 'ipaddr' '127.0.0.1'

option 'netmask' '255.0.0.0'

config 'interface' 'lan'

option 'ifname' 'eth0'

option 'type' 'bridge'

option 'proto' 'static'

option 'ipaddr' '192.168.1.1'

option 'netmask' '255.255.255.0'

option 'macaddr' ''

option 'ip6addr' ''

option 'gateway' ''

option 'ip6gw' ''

option 'dns' ''

config 'interface' 'wan'

option 'ifname' 'eth0.1'

option 'proto' 'static'

option 'ipaddr' '10.1.1.201'

option 'netmask' '255.255.0.0'

option 'macaddr' ''

option 'ip6addr' ''

option 'gateway' ''

option 'ip6gw' ''

option 'dns' ''

An ifconfig shows...

ath0 Link encap:Ethernet HWaddr 00:12:CF:A4:A1:9D

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:6524 errors:0 dropped:1266 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 B) TX bytes:607729 (593.4 KiB)

br-lan Link encap:Ethernet HWaddr 00:12:CF:A4:A1:9C

inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:6647 errors:0 dropped:0 overruns:0 frame:0

TX packets:98 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:526114 (513.7 KiB) TX bytes:11023 (10.7 KiB)

eth0 Link encap:Ethernet HWaddr 00:12:CF:A4:A1:9C

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:33036 errors:0 dropped:0 overruns:0 frame:0

TX packets:99 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:5985673 (5.7 MiB) TX bytes:12066 (11.7 KiB)

Interrupt:4 Base address:0x1000

eth0.1 Link encap:Ethernet HWaddr 00:12:CF:A4:A1:9C

inet addr:10.1.1.201 Bcast:10.1.255.255 Mask:255.255.0.0

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

wifi0 Link encap:UNSPEC HWaddr 00-12-CF-A4-A1-9D-00-00-00-00-00-00-00-00-00-00

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:10959 errors:0 dropped:0 overruns:0 frame:558

TX packets:8244 errors:972 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:195

RX bytes:1075984 (1.0 MiB) TX bytes:930693 (908.8 KiB)

Interrupt:3 Memory:b0000000-b00ffff

However I cannot ping 10.1.1.201 which is assigned to eth0.1 from a PC with 10.1.1.203 as its IP. What am I missing here?

Posted

You probably want to assign the addresses to br-lan rather than eth0 as it is br-lan that is talking to the world

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...