雙網卡(wlan0 ,eth0)同時sock收資料 - Linux

By Ophelia
at 2015-09-26T00:57
at 2015-09-26T00:57
Table of Contents
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
10.101.131.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
140.117.89.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
140.117.89.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
我現在將IP routing改成這樣以後,
wlan0可以接收到140.117.89.50 的封包,
但是eth1接收不到相同140.117.89.50的封包
是因為不能設定兩次嗎?
如果不行這樣設定,
要如何設定才可以讓wlan0 , eth1 都接收140.117.89.50的封包呢?
謝謝大家的回覆!
※ 引述《hardware (硬體)》之銘言:
: 我在A電腦送兩份資料到B電腦
: A 一份資料送給 B的eth0網卡那個IP
: A 另外一份資料送給 B的wlan0無線網卡的那個IP
: 但是B 的linux只會接收default gateway那一張網卡資料,不曉得為什麼
: Ubuntu 12.04
: Kernel IP routing table
: Destination Gateway Genmask Flags Metric Ref Use Iface
: 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
: 192.168.1.0 0.0.0.0 255.255.255.0 U 1 0 0 wlan0
: 140.117.89.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
: 是哪邊的要改嗎?
: 我這樣的rule,socket只會接收default gateway那一張網卡的資料
: 我開wireshark去看兩支網卡,封包都有進來,
: 但是socket就只能接收到,default gateway那一張網卡的資料
: PS. Ubuntu 12.04 和 Ubuntu 10.04 差別
: 10.04 default GW rule會是最後一個
: 我記得routing table排序會跟優先權有關係
: Ubuntu 10.04
: Kernel IP routing table
: Destination Gateway Genmask Flags Metric Ref Use Iface
: 192.168.1.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0
: 10.0.3.0 0.0.0.0 255.255.255.0 U 1 0 0 eth1
: 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
: 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
: 謝謝
--
Tags:
Linux
All Comments

By Kumar
at 2015-09-30T20:42
at 2015-09-30T20:42

By Victoria
at 2015-10-02T23:09
at 2015-10-02T23:09

By Blanche
at 2015-10-07T21:33
at 2015-10-07T21:33

By Bethany
at 2015-10-09T23:08
at 2015-10-09T23:08
Related Posts
雙網卡(wlan0 ,eth0)同時sock收資料

By Harry
at 2015-09-24T23:44
at 2015-09-24T23:44
好用的效能分析工具?

By Doris
at 2015-09-24T17:40
at 2015-09-24T17:40
CentOS 5.8安裝不進USB內

By Ida
at 2015-09-23T19:47
at 2015-09-23T19:47
fedora 22找不到syscall_table 求解

By Dinah
at 2015-09-23T18:18
at 2015-09-23T18:18
有關m3u8的支援度

By Todd Johnson
at 2015-09-23T17:52
at 2015-09-23T17:52