로컬에서 접속하면 putty로 접속을 하면 10.0 이 뜨는데
혹시나 해서 ssh에서 동일하게 설정을 하면 서버측의 X로 출력을 보낼수 있다.
$ export DISPLAY=:0.0
localhost:0.0 으로 하면 안되고, :0.0 으로 해야만 되서 왜 그러나 해서 찾아봤는데
가장 효율적인 접속을 할 수 있는 경로로 접속한다고 한다.
추가내용을 보니, hostname을 비워두면 local로 접속하는데 TCP 소켓이 아닌 로컬 소켓등으로 접속을 하는 것으로 보인다.
Display Names
From the user's perspective, every X server has a display name of the form:
hostname:displaynumber.screennumber
This information is used by the application to determine how it should connect to the server and which screen it should use by default (on displays with multiple monitors):
hostname
The hostname specifies the name of the machine to which the display is physically connected. If the hostname is not given, the most efficient way of communicating to a server on the same machine will be used.
X servers listen for connections on a variety of different communications channels (network byte streams, shared memory, etc.). Since there can be more than one way of contacting a given server, The hostname part of the display name is used to determine the type of channel (also called a transport layer) to be used. X servers generally support the following types of connections: local
The hostname part of the display name should be the empty string. For example: :0, :1, and :0.1. The most efficient local transport will be chosen.
TCP/IP
The hostname part of the display name should be the server machine's IP address name. Full Internet names, abbreviated names, and IP addresses are all allowed. For example: x.org:0, expo:0, 198.112.45.11:0, bigmachine:1, and hydra:0.1.
This is the default table (if no -t option is passed). It contains the built-in chains INPUT (for packets destined to local sockets), FORWARD (for packets being routed through the box), and OUTPUT (for locally-generated packets).
nat:
This table is consulted when a packet that creates a new connection is encountered. It consists of three built-ins: PREROUTING (for altering packets as soon as they come in), OUTPUT (for altering locally-generated packets before routing), and POSTROUTING (for altering packets as they are about to go out).
mangle:
This table is used for specialized packet alteration. Until kernel 2.4.17 it had two built-in chains: PREROUTING (for altering incoming packets before routing) and OUTPUT(for altering locally-generated packets before routing). Since kernel 2.4.18, three other built-in chains are also supported: INPUT (for packets coming into the box itself),FORWARD (for altering packets being routed through the box), and POSTROUTING (for altering packets as they are about to go out).
raw:
This table is used mainly for configuring exemptions from connection tracking in combination with the NOTRACK target. It registers at the netfilter hooks with higher priority and is thus called before ip_conntrack, or any other IP tables. It provides the following built-in chains: PREROUTING (for packets arriving via any network interface)OUTPUT (for packets generated by local processes)
집에서 사용하는 케이블 모뎀과 핸드폰의 테터링을 이용해서 동시에 해볼려고 했는데 영 안되네 -_-
공유기를 쓰므로 eth0(유선)은 192.168.0.1
테터링은 eth1(무선) 192.168.1.1 로 연결되는데
$ sudo ip route add default scope global nexthop via 192.168.0.1 dev eth0 weight 1 nexthop via 192.168.1.1 dev eth1 weight 1 RTNETLINK answers: File exists
이런 에러를 뱉는다. -_-
Did you try to remove the old default gw?
ip route del default ...
And add your multipath route with several nexthops sfter that.
---
2012.1.21
혹시나 해서 /etc/iproute2/rt_tables 에 추가하고 나서
해당 테이블 별로 default 설정을 해주고 나서 테이블 별로 룰을 추가해주니
connection timed out도 안뜨고 잘되는데
# ip route add default via 192.168.0.1 dev eth0 table CABLE
# ip rule add from 192.168.0.1/24 table CABLE
# ip route add default via 192.168.1.1 dev eth1 table CELLPHONE
# ip rule add from 192.168.1.1/24 table CELLPHONE
아직까지는 확인은 해봐야겠지만, Round-Robin처럼 작동하는 기분?
$ dstat -n -N eth0,eth1,total
명령을 해 놓고 나오는 결과를 보고 있노라면
두개를 동시에 하는 경우는 거의 없고, 한다고 해도 몰빵을 해주는 경향을 보인다.
단지, 어려개 탭을 띄워놓거나, 다운로드는 동시에 여러개 하지 않는 이상에는 대역폭이 합쳐지지 않고
단순하게 multiple gateway를 순차적으로 쓰는 것으로 보인다.