| | 1 | = Bridge WAN LAN = |
| | 2 | |
| | 3 | On GLiNet X300B has 2 RJ-45 port one for LAN the other for WAN. We want to use both RJ-45 as LAN port. We edit '''/etc/config/network'''. |
| | 4 | {{{ |
| | 5 | root@OpenWrt:~# cat /etc/config/network |
| | 6 | |
| | 7 | config interface 'loopback' |
| | 8 | option device 'lo' |
| | 9 | option proto 'static' |
| | 10 | option ipaddr '127.0.0.1' |
| | 11 | option netmask '255.0.0.0' |
| | 12 | |
| | 13 | config globals 'globals' |
| | 14 | option ula_prefix 'fd5f:8996:7c19::/48' |
| | 15 | |
| | 16 | config interface 'wan' |
| | 17 | option device 'eth1' |
| | 18 | option proto 'dhcp' |
| | 19 | |
| | 20 | config interface 'wan6' |
| | 21 | option device 'eth1' |
| | 22 | option proto 'dhcpv6' |
| | 23 | |
| | 24 | config device |
| | 25 | option name 'br-lan' |
| | 26 | option type 'bridge' |
| | 27 | list ports 'eth0.1' |
| | 28 | list ports 'eth1' |
| | 29 | |
| | 30 | config interface 'lan' |
| | 31 | option device 'br-lan' |
| | 32 | option proto 'static' |
| | 33 | option ipaddr '192.168.1.1' |
| | 34 | option netmask '255.255.255.0' |
| | 35 | option ip6assign '60' |
| | 36 | option gateway '192.168.1.2' |
| | 37 | list dns '8.8.8.8' |
| | 38 | |
| | 39 | config switch |
| | 40 | option name 'switch0' |
| | 41 | option reset '1' |
| | 42 | option enable_vlan '1' |
| | 43 | |
| | 44 | config switch_vlan |
| | 45 | option device 'switch0' |
| | 46 | option vlan '1' |
| | 47 | option ports '4 0t' |
| | 48 | |
| | 49 | config interface 'LTE4G' |
| | 50 | option proto 'qmi' |
| | 51 | option device '/dev/cdc-wdm0' |
| | 52 | option auth 'none' |
| | 53 | option apn 'internet' |
| | 54 | option pdptype 'ipv4' |
| | 55 | |
| | 56 | }}} |