1
1
I'm configuring own server to act as router. It has three interfaces, two cable and wifi.
Following this article to configure access point. After setting bridge i have problem with default gateway. System always chooses bridge as gateway what is wrong.
Interfaces are: eth0 -> link do my ISP (DHCP - dynamic address), eth1 -> internal network, wlan0 -> wifi.
eth1 and wlan0 are bridged.
Some data:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.22.11 0.0.0.0 UG 0 0 0 zbr0
192.168.11.64 0.0.0.0 255.255.255.192 U 0 0 0 eth0
192.168.22.0 0.0.0.0 255.255.255.128 U 0 0 0 zbr0
eth0 Link encap:Ethernet HWaddr 54:be:f7:09:67:7a
inet addr:192.168.11.77 Bcast:192.168.11.127 Mask:255.255.255.192
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:245 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18860 (18.4 KiB) TX bytes:1559 (1.5 KiB)
Interrupt:20 Memory:f7e00000-f7e20000
eth1 Link encap:Ethernet HWaddr 54:be:f7:09:67:7b
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:367 errors:0 dropped:0 overruns:0 frame:0
TX packets:254 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:62760 (61.2 KiB) TX bytes:37744 (36.8 KiB)
Interrupt:18 Memory:f7c00000-f7c20000
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:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:190 (190.0 B) TX bytes:190 (190.0 B)
zbr0 Link encap:Ethernet HWaddr 54:be:f7:09:67:7b
inet addr:192.168.22.11 Bcast:192.168.22.127 Mask:255.255.255.128
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:285 errors:0 dropped:0 overruns:0 frame:0
TX packets:245 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:32960 (32.1 KiB) TX bytes:35426 (34.5 KiB)
How to set gateway via interface not an IP address?
Interfaces configuration:
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet dhcp
allow-hotplug eth1
iface eth1 inet manual
allow-hotplug wlan0
iface wlan0 inet manual
auto zbr0
iface zbr0 inet static
bridge_ports eth1
address 192.168.22.11
netmask 255.255.255.128
network 192.168.22.0
broadcast 192.168.22.127
gateway 192.168.22.11
Can you show us your
/etc/network/interfaces
configuration? – Marcus Rickert – 2013-12-01T14:50:26.130added to question. – WombaT – 2013-12-01T15:00:38.367
I think it should suffice to delete the
gateway
entry in yourinterfaces
file. Since you retrieve the IP address foreth0
over DHCP it should establish the default route througheth0
appropriately. – Marcus Rickert – 2013-12-01T15:24:15.543