How do you bridge the eth0 (ethernet) and eth1 (WiFi_Ap)?
Hello.
I am in the WiFi test embedded board.
The ethernet port eth0 is connected to the Internet.
The interface eth1 is caused due to the WiFi chip.
The Access Point can be used as a WiFi eth1 is.
We use the following instructions to Acess Point with WiFi on eth1 is.
# ifconfig eth1 192.168.10.1 up
# dnsmasq
# iwpriv eth1 AP_SET_CFG ASCII_CMD=AP_CFG,SSID="WiFi_Test",SEC="wpa2-psk",KEY=ac10b3e2e8b13e67841b01e2eb07bd95da516fdac049d486112997bf16afb24b,CHANNEL=11,PREAMBLE=0,MAX_ SCB=8,END
# iwpriv eth1 AP_BSS_START
also has access to a WiFi Access Point in Mobile when used with the eth1.
But this was a closed network eth1 and Mobile Bay.
What I want eth0 and eth1 are connected to each other must also be connected to the Acess Point Mobile is another place to use ping.
I can use the Ping to 192.168.1.1 eth0.
But I can not use Ping to 192.168.1.1 Mobile In.
I can not use the brctl command.
I must be the only bridge to eth0 and eth1 using only iptables command.
1. If I bridge the eth1 eth0 and the dnsmasq command should I run?
( I think you are thinking of eth0 dhcp also not necessary because the bridge.)
2.How should I use to bridge the eth0 and eth1 (WiFi Access Point) the iptables command?
(I did not work looked like using the command below.)
# echo 1 > /proc/sys/net/ipv4/ip_forward
# iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
# iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
# iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
3. If that bridge is normally eth0 and eth1 eth1 geotingayo also be automatically assigned an IP doeneunge fit?
Below is my ifconfig results.
root@test:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:192.168.0.88 Bcast:192.168.255.255 Mask:255.255.0.0
UP BROADCAST 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:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:170
eth1 Link encap:Ethernet HWaddr C4:23:7A:00:6E:93
UP BROADCAST 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:1000
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:65536 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)
root@test:~#
|